diff --git a/src/game/PlayerBots/PartyBotAI.cpp b/src/game/PlayerBots/PartyBotAI.cpp index c6b95734d85..5a817e9e320 100644 --- a/src/game/PlayerBots/PartyBotAI.cpp +++ b/src/game/PlayerBots/PartyBotAI.cpp @@ -1563,15 +1563,19 @@ void PartyBotAI::UpdateOutOfCombatAI_Mage() { if (m_spells.mage.pArcaneBrilliance) { - if (CanTryToCastSpell(me, m_spells.mage.pArcaneBrilliance)) + if (Player* pTarget = SelectBuffTarget(m_spells.mage.pArcaneBrilliance)) { - if (DoCastSpell(me, m_spells.mage.pArcaneBrilliance) == SPELL_CAST_OK) + if (CanTryToCastSpell(pTarget, m_spells.mage.pArcaneBrilliance)) { - m_isBuffing = true; - me->ClearTarget(); - return; + if (DoCastSpell(pTarget, m_spells.mage.pArcaneBrilliance) == SPELL_CAST_OK) + { + m_isBuffing = true; + me->ClearTarget(); + return; + } } } + } else if (m_spells.mage.pArcaneIntellect) {