mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Drink threshold with freefood
This commit is contained in:
@@ -5,12 +5,19 @@
|
|||||||
|
|
||||||
#include "UseFoodStrategy.h"
|
#include "UseFoodStrategy.h"
|
||||||
|
|
||||||
|
#include "PlayerbotAIConfig.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
|
|
||||||
void UseFoodStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void UseFoodStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
Strategy::InitTriggers(triggers);
|
Strategy::InitTriggers(triggers);
|
||||||
|
if (sPlayerbotAIConfig->freeFood)
|
||||||
|
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)));
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("food", 3.0f), nullptr)));
|
if (sPlayerbotAIConfig->freeFood)
|
||||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("drink", 3.0f), nullptr)));
|
triggers.push_back(new TriggerNode("high mana", NextAction::array(0, new NextAction("drink", 3.0f), nullptr)));
|
||||||
|
else
|
||||||
|
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("drink", 3.0f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user