From 972e2604ce0cc4d02fe690faf126a9b6de71bd92 Mon Sep 17 00:00:00 2001 From: bash <31279994+hermensbas@users.noreply.github.com> Date: Mon, 29 Sep 2025 00:14:28 +0200 Subject: [PATCH] Update NonCombatActions.cpp This is better, even though aura check is tiny more expensive then most. Placing them into isUseful() is kinda confusing. --- src/strategy/actions/NonCombatActions.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/strategy/actions/NonCombatActions.cpp b/src/strategy/actions/NonCombatActions.cpp index 25c1fc47..60628bc7 100644 --- a/src/strategy/actions/NonCombatActions.cpp +++ b/src/strategy/actions/NonCombatActions.cpp @@ -51,15 +51,15 @@ bool DrinkAction::isUseful() { return UseItemAction::isUseful() && AI_VALUE2(bool, "has mana", "self target") && - AI_VALUE2(uint8, "mana", "self target") < 100 && - !botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", - "aquatic form","flight form", "swift flight form", nullptr) && + AI_VALUE2(uint8, "mana", "self target") < 100; } bool DrinkAction::isPossible() { return !bot->IsInCombat() && !bot->IsMounted() && + !botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", + "aquatic form","flight form", "swift flight form", nullptr) && (botAI->HasCheat(BotCheatMask::food) || UseItemAction::isPossible()); } @@ -105,14 +105,14 @@ bool EatAction::Execute(Event event) bool EatAction::isUseful() { return UseItemAction::isUseful() && - AI_VALUE2(uint8, "health", "self target") < 100 && - !botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", - "aquatic form","flight form", "swift flight form", nullptr) && + AI_VALUE2(uint8, "health", "self target") < 100; } bool EatAction::isPossible() { return !bot->IsInCombat() && !bot->IsMounted() && + !botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", + "aquatic form","flight form", "swift flight form", nullptr) && (botAI->HasCheat(BotCheatMask::food) || UseItemAction::isPossible()); }