mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-22 04:56:22 +00:00
added 'move from group' action/strat/shortcut-action
This commit is contained in:
@@ -51,6 +51,8 @@ void ChatCommandHandlerStrategy::InitTriggers(std::vector<TriggerNode*>& trigger
|
||||
new TriggerNode("follow", NextAction::array(0, new NextAction("follow chat shortcut", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("stay", NextAction::array(0, new NextAction("stay chat shortcut", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("move from group", NextAction::array(0, new NextAction("move from group chat shortcut", relevance), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("flee", NextAction::array(0, new NextAction("flee chat shortcut", relevance), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
|
||||
18
src/strategy/generic/MoveFromGroupStrategy.cpp
Normal file
18
src/strategy/generic/MoveFromGroupStrategy.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "MoveFromGroupStrategy.h"
|
||||
#include "PassiveMultiplier.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
NextAction** MoveFromGroupStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("move from group", 1.0f), nullptr);
|
||||
}
|
||||
|
||||
void MoveFromGroupStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)
|
||||
{
|
||||
multipliers.push_back(new PassiveMultiplier(botAI));
|
||||
}
|
||||
23
src/strategy/generic/MoveFromGroupStrategy.h
Normal file
23
src/strategy/generic/MoveFromGroupStrategy.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_MOVEFROMGROUPSTRATEGY_H
|
||||
#define _PLAYERBOT_MOVEFROMGROUPSTRATEGY_H
|
||||
|
||||
#include "Strategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class MoveFromGroupStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
MoveFromGroupStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "move from group"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitMultipliers(std::vector<Multiplier*>& multipliers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user