[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:
megamage
2009-04-14 19:54:49 -05:00
parent 4f4c6aeaf5
commit 3a65800218
15 changed files with 289 additions and 294 deletions
+1 -2
View File
@@ -29,7 +29,7 @@ class TRINITY_DLL_DECL ReactorAI : public CreatureAI
{
public:
ReactorAI(Creature *c) : CreatureAI(c), i_creature(*c), i_victimGuid(0) {}
explicit ReactorAI(Creature *c) : CreatureAI(c), i_victimGuid(0) {}
void MoveInLineOfSight(Unit *);
void EnterEvadeMode();
@@ -39,7 +39,6 @@ class TRINITY_DLL_DECL ReactorAI : public CreatureAI
static int Permissible(const Creature *);
private:
Creature &i_creature;
uint64 i_victimGuid;
};
#endif