ond
Veteran OT User
There are three main issues still without fix:
- Monsters cast beams and waves through wall
- Support/Attack spells not sharing exhaust
- Items with Atk 0 incorrect description
1. Not a bug since the wall doesn't have "blockprojectile" attribute
2. I'm using exhaust tag in spells.xml, seems to work fine for me.
3.
Code:
else if (it.weaponType != WEAPON_AMMO && it.weaponType != WEAPON_WAND) { // Arrows and Bolts doesn't show atk
s << " (";
if (it.attack != 0) {
s << "Atk:" << (int)it.attack;
}
if (it.defense != 0 || it.extraDef != 0) {
if (it.attack != 0)
s << " ";
s << "Def:" << (int)it.defense;
}
if (it.abilities.stats[STAT_MAGICPOINTS] != 0) {
if (it.attack != 0 || it.defense != 0 || it.extraDef != 0)
s << ", ";
s << "magic level " << std::showpos << (int)it.abilities.stats[STAT_MAGICPOINTS] << std::noshowpos;
}
s << ")";
}
to
Code:
else if (it.weaponType != WEAPON_AMMO && it.weaponType != WEAPON_WAND && it.attack != 0) { // Arrows and Bolts doesn't show atk
s << " (Atk:" << (int)it.attack;
if (it.defense != 0 || it.extraDef != 0) {
if (it.attack != 0)
s << " ";
s << "Def:" << (int)it.defense;
}
if (it.abilities.stats[STAT_MAGICPOINTS] != 0) {
if (it.attack != 0 || it.defense != 0 || it.extraDef != 0)
s << ", ";
s << "magic level " << std::showpos << (int)it.abilities.stats[STAT_MAGICPOINTS] << std::noshowpos;
}
s << ")";
}
Also regarding destroy field, why in the hell aren't you just checking for items in an array if the field should be removable or not?
Destroy field:
Code:
local function doRemoveField(cid, pos)
local TrueFields = {1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1500,1501,1502,1503,1504}
pos.stackpos = 254
local field = getThingfromPos(pos)
local playerPos = getPlayerPosition(cid)
if(field.uid > 0 and isInArray(TrueFields, field.itemid)) then
doRemoveItem(field.uid)
doSendMagicEffect(pos, CONST_ME_POFF)
return LUA_NO_ERROR
end
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
doSendMagicEffect(playerPos, CONST_ME_POFF)
return LUA_ERROR
end
function onCastSpell(cid, var)
local pos = variantToPosition(var)
if(pos.x ~= 0 and pos.y ~= 0 and pos.z ~= 0) then
return doRemoveField(cid, pos)
end
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return LUA_ERROR
end