From 89a8ebd53a4af09f6ae5cf5dd66d942bb227a24a Mon Sep 17 00:00:00 2001 From: Anubisss Date: Thu, 23 Jul 2009 22:51:56 +0200 Subject: *Call Reset() only if the npc is alive. *I hope this fix some issues in instances. Eg.: GetData() give the correct value. *Thanks to megamage for the help. --HG-- branch : trunk --- src/game/UnitAI.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/UnitAI.h b/src/game/UnitAI.h index 9530405ed4d..3e6ce4f4a6f 100644 --- a/src/game/UnitAI.h +++ b/src/game/UnitAI.h @@ -23,6 +23,7 @@ #include "Platform/Define.h" #include +#include "Unit.h" class Unit; class Player; @@ -47,7 +48,7 @@ class TRINITY_DLL_SPEC UnitAI virtual void AttackStart(Unit *); virtual void UpdateAI(const uint32 diff) = 0; - virtual void InitializeAI() { Reset(); } + virtual void InitializeAI() { if(!me->isDead()) Reset(); } virtual void Reset() {}; -- cgit v1.2.3