Fix pet stopping approach when attacked by another creature
Fix pet placed on stay after "attack" not attacking new attackers Closes #8735
This commit is contained in:
1 parent
63ea4b1056
commit
4c9451d54c
3 files changed
+22
-5
No files matched your search
@@ -12136,7 +12136,10 @@ void Unit::CombatStart(Unit* target, bool initialAggro)
|
||||
if (!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
|
||||
&& !target->ToCreature()->HasReactState(REACT_PASSIVE) && target->ToCreature()->IsAIEnabled)
|
||||
{
|
||||
target->ToCreature()->AI()->AttackStart(this);
|
||||
if (target->isPet())
|
||||
target->ToCreature()->AI()->AttackedBy(this); // PetAI has special handler before AttackStart()
|
||||
else
|
||||
target->ToCreature()->AI()->AttackStart(this);
|
||||
}
|
||||
|
||||
SetInCombatWith(target);
|
||||
|
||||
Reference in new issue
Block a user