aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetAI.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-05 18:48:56 -0600
committermegamage <none@none>2009-03-05 18:48:56 -0600
commit8787c00ca3eda49410cf9ecf2df53c2061628afd (patch)
treea82d8ac7ddbb9f678e30260d68137fd3d7818255 /src/game/PetAI.cpp
parent769c835f266c6e94e878d6e2db0118df1fa7b450 (diff)
*Disable charmed/possessed creature AI.
*Use general react states to replace charminfo react states. --HG-- branch : trunk
Diffstat (limited to 'src/game/PetAI.cpp')
-rw-r--r--src/game/PetAI.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index f841d83fdb0..cf639f84db5 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -47,7 +47,6 @@ PetAI::PetAI(Creature *c) : CreatureAI(c), i_pet(*c), i_tracker(TIME_INTERVAL_LO
void PetAI::MoveInLineOfSight(Unit *u)
{
if( !i_pet.getVictim() && i_pet.GetCharmInfo() &&
- i_pet.GetCharmInfo()->HasReactState(REACT_AGGRESSIVE) &&
i_pet.IsHostileTo( u ) && i_pet.canAttack(u) &&
u->isInAccessiblePlaceFor(&i_pet))
{
@@ -181,7 +180,7 @@ void PetAI::UpdateAI(const uint32 diff)
}
else if(owner && i_pet.GetCharmInfo())
{
- if(owner->isInCombat() && !(i_pet.GetCharmInfo()->HasReactState(REACT_PASSIVE) || i_pet.GetCharmInfo()->HasCommandState(COMMAND_STAY)))
+ if(owner->isInCombat() && !(i_pet.HasReactState(REACT_PASSIVE) || i_pet.GetCharmInfo()->HasCommandState(COMMAND_STAY)))
{
AttackStart(owner->getAttackerForHelper());
}