mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
*Disable charmed/possessed creature AI.
*Use general react states to replace charminfo react states. --HG-- branch : trunk
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user