diff options
author | Blaymoira <none@none> | 2009-03-06 20:14:07 +0100 |
---|---|---|
committer | Blaymoira <none@none> | 2009-03-06 20:14:07 +0100 |
commit | b49732c04db0d5bf67bf78e73e9c22f2078fd47c (patch) | |
tree | e445fa32d805789d966505ffac97535152e852f6 /src/game/CreatureAI.h | |
parent | ba05670747d7f5cc91ce4e623f2b89ba60e8081e (diff) | |
parent | 0b9d3f95de06da9e23bdd075a286679395dab49c (diff) |
*Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAI.h')
-rw-r--r-- | src/game/CreatureAI.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h index a259475b543..fbfb8605866 100644 --- a/src/game/CreatureAI.h +++ b/src/game/CreatureAI.h @@ -78,6 +78,9 @@ class TRINITY_DLL_SPEC UnitAI UnitAI(Unit *u) : me(u) {} virtual void AttackStart(Unit *); virtual void UpdateAI(const uint32 diff) = 0; + + // Called when unit is charmed + virtual void OnCharmed(bool apply) = 0; }; class TRINITY_DLL_SPEC PlayerAI : public UnitAI @@ -86,6 +89,8 @@ class TRINITY_DLL_SPEC PlayerAI : public UnitAI Player *me; public: PlayerAI(Player *p) : UnitAI((Unit*)p), me(p) {} + + void OnCharmed(bool apply); }; class TRINITY_DLL_SPEC SimpleCharmedAI : public PlayerAI @@ -140,8 +145,7 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI // Called at waypoint reached or point movement finished virtual void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/) {} - // Called when AI is temporarily replaced or put back when possess is applied or removed - virtual void OnPossess(bool apply) {} + void OnCharmed(bool apply); }; struct SelectableAI : public FactoryHolder<CreatureAI>, public Permissible<Creature> |