mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-26 15:06:22 +00:00
[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)
This commit is contained in:
113
src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.cpp
Normal file
113
src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.cpp
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* 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 "BeastMasteryHunterStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class BeastMasteryHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
BeastMasteryHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["auto shot"] = &auto_shot;
|
||||
creators["kill command"] = &kill_command;
|
||||
creators["kill shot"] = &kill_shot;
|
||||
creators["viper sting"] = &viper_sting;
|
||||
creators["serpent sting"] = serpent_sting;
|
||||
creators["aimed shot"] = &aimed_shot;
|
||||
creators["arcane shot"] = &arcane_shot;
|
||||
creators["steady shot"] = &steady_shot;
|
||||
creators["multi-shot"] = &multi_shot;
|
||||
creators["volley"] = &volley;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* auto_shot(PlayerbotAI*) { return new ActionNode("auto shot", {}, {}, {}); }
|
||||
static ActionNode* kill_command(PlayerbotAI*) { return new ActionNode("kill command", {}, {}, {}); }
|
||||
static ActionNode* kill_shot(PlayerbotAI*) { return new ActionNode("kill shot", {}, {}, {}); }
|
||||
static ActionNode* viper_sting(PlayerbotAI*) { return new ActionNode("viper sting", {}, {}, {}); }
|
||||
static ActionNode* serpent_sting(PlayerbotAI*) { return new ActionNode("serpent sting", {}, {}, {}); }
|
||||
static ActionNode* aimed_shot(PlayerbotAI*) { return new ActionNode("aimed shot", {}, {}, {}); }
|
||||
static ActionNode* arcane_shot(PlayerbotAI*) { return new ActionNode("arcane shot", {}, {}, {}); }
|
||||
static ActionNode* steady_shot(PlayerbotAI*) { return new ActionNode("steady shot", {}, {}, {}); }
|
||||
static ActionNode* multi_shot(PlayerbotAI*) { return new ActionNode("multi shot", {}, {}, {}); }
|
||||
static ActionNode* volley(PlayerbotAI*) { return new ActionNode("volley", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Single Target Strategy =====
|
||||
BeastMasteryHunterStrategy::BeastMasteryHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new BeastMasteryHunterStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
// ===== Default Actions =====
|
||||
std::vector<NextAction> BeastMasteryHunterStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("bestial wrath", 19.0f),
|
||||
NextAction("kill command", 5.7f),
|
||||
NextAction("kill shot", 5.6f),
|
||||
NextAction("serpent sting", 5.5f),
|
||||
NextAction("aimed shot", 5.4f),
|
||||
NextAction("arcane shot", 5.3f),
|
||||
NextAction("steady shot", 5.2f),
|
||||
NextAction("auto shot", 5.1f)
|
||||
};
|
||||
}
|
||||
|
||||
// ===== Trigger Initialization ===
|
||||
void BeastMasteryHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericHunterStrategy::InitTriggers(triggers);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"intimidation",
|
||||
{
|
||||
NextAction("intimidation", 40.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"kill command",
|
||||
{
|
||||
NextAction("kill command", 18.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"target critical health",
|
||||
{
|
||||
NextAction("kill shot", 18.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("viper sting", 17.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"no stings",
|
||||
{
|
||||
NextAction("serpent sting", 17.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"serpent sting on attacker",
|
||||
{
|
||||
NextAction("serpent sting on attacker", 16.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.h
Normal file
24
src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_BEASTMASTERYHUNTERSTRATEGY_H
|
||||
#define _PLAYERBOT_BEASTMASTERYHUNTERSTRATEGY_H
|
||||
|
||||
#include "GenericHunterStrategy.h"
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class BeastMasteryHunterStrategy : public GenericHunterStrategy
|
||||
{
|
||||
public:
|
||||
BeastMasteryHunterStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bm"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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 "GenericHunterNonCombatStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericHunterNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericHunterNonCombatStrategyActionNodeFactory()
|
||||
{
|
||||
creators["rapid fire"] = &rapid_fire;
|
||||
creators["boost"] = &rapid_fire;
|
||||
creators["aspect of the pack"] = &aspect_of_the_pack;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("rapid fire",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("readiness")},
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the pack",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("aspect of the cheetah")},
|
||||
/*C*/ {});
|
||||
}
|
||||
};
|
||||
|
||||
GenericHunterNonCombatStrategy::GenericHunterNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericHunterNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericHunterNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("trueshot aura", { NextAction("trueshot aura", 2.0f)}));
|
||||
triggers.push_back(new TriggerNode("often", {
|
||||
NextAction("apply stone", 1.0f),
|
||||
NextAction("apply oil", 1.0f),
|
||||
}));
|
||||
triggers.push_back(new TriggerNode("low ammo", { NextAction("say::low ammo", ACTION_NORMAL)}));
|
||||
triggers.push_back(new TriggerNode("no track", { NextAction("track humanoids", ACTION_NORMAL)}));
|
||||
triggers.push_back(new TriggerNode("no ammo", { NextAction("equip upgrades", ACTION_HIGH + 1)}));
|
||||
}
|
||||
|
||||
void HunterPetStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("call pet", 60.0f)}));
|
||||
triggers.push_back(new TriggerNode("has pet", { NextAction("toggle pet spell", 60.0f)}));
|
||||
triggers.push_back(new TriggerNode("new pet", { NextAction("set pet stance", 60.0f)}));
|
||||
triggers.push_back(new TriggerNode("pet not happy", { NextAction("feed pet", 60.0f)}));
|
||||
triggers.push_back(new TriggerNode("hunters pet medium health", { NextAction("mend pet", 60.0f)}));
|
||||
triggers.push_back(new TriggerNode("hunters pet dead", { NextAction("revive pet", 60.0f)}));
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICHUNTERNONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICHUNTERNONCOMBATSTRATEGY_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericHunterNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericHunterNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterPetStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterPetStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "pet"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
157
src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.cpp
Normal file
157
src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.cpp
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* 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 "GenericHunterStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["rapid fire"] = &rapid_fire;
|
||||
creators["boost"] = &rapid_fire;
|
||||
creators["aspect of the pack"] = &aspect_of_the_pack;
|
||||
creators["aspect of the dragonhawk"] = &aspect_of_the_dragonhawk;
|
||||
creators["feign death"] = &feign_death;
|
||||
creators["wing clip"] = &wing_clip;
|
||||
creators["mongoose bite"] = &mongoose_bite;
|
||||
creators["raptor strike"] = &raptor_strike;
|
||||
creators["explosive trap"] = &explosive_trap;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("rapid fire",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("readiness") },
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the pack",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("aspect of the cheetah") },
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* aspect_of_the_dragonhawk([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the dragonhawk",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("aspect of the hawk") },
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* feign_death([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("feign death",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* wing_clip([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("wing clip",
|
||||
/*P*/ {},
|
||||
// /*A*/ { NextAction("mongoose bite") },
|
||||
{},
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* mongoose_bite([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("mongoose bite",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("raptor strike") },
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* raptor_strike([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("raptor strike",
|
||||
/*P*/ { NextAction("melee") },
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* explosive_trap([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("explosive trap",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("immolation trap") },
|
||||
/*C*/ {});
|
||||
}
|
||||
};
|
||||
|
||||
GenericHunterStrategy::GenericHunterStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericHunterStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
// Mark/Ammo/Mana Triggers
|
||||
triggers.push_back(new TriggerNode("no ammo", { NextAction("equip upgrades", 30.0f) }));
|
||||
triggers.push_back(new TriggerNode("hunter's mark", { NextAction("hunter's mark", 29.5f) }));
|
||||
triggers.push_back(new TriggerNode("rapid fire", { NextAction("rapid fire", 29.0f) }));
|
||||
triggers.push_back(new TriggerNode("aspect of the viper", { NextAction("aspect of the viper", 28.0f) }));
|
||||
triggers.push_back(new TriggerNode("aspect of the hawk", { NextAction("aspect of the dragonhawk", 27.5f) }));
|
||||
|
||||
// Aggro/Threat/Defensive Triggers
|
||||
triggers.push_back(new TriggerNode("has aggro", { NextAction("concussive shot", 20.0f) }));
|
||||
triggers.push_back(new TriggerNode("low tank threat", { NextAction("misdirection on main tank", 27.0f) }));
|
||||
triggers.push_back(new TriggerNode("low health", { NextAction("deterrence", 35.0f) }));
|
||||
triggers.push_back(new TriggerNode("concussive shot on snare target", { NextAction("concussive shot", 20.0f) }));
|
||||
triggers.push_back(new TriggerNode("medium threat", { NextAction("feign death", 35.0f) }));
|
||||
triggers.push_back(new TriggerNode("hunters pet medium health", { NextAction("mend pet", 22.0f) }));
|
||||
triggers.push_back(new TriggerNode("hunters pet low health", { NextAction("mend pet", 21.0f) }));
|
||||
|
||||
// Dispel Triggers
|
||||
triggers.push_back(new TriggerNode("tranquilizing shot enrage", { NextAction("tranquilizing shot", 61.0f) }));
|
||||
triggers.push_back(new TriggerNode("tranquilizing shot magic", { NextAction("tranquilizing shot", 61.0f) }));
|
||||
|
||||
// Ranged-based Triggers
|
||||
triggers.push_back(new TriggerNode("enemy within melee", {
|
||||
NextAction("explosive trap", 37.0f),
|
||||
NextAction("mongoose bite", 22.0f),
|
||||
NextAction("wing clip", 21.0f) }));
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy too close for auto shot", {
|
||||
NextAction("disengage", 35.0f),
|
||||
NextAction("flee", 34.0f) }));
|
||||
}
|
||||
|
||||
// ===== AoE Strategy, 2/3+ enemies =====
|
||||
AoEHunterStrategy::AoEHunterStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
void AoEHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("volley channel check", { NextAction("cancel channel", 23.0f) }));
|
||||
triggers.push_back(new TriggerNode("medium aoe", { NextAction("volley", 22.0f) }));
|
||||
triggers.push_back(new TriggerNode("light aoe", { NextAction("multi-shot", 21.0f) }));
|
||||
}
|
||||
|
||||
void HunterBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
}
|
||||
|
||||
void HunterCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("scare beast", { NextAction("scare beast on cc", 23.0f) }));
|
||||
triggers.push_back(new TriggerNode("freezing trap", { NextAction("freezing trap on cc", 23.0f) }));
|
||||
}
|
||||
|
||||
void HunterTrapWeaveStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("immolation trap no cd", { NextAction("reach melee", 23.0f) }));
|
||||
}
|
||||
60
src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.h
Normal file
60
src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICHUNTERSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICHUNTERSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericHunterStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericHunterStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "hunter"; }
|
||||
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
|
||||
};
|
||||
|
||||
class AoEHunterStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
AoEHunterStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "aoe"; }
|
||||
};
|
||||
|
||||
class HunterBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "boost"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
};
|
||||
|
||||
class HunterTrapWeaveStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterTrapWeaveStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "trap weave"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
53
src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.cpp
Normal file
53
src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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 "HunterBuffStrategies.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class BuffHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
BuffHunterStrategyActionNodeFactory() { creators["aspect of the hawk"] = &aspect_of_the_hawk; }
|
||||
|
||||
private:
|
||||
static ActionNode* aspect_of_the_hawk([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the hawk",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("aspect of the monkey") },
|
||||
/*C*/ {});
|
||||
}
|
||||
};
|
||||
|
||||
HunterBuffDpsStrategy::HunterBuffDpsStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new BuffHunterStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void HunterBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("aspect of the hawk", { NextAction("aspect of the dragonhawk", 20.1f),
|
||||
NextAction("aspect of the hawk", 20.0f) }));
|
||||
}
|
||||
|
||||
void HunterNatureResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("aspect of the wild",
|
||||
{ NextAction("aspect of the wild", 20.0f) }));
|
||||
}
|
||||
|
||||
void HunterBuffSpeedStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("aspect of the pack",
|
||||
{ NextAction("aspect of the pack", 20.0f) }));
|
||||
}
|
||||
|
||||
void HunterBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("aspect of the viper",
|
||||
{ NextAction("aspect of the viper", 20.0f) }));
|
||||
}
|
||||
49
src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.h
Normal file
49
src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_HUNTERBUFFSTRATEGIES_H
|
||||
#define _PLAYERBOT_HUNTERBUFFSTRATEGIES_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class HunterBuffSpeedStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterBuffSpeedStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "bspeed"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterBuffManaStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterBuffManaStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "bmana"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterBuffDpsStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterBuffDpsStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "bdps"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterNatureResistanceStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterNatureResistanceStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "rnature"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
118
src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.cpp
Normal file
118
src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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 "MarksmanshipHunterStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class MarksmanshipHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
MarksmanshipHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["auto shot"] = &auto_shot;
|
||||
creators["silencing shot"] = &silencing_shot;
|
||||
creators["kill command"] = &kill_command;
|
||||
creators["kill shot"] = &kill_shot;
|
||||
creators["viper sting"] = &viper_sting;
|
||||
creators["serpent sting"] = serpent_sting;
|
||||
creators["chimera shot"] = &chimera_shot;
|
||||
creators["aimed shot"] = &aimed_shot;
|
||||
creators["arcane shot"] = &arcane_shot;
|
||||
creators["steady shot"] = &steady_shot;
|
||||
creators["multi-shot"] = &multi_shot;
|
||||
creators["volley"] = &volley;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* auto_shot(PlayerbotAI*) { return new ActionNode("auto shot", {}, {}, {}); }
|
||||
static ActionNode* silencing_shot(PlayerbotAI*) { return new ActionNode("silencing shot", {}, {}, {}); }
|
||||
static ActionNode* kill_command(PlayerbotAI*) { return new ActionNode("kill command", {}, {}, {}); }
|
||||
static ActionNode* kill_shot(PlayerbotAI*) { return new ActionNode("kill shot", {}, {}, {}); }
|
||||
static ActionNode* viper_sting(PlayerbotAI*) { return new ActionNode("viper sting", {}, {}, {}); }
|
||||
static ActionNode* serpent_sting(PlayerbotAI*) { return new ActionNode("serpent sting", {}, {}, {}); }
|
||||
static ActionNode* chimera_shot(PlayerbotAI*) { return new ActionNode("chimera shot", {}, {}, {}); }
|
||||
static ActionNode* aimed_shot(PlayerbotAI*) { return new ActionNode("aimed shot", {}, {}, {}); }
|
||||
static ActionNode* arcane_shot(PlayerbotAI*) { return new ActionNode("arcane shot", {}, {}, {}); }
|
||||
static ActionNode* steady_shot(PlayerbotAI*) { return new ActionNode("steady shot", {}, {}, {}); }
|
||||
static ActionNode* multi_shot(PlayerbotAI*) { return new ActionNode("multi shot", {}, {}, {}); }
|
||||
static ActionNode* volley(PlayerbotAI*) { return new ActionNode("volley", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Single Target Strategy =====
|
||||
MarksmanshipHunterStrategy::MarksmanshipHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new MarksmanshipHunterStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
// ===== Default Actions =====
|
||||
std::vector<NextAction> MarksmanshipHunterStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("kill command", 5.8f),
|
||||
NextAction("kill shot", 5.7f),
|
||||
NextAction("serpent sting", 5.6f),
|
||||
NextAction("chimera shot", 5.5f),
|
||||
NextAction("aimed shot", 5.4f),
|
||||
NextAction("arcane shot", 5.3f),
|
||||
NextAction("steady shot", 5.2f),
|
||||
NextAction("auto shot", 5.1f)
|
||||
};
|
||||
}
|
||||
|
||||
// ===== Trigger Initialization ===
|
||||
void MarksmanshipHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericHunterStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"silencing shot",
|
||||
{
|
||||
NextAction("silencing shot", 40.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"kill command",
|
||||
{
|
||||
NextAction("kill command", 18.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"target critical health",
|
||||
{
|
||||
NextAction("kill shot", 18.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("viper sting", 17.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"no stings",
|
||||
{
|
||||
NextAction("serpent sting", 17.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"serpent sting on attacker",
|
||||
{
|
||||
NextAction("serpent sting on attacker", 16.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.h
Normal file
24
src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_MARKSMANSHIPHUNTERSTRATEGY_H
|
||||
#define _PLAYERBOT_MARKSMANSHIPHUNTERSTRATEGY_H
|
||||
|
||||
#include "GenericHunterStrategy.h"
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class MarksmanshipHunterStrategy : public GenericHunterStrategy
|
||||
{
|
||||
public:
|
||||
MarksmanshipHunterStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "mm"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
159
src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.cpp
Normal file
159
src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* 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 "SurvivalHunterStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class SurvivalHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
SurvivalHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["auto shot"] = &auto_shot;
|
||||
creators["kill command"] = &kill_command;
|
||||
creators["kill shot"] = &kill_shot;
|
||||
creators["explosive shot"] = &explosive_shot;
|
||||
creators["black arrow"] = &black_arrow;
|
||||
creators["viper sting"] = &viper_sting;
|
||||
creators["serpent sting"] = serpent_sting;
|
||||
creators["aimed shot"] = &aimed_shot;
|
||||
creators["arcane shot"] = &arcane_shot;
|
||||
creators["steady shot"] = &steady_shot;
|
||||
creators["multi-shot"] = &multi_shot;
|
||||
creators["volley"] = &volley;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* auto_shot(PlayerbotAI*) { return new ActionNode("auto shot", {}, {}, {}); }
|
||||
static ActionNode* kill_command(PlayerbotAI*) { return new ActionNode("kill command", {}, {}, {}); }
|
||||
static ActionNode* kill_shot(PlayerbotAI*) { return new ActionNode("kill shot", {}, {}, {}); }
|
||||
static ActionNode* explosive_shot(PlayerbotAI*) { return new ActionNode("explosive shot", {}, {}, {}); }
|
||||
static ActionNode* black_arrow(PlayerbotAI*) { return new ActionNode("black arrow", {}, {}, {}); }
|
||||
static ActionNode* viper_sting(PlayerbotAI*) { return new ActionNode("viper sting", {}, {}, {}); }
|
||||
static ActionNode* serpent_sting(PlayerbotAI*) { return new ActionNode("serpent sting", {}, {}, {}); }
|
||||
static ActionNode* aimed_shot(PlayerbotAI*) { return new ActionNode("aimed shot", {}, {}, {}); }
|
||||
static ActionNode* arcane_shot(PlayerbotAI*) { return new ActionNode("arcane shot", {}, {}, {}); }
|
||||
static ActionNode* steady_shot(PlayerbotAI*) { return new ActionNode("steady shot", {}, {}, {}); }
|
||||
static ActionNode* multi_shot(PlayerbotAI*) { return new ActionNode("multi shot", {}, {}, {}); }
|
||||
static ActionNode* volley(PlayerbotAI*) { return new ActionNode("volley", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Single Target Strategy =====
|
||||
SurvivalHunterStrategy::SurvivalHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new SurvivalHunterStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
// ===== Default Actions =====
|
||||
std::vector<NextAction> SurvivalHunterStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("kill command", 5.9f),
|
||||
NextAction("kill shot", 5.8f),
|
||||
NextAction("explosive shot", 5.7f),
|
||||
NextAction("black arrow", 5.6f),
|
||||
NextAction("serpent sting", 5.5f),
|
||||
NextAction("aimed shot", 5.4f),
|
||||
NextAction("arcane shot", 5.3f),
|
||||
NextAction("steady shot", 5.2f),
|
||||
NextAction("auto shot", 5.1f)
|
||||
};
|
||||
}
|
||||
|
||||
// ===== Trigger Initialization ===
|
||||
void SurvivalHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericHunterStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"lock and load",
|
||||
{
|
||||
NextAction("explosive shot rank 4", 28.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"lock and load",
|
||||
{
|
||||
NextAction("explosive shot rank 3", 27.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"lock and load",
|
||||
{
|
||||
NextAction("explosive shot rank 2", 27.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"lock and load",
|
||||
{
|
||||
NextAction("explosive shot rank 1", 26.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"kill command",
|
||||
{
|
||||
NextAction("kill command", 18.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"target critical health",
|
||||
{
|
||||
NextAction("kill shot", 18.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"explosive shot",
|
||||
{
|
||||
NextAction("explosive shot", 17.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"black arrow",
|
||||
{
|
||||
NextAction("black arrow", 16.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("viper sting", 16.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"no stings",
|
||||
{
|
||||
NextAction("serpent sting", 15.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"serpent sting on attacker",
|
||||
{
|
||||
NextAction("serpent sting on attacker", 15.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.h
Normal file
24
src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_SURVIVALHUNTERSTRATEGY_H
|
||||
#define _PLAYERBOT_SURVIVALHUNTERSTRATEGY_H
|
||||
|
||||
#include "GenericHunterStrategy.h"
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class SurvivalHunterStrategy : public GenericHunterStrategy
|
||||
{
|
||||
public:
|
||||
SurvivalHunterStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "surv"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user