Merge pull request #8739 from MrSmite/PetAI_CanAttack_bugfix
Fix a minor PetAI behavioral issue
This commit is contained in:
commit
3f4c6a9d45
1 file changed
+4
-1
@@ -12106,7 +12106,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