aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/Creature.cpp2
-rw-r--r--src/game/CreatureAI.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 8e1be5145c4..0681dcddd04 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -620,7 +620,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
i_motionMaster.Initialize();
i_AI = ai ? ai : FactorySelector::selectAI(this);
IsAIEnabled = true;
- i_AI->Reset();
+ i_AI->InitializeAI();
return true;
}
diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h
index 275ecbeb3b4..b7a584fd36e 100644
--- a/src/game/CreatureAI.h
+++ b/src/game/CreatureAI.h
@@ -79,7 +79,8 @@ class TRINITY_DLL_SPEC UnitAI
virtual void AttackStart(Unit *);
virtual void UpdateAI(const uint32 diff) = 0;
- // Initialize
+ virtual void InitializeAI() { Reset(); }
+
virtual void Reset() {};
// Called when unit is charmed