mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-05 11:53:49 +00:00
[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)
This commit is contained in:
94
src/Ai/Base/Strategy/CombatStrategy.cpp
Normal file
94
src/Ai/Base/Strategy/CombatStrategy.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
void CombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enemy out of spell",
|
||||
{
|
||||
NextAction("reach spell", ACTION_HIGH)
|
||||
}
|
||||
)
|
||||
);
|
||||
// drop target relevance 99 (lower than Worldpacket triggers)
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"invalid target",
|
||||
{
|
||||
NextAction("drop target", 99)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"mounted",
|
||||
{
|
||||
NextAction("check mount state", 54)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"combat stuck",
|
||||
{
|
||||
NextAction("reset", 1.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"not facing target",
|
||||
{
|
||||
NextAction("set facing", ACTION_MOVE + 7)
|
||||
}
|
||||
)
|
||||
);
|
||||
// The pet-attack trigger is commented out because it was forcing the bot's pet to attack, overriding stay and follow commands.
|
||||
// Pets will automatically attack the bot's enemy if they are in "defensive" or "aggressive"
|
||||
// stance, or if the master issues an attack command.
|
||||
}
|
||||
|
||||
AvoidAoeStrategy::AvoidAoeStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::vector<NextAction> AvoidAoeStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("avoid aoe", ACTION_EMERGENCY)
|
||||
};
|
||||
}
|
||||
|
||||
void AvoidAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
}
|
||||
|
||||
void AvoidAoeStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)
|
||||
{
|
||||
}
|
||||
|
||||
TankFaceStrategy::TankFaceStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::vector<NextAction> TankFaceStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("tank face", ACTION_MOVE)
|
||||
};
|
||||
}
|
||||
|
||||
void TankFaceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<NextAction> CombatFormationStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("combat formation move", ACTION_NORMAL)
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user