mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-31 01:13:48 +00:00
Stay strategy improvement (#1072)
* - Stay Strategy work in combat and with RTSC * - Fixed summon with stay strategy * - Added new stay strategy support for chat commands
This commit is contained in:
@@ -7,6 +7,13 @@
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
void StayStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"return to stay position",
|
||||
NextAction::array(0, new NextAction("return to stay position", ACTION_MOVE), nullptr)));
|
||||
}
|
||||
|
||||
NextAction** StayStrategy::getDefaultActions() { return NextAction::array(0, new NextAction("stay", 1.0f), nullptr); }
|
||||
|
||||
void SitStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class StayStrategy : public NonCombatStrategy
|
||||
class StayStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
StayStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
StayStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "stay"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
NextAction** getDefaultActions() override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user