- Changed standalone config on cheat (#1585)

- Changed drink condition
This commit is contained in:
kadeshar
2025-08-26 18:28:42 +02:00
committed by GitHub
parent 704e02e9cc
commit bc737ecc68
8 changed files with 23 additions and 24 deletions

View File

@@ -11,13 +11,14 @@
void UseFoodStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
Strategy::InitTriggers(triggers);
if (sPlayerbotAIConfig->freeFood)
if (botAI->HasCheat(BotCheatMask::food))
{
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("food", 3.0f), nullptr)));
else
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("food", 3.0f), nullptr)));
if (sPlayerbotAIConfig->freeFood)
triggers.push_back(new TriggerNode("high mana", NextAction::array(0, new NextAction("drink", 3.0f), nullptr)));
}
else
{
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("food", 3.0f), nullptr)));
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("drink", 3.0f), nullptr)));
}
}