aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnubisss <none@none>2009-07-23 22:51:56 +0200
committerAnubisss <none@none>2009-07-23 22:51:56 +0200
commit89a8ebd53a4af09f6ae5cf5dd66d942bb227a24a (patch)
treebe52ed1ea1547347f6b2fb8603c467b63fd5c171 /src
parent8b256915414ca3d6c0d74ad36fd2cfef6909cfbf (diff)
*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
Diffstat (limited to 'src')
-rw-r--r--src/game/UnitAI.h3
1 files changed, 2 insertions, 1 deletions
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 <list>
+#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() {};