mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
*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
This commit is contained in:
@@ -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() {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user