diff options
author | megamage <none@none> | 2009-04-14 19:54:49 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-14 19:54:49 -0500 |
commit | 3a658002180e30de4e7037a14e2b4fc0788b5d40 (patch) | |
tree | f62abe1bfc8ec2fbf5fff81c5eb73c6cb1e99a04 /src/game/TotemAI.h | |
parent | 4f4c6aeaf533419a7933e8ff0ee6f09d976a04b7 (diff) |
[7667] Add to CreatureAI field pointing to creature itself. Use it instead diff. fields in subclases. Author: VladimirMangos
Also send pointer to AI constructors ans mark constructors as explicit.
This changes allow move now some generic often used AI code to CreatureAI helper functions.
--HG--
branch : trunk
Diffstat (limited to 'src/game/TotemAI.h')
-rw-r--r-- | src/game/TotemAI.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/TotemAI.h b/src/game/TotemAI.h index 9a19d2c99e5..0b8d0790703 100644 --- a/src/game/TotemAI.h +++ b/src/game/TotemAI.h @@ -31,7 +31,7 @@ class TRINITY_DLL_DECL TotemAI : public CreatureAI { public: - TotemAI(Creature *c); + explicit TotemAI(Creature *c); void MoveInLineOfSight(Unit *); void AttackStart(Unit *); @@ -40,9 +40,10 @@ class TRINITY_DLL_DECL TotemAI : public CreatureAI void UpdateAI(const uint32); static int Permissible(const Creature *); + protected: + Totem& getTotem(); private: - Totem &i_totem; uint64 i_victimGuid; }; #endif |