diff options
author | megamage <none@none> | 2009-08-10 15:50:19 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-10 15:50:19 -0500 |
commit | 7982a75c5c759efc1f4a85853524074bf579638b (patch) | |
tree | fc58c48aa676491901552dc7795c84aac2b8a524 | |
parent | feba13e6504bc8c1523b1101d3131d3afb219577 (diff) |
*Set react passive for passiveAI creatures.
--HG--
branch : trunk
-rw-r--r-- | src/game/NullCreatureAI.cpp | 5 | ||||
-rw-r--r-- | src/game/NullCreatureAI.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/game/NullCreatureAI.cpp b/src/game/NullCreatureAI.cpp index 5547ad8f059..a92e7125eaf 100644 --- a/src/game/NullCreatureAI.cpp +++ b/src/game/NullCreatureAI.cpp @@ -22,6 +22,11 @@ #include "Creature.h" #include "TemporarySummon.h" +PassiveAI::PassiveAI(Creature *c) : CreatureAI(c) +{ + me->SetReactState(REACT_PASSIVE); +} + void PassiveAI::UpdateAI(const uint32) { if(me->isInCombat() && me->getAttackers().empty()) diff --git a/src/game/NullCreatureAI.h b/src/game/NullCreatureAI.h index 84031f179b0..7357af627b1 100644 --- a/src/game/NullCreatureAI.h +++ b/src/game/NullCreatureAI.h @@ -24,10 +24,10 @@ #include "CreatureAI.h" #include "CreatureAIImpl.h" -class TRINITY_DLL_DECL PassiveAI : public CreatureAI +class TRINITY_DLL_SPEC PassiveAI : public CreatureAI { public: - explicit PassiveAI(Creature *c) : CreatureAI(c) {} + explicit PassiveAI(Creature *c); void MoveInLineOfSight(Unit *) {} void AttackStart(Unit *) {} |