*Fix critter AI.

*Some AI structure change.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-28 20:16:11 -06:00
parent 3a229014dc
commit 30c5bff102
21 changed files with 97 additions and 53 deletions
+23 -7
View File
@@ -23,22 +23,38 @@
#include "CreatureAI.h"
class TRINITY_DLL_DECL NullCreatureAI : public CreatureAI
class TRINITY_DLL_DECL PassiveAI : public CreatureAI
{
public:
NullCreatureAI(Creature &) {}
NullCreatureAI() {}
~NullCreatureAI();
PassiveAI(Creature *c) : CreatureAI(c) {}
~PassiveAI() {}
void MoveInLineOfSight(Unit *) {}
void AttackStart(Unit *) {}
void EnterEvadeMode() {}
bool IsVisible(Unit *) const { return false; }
void UpdateAI(const uint32) {}
static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
};
class TRINITY_DLL_DECL NullCreatureAI : public PassiveAI
{
public:
NullCreatureAI(Creature *c) : PassiveAI(c) {}
~NullCreatureAI();
void EnterEvadeMode() {}
};
class TRINITY_DLL_DECL CritterAI : public PassiveAI
{
public:
CritterAI(Creature *c) : PassiveAI(c) {}
~CritterAI();
void DamageTaken(Unit *done_by, uint32 & /*damage*/);
void EnterEvadeMode();
};
#endif