From e13aa7d2f633a818da3a7b6664af6caf1ab1d08b Mon Sep 17 00:00:00 2001 From: kadeshar Date: Sat, 11 Apr 2026 07:15:57 +0200 Subject: [PATCH] IsTank fix for Death Knight (#2296) ## Pull Request Description Death Knights with Frost Presents are recognized by bots as tank Related with: #2290 ## How to Test the Changes 1. Create Death Knight and apply Frost Presence 2. Invite Restoration Druid bot to party 3. Bot should apply "Thorns" on you ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - - [x] No, not at all - - [ ] Minimal impact (**explain below**) - - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - - [ ] No - - [x] Yes (**explain why**) Bots now identify Death Knight with Frost Presence as tank - Does this change add new decision branches or increase maintenance complexity? - - [x] No - - [ ] Yes (**explain below**) ## AI Assistance Was AI assistance used while working on this change? - - [x] No - - [ ] Yes (**explain below**) ## Final Checklist - - [x] Stability is not compromised. - - [x] Performance impact is understood, tested, and acceptable. - - [x] Added logic complexity is justified and explained. - - [x] Any new bot dialogue lines are translated. - - [x] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers Example of non Blood Death Knight tank build https://forum.warmane.com/showthread.php?325582 --- src/Bot/PlayerbotAI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bot/PlayerbotAI.cpp b/src/Bot/PlayerbotAI.cpp index 1a74b8b2f..e9de581de 100644 --- a/src/Bot/PlayerbotAI.cpp +++ b/src/Bot/PlayerbotAI.cpp @@ -54,6 +54,7 @@ #include "Unit.h" #include "UpdateTime.h" #include "Vehicle.h" +#include "../../../../src/server/scripts/Spells/spell_dk.cpp" const int SPELL_TITAN_GRIP = 49152; @@ -2163,7 +2164,7 @@ bool PlayerbotAI::IsTank(Player* player, bool bySpec) switch (player->getClass()) { case CLASS_DEATH_KNIGHT: - if (tab == DEATH_KNIGHT_TAB_BLOOD) + if (tab == DEATH_KNIGHT_TAB_BLOOD || player->HasAura(SPELL_DK_FROST_PRESENCE)) { return true; }