[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
This commit is contained in:
@@ -36,7 +36,7 @@ class TRINITY_DLL_DECL AggressorAI : public CreatureAI
|
||||
|
||||
public:
|
||||
|
||||
AggressorAI(Creature *c);
|
||||
explicit AggressorAI(Creature *c);
|
||||
|
||||
void EnterEvadeMode();
|
||||
|
||||
@@ -44,7 +44,6 @@ class TRINITY_DLL_DECL AggressorAI : public CreatureAI
|
||||
static int Permissible(const Creature *);
|
||||
|
||||
private:
|
||||
Creature &i_creature;
|
||||
uint64 i_victimGuid;
|
||||
AggressorState i_state;
|
||||
TimeTracker i_tracker;
|
||||
|
||||
Reference in New Issue
Block a user