From 8a264d0b13c2249a2e2322ad5d21d3136515ed58 Mon Sep 17 00:00:00 2001 From: trickerer Date: Thu, 14 Mar 2024 14:50:13 +0700 Subject: [PATCH] NPCBots: Allow secondary, non-tanking Warrior bots to use Sunder Armor --- src/server/game/AI/NpcBots/bot_warrior_ai.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/game/AI/NpcBots/bot_warrior_ai.cpp b/src/server/game/AI/NpcBots/bot_warrior_ai.cpp index 3d3b881e06519..d83a2ccdb5cc1 100644 --- a/src/server/game/AI/NpcBots/bot_warrior_ai.cpp +++ b/src/server/game/AI/NpcBots/bot_warrior_ai.cpp @@ -815,8 +815,10 @@ class warrior_bot : public CreatureScript return; } //SUNDER ARMOR - if (IsSpellReady(SUNDER_ARMOR_1, diff) && can_do_normal && IsTank() && Rand() < 55 && mytar->GetHealth() > me->GetMaxHealth() && - dist < 5 && (!HasRole(BOT_ROLE_DPS) || !GetSpell(DEVASTATE_1)) && rage >= rcost(SUNDER_ARMOR_1)) + if (IsSpellReady(SUNDER_ARMOR_1, diff) && can_do_normal && dist < 5 && Rand() < 45 && + (IsTank() ? (mytar->GetHealth() > me->GetMaxHealth()) : (Rand() < 25 && mytar->GetHealth() > me->GetMaxHealth() * 2)) && + (!HasRole(BOT_ROLE_DPS) || !CanBlock() || !GetSpell(DEVASTATE_1)) && + (IsTank() || master->GetBotMgr()->HasBotWithSpec(BOT_SPEC_WARRIOR_PROTECTION, false)) && rage >= rcost(SUNDER_ARMOR_1)) { AuraEffect const* sunder = mytar->GetAuraEffect(SUNDER_ARMOR_DEBUFF, 0); if ((!sunder || sunder->GetBase()->GetStackAmount() < 5 || sunder->GetBase()->GetDuration() < 20000) &&