mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Removing unnecessary variable
This commit is contained in:
parent
ca0dafd67b
commit
f35e39e19c
@ -116,18 +116,11 @@ bool SetTotemAction::isUseful()
|
|||||||
return true; // No totem assigned
|
return true; // No totem assigned
|
||||||
|
|
||||||
// Find the highest rank the bot knows
|
// Find the highest rank the bot knows
|
||||||
uint32 highestKnown = 0;
|
|
||||||
for (int i = (int)totemSpellIdsCount - 1; i >= 0; --i)
|
for (int i = (int)totemSpellIdsCount - 1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
if (bot->HasSpell(totemSpellIds[i]))
|
if (bot->HasSpell(totemSpellIds[i]))
|
||||||
{
|
return button->GetAction() != totemSpellIds[i];
|
||||||
highestKnown = totemSpellIds[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!highestKnown)
|
// Bot doesn't know any valid rank
|
||||||
return false; // Bot doesn't know any valid rank
|
return false;
|
||||||
|
|
||||||
// Only consider the bar set if the highest rank is assigned
|
|
||||||
return button->GetAction() != highestKnown;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user