From 144c797dba7dc4af9399151466d99aa711b67dc2 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 20 Jan 2022 07:51:36 +0100 Subject: [PATCH] fix(Core/PetAI): Combat spells should be casted when pet starts attack. (#9845) Fixes #2140 --- src/server/game/AI/CoreAI/PetAI.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 8f9d496fb..58f3e59af 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -252,8 +252,10 @@ void PetAI::UpdateAI(uint32 diff) if (spellInfo->CanBeUsedInCombat()) { // Check if we're in combat or commanded to attack (exlude auras with infinity duration) - if (!me->IsInCombat() && !me->GetCharmInfo()->IsCommandAttack() && spellInfo->GetMaxDuration() != -1) + if (!me->IsInCombat() && spellInfo->GetMaxDuration() != -1 && !me->IsPetInCombat()) + { continue; + } } Spell* spell = new Spell(me, spellInfo, TRIGGERED_NONE);