[Spell cast] Fix channeled spell cast (mind control)

This commit is contained in:
Yunfan Li
2024-09-26 20:31:58 +08:00
parent 5b8d8fbf6e
commit 7f05d3f6bf

View File

@@ -314,6 +314,8 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
AllowActivity();
Spell* currentSpell = bot->GetCurrentSpell(CURRENT_GENERIC_SPELL);
if (!currentSpell)
currentSpell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
if (currentSpell && currentSpell->getState() == SPELL_STATE_PREPARING)
{
if (currentSpell->m_targets.GetUnitTarget() && !currentSpell->m_targets.GetUnitTarget()->IsAlive() &&