Core/PetAI: Make pets respect being in passive mode (fixes a few "stuck in front of target"-issues with pets on certain occations)
- setting pet into passive mode before reaching its target (after an attack-command) will break attack (return "home" to follow/stay position) - setting pet into passive mode and fully attacking target will make it return home properly --HG-- branch : trunk
This commit is contained in:
@@ -96,7 +96,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||||||
{
|
{
|
||||||
if (_needToStop())
|
if (_needToStop())
|
||||||
{
|
{
|
||||||
sLog.outStaticDebug("Pet AI stoped attacking [guid=%u]", me->GetGUIDLow());
|
sLog.outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
|
||||||
_stopAttack();
|
_stopAttack();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -109,6 +109,8 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||||||
|
|
||||||
if (nextTarget)
|
if (nextTarget)
|
||||||
AttackStart(nextTarget);
|
AttackStart(nextTarget);
|
||||||
|
if (me->HasReactState(REACT_PASSIVE))
|
||||||
|
_stopAttack();
|
||||||
else
|
else
|
||||||
HandleReturnMovement();
|
HandleReturnMovement();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user