Merge branch 'master' into patch-2

This commit is contained in:
bash
2025-09-27 22:40:39 +02:00
committed by GitHub
2 changed files with 11 additions and 8 deletions

View File

@@ -17,10 +17,6 @@ bool DrinkAction::Execute(Event event)
if (bot->IsMounted())
return false;
bool hasMana = AI_VALUE2(bool, "has mana", "self target");
if (!hasMana)
return false;
if (botAI->HasCheat(BotCheatMask::food))
{
// if (bot->IsNonMeleeSpellCast(true))
@@ -58,7 +54,14 @@ bool DrinkAction::Execute(Event event)
return UseItemAction::Execute(event);
}
bool DrinkAction::isUseful() { return UseItemAction::isUseful() && AI_VALUE2(uint8, "mana", "self target") < 100; }
bool DrinkAction::isUseful()
{
// check class uses mana
if (!AI_VALUE2(bool, "has mana", "self target"))
return false;
return UseItemAction::isUseful() && AI_VALUE2(uint8, "mana", "self target") < 100;
}
bool DrinkAction::isPossible()
{