Fix so NPC don't ghost when casting spells from scripts while moving.

This commit is contained in:
KayenEQ 2014-10-20 01:16:08 -04:00
parent bb91265b2b
commit 193f7b0fe3

View File

@ -307,6 +307,10 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
sprintf(temp, "%d", spell_id);
parse->EventNPC(EVENT_CAST_BEGIN, CastToNPC(), nullptr, temp, 0);
}
//To prevent NPC ghosting when spells are cast from scripts
if (IsNPC() && IsMoving() && cast_time > 0)
SendPosition();
if(resist_adjust)
{