mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 10:20:27 +00:00
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user