diff --git a/src/game/PlayerBots/PartyBotAI.cpp b/src/game/PlayerBots/PartyBotAI.cpp index 306244a60ca..18d5b831763 100644 --- a/src/game/PlayerBots/PartyBotAI.cpp +++ b/src/game/PlayerBots/PartyBotAI.cpp @@ -960,6 +960,27 @@ void PartyBotAI::UpdateInCombatAI() return; } + Unit* pVictim = me->GetVictim(); + + // Swap to marked target or party leader's target + if (GetRole() != ROLE_HEALER) + { + if (Player* pLeader = GetPartyLeader()) + { + Unit* newVictim = SelectAttackTarget(pLeader); + + if (newVictim && (newVictim != pVictim)) + { + if (pVictim) + me->AttackStop(); + else + AttackStart(newVictim); + + return; + } + } + } + switch (me->GetClass()) { case CLASS_PALADIN: