From f35e39e19c075cd998902d7d928e561814cfe722 Mon Sep 17 00:00:00 2001 From: Spargel Date: Mon, 22 Sep 2025 03:00:29 -0500 Subject: [PATCH] Removing unnecessary variable --- src/strategy/shaman/ShamanActions.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/strategy/shaman/ShamanActions.cpp b/src/strategy/shaman/ShamanActions.cpp index 5d5eff81..c1cacad9 100644 --- a/src/strategy/shaman/ShamanActions.cpp +++ b/src/strategy/shaman/ShamanActions.cpp @@ -116,18 +116,11 @@ bool SetTotemAction::isUseful() return true; // No totem assigned // Find the highest rank the bot knows - uint32 highestKnown = 0; for (int i = (int)totemSpellIdsCount - 1; i >= 0; --i) { if (bot->HasSpell(totemSpellIds[i])) - { - highestKnown = totemSpellIds[i]; - break; - } + return button->GetAction() != totemSpellIds[i]; } - if (!highestKnown) - return false; // Bot doesn't know any valid rank - - // Only consider the bar set if the highest rank is assigned - return button->GetAction() != highestKnown; + // Bot doesn't know any valid rank + return false; }