*Set react passive for passiveAI creatures.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-10 15:50:19 -05:00
parent feba13e650
commit 7982a75c5c
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -22,6 +22,11 @@
#include "Creature.h" #include "Creature.h"
#include "TemporarySummon.h" #include "TemporarySummon.h"
PassiveAI::PassiveAI(Creature *c) : CreatureAI(c)
{
me->SetReactState(REACT_PASSIVE);
}
void PassiveAI::UpdateAI(const uint32) void PassiveAI::UpdateAI(const uint32)
{ {
if(me->isInCombat() && me->getAttackers().empty()) if(me->isInCombat() && me->getAttackers().empty())
+2 -2
View File
@@ -24,10 +24,10 @@
#include "CreatureAI.h" #include "CreatureAI.h"
#include "CreatureAIImpl.h" #include "CreatureAIImpl.h"
class TRINITY_DLL_DECL PassiveAI : public CreatureAI class TRINITY_DLL_SPEC PassiveAI : public CreatureAI
{ {
public: public:
explicit PassiveAI(Creature *c) : CreatureAI(c) {} explicit PassiveAI(Creature *c);
void MoveInLineOfSight(Unit *) {} void MoveInLineOfSight(Unit *) {}
void AttackStart(Unit *) {} void AttackStart(Unit *) {}