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:
kadeshar
2025-03-20 10:53:16 +01:00
committed by GitHub
parent f039e88393
commit 3d6d454337
19 changed files with 244 additions and 44 deletions

View File

@@ -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)

View File

@@ -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;
};