mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
default actions
This commit is contained in:
@@ -146,7 +146,8 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal)
|
|||||||
time_t currentTime = time(nullptr);
|
time_t currentTime = time(nullptr);
|
||||||
aiObjectContext->Update();
|
aiObjectContext->Update();
|
||||||
ProcessTriggers(minimal);
|
ProcessTriggers(minimal);
|
||||||
|
PushDefaultActions();
|
||||||
|
|
||||||
uint32 iterations = 0;
|
uint32 iterations = 0;
|
||||||
uint32 iterationsPerTick = queue.Size() * (minimal ? 2 : sPlayerbotAIConfig->iterationsPerTick);
|
uint32 iterationsPerTick = queue.Size() * (minimal ? 2 : sPlayerbotAIConfig->iterationsPerTick);
|
||||||
do
|
do
|
||||||
@@ -265,15 +266,15 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal)
|
|||||||
}
|
}
|
||||||
while (basket && ++iterations <= iterationsPerTick);
|
while (basket && ++iterations <= iterationsPerTick);
|
||||||
|
|
||||||
if (!basket)
|
// if (!basket)
|
||||||
{
|
// {
|
||||||
lastRelevance = 0.0f;
|
// lastRelevance = 0.0f;
|
||||||
PushDefaultActions();
|
// PushDefaultActions();
|
||||||
|
|
||||||
// prevent the delay after pushing default actions
|
// // prevent the delay after pushing default actions
|
||||||
if (queue.Peek() && depth < 1 && !minimal)
|
// if (queue.Peek() && depth < 1 && !minimal)
|
||||||
return DoNextAction(unit, depth + 1, minimal);
|
// return DoNextAction(unit, depth + 1, minimal);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// MEMORY FIX TEST
|
// MEMORY FIX TEST
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ bool MovementAction::MoveToLOS(WorldObject* target, bool ranged)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, bool react)
|
bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle, bool react, bool normal_only)
|
||||||
{
|
{
|
||||||
UpdateMovementState();
|
UpdateMovementState();
|
||||||
if (!IsMovingAllowed(mapId, x, y, z)) {
|
if (!IsMovingAllowed(mapId, x, y, z)) {
|
||||||
@@ -166,7 +166,11 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
|||||||
MotionMaster &mm = *bot->GetMotionMaster();
|
MotionMaster &mm = *bot->GetMotionMaster();
|
||||||
|
|
||||||
mm.Clear();
|
mm.Clear();
|
||||||
mm.MovePoint(mapId, x, y, SearchBestGroundZForPath(x, y, z, generatePath), generatePath);
|
float modifiedZ = SearchBestGroundZForPath(x, y, z, generatePath, normal_only);
|
||||||
|
if (modifiedZ == INVALID_HEIGHT) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
mm.MovePoint(mapId, x, y, modifiedZ, generatePath);
|
||||||
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation());
|
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1257,7 +1261,7 @@ bool MovementAction::MoveAway(Unit* target)
|
|||||||
float dx = bot->GetPositionX() + cos(angle) * sPlayerbotAIConfig->fleeDistance;
|
float dx = bot->GetPositionX() + cos(angle) * sPlayerbotAIConfig->fleeDistance;
|
||||||
float dy = bot->GetPositionY() + sin(angle) * sPlayerbotAIConfig->fleeDistance;
|
float dy = bot->GetPositionY() + sin(angle) * sPlayerbotAIConfig->fleeDistance;
|
||||||
float dz = bot->GetPositionZ();
|
float dz = bot->GetPositionZ();
|
||||||
return MoveTo(target->GetMapId(), dx, dy, dz);
|
return MoveTo(target->GetMapId(), dx, dy, dz, false, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MovementAction::MoveInside(uint32 mapId, float x, float y, float z, float distance)
|
bool MovementAction::MoveInside(uint32 mapId, float x, float y, float z, float distance)
|
||||||
@@ -1268,7 +1272,7 @@ bool MovementAction::MoveInside(uint32 mapId, float x, float y, float z, float d
|
|||||||
return MoveNear(mapId, x, y, z, distance);
|
return MoveNear(mapId, x, y, z, distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
float MovementAction::SearchBestGroundZForPath(float x, float y, float z, bool generatePath, float range)
|
float MovementAction::SearchBestGroundZForPath(float x, float y, float z, bool generatePath, float range, bool normal_only)
|
||||||
{
|
{
|
||||||
if (!generatePath) {
|
if (!generatePath) {
|
||||||
return z;
|
return z;
|
||||||
@@ -1299,6 +1303,9 @@ float MovementAction::SearchBestGroundZForPath(float x, float y, float z, bool g
|
|||||||
return modified_z;
|
return modified_z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (normal_only) {
|
||||||
|
return INVALID_HEIGHT;
|
||||||
|
}
|
||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class MovementAction : public Action
|
|||||||
protected:
|
protected:
|
||||||
bool MoveNear(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->contactDistance);
|
bool MoveNear(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->contactDistance);
|
||||||
bool MoveToLOS(WorldObject* target, bool ranged = false);
|
bool MoveToLOS(WorldObject* target, bool ranged = false);
|
||||||
bool MoveTo(uint32 mapId, float x, float y, float z, bool idle = false, bool react = false);
|
bool MoveTo(uint32 mapId, float x, float y, float z, bool idle = false, bool react = false, bool normal_only = false);
|
||||||
bool MoveTo(Unit* target, float distance = 0.0f);
|
bool MoveTo(Unit* target, float distance = 0.0f);
|
||||||
bool MoveNear(WorldObject* target, float distance = sPlayerbotAIConfig->contactDistance);
|
bool MoveNear(WorldObject* target, float distance = sPlayerbotAIConfig->contactDistance);
|
||||||
float GetFollowAngle();
|
float GetFollowAngle();
|
||||||
@@ -41,7 +41,7 @@ class MovementAction : public Action
|
|||||||
bool MoveInside(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->followDistance);
|
bool MoveInside(uint32 mapId, float x, float y, float z, float distance = sPlayerbotAIConfig->followDistance);
|
||||||
void CreateWp(Player* wpOwner, float x, float y, float z, float o, uint32 entry, bool important = false);
|
void CreateWp(Player* wpOwner, float x, float y, float z, float o, uint32 entry, bool important = false);
|
||||||
private:
|
private:
|
||||||
float SearchBestGroundZForPath(float x, float y, float z, bool generatePath, float range = 10.0f);
|
float SearchBestGroundZForPath(float x, float y, float z, bool generatePath, float range = 10.0f, bool normal_only = false);
|
||||||
};
|
};
|
||||||
|
|
||||||
class FleeAction : public MovementAction
|
class FleeAction : public MovementAction
|
||||||
|
|||||||
@@ -140,12 +140,12 @@ BearTankDruidStrategy::BearTankDruidStrategy(PlayerbotAI* botAI) : FeralDruidStr
|
|||||||
NextAction** BearTankDruidStrategy::getDefaultActions()
|
NextAction** BearTankDruidStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("mangle (bear)", ACTION_NORMAL + 5),
|
new NextAction("mangle (bear)", ACTION_DEFAULT + 0.5f),
|
||||||
new NextAction("faerie fire (feral)", ACTION_NORMAL + 4),
|
new NextAction("faerie fire (feral)", ACTION_DEFAULT + 0.4f),
|
||||||
new NextAction("lacerate", ACTION_NORMAL + 3),
|
new NextAction("lacerate", ACTION_DEFAULT + 0.3f),
|
||||||
new NextAction("maul", ACTION_NORMAL + 2),
|
new NextAction("maul", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("enrage", ACTION_NORMAL + 1),
|
new NextAction("enrage", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ CasterDruidStrategy::CasterDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrat
|
|||||||
NextAction** CasterDruidStrategy::getDefaultActions()
|
NextAction** CasterDruidStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("starfall", ACTION_NORMAL + 2),
|
new NextAction("starfall", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("wrath", ACTION_NORMAL + 1),
|
new NextAction("wrath", ACTION_DEFAULT + 0.1f),
|
||||||
// new NextAction("starfire", ACTION_NORMAL),
|
// new NextAction("starfire", ACTION_NORMAL),
|
||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ CatDpsDruidStrategy::CatDpsDruidStrategy(PlayerbotAI* botAI) : FeralDruidStrateg
|
|||||||
|
|
||||||
NextAction** CatDpsDruidStrategy::getDefaultActions()
|
NextAction** CatDpsDruidStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("mangle (cat)", ACTION_NORMAL + 1), nullptr);
|
return NextAction::array(0, new NextAction("mangle (cat)", ACTION_DEFAULT + 0.1f), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CatDpsDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void CatDpsDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ MeleeDruidStrategy::MeleeDruidStrategy(PlayerbotAI* botAI) : CombatStrategy(botA
|
|||||||
NextAction** MeleeDruidStrategy::getDefaultActions()
|
NextAction** MeleeDruidStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("faerie fire", ACTION_NORMAL + 1),
|
new NextAction("faerie fire", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ NextAction** GrindingStrategy::getDefaultActions()
|
|||||||
|
|
||||||
void GrindingStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void GrindingStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("drink", 7.0f), nullptr)));
|
triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("drink", 4.2f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("food", 6.0f), nullptr)));
|
triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("food", 4.1f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("no target", NextAction::array(0, new NextAction("attack anything", 5.0f), nullptr)));
|
triggers.push_back(new TriggerNode("no target", NextAction::array(0, new NextAction("attack anything", 4.0f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveRandomStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void MoveRandomStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -31,13 +31,13 @@ DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy
|
|||||||
NextAction** DpsHunterStrategy::getDefaultActions()
|
NextAction** DpsHunterStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("kill shot", 16.0f),
|
new NextAction("kill shot", ACTION_DEFAULT + 0.6f),
|
||||||
new NextAction("chimera shot", 15.0f),
|
new NextAction("chimera shot", ACTION_DEFAULT + 0.5f),
|
||||||
new NextAction("explosive shot", 15.0f),
|
new NextAction("explosive shot", ACTION_DEFAULT + 0.4f),
|
||||||
new NextAction("aimed shot", 14.0f),
|
new NextAction("aimed shot", ACTION_DEFAULT + 0.3f),
|
||||||
new NextAction("arcane shot", 13.0f),
|
new NextAction("arcane shot", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("steady shot", 12.0f),
|
new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("auto shot", 10.0f),
|
new NextAction("auto shot", ACTION_DEFAULT),
|
||||||
nullptr);
|
nullptr);
|
||||||
// return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new NextAction("auto attack", 9.0f), nullptr);
|
// return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new NextAction("auto attack", 9.0f), nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ ArcaneMageStrategy::ArcaneMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy
|
|||||||
|
|
||||||
NextAction** ArcaneMageStrategy::getDefaultActions()
|
NextAction** ArcaneMageStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("arcane blast", 10.0f), NULL);
|
return NextAction::array(0,
|
||||||
|
new NextAction("arcane blast", ACTION_DEFAULT + 0.1f),
|
||||||
|
new NextAction("shoot", ACTION_DEFAULT),
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArcaneMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void ArcaneMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -7,7 +7,10 @@
|
|||||||
|
|
||||||
NextAction** FireMageStrategy::getDefaultActions()
|
NextAction** FireMageStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("fireball", ACTION_NORMAL + 1), NULL);
|
return NextAction::array(0,
|
||||||
|
new NextAction("fireball", ACTION_DEFAULT + 0.1f),
|
||||||
|
new NextAction("shoot", ACTION_DEFAULT),
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FireMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void FireMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ FrostMageStrategy::FrostMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(b
|
|||||||
|
|
||||||
NextAction** FrostMageStrategy::getDefaultActions()
|
NextAction** FrostMageStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("frostbolt", 7.0f), nullptr);
|
return NextAction::array(0,
|
||||||
|
new NextAction("frostbolt", ACTION_DEFAULT + 0.1f),
|
||||||
|
new NextAction("shoot", ACTION_DEFAULT),
|
||||||
|
nullptr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrostMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void FrostMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ DpsPaladinStrategy::DpsPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrat
|
|||||||
NextAction** DpsPaladinStrategy::getDefaultActions()
|
NextAction** DpsPaladinStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("judgement of wisdom", ACTION_NORMAL + 6),
|
new NextAction("judgement of wisdom", ACTION_DEFAULT + 0.4f),
|
||||||
new NextAction("crusader strike", ACTION_NORMAL + 5),
|
new NextAction("crusader strike", ACTION_DEFAULT + 0.3f),
|
||||||
new NextAction("divine storm", ACTION_NORMAL + 4),
|
new NextAction("divine storm", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("consecration", ACTION_NORMAL + 3),
|
new NextAction("consecration", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStr
|
|||||||
|
|
||||||
NextAction** HealPaladinStrategy::getDefaultActions()
|
NextAction** HealPaladinStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("judgement of light", ACTION_NORMAL + 2), nullptr);
|
return NextAction::array(0, new NextAction("judgement of light", ACTION_DEFAULT + 2), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ TankPaladinStrategy::TankPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStr
|
|||||||
NextAction** TankPaladinStrategy::getDefaultActions()
|
NextAction** TankPaladinStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("shield of righteousness", ACTION_NORMAL + 6),
|
new NextAction("shield of righteousness", ACTION_DEFAULT + 0.6f),
|
||||||
new NextAction("hammer of the righteous", ACTION_NORMAL + 5),
|
new NextAction("hammer of the righteous", ACTION_DEFAULT + 0.5f),
|
||||||
new NextAction("judgement of wisdom", ACTION_NORMAL + 4),
|
new NextAction("judgement of wisdom", ACTION_DEFAULT + 0.4f),
|
||||||
// new NextAction("avenger's shield", ACTION_NORMAL + 3),
|
// new NextAction("avenger's shield", ACTION_NORMAL + 3),
|
||||||
// new NextAction("consecration", ACTION_NORMAL + 2),
|
// new NextAction("consecration", ACTION_NORMAL + 2),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ HealPriestStrategy::HealPriestStrategy(PlayerbotAI* botAI) : GenericPriestStrate
|
|||||||
|
|
||||||
NextAction** HealPriestStrategy::getDefaultActions()
|
NextAction** HealPriestStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("shoot", 10.0f), nullptr);
|
return NextAction::array(0, new NextAction("shoot", ACTION_DEFAULT), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void HealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ HolyPriestStrategy::HolyPriestStrategy(PlayerbotAI* botAI) : HealPriestStrategy(
|
|||||||
|
|
||||||
NextAction** HolyPriestStrategy::getDefaultActions()
|
NextAction** HolyPriestStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("smite", 10.0f), new NextAction("mana burn", 9.0f), new NextAction("starshards", 8.0f), nullptr);
|
return NextAction::array(0, new NextAction("smite", ACTION_DEFAULT + 0.2f), new NextAction("mana burn", ACTION_DEFAULT + 0.1f), new NextAction("starshards", ACTION_DEFAULT), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HolyPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void HolyPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ ShadowPriestStrategy::ShadowPriestStrategy(PlayerbotAI* botAI) : GenericPriestSt
|
|||||||
NextAction** ShadowPriestStrategy::getDefaultActions()
|
NextAction** ShadowPriestStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("mind blast", 13.0f),
|
new NextAction("mind blast", ACTION_DEFAULT + 0.2f),
|
||||||
// new NextAction("shadow word: death", 12.0f),
|
// new NextAction("shadow word: death", 12.0f),
|
||||||
new NextAction("mind flay", 11.0f),
|
new NextAction("mind flay", ACTION_DEFAULT + 0.1f),
|
||||||
// new NextAction("shoot", 10.0f),
|
new NextAction("shoot", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ AssassinationRogueStrategy::AssassinationRogueStrategy(PlayerbotAI* ai) : MeleeC
|
|||||||
NextAction** AssassinationRogueStrategy::getDefaultActions()
|
NextAction** AssassinationRogueStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ DpsRogueStrategy::DpsRogueStrategy(PlayerbotAI* botAI) : MeleeCombatStrategy(bot
|
|||||||
NextAction** DpsRogueStrategy::getDefaultActions()
|
NextAction** DpsRogueStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("killing spree", ACTION_NORMAL + 1),
|
new NextAction("killing spree", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL), NULL);
|
new NextAction("melee", ACTION_DEFAULT), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DpsRogueStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void DpsRogueStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanSt
|
|||||||
NextAction** CasterShamanStrategy::getDefaultActions()
|
NextAction** CasterShamanStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("lava burst", 11.0f),
|
new NextAction("lava burst", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("lightning bolt", 10.0f),
|
new NextAction("lightning bolt", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ MeleeShamanStrategy::MeleeShamanStrategy(PlayerbotAI* botAI) : GenericShamanStra
|
|||||||
NextAction** MeleeShamanStrategy::getDefaultActions()
|
NextAction** MeleeShamanStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("stormstrike", ACTION_NORMAL + 6),
|
new NextAction("stormstrike", ACTION_DEFAULT + 0.4f),
|
||||||
new NextAction("earth shock", ACTION_NORMAL + 5),
|
new NextAction("earth shock", ACTION_DEFAULT + 0.3f),
|
||||||
new NextAction("fire nova", ACTION_NORMAL + 4),
|
new NextAction("fire nova", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("lava lash", ACTION_NORMAL + 1),
|
new NextAction("lava lash", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ class TriggerContext : public NamedObjectContext<Trigger>
|
|||||||
static Trigger* critical_aoe_heal(PlayerbotAI* botAI) { return new AoeHealTrigger(botAI, "critical aoe heal", "critical", 2); }
|
static Trigger* critical_aoe_heal(PlayerbotAI* botAI) { return new AoeHealTrigger(botAI, "critical aoe heal", "critical", 2); }
|
||||||
static Trigger* low_aoe_heal(PlayerbotAI* botAI) { return new AoeHealTrigger(botAI, "low aoe heal", "low", 2); }
|
static Trigger* low_aoe_heal(PlayerbotAI* botAI) { return new AoeHealTrigger(botAI, "low aoe heal", "low", 2); }
|
||||||
static Trigger* medium_aoe_heal(PlayerbotAI* botAI) { return new AoeHealTrigger(botAI, "medium aoe heal", "medium", 2); }
|
static Trigger* medium_aoe_heal(PlayerbotAI* botAI) { return new AoeHealTrigger(botAI, "medium aoe heal", "medium", 2); }
|
||||||
static Trigger* group_heal_occasion(PlayerbotAI* ai) { return new AoeInGroupTrigger(ai, "group heal occasion", "almost full", 0.4); }
|
static Trigger* group_heal_occasion(PlayerbotAI* ai) { return new AoeInGroupTrigger(ai, "group heal occasion", "almost full", 0.6); }
|
||||||
static Trigger* medium_group_heal_occasion(PlayerbotAI* ai) { return new AoeInGroupTrigger(ai, "group heal occasion", "medium", 0.4); }
|
static Trigger* medium_group_heal_occasion(PlayerbotAI* ai) { return new AoeInGroupTrigger(ai, "group heal occasion", "medium", 0.4); }
|
||||||
static Trigger* target_changed(PlayerbotAI* botAI) { return new TargetChangedTrigger(botAI); }
|
static Trigger* target_changed(PlayerbotAI* botAI) { return new TargetChangedTrigger(botAI); }
|
||||||
static Trigger* swimming(PlayerbotAI* botAI) { return new IsSwimmingTrigger(botAI); }
|
static Trigger* swimming(PlayerbotAI* botAI) { return new IsSwimmingTrigger(botAI); }
|
||||||
|
|||||||
@@ -47,9 +47,10 @@ DpsWarlockStrategy::DpsWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrat
|
|||||||
NextAction** DpsWarlockStrategy::getDefaultActions()
|
NextAction** DpsWarlockStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("haunt", 14.0f),
|
new NextAction("haunt", ACTION_DEFAULT + 0.3f),
|
||||||
new NextAction("demonic empowerment", 13.0f),
|
new NextAction("demonic empowerment", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("shadow bolt", 10.0f),
|
new NextAction("shadow bolt", ACTION_DEFAULT + 0.1f),
|
||||||
|
new NextAction("shoot", ACTION_DEFAULT),
|
||||||
nullptr);
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ TankWarlockStrategy::TankWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStr
|
|||||||
|
|
||||||
NextAction** TankWarlockStrategy::getDefaultActions()
|
NextAction** TankWarlockStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("shoot", 10.0f), nullptr);
|
return NextAction::array(0, new NextAction("shoot", ACTION_DEFAULT), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TankWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void TankWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ ArmsWarriorStrategy::ArmsWarriorStrategy(PlayerbotAI* botAI) : GenericWarriorStr
|
|||||||
|
|
||||||
NextAction** ArmsWarriorStrategy::getDefaultActions()
|
NextAction** ArmsWarriorStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0, new NextAction("heroic strike", ACTION_NORMAL), nullptr);
|
return NextAction::array(0, new NextAction("heroic strike", ACTION_DEFAULT), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArmsWarriorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void ArmsWarriorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ FuryWarriorStrategy::FuryWarriorStrategy(PlayerbotAI* botAI) : GenericWarriorStr
|
|||||||
NextAction** FuryWarriorStrategy::getDefaultActions()
|
NextAction** FuryWarriorStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("bloodthirst", ACTION_NORMAL + 5),
|
new NextAction("bloodthirst", ACTION_DEFAULT + 0.5f),
|
||||||
new NextAction("whirlwind", ACTION_NORMAL + 4),
|
new NextAction("whirlwind", ACTION_DEFAULT + 0.4f),
|
||||||
new NextAction("sunder armor", ACTION_NORMAL + 3),
|
new NextAction("sunder armor", ACTION_DEFAULT + 0.3f),
|
||||||
new NextAction("execute", ACTION_NORMAL + 2),
|
new NextAction("execute", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("overpower", ACTION_NORMAL + 1),
|
new NextAction("overpower", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ TankWarriorStrategy::TankWarriorStrategy(PlayerbotAI* botAI) : GenericWarriorStr
|
|||||||
NextAction** TankWarriorStrategy::getDefaultActions()
|
NextAction** TankWarriorStrategy::getDefaultActions()
|
||||||
{
|
{
|
||||||
return NextAction::array(0,
|
return NextAction::array(0,
|
||||||
new NextAction("devastate", ACTION_NORMAL + 2),
|
new NextAction("devastate", ACTION_DEFAULT + 0.2f),
|
||||||
new NextAction("revenge", ACTION_NORMAL + 1),
|
new NextAction("revenge", ACTION_DEFAULT + 0.1f),
|
||||||
new NextAction("melee", ACTION_NORMAL),
|
new NextAction("melee", ACTION_DEFAULT),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user