*Update creature AI functions.
--HG-- branch : trunk
This commit is contained in:
@@ -37,7 +37,7 @@ class TRINITY_DLL_DECL AggressorAI : public CreatureAI
|
||||
|
||||
typedef std::vector<uint32> SpellVct;
|
||||
|
||||
class TRINITY_DLL_DECL SpellAI : public CreatureAI
|
||||
class TRINITY_DLL_SPEC SpellAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit SpellAI(Creature *c) : CreatureAI(c) {}
|
||||
|
||||
@@ -112,6 +112,8 @@ void CreatureAI::EnterEvadeMode()
|
||||
|
||||
if(me->isAlive())
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
inline bool SelectTargetHelper(const Unit * me, const Unit * target, const bool &playerOnly, const float &dist, const int32 &aura)
|
||||
|
||||
@@ -123,7 +123,7 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI
|
||||
//virtual void AttackedBy(Unit* attacker);
|
||||
|
||||
// Called when creature is spawned or respawned (for reseting variables)
|
||||
virtual void JustRespawned() {}
|
||||
virtual void JustRespawned() { Reset(); }
|
||||
|
||||
// Called at waypoint reached or point movement finished
|
||||
virtual void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/) {}
|
||||
|
||||
@@ -28,35 +28,41 @@ class TRINITY_DLL_DECL PassiveAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit PassiveAI(Creature *c) : CreatureAI(c) {}
|
||||
~PassiveAI() {}
|
||||
|
||||
void MoveInLineOfSight(Unit *) {}
|
||||
void AttackStart(Unit *) {}
|
||||
|
||||
void UpdateAI(const uint32);
|
||||
|
||||
static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
|
||||
class TRINITY_DLL_DECL PossessedAI : public PassiveAI
|
||||
class TRINITY_DLL_DECL PossessedAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit PossessedAI(Creature *c) : PassiveAI(c) {}
|
||||
explicit PossessedAI(Creature *c) : CreatureAI(c) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *) {}
|
||||
void AttackStart(Unit *target);
|
||||
void UpdateAI(const uint32);
|
||||
void EnterEvadeMode() {}
|
||||
|
||||
void JustDied(Unit*);
|
||||
void KilledUnit(Unit* victim);
|
||||
|
||||
static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
|
||||
class TRINITY_DLL_DECL NullCreatureAI : public PassiveAI
|
||||
class TRINITY_DLL_DECL NullCreatureAI : public CreatureAI
|
||||
{
|
||||
public:
|
||||
explicit NullCreatureAI(Creature *c) : PassiveAI(c) {}
|
||||
explicit NullCreatureAI(Creature *c) : CreatureAI(c) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *) {}
|
||||
void AttackStart(Unit *) {}
|
||||
void UpdateAI(const uint32) {}
|
||||
void EnterEvadeMode() {}
|
||||
|
||||
static int Permissible(const Creature *) { return PERMIT_BASE_IDLE; }
|
||||
};
|
||||
|
||||
class TRINITY_DLL_DECL CritterAI : public PassiveAI
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "Creature.h"
|
||||
|
||||
class TempSummon : public Creature
|
||||
class TRINITY_DLL_SPEC TempSummon : public Creature
|
||||
{
|
||||
public:
|
||||
explicit TempSummon(SummonPropertiesEntry const *properties, Unit *owner);
|
||||
|
||||
Reference in New Issue
Block a user