Support for spells_new field npc_no_los (simply skips the LOS check for that spell

despite name, no reason to hard code it only for NPC).
This commit is contained in:
KayenEQ
2014-08-01 23:35:35 -04:00
parent cc0f2ac37a
commit 454f2520c3
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1833,7 +1833,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
}
// check line of sight to target if it's a detrimental spell
if(spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target) && !IsHarmonySpell(spell_id) && spells[spell_id].targettype != ST_TargetOptional)
if(!spells[spell_id].npc_no_los && spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target) && !IsHarmonySpell(spell_id) && spells[spell_id].targettype != ST_TargetOptional)
{
mlog(SPELLS__CASTING, "Spell %d: cannot see target %s", spell_target->GetName());
Message_StringID(13,CANT_SEE_TARGET);