From 193f7b0fe3336a44e757c574b2474155de9e68c5 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Mon, 20 Oct 2014 01:16:08 -0400 Subject: [PATCH] Fix so NPC don't ghost when casting spells from scripts while moving. --- zone/spells.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zone/spells.cpp b/zone/spells.cpp index c6fb43b24..8edb7b448 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -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) {