fix(Core/Pets): Stop moving for autocast channels (#27564)

This commit is contained in:
Saqra1
2026-09-12 14:51:19 +02:00
committed by GitHub
parent 553012d86f
commit 74487848ea
+6
View File
@@ -350,6 +350,12 @@ void PetAI::UpdateAI(uint32 diff)
me->AddSpellCooldown(spell->m_spellInfo->Id, 0, 0);
spell->prepare(&targets);
// Stop the current spline before the next movement update can interrupt a stationary channel.
if (Pet* controlledPet = me->ToPet())
if (spell->m_spellInfo->IsChanneled() && !spell->m_spellInfo->IsActionAllowedChannel()
&& controlledPet->IsMovementPreventedByCasting())
controlledPet->StopMoving();
}
// deleted cached Spell objects