mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-14 23:56:13 +00:00
Run clang-format
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "DpsHunterStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
DpsHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["aimed shot"] = &aimed_shot;
|
||||
}
|
||||
public:
|
||||
DpsHunterStrategyActionNodeFactory() { creators["aimed shot"] = &aimed_shot; }
|
||||
|
||||
private:
|
||||
static ActionNode* aimed_shot([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("aimed shot",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("multi-shot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
private:
|
||||
static ActionNode* aimed_shot([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aimed shot",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("multi-shot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI)
|
||||
@@ -30,39 +29,46 @@ DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy
|
||||
|
||||
NextAction** DpsHunterStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0,
|
||||
new NextAction("kill shot", ACTION_DEFAULT + 0.6f),
|
||||
new NextAction("chimera shot", ACTION_DEFAULT + 0.5f),
|
||||
new NextAction("explosive shot", ACTION_DEFAULT + 0.4f),
|
||||
new NextAction("aimed shot", ACTION_DEFAULT + 0.3f),
|
||||
new NextAction("arcane shot", ACTION_DEFAULT + 0.2f),
|
||||
new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
|
||||
new NextAction("auto shot", ACTION_DEFAULT),
|
||||
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("kill shot", ACTION_DEFAULT + 0.6f), new NextAction("chimera shot", ACTION_DEFAULT + 0.5f),
|
||||
new NextAction("explosive shot", ACTION_DEFAULT + 0.4f), new NextAction("aimed shot", ACTION_DEFAULT + 0.3f),
|
||||
new NextAction("arcane shot", ACTION_DEFAULT + 0.2f), new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
|
||||
new NextAction("auto shot", ACTION_DEFAULT), nullptr);
|
||||
// return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new
|
||||
// NextAction("auto attack", 9.0f), nullptr);
|
||||
}
|
||||
|
||||
void DpsHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericHunterStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("black arrow", NextAction::array(0, new NextAction("black arrow", 15.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("viper sting", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunter's mark", NextAction::array(0, new NextAction("hunter's mark", 31.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("concussive shot on snare target", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("black arrow", NextAction::array(0, new NextAction("black arrow", 15.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("low mana", NextAction::array(0, new NextAction("viper sting", 23.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("hunter's mark", NextAction::array(0, new NextAction("hunter's mark", 31.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("concussive shot on snare target",
|
||||
NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("call pet", 21.0f), NULL)));
|
||||
// triggers.push_back(new TriggerNode("hunters pet low health", NextAction::array(0, new NextAction("mend pet", 21.0f), NULL)));
|
||||
triggers.push_back(new TriggerNode("has aggro", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("hunters pet low health", NextAction::array(0, new NextAction("mend
|
||||
// pet", 21.0f), NULL)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("has aggro", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));
|
||||
}
|
||||
|
||||
void DpsAoeHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("multi-shot", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("volley", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("serpent sting on attacker", NextAction::array(0, new NextAction("serpent sting on attacker", 17.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("light aoe", NextAction::array(0, new NextAction("multi-shot", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("volley", 21.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("serpent sting on attacker",
|
||||
NextAction::array(0, new NextAction("serpent sting on attacker", 17.0f), nullptr)));
|
||||
}
|
||||
|
||||
void DpsHunterDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no stings", NextAction::array(0, new NextAction("serpent sting", 18.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("no stings", NextAction::array(0, new NextAction("serpent sting", 18.0f), nullptr)));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_DPSHUNTERSTRATEGY_H
|
||||
@@ -11,30 +12,30 @@ class PlayerbotAI;
|
||||
|
||||
class DpsHunterStrategy : public GenericHunterStrategy
|
||||
{
|
||||
public:
|
||||
DpsHunterStrategy(PlayerbotAI* botAI);
|
||||
public:
|
||||
DpsHunterStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "dps"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "dps"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
};
|
||||
|
||||
class DpsAoeHunterStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
DpsAoeHunterStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
public:
|
||||
DpsAoeHunterStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "aoe"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "aoe"; }
|
||||
};
|
||||
|
||||
class DpsHunterDebuffStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
DpsHunterDebuffStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
public:
|
||||
DpsHunterDebuffStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "dps debuff"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "dps debuff"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,36 +1,38 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "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;
|
||||
}
|
||||
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*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("readiness"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
private:
|
||||
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("rapid fire",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("readiness"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("aspect of the pack",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aspect of the cheetah"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the pack",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aspect of the cheetah"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericHunterNonCombatStrategy::GenericHunterNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
@@ -42,18 +44,25 @@ void GenericHunterNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& tri
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("trueshot aura", NextAction::array(0, new NextAction("trueshot aura", 2.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("trueshot aura", NextAction::array(0, new NextAction("trueshot aura", 2.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low ammo", NextAction::array(0, new NextAction("say::low ammo", ACTION_NORMAL), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("no ammo", NextAction::array(0, new NextAction("switch to melee", ACTION_NORMAL + 1), new NextAction("say::no ammo", ACTION_NORMAL), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("has ammo", NextAction::array(0, new NextAction("switch to ranged", ACTION_NORMAL), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("low ammo", NextAction::array(0, new NextAction("say::low ammo", ACTION_NORMAL), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("no ammo", NextAction::array(0, new NextAction("switch to melee",
|
||||
// ACTION_NORMAL + 1), new NextAction("say::no ammo", ACTION_NORMAL), nullptr))); triggers.push_back(new
|
||||
// TriggerNode("has ammo", NextAction::array(0, new NextAction("switch to ranged", ACTION_NORMAL), nullptr)));
|
||||
}
|
||||
|
||||
void HunterPetStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("call pet", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("pet not happy", NextAction::array(0, new NextAction("feed pet", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunters pet medium health", NextAction::array(0, new NextAction("mend pet", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunters pet dead", NextAction::array(0, new NextAction("revive pet", 60.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", 60.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("pet not happy", NextAction::array(0, new NextAction("feed pet", 60.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("hunters pet medium health", NextAction::array(0, new NextAction("mend pet", 60.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("hunters pet dead", NextAction::array(0, new NextAction("revive pet", 60.0f), nullptr)));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_GENERICHUNTERNONCOMBATSTRATEGY_H
|
||||
@@ -11,20 +12,20 @@ class PlayerbotAI;
|
||||
|
||||
class GenericHunterNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericHunterNonCombatStrategy(PlayerbotAI* botAI);
|
||||
public:
|
||||
GenericHunterNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterPetStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterPetStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
public:
|
||||
HunterPetStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "pet"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "pet"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,73 +1,75 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "GenericHunterStrategy.h"
|
||||
|
||||
#include "Playerbots.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["feign death"] = &feign_death;
|
||||
creators["wing clip"] = &wing_clip;
|
||||
creators["mongoose bite"] = &mongoose_bite;
|
||||
creators["raptor strike"] = &raptor_strike;
|
||||
}
|
||||
public:
|
||||
GenericHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["rapid fire"] = &rapid_fire;
|
||||
creators["boost"] = &rapid_fire;
|
||||
creators["aspect of the pack"] = &aspect_of_the_pack;
|
||||
creators["feign death"] = &feign_death;
|
||||
creators["wing clip"] = &wing_clip;
|
||||
creators["mongoose bite"] = &mongoose_bite;
|
||||
creators["raptor strike"] = &raptor_strike;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("rapid fire",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("readiness"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
private:
|
||||
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("rapid fire",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("readiness"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("aspect of the pack",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aspect of the cheetah"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the pack",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aspect of the cheetah"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* feign_death([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("feign death",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* feign_death([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("feign death",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* wing_clip([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("wing clip",
|
||||
/*P*/ nullptr,
|
||||
// /*A*/ NextAction::array(0, new NextAction("mongoose bite"), nullptr),
|
||||
nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* wing_clip([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("wing clip",
|
||||
/*P*/ nullptr,
|
||||
// /*A*/ NextAction::array(0, new NextAction("mongoose bite"), nullptr),
|
||||
nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mongoose_bite([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("mongoose bite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("raptor strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* mongoose_bite([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("mongoose bite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("raptor strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* raptor_strike([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("raptor strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
static ActionNode* raptor_strike([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("raptor strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericHunterStrategy::GenericHunterStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
@@ -79,19 +81,24 @@ void GenericHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy within melee",
|
||||
NextAction::array(0,
|
||||
new NextAction("wing clip", ACTION_HIGH + 1),
|
||||
new NextAction("mongoose bite", ACTION_HIGH),
|
||||
nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium threat", NextAction::array(0, new NextAction("feign death", 35.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunters pet medium health", NextAction::array(0, new NextAction("mend pet", ACTION_HIGH + 2), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("no ammo", NextAction::array(0, new NextAction("switch to melee", ACTION_HIGH + 1), new NextAction("say::no ammo", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("aspect of the viper", NextAction::array(0, new NextAction("aspect of the viper", ACTION_HIGH), NULL)));
|
||||
triggers.push_back(new TriggerNode("enemy too close for auto shot", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("misdirection on main tank", NextAction::array(0, new NextAction("misdirection on main tank", ACTION_HIGH + 7), NULL)));
|
||||
triggers.push_back(new TriggerNode("tranquilizing shot", NextAction::array(0, new NextAction("tranquilizing shot", 61.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy within melee",
|
||||
NextAction::array(0, new NextAction("wing clip", ACTION_HIGH + 1),
|
||||
new NextAction("mongoose bite", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium threat", NextAction::array(0, new NextAction("feign death", 35.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunters pet medium health",
|
||||
NextAction::array(0, new NextAction("mend pet", ACTION_HIGH + 2), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("no ammo", NextAction::array(0, new NextAction("switch to melee", ACTION_HIGH
|
||||
// + 1), new NextAction("say::no ammo", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("aspect of the viper",
|
||||
NextAction::array(0, new NextAction("aspect of the viper", ACTION_HIGH), NULL)));
|
||||
triggers.push_back(new TriggerNode("enemy too close for auto shot",
|
||||
NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("misdirection on main tank",
|
||||
NextAction::array(0, new NextAction("misdirection on main tank", ACTION_HIGH + 7), NULL)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("tranquilizing shot", NextAction::array(0, new NextAction("tranquilizing shot", 61.0f), NULL)));
|
||||
}
|
||||
|
||||
NextAction** HunterBoostStrategy::getDefaultActions()
|
||||
@@ -101,11 +108,14 @@ NextAction** HunterBoostStrategy::getDefaultActions()
|
||||
|
||||
void HunterBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("rapid fire", NextAction::array(0, new NextAction("rapid fire", 16.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("rapid fire", NextAction::array(0, new NextAction("rapid fire", 16.0f), nullptr)));
|
||||
}
|
||||
|
||||
void HunterCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("scare beast", NextAction::array(0, new NextAction("scare beast on cc", ACTION_HIGH + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("freezing trap", NextAction::array(0, new NextAction("freezing trap on cc", ACTION_HIGH + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"scare beast", NextAction::array(0, new NextAction("scare beast on cc", ACTION_HIGH + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"freezing trap", NextAction::array(0, new NextAction("freezing trap on cc", ACTION_HIGH + 3), nullptr)));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_GENERICHUNTERSTRATEGY_H
|
||||
@@ -12,31 +13,31 @@ class PlayerbotAI;
|
||||
|
||||
class GenericHunterStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericHunterStrategy(PlayerbotAI* botAI);
|
||||
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; }
|
||||
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 HunterBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
public:
|
||||
HunterBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "boost"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "boost"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
HunterCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
public:
|
||||
HunterCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "HunterActions.h"
|
||||
|
||||
#include "Event.h"
|
||||
#include "GenericSpellActions.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool CastHuntersMarkAction::isUseful()
|
||||
{
|
||||
return CastDebuffSpellAction::isUseful();
|
||||
}
|
||||
bool CastHuntersMarkAction::isUseful() { return CastDebuffSpellAction::isUseful(); }
|
||||
|
||||
bool CastViperStingAction::isUseful()
|
||||
{
|
||||
@@ -22,10 +21,7 @@ bool CastAspectOfTheCheetahAction::isUseful()
|
||||
return !botAI->HasAnyAuraOf(GetTarget(), "aspect of the cheetah", "aspect of the pack", nullptr);
|
||||
}
|
||||
|
||||
Value<Unit*>* CastFreezingTrap::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>("cc target", "freezing trap");
|
||||
}
|
||||
Value<Unit*>* CastFreezingTrap::GetTargetValue() { return context->GetValue<Unit*>("cc target", "freezing trap"); }
|
||||
|
||||
bool FeedPetAction::Execute(Event event)
|
||||
{
|
||||
@@ -40,32 +36,23 @@ bool CastAutoShotAction::isUseful()
|
||||
{
|
||||
if (botAI->IsInVehicle() && !botAI->IsInVehicle(false, false, true))
|
||||
return false;
|
||||
|
||||
if (AI_VALUE(Unit*, "current target") && bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL) && bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)->m_targets.GetUnitTargetGUID() == AI_VALUE(Unit*, "current target")->GetGUID()) {
|
||||
|
||||
if (AI_VALUE(Unit*, "current target") && bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL) &&
|
||||
bot->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)->m_targets.GetUnitTargetGUID() ==
|
||||
AI_VALUE(Unit*, "current target")->GetGUID())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return AI_VALUE(uint32, "active spell") != AI_VALUE2(uint32, "spell id", getName());
|
||||
}
|
||||
|
||||
Value<Unit*>* CastScareBeastCcAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>("cc target", "scare beast");
|
||||
}
|
||||
Value<Unit*>* CastScareBeastCcAction::GetTargetValue() { return context->GetValue<Unit*>("cc target", "scare beast"); }
|
||||
|
||||
bool CastScareBeastCcAction::Execute(Event event)
|
||||
{
|
||||
return botAI->CastSpell("scare beast", GetTarget());
|
||||
}
|
||||
bool CastScareBeastCcAction::Execute(Event event) { return botAI->CastSpell("scare beast", GetTarget()); }
|
||||
|
||||
bool CastWingClipAction::isUseful()
|
||||
{
|
||||
return CastSpellAction::isUseful() && !botAI->HasAura(spell, GetTarget());
|
||||
}
|
||||
bool CastWingClipAction::isUseful() { return CastSpellAction::isUseful() && !botAI->HasAura(spell, GetTarget()); }
|
||||
|
||||
NextAction** CastWingClipAction::getPrerequisites()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
NextAction** CastWingClipAction::getPrerequisites() { return nullptr; }
|
||||
|
||||
// bool CastRaptorStrikeAction::isUseful()
|
||||
// {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_HUNTERACTIONS_H
|
||||
@@ -16,16 +17,16 @@ class Unit;
|
||||
|
||||
class CastHuntersMarkAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastHuntersMarkAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "hunter's mark") { }
|
||||
bool isUseful() override;
|
||||
public:
|
||||
CastHuntersMarkAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "hunter's mark") {}
|
||||
bool isUseful() override;
|
||||
};
|
||||
class CastAutoShotAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastAutoShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "auto shot") { }
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::None; }
|
||||
bool isUseful() override;
|
||||
public:
|
||||
CastAutoShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "auto shot") {}
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::None; }
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
BEGIN_RANGED_SPELL_ACTION(CastArcaneShotAction, "arcane shot")
|
||||
@@ -42,8 +43,8 @@ END_SPELL_ACTION()
|
||||
|
||||
class CastConcussiveShotAction : public CastSnareSpellAction
|
||||
{
|
||||
public:
|
||||
CastConcussiveShotAction(PlayerbotAI* botAI) : CastSnareSpellAction(botAI, "concussive shot") { }
|
||||
public:
|
||||
CastConcussiveShotAction(PlayerbotAI* botAI) : CastSnareSpellAction(botAI, "concussive shot") {}
|
||||
};
|
||||
|
||||
BEGIN_RANGED_SPELL_ACTION(CastDistractingShotAction, "distracting shot")
|
||||
@@ -53,7 +54,7 @@ BEGIN_RANGED_SPELL_ACTION(CastMultiShotAction, "multi-shot")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
BEGIN_RANGED_SPELL_ACTION(CastVolleyAction, "volley")
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
|
||||
END_SPELL_ACTION()
|
||||
|
||||
DEBUFF_CHECKISOWNER_ACTION(CastSerpentStingAction, "serpent sting");
|
||||
@@ -79,14 +80,14 @@ END_SPELL_ACTION()
|
||||
|
||||
class CastAspectOfTheHawkAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAspectOfTheHawkAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the hawk") { }
|
||||
public:
|
||||
CastAspectOfTheHawkAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the hawk") {}
|
||||
};
|
||||
|
||||
class CastAspectOfTheMonkeyAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAspectOfTheMonkeyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the monkey") { }
|
||||
public:
|
||||
CastAspectOfTheMonkeyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the monkey") {}
|
||||
};
|
||||
|
||||
class CastAspectOfTheDragonhawkAction : public CastBuffSpellAction
|
||||
@@ -97,148 +98,150 @@ public:
|
||||
|
||||
class CastAspectOfTheWildAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAspectOfTheWildAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the wild") { }
|
||||
public:
|
||||
CastAspectOfTheWildAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the wild") {}
|
||||
};
|
||||
|
||||
class CastAspectOfTheCheetahAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAspectOfTheCheetahAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the cheetah") { }
|
||||
public:
|
||||
CastAspectOfTheCheetahAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the cheetah") {}
|
||||
|
||||
bool isUseful() override;
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastAspectOfThePackAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAspectOfThePackAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the pack") { }
|
||||
public:
|
||||
CastAspectOfThePackAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the pack") {}
|
||||
};
|
||||
|
||||
class CastAspectOfTheViperAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAspectOfTheViperAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the viper") { }
|
||||
public:
|
||||
CastAspectOfTheViperAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the viper") {}
|
||||
};
|
||||
|
||||
class CastCallPetAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastCallPetAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "call pet") { }
|
||||
public:
|
||||
CastCallPetAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "call pet") {}
|
||||
};
|
||||
|
||||
class CastMendPetAction : public CastAuraSpellAction
|
||||
{
|
||||
public:
|
||||
CastMendPetAction(PlayerbotAI* botAI) : CastAuraSpellAction(botAI, "mend pet") { }
|
||||
public:
|
||||
CastMendPetAction(PlayerbotAI* botAI) : CastAuraSpellAction(botAI, "mend pet") {}
|
||||
|
||||
std::string const GetTargetName() override { return "pet target"; }
|
||||
std::string const GetTargetName() override { return "pet target"; }
|
||||
};
|
||||
|
||||
class CastRevivePetAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastRevivePetAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "revive pet") { }
|
||||
public:
|
||||
CastRevivePetAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "revive pet") {}
|
||||
};
|
||||
|
||||
class CastTrueshotAuraAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastTrueshotAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "trueshot aura") { }
|
||||
public:
|
||||
CastTrueshotAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "trueshot aura") {}
|
||||
};
|
||||
|
||||
class CastFeignDeathAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastFeignDeathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "feign death") { }
|
||||
public:
|
||||
CastFeignDeathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "feign death") {}
|
||||
};
|
||||
|
||||
class CastRapidFireAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastRapidFireAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "rapid fire") { }
|
||||
public:
|
||||
CastRapidFireAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "rapid fire") {}
|
||||
};
|
||||
|
||||
class CastReadinessAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastReadinessAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "readiness") { }
|
||||
public:
|
||||
CastReadinessAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "readiness") {}
|
||||
};
|
||||
|
||||
class CastBlackArrow : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBlackArrow(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "black arrow", true) { }
|
||||
public:
|
||||
CastBlackArrow(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "black arrow", true) {}
|
||||
};
|
||||
|
||||
class CastFreezingTrap : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastFreezingTrap(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "freezing trap") { }
|
||||
public:
|
||||
CastFreezingTrap(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "freezing trap") {}
|
||||
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
};
|
||||
|
||||
class CastWingClipAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastWingClipAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "wing clip") { }
|
||||
public:
|
||||
CastWingClipAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "wing clip") {}
|
||||
|
||||
bool isUseful() override;
|
||||
NextAction** getPrerequisites() override;
|
||||
bool isUseful() override;
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
class CastRaptorStrikeAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastRaptorStrikeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "raptor strike") { }
|
||||
public:
|
||||
CastRaptorStrikeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "raptor strike") {}
|
||||
};
|
||||
|
||||
class CastMongooseBiteAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastMongooseBiteAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "mongoose bite") { }
|
||||
public:
|
||||
CastMongooseBiteAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "mongoose bite") {}
|
||||
};
|
||||
|
||||
class CastSerpentStingOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||
{
|
||||
public:
|
||||
CastSerpentStingOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "serpent sting", true) { }
|
||||
public:
|
||||
CastSerpentStingOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "serpent sting", true)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class FeedPetAction : public Action
|
||||
{
|
||||
public:
|
||||
FeedPetAction(PlayerbotAI* botAI) : Action(botAI, "feed pet") { }
|
||||
public:
|
||||
FeedPetAction(PlayerbotAI* botAI) : Action(botAI, "feed pet") {}
|
||||
|
||||
bool Execute(Event event) override;
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class CastBestialWrathAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBestialWrathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bestial wrath") { }
|
||||
std::string const GetTargetName() override { return "pet target"; }
|
||||
public:
|
||||
CastBestialWrathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bestial wrath") {}
|
||||
std::string const GetTargetName() override { return "pet target"; }
|
||||
};
|
||||
|
||||
class CastScareBeastAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastScareBeastAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scare beast") { }
|
||||
public:
|
||||
CastScareBeastAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scare beast") {}
|
||||
};
|
||||
|
||||
class CastScareBeastCcAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastScareBeastCcAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scare beast on cc") { }
|
||||
public:
|
||||
CastScareBeastCcAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scare beast on cc") {}
|
||||
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
bool Execute(Event event) override;
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class CastMisdirectionOnMainTankAction : public BuffOnMainTankAction
|
||||
{
|
||||
public:
|
||||
CastMisdirectionOnMainTankAction(PlayerbotAI* ai) : BuffOnMainTankAction(ai, "misdirection", true) {}
|
||||
public:
|
||||
CastMisdirectionOnMainTankAction(PlayerbotAI* ai) : BuffOnMainTankAction(ai, "misdirection", true) {}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,213 +1,218 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "HunterAiObjectContext.h"
|
||||
|
||||
#include "DpsHunterStrategy.h"
|
||||
#include "GenericHunterNonCombatStrategy.h"
|
||||
#include "HunterActions.h"
|
||||
#include "HunterBuffStrategies.h"
|
||||
#include "HunterTriggers.h"
|
||||
#include "GenericHunterNonCombatStrategy.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class HunterStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
HunterStrategyFactoryInternal()
|
||||
{
|
||||
creators["dps"] = &HunterStrategyFactoryInternal::dps;
|
||||
creators["nc"] = &HunterStrategyFactoryInternal::nc;
|
||||
creators["aoe"] = &HunterStrategyFactoryInternal::aoe;
|
||||
creators["dps debuff"] = &HunterStrategyFactoryInternal::dps_debuff;
|
||||
creators["boost"] = &HunterStrategyFactoryInternal::boost;
|
||||
creators["pet"] = &HunterStrategyFactoryInternal::pet;
|
||||
creators["cc"] = &HunterStrategyFactoryInternal::cc;
|
||||
}
|
||||
public:
|
||||
HunterStrategyFactoryInternal()
|
||||
{
|
||||
creators["dps"] = &HunterStrategyFactoryInternal::dps;
|
||||
creators["nc"] = &HunterStrategyFactoryInternal::nc;
|
||||
creators["aoe"] = &HunterStrategyFactoryInternal::aoe;
|
||||
creators["dps debuff"] = &HunterStrategyFactoryInternal::dps_debuff;
|
||||
creators["boost"] = &HunterStrategyFactoryInternal::boost;
|
||||
creators["pet"] = &HunterStrategyFactoryInternal::pet;
|
||||
creators["cc"] = &HunterStrategyFactoryInternal::cc;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* aoe(PlayerbotAI* botAI) { return new DpsAoeHunterStrategy(botAI); }
|
||||
static Strategy* dps(PlayerbotAI* botAI) { return new DpsHunterStrategy(botAI); }
|
||||
static Strategy* nc(PlayerbotAI* botAI) { return new GenericHunterNonCombatStrategy(botAI); }
|
||||
static Strategy* dps_debuff(PlayerbotAI* botAI) { return new DpsHunterDebuffStrategy(botAI); }
|
||||
static Strategy* boost(PlayerbotAI* botAI) { return new HunterBoostStrategy(botAI); }
|
||||
static Strategy* pet(PlayerbotAI* botAI) { return new HunterPetStrategy(botAI); }
|
||||
static Strategy* cc(PlayerbotAI* botAI) { return new HunterCcStrategy(botAI); }
|
||||
private:
|
||||
static Strategy* aoe(PlayerbotAI* botAI) { return new DpsAoeHunterStrategy(botAI); }
|
||||
static Strategy* dps(PlayerbotAI* botAI) { return new DpsHunterStrategy(botAI); }
|
||||
static Strategy* nc(PlayerbotAI* botAI) { return new GenericHunterNonCombatStrategy(botAI); }
|
||||
static Strategy* dps_debuff(PlayerbotAI* botAI) { return new DpsHunterDebuffStrategy(botAI); }
|
||||
static Strategy* boost(PlayerbotAI* botAI) { return new HunterBoostStrategy(botAI); }
|
||||
static Strategy* pet(PlayerbotAI* botAI) { return new HunterPetStrategy(botAI); }
|
||||
static Strategy* cc(PlayerbotAI* botAI) { return new HunterCcStrategy(botAI); }
|
||||
};
|
||||
|
||||
class HunterBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
HunterBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["bspeed"] = &HunterBuffStrategyFactoryInternal::bspeed;
|
||||
creators["bdps"] = &HunterBuffStrategyFactoryInternal::bdps;
|
||||
creators["bmana"] = &HunterBuffStrategyFactoryInternal::bmana;
|
||||
creators["rnature"] = &HunterBuffStrategyFactoryInternal::rnature;
|
||||
}
|
||||
public:
|
||||
HunterBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["bspeed"] = &HunterBuffStrategyFactoryInternal::bspeed;
|
||||
creators["bdps"] = &HunterBuffStrategyFactoryInternal::bdps;
|
||||
creators["bmana"] = &HunterBuffStrategyFactoryInternal::bmana;
|
||||
creators["rnature"] = &HunterBuffStrategyFactoryInternal::rnature;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* bspeed(PlayerbotAI* botAI) { return new HunterBuffSpeedStrategy(botAI); }
|
||||
static Strategy* bdps(PlayerbotAI* botAI) { return new HunterBuffDpsStrategy(botAI); }
|
||||
static Strategy* bmana(PlayerbotAI* botAI) { return new HunterBuffManaStrategy(botAI); }
|
||||
static Strategy* rnature(PlayerbotAI* botAI) { return new HunterNatureResistanceStrategy(botAI); }
|
||||
private:
|
||||
static Strategy* bspeed(PlayerbotAI* botAI) { return new HunterBuffSpeedStrategy(botAI); }
|
||||
static Strategy* bdps(PlayerbotAI* botAI) { return new HunterBuffDpsStrategy(botAI); }
|
||||
static Strategy* bmana(PlayerbotAI* botAI) { return new HunterBuffManaStrategy(botAI); }
|
||||
static Strategy* rnature(PlayerbotAI* botAI) { return new HunterNatureResistanceStrategy(botAI); }
|
||||
};
|
||||
|
||||
class HunterTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
HunterTriggerFactoryInternal()
|
||||
{
|
||||
creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper;
|
||||
creators["black arrow"] = &HunterTriggerFactoryInternal::black_arrow;
|
||||
creators["no stings"] = &HunterTriggerFactoryInternal::NoStings;
|
||||
creators["hunters pet dead"] = &HunterTriggerFactoryInternal::hunters_pet_dead;
|
||||
creators["hunters pet low health"] = &HunterTriggerFactoryInternal::hunters_pet_low_health;
|
||||
creators["hunters pet medium health"] = &HunterTriggerFactoryInternal::hunters_pet_medium_health;
|
||||
creators["hunter's mark"] = &HunterTriggerFactoryInternal::hunters_mark;
|
||||
creators["freezing trap"] = &HunterTriggerFactoryInternal::freezing_trap;
|
||||
creators["aspect of the pack"] = &HunterTriggerFactoryInternal::aspect_of_the_pack;
|
||||
creators["rapid fire"] = &HunterTriggerFactoryInternal::rapid_fire;
|
||||
creators["aspect of the hawk"] = &HunterTriggerFactoryInternal::aspect_of_the_hawk;
|
||||
creators["aspect of the monkey"] = &HunterTriggerFactoryInternal::aspect_of_the_monkey;
|
||||
creators["aspect of the wild"] = &HunterTriggerFactoryInternal::aspect_of_the_wild;
|
||||
creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper;
|
||||
creators["trueshot aura"] = &HunterTriggerFactoryInternal::trueshot_aura;
|
||||
creators["serpent sting on attacker"] = &HunterTriggerFactoryInternal::serpent_sting_on_attacker;
|
||||
creators["pet not happy"] = &HunterTriggerFactoryInternal::pet_not_happy;
|
||||
creators["concussive shot on snare target"] = &HunterTriggerFactoryInternal::concussive_shot_on_snare_target;
|
||||
creators["scare beast"] = &HunterTriggerFactoryInternal::scare_beast;
|
||||
creators["low ammo"] = &HunterTriggerFactoryInternal::low_ammo;
|
||||
creators["no ammo"] = &HunterTriggerFactoryInternal::no_ammo;
|
||||
creators["has ammo"] = &HunterTriggerFactoryInternal::has_ammo;
|
||||
creators["switch to melee"] = &HunterTriggerFactoryInternal::switch_to_melee;
|
||||
creators["switch to ranged"] = &HunterTriggerFactoryInternal::switch_to_ranged;
|
||||
creators["misdirection on main tank"] = &HunterTriggerFactoryInternal::misdirection_on_main_tank;
|
||||
creators["tranquilizing shot"] = &HunterTriggerFactoryInternal::remove_enrage;
|
||||
}
|
||||
public:
|
||||
HunterTriggerFactoryInternal()
|
||||
{
|
||||
creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper;
|
||||
creators["black arrow"] = &HunterTriggerFactoryInternal::black_arrow;
|
||||
creators["no stings"] = &HunterTriggerFactoryInternal::NoStings;
|
||||
creators["hunters pet dead"] = &HunterTriggerFactoryInternal::hunters_pet_dead;
|
||||
creators["hunters pet low health"] = &HunterTriggerFactoryInternal::hunters_pet_low_health;
|
||||
creators["hunters pet medium health"] = &HunterTriggerFactoryInternal::hunters_pet_medium_health;
|
||||
creators["hunter's mark"] = &HunterTriggerFactoryInternal::hunters_mark;
|
||||
creators["freezing trap"] = &HunterTriggerFactoryInternal::freezing_trap;
|
||||
creators["aspect of the pack"] = &HunterTriggerFactoryInternal::aspect_of_the_pack;
|
||||
creators["rapid fire"] = &HunterTriggerFactoryInternal::rapid_fire;
|
||||
creators["aspect of the hawk"] = &HunterTriggerFactoryInternal::aspect_of_the_hawk;
|
||||
creators["aspect of the monkey"] = &HunterTriggerFactoryInternal::aspect_of_the_monkey;
|
||||
creators["aspect of the wild"] = &HunterTriggerFactoryInternal::aspect_of_the_wild;
|
||||
creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper;
|
||||
creators["trueshot aura"] = &HunterTriggerFactoryInternal::trueshot_aura;
|
||||
creators["serpent sting on attacker"] = &HunterTriggerFactoryInternal::serpent_sting_on_attacker;
|
||||
creators["pet not happy"] = &HunterTriggerFactoryInternal::pet_not_happy;
|
||||
creators["concussive shot on snare target"] = &HunterTriggerFactoryInternal::concussive_shot_on_snare_target;
|
||||
creators["scare beast"] = &HunterTriggerFactoryInternal::scare_beast;
|
||||
creators["low ammo"] = &HunterTriggerFactoryInternal::low_ammo;
|
||||
creators["no ammo"] = &HunterTriggerFactoryInternal::no_ammo;
|
||||
creators["has ammo"] = &HunterTriggerFactoryInternal::has_ammo;
|
||||
creators["switch to melee"] = &HunterTriggerFactoryInternal::switch_to_melee;
|
||||
creators["switch to ranged"] = &HunterTriggerFactoryInternal::switch_to_ranged;
|
||||
creators["misdirection on main tank"] = &HunterTriggerFactoryInternal::misdirection_on_main_tank;
|
||||
creators["tranquilizing shot"] = &HunterTriggerFactoryInternal::remove_enrage;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* auto_shot(PlayerbotAI* botAI) { return new AutoShotTrigger(botAI); }
|
||||
static Trigger* scare_beast(PlayerbotAI* botAI) { return new ScareBeastTrigger(botAI); }
|
||||
static Trigger* concussive_shot_on_snare_target(PlayerbotAI* botAI) { return new ConsussiveShotSnareTrigger(botAI); }
|
||||
static Trigger* pet_not_happy(PlayerbotAI* botAI) { return new HunterPetNotHappy(botAI); }
|
||||
static Trigger* serpent_sting_on_attacker(PlayerbotAI* botAI) { return new SerpentStingOnAttackerTrigger(botAI); }
|
||||
static Trigger* trueshot_aura(PlayerbotAI* botAI) { return new TrueshotAuraTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_viper(PlayerbotAI* botAI) { return new HunterAspectOfTheViperTrigger(botAI); }
|
||||
static Trigger* black_arrow(PlayerbotAI* botAI) { return new BlackArrowTrigger(botAI); }
|
||||
static Trigger* NoStings(PlayerbotAI* botAI) { return new HunterNoStingsActiveTrigger(botAI); }
|
||||
static Trigger* hunters_pet_dead(PlayerbotAI* botAI) { return new HuntersPetDeadTrigger(botAI); }
|
||||
static Trigger* hunters_pet_low_health(PlayerbotAI* botAI) { return new HuntersPetLowHealthTrigger(botAI); }
|
||||
static Trigger* hunters_pet_medium_health(PlayerbotAI* botAI) { return new HuntersPetMediumHealthTrigger(botAI); }
|
||||
static Trigger* hunters_mark(PlayerbotAI* botAI) { return new HuntersMarkTrigger(botAI); }
|
||||
static Trigger* freezing_trap(PlayerbotAI* botAI) { return new FreezingTrapTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_pack(PlayerbotAI* botAI) { return new HunterAspectOfThePackTrigger(botAI); }
|
||||
static Trigger* rapid_fire(PlayerbotAI* botAI) { return new RapidFireTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_hawk(PlayerbotAI* botAI) { return new HunterAspectOfTheHawkTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_monkey(PlayerbotAI* botAI) { return new HunterAspectOfTheMonkeyTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_wild(PlayerbotAI* botAI) { return new HunterAspectOfTheWildTrigger(botAI); }
|
||||
static Trigger* low_ammo(PlayerbotAI* botAI) { return new HunterLowAmmoTrigger(botAI); }
|
||||
static Trigger* no_ammo(PlayerbotAI* botAI) { return new HunterNoAmmoTrigger(botAI); }
|
||||
static Trigger* has_ammo(PlayerbotAI* botAI) { return new HunterHasAmmoTrigger(botAI); }
|
||||
static Trigger* switch_to_melee(PlayerbotAI* botAI) { return new SwitchToMeleeTrigger(botAI); }
|
||||
static Trigger* switch_to_ranged(PlayerbotAI* botAI) { return new SwitchToRangedTrigger(botAI); }
|
||||
static Trigger* misdirection_on_main_tank(PlayerbotAI* ai) { return new MisdirectionOnMainTankTrigger(ai); }
|
||||
static Trigger* remove_enrage(PlayerbotAI* ai) { return new TargetRemoveEnrageTrigger(ai); }
|
||||
private:
|
||||
static Trigger* auto_shot(PlayerbotAI* botAI) { return new AutoShotTrigger(botAI); }
|
||||
static Trigger* scare_beast(PlayerbotAI* botAI) { return new ScareBeastTrigger(botAI); }
|
||||
static Trigger* concussive_shot_on_snare_target(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ConsussiveShotSnareTrigger(botAI);
|
||||
}
|
||||
static Trigger* pet_not_happy(PlayerbotAI* botAI) { return new HunterPetNotHappy(botAI); }
|
||||
static Trigger* serpent_sting_on_attacker(PlayerbotAI* botAI) { return new SerpentStingOnAttackerTrigger(botAI); }
|
||||
static Trigger* trueshot_aura(PlayerbotAI* botAI) { return new TrueshotAuraTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_viper(PlayerbotAI* botAI) { return new HunterAspectOfTheViperTrigger(botAI); }
|
||||
static Trigger* black_arrow(PlayerbotAI* botAI) { return new BlackArrowTrigger(botAI); }
|
||||
static Trigger* NoStings(PlayerbotAI* botAI) { return new HunterNoStingsActiveTrigger(botAI); }
|
||||
static Trigger* hunters_pet_dead(PlayerbotAI* botAI) { return new HuntersPetDeadTrigger(botAI); }
|
||||
static Trigger* hunters_pet_low_health(PlayerbotAI* botAI) { return new HuntersPetLowHealthTrigger(botAI); }
|
||||
static Trigger* hunters_pet_medium_health(PlayerbotAI* botAI) { return new HuntersPetMediumHealthTrigger(botAI); }
|
||||
static Trigger* hunters_mark(PlayerbotAI* botAI) { return new HuntersMarkTrigger(botAI); }
|
||||
static Trigger* freezing_trap(PlayerbotAI* botAI) { return new FreezingTrapTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_pack(PlayerbotAI* botAI) { return new HunterAspectOfThePackTrigger(botAI); }
|
||||
static Trigger* rapid_fire(PlayerbotAI* botAI) { return new RapidFireTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_hawk(PlayerbotAI* botAI) { return new HunterAspectOfTheHawkTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_monkey(PlayerbotAI* botAI) { return new HunterAspectOfTheMonkeyTrigger(botAI); }
|
||||
static Trigger* aspect_of_the_wild(PlayerbotAI* botAI) { return new HunterAspectOfTheWildTrigger(botAI); }
|
||||
static Trigger* low_ammo(PlayerbotAI* botAI) { return new HunterLowAmmoTrigger(botAI); }
|
||||
static Trigger* no_ammo(PlayerbotAI* botAI) { return new HunterNoAmmoTrigger(botAI); }
|
||||
static Trigger* has_ammo(PlayerbotAI* botAI) { return new HunterHasAmmoTrigger(botAI); }
|
||||
static Trigger* switch_to_melee(PlayerbotAI* botAI) { return new SwitchToMeleeTrigger(botAI); }
|
||||
static Trigger* switch_to_ranged(PlayerbotAI* botAI) { return new SwitchToRangedTrigger(botAI); }
|
||||
static Trigger* misdirection_on_main_tank(PlayerbotAI* ai) { return new MisdirectionOnMainTankTrigger(ai); }
|
||||
static Trigger* remove_enrage(PlayerbotAI* ai) { return new TargetRemoveEnrageTrigger(ai); }
|
||||
};
|
||||
|
||||
class HunterAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
HunterAiObjectContextInternal()
|
||||
{
|
||||
creators["auto shot"] = &HunterAiObjectContextInternal::auto_shot;
|
||||
creators["aimed shot"] = &HunterAiObjectContextInternal::aimed_shot;
|
||||
creators["chimera shot"] = &HunterAiObjectContextInternal::chimera_shot;
|
||||
creators["explosive shot"] = &HunterAiObjectContextInternal::explosive_shot;
|
||||
creators["arcane shot"] = &HunterAiObjectContextInternal::arcane_shot;
|
||||
creators["concussive shot"] = &HunterAiObjectContextInternal::concussive_shot;
|
||||
creators["distracting shot"] = &HunterAiObjectContextInternal::distracting_shot;
|
||||
creators["multi-shot"] = &HunterAiObjectContextInternal::multi_shot;
|
||||
creators["volley"] = &HunterAiObjectContextInternal::volley;
|
||||
creators["serpent sting"] = &HunterAiObjectContextInternal::serpent_sting;
|
||||
creators["serpent sting on attacker"] = &HunterAiObjectContextInternal::serpent_sting_on_attacker;
|
||||
creators["wyvern sting"] = &HunterAiObjectContextInternal::wyvern_sting;
|
||||
creators["viper sting"] = &HunterAiObjectContextInternal::viper_sting;
|
||||
creators["scorpid sting"] = &HunterAiObjectContextInternal::scorpid_sting;
|
||||
creators["hunter's mark"] = &HunterAiObjectContextInternal::hunters_mark;
|
||||
creators["mend pet"] = &HunterAiObjectContextInternal::mend_pet;
|
||||
creators["revive pet"] = &HunterAiObjectContextInternal::revive_pet;
|
||||
creators["call pet"] = &HunterAiObjectContextInternal::call_pet;
|
||||
creators["black arrow"] = &HunterAiObjectContextInternal::black_arrow;
|
||||
creators["freezing trap"] = &HunterAiObjectContextInternal::freezing_trap;
|
||||
creators["rapid fire"] = &HunterAiObjectContextInternal::rapid_fire;
|
||||
creators["boost"] = &HunterAiObjectContextInternal::rapid_fire;
|
||||
creators["readiness"] = &HunterAiObjectContextInternal::readiness;
|
||||
creators["aspect of the hawk"] = &HunterAiObjectContextInternal::aspect_of_the_hawk;
|
||||
creators["aspect of the monkey"] = &HunterAiObjectContextInternal::aspect_of_the_monkey;
|
||||
creators["aspect of the wild"] = &HunterAiObjectContextInternal::aspect_of_the_wild;
|
||||
creators["aspect of the viper"] = &HunterAiObjectContextInternal::aspect_of_the_viper;
|
||||
creators["aspect of the pack"] = &HunterAiObjectContextInternal::aspect_of_the_pack;
|
||||
creators["aspect of the cheetah"] = &HunterAiObjectContextInternal::aspect_of_the_cheetah;
|
||||
creators["trueshot aura"] = &HunterAiObjectContextInternal::trueshot_aura;
|
||||
creators["feign death"] = &HunterAiObjectContextInternal::feign_death;
|
||||
creators["wing clip"] = &HunterAiObjectContextInternal::wing_clip;
|
||||
creators["raptor strike"] = &HunterAiObjectContextInternal::raptor_strike;
|
||||
creators["mongoose bite"] = &HunterAiObjectContextInternal::mongoose_bite;
|
||||
creators["feed pet"] = &HunterAiObjectContextInternal::feed_pet;
|
||||
creators["bestial wrath"] = &HunterAiObjectContextInternal::bestial_wrath;
|
||||
creators["scare beast"] = &HunterAiObjectContextInternal::scare_beast;
|
||||
creators["scare beast on cc"] = &HunterAiObjectContextInternal::scare_beast_on_cc;
|
||||
creators["aspect of the dragonhawk"] = &HunterAiObjectContextInternal::aspect_of_the_dragonhawk;
|
||||
creators["tranquilizing shot"] = &HunterAiObjectContextInternal::tranquilizing_shot;
|
||||
creators["steady shot"] = &HunterAiObjectContextInternal::steady_shot;
|
||||
creators["kill shot"] = &HunterAiObjectContextInternal::kill_shot;
|
||||
creators["misdirection on main tank"] = &HunterAiObjectContextInternal::misdirection_on_main_tank;
|
||||
}
|
||||
public:
|
||||
HunterAiObjectContextInternal()
|
||||
{
|
||||
creators["auto shot"] = &HunterAiObjectContextInternal::auto_shot;
|
||||
creators["aimed shot"] = &HunterAiObjectContextInternal::aimed_shot;
|
||||
creators["chimera shot"] = &HunterAiObjectContextInternal::chimera_shot;
|
||||
creators["explosive shot"] = &HunterAiObjectContextInternal::explosive_shot;
|
||||
creators["arcane shot"] = &HunterAiObjectContextInternal::arcane_shot;
|
||||
creators["concussive shot"] = &HunterAiObjectContextInternal::concussive_shot;
|
||||
creators["distracting shot"] = &HunterAiObjectContextInternal::distracting_shot;
|
||||
creators["multi-shot"] = &HunterAiObjectContextInternal::multi_shot;
|
||||
creators["volley"] = &HunterAiObjectContextInternal::volley;
|
||||
creators["serpent sting"] = &HunterAiObjectContextInternal::serpent_sting;
|
||||
creators["serpent sting on attacker"] = &HunterAiObjectContextInternal::serpent_sting_on_attacker;
|
||||
creators["wyvern sting"] = &HunterAiObjectContextInternal::wyvern_sting;
|
||||
creators["viper sting"] = &HunterAiObjectContextInternal::viper_sting;
|
||||
creators["scorpid sting"] = &HunterAiObjectContextInternal::scorpid_sting;
|
||||
creators["hunter's mark"] = &HunterAiObjectContextInternal::hunters_mark;
|
||||
creators["mend pet"] = &HunterAiObjectContextInternal::mend_pet;
|
||||
creators["revive pet"] = &HunterAiObjectContextInternal::revive_pet;
|
||||
creators["call pet"] = &HunterAiObjectContextInternal::call_pet;
|
||||
creators["black arrow"] = &HunterAiObjectContextInternal::black_arrow;
|
||||
creators["freezing trap"] = &HunterAiObjectContextInternal::freezing_trap;
|
||||
creators["rapid fire"] = &HunterAiObjectContextInternal::rapid_fire;
|
||||
creators["boost"] = &HunterAiObjectContextInternal::rapid_fire;
|
||||
creators["readiness"] = &HunterAiObjectContextInternal::readiness;
|
||||
creators["aspect of the hawk"] = &HunterAiObjectContextInternal::aspect_of_the_hawk;
|
||||
creators["aspect of the monkey"] = &HunterAiObjectContextInternal::aspect_of_the_monkey;
|
||||
creators["aspect of the wild"] = &HunterAiObjectContextInternal::aspect_of_the_wild;
|
||||
creators["aspect of the viper"] = &HunterAiObjectContextInternal::aspect_of_the_viper;
|
||||
creators["aspect of the pack"] = &HunterAiObjectContextInternal::aspect_of_the_pack;
|
||||
creators["aspect of the cheetah"] = &HunterAiObjectContextInternal::aspect_of_the_cheetah;
|
||||
creators["trueshot aura"] = &HunterAiObjectContextInternal::trueshot_aura;
|
||||
creators["feign death"] = &HunterAiObjectContextInternal::feign_death;
|
||||
creators["wing clip"] = &HunterAiObjectContextInternal::wing_clip;
|
||||
creators["raptor strike"] = &HunterAiObjectContextInternal::raptor_strike;
|
||||
creators["mongoose bite"] = &HunterAiObjectContextInternal::mongoose_bite;
|
||||
creators["feed pet"] = &HunterAiObjectContextInternal::feed_pet;
|
||||
creators["bestial wrath"] = &HunterAiObjectContextInternal::bestial_wrath;
|
||||
creators["scare beast"] = &HunterAiObjectContextInternal::scare_beast;
|
||||
creators["scare beast on cc"] = &HunterAiObjectContextInternal::scare_beast_on_cc;
|
||||
creators["aspect of the dragonhawk"] = &HunterAiObjectContextInternal::aspect_of_the_dragonhawk;
|
||||
creators["tranquilizing shot"] = &HunterAiObjectContextInternal::tranquilizing_shot;
|
||||
creators["steady shot"] = &HunterAiObjectContextInternal::steady_shot;
|
||||
creators["kill shot"] = &HunterAiObjectContextInternal::kill_shot;
|
||||
creators["misdirection on main tank"] = &HunterAiObjectContextInternal::misdirection_on_main_tank;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* scare_beast(PlayerbotAI* botAI) { return new CastScareBeastAction(botAI); }
|
||||
static Action* scare_beast_on_cc(PlayerbotAI* botAI) { return new CastScareBeastCcAction(botAI); }
|
||||
static Action* bestial_wrath(PlayerbotAI* botAI) { return new CastBestialWrathAction(botAI); }
|
||||
static Action* feed_pet(PlayerbotAI* botAI) { return new FeedPetAction(botAI); }
|
||||
static Action* feign_death(PlayerbotAI* botAI) { return new CastFeignDeathAction(botAI); }
|
||||
static Action* trueshot_aura(PlayerbotAI* botAI) { return new CastTrueshotAuraAction(botAI); }
|
||||
static Action* auto_shot(PlayerbotAI* botAI) { return new CastAutoShotAction(botAI); }
|
||||
static Action* aimed_shot(PlayerbotAI* botAI) { return new CastAimedShotAction(botAI); }
|
||||
static Action* chimera_shot(PlayerbotAI* botAI) { return new CastChimeraShotAction(botAI); }
|
||||
static Action* explosive_shot(PlayerbotAI* botAI) { return new CastExplosiveShotAction(botAI); }
|
||||
static Action* arcane_shot(PlayerbotAI* botAI) { return new CastArcaneShotAction(botAI); }
|
||||
static Action* concussive_shot(PlayerbotAI* botAI) { return new CastConcussiveShotAction(botAI); }
|
||||
static Action* distracting_shot(PlayerbotAI* botAI) { return new CastDistractingShotAction(botAI); }
|
||||
static Action* multi_shot(PlayerbotAI* botAI) { return new CastMultiShotAction(botAI); }
|
||||
static Action* volley(PlayerbotAI* botAI) { return new CastVolleyAction(botAI); }
|
||||
static Action* serpent_sting(PlayerbotAI* botAI) { return new CastSerpentStingAction(botAI); }
|
||||
static Action* serpent_sting_on_attacker(PlayerbotAI* botAI) { return new CastSerpentStingOnAttackerAction(botAI); }
|
||||
static Action* wyvern_sting(PlayerbotAI* botAI) { return new CastWyvernStingAction(botAI); }
|
||||
static Action* viper_sting(PlayerbotAI* botAI) { return new CastViperStingAction(botAI); }
|
||||
static Action* scorpid_sting(PlayerbotAI* botAI) { return new CastScorpidStingAction(botAI); }
|
||||
static Action* hunters_mark(PlayerbotAI* botAI) { return new CastHuntersMarkAction(botAI); }
|
||||
static Action* mend_pet(PlayerbotAI* botAI) { return new CastMendPetAction(botAI); }
|
||||
static Action* revive_pet(PlayerbotAI* botAI) { return new CastRevivePetAction(botAI); }
|
||||
static Action* call_pet(PlayerbotAI* botAI) { return new CastCallPetAction(botAI); }
|
||||
static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); }
|
||||
static Action* freezing_trap(PlayerbotAI* botAI) { return new CastFreezingTrap(botAI); }
|
||||
static Action* rapid_fire(PlayerbotAI* botAI) { return new CastRapidFireAction(botAI); }
|
||||
static Action* readiness(PlayerbotAI* botAI) { return new CastReadinessAction(botAI); }
|
||||
static Action* aspect_of_the_hawk(PlayerbotAI* botAI) { return new CastAspectOfTheHawkAction(botAI); }
|
||||
static Action* aspect_of_the_monkey(PlayerbotAI* botAI) { return new CastAspectOfTheMonkeyAction(botAI); }
|
||||
static Action* aspect_of_the_wild(PlayerbotAI* botAI) { return new CastAspectOfTheWildAction(botAI); }
|
||||
static Action* aspect_of_the_viper(PlayerbotAI* botAI) { return new CastAspectOfTheViperAction(botAI); }
|
||||
static Action* aspect_of_the_pack(PlayerbotAI* botAI) { return new CastAspectOfThePackAction(botAI); }
|
||||
static Action* aspect_of_the_cheetah(PlayerbotAI* botAI) { return new CastAspectOfTheCheetahAction(botAI); }
|
||||
static Action* wing_clip(PlayerbotAI* botAI) { return new CastWingClipAction(botAI); }
|
||||
static Action* raptor_strike(PlayerbotAI* botAI) { return new CastRaptorStrikeAction(botAI); }
|
||||
static Action* mongoose_bite(PlayerbotAI* botAI) { return new CastMongooseBiteAction(botAI); }
|
||||
static Action* aspect_of_the_dragonhawk(PlayerbotAI* ai) { return new CastAspectOfTheDragonhawkAction(ai); }
|
||||
static Action* tranquilizing_shot(PlayerbotAI* ai) { return new CastTranquilizingShotAction(ai); }
|
||||
static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); }
|
||||
static Action* kill_shot(PlayerbotAI* ai) { return new CastKillShotAction(ai); }
|
||||
static Action* misdirection_on_main_tank(PlayerbotAI* ai) { return new CastMisdirectionOnMainTankAction(ai); }
|
||||
private:
|
||||
static Action* scare_beast(PlayerbotAI* botAI) { return new CastScareBeastAction(botAI); }
|
||||
static Action* scare_beast_on_cc(PlayerbotAI* botAI) { return new CastScareBeastCcAction(botAI); }
|
||||
static Action* bestial_wrath(PlayerbotAI* botAI) { return new CastBestialWrathAction(botAI); }
|
||||
static Action* feed_pet(PlayerbotAI* botAI) { return new FeedPetAction(botAI); }
|
||||
static Action* feign_death(PlayerbotAI* botAI) { return new CastFeignDeathAction(botAI); }
|
||||
static Action* trueshot_aura(PlayerbotAI* botAI) { return new CastTrueshotAuraAction(botAI); }
|
||||
static Action* auto_shot(PlayerbotAI* botAI) { return new CastAutoShotAction(botAI); }
|
||||
static Action* aimed_shot(PlayerbotAI* botAI) { return new CastAimedShotAction(botAI); }
|
||||
static Action* chimera_shot(PlayerbotAI* botAI) { return new CastChimeraShotAction(botAI); }
|
||||
static Action* explosive_shot(PlayerbotAI* botAI) { return new CastExplosiveShotAction(botAI); }
|
||||
static Action* arcane_shot(PlayerbotAI* botAI) { return new CastArcaneShotAction(botAI); }
|
||||
static Action* concussive_shot(PlayerbotAI* botAI) { return new CastConcussiveShotAction(botAI); }
|
||||
static Action* distracting_shot(PlayerbotAI* botAI) { return new CastDistractingShotAction(botAI); }
|
||||
static Action* multi_shot(PlayerbotAI* botAI) { return new CastMultiShotAction(botAI); }
|
||||
static Action* volley(PlayerbotAI* botAI) { return new CastVolleyAction(botAI); }
|
||||
static Action* serpent_sting(PlayerbotAI* botAI) { return new CastSerpentStingAction(botAI); }
|
||||
static Action* serpent_sting_on_attacker(PlayerbotAI* botAI) { return new CastSerpentStingOnAttackerAction(botAI); }
|
||||
static Action* wyvern_sting(PlayerbotAI* botAI) { return new CastWyvernStingAction(botAI); }
|
||||
static Action* viper_sting(PlayerbotAI* botAI) { return new CastViperStingAction(botAI); }
|
||||
static Action* scorpid_sting(PlayerbotAI* botAI) { return new CastScorpidStingAction(botAI); }
|
||||
static Action* hunters_mark(PlayerbotAI* botAI) { return new CastHuntersMarkAction(botAI); }
|
||||
static Action* mend_pet(PlayerbotAI* botAI) { return new CastMendPetAction(botAI); }
|
||||
static Action* revive_pet(PlayerbotAI* botAI) { return new CastRevivePetAction(botAI); }
|
||||
static Action* call_pet(PlayerbotAI* botAI) { return new CastCallPetAction(botAI); }
|
||||
static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); }
|
||||
static Action* freezing_trap(PlayerbotAI* botAI) { return new CastFreezingTrap(botAI); }
|
||||
static Action* rapid_fire(PlayerbotAI* botAI) { return new CastRapidFireAction(botAI); }
|
||||
static Action* readiness(PlayerbotAI* botAI) { return new CastReadinessAction(botAI); }
|
||||
static Action* aspect_of_the_hawk(PlayerbotAI* botAI) { return new CastAspectOfTheHawkAction(botAI); }
|
||||
static Action* aspect_of_the_monkey(PlayerbotAI* botAI) { return new CastAspectOfTheMonkeyAction(botAI); }
|
||||
static Action* aspect_of_the_wild(PlayerbotAI* botAI) { return new CastAspectOfTheWildAction(botAI); }
|
||||
static Action* aspect_of_the_viper(PlayerbotAI* botAI) { return new CastAspectOfTheViperAction(botAI); }
|
||||
static Action* aspect_of_the_pack(PlayerbotAI* botAI) { return new CastAspectOfThePackAction(botAI); }
|
||||
static Action* aspect_of_the_cheetah(PlayerbotAI* botAI) { return new CastAspectOfTheCheetahAction(botAI); }
|
||||
static Action* wing_clip(PlayerbotAI* botAI) { return new CastWingClipAction(botAI); }
|
||||
static Action* raptor_strike(PlayerbotAI* botAI) { return new CastRaptorStrikeAction(botAI); }
|
||||
static Action* mongoose_bite(PlayerbotAI* botAI) { return new CastMongooseBiteAction(botAI); }
|
||||
static Action* aspect_of_the_dragonhawk(PlayerbotAI* ai) { return new CastAspectOfTheDragonhawkAction(ai); }
|
||||
static Action* tranquilizing_shot(PlayerbotAI* ai) { return new CastTranquilizingShotAction(ai); }
|
||||
static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); }
|
||||
static Action* kill_shot(PlayerbotAI* ai) { return new CastKillShotAction(ai); }
|
||||
static Action* misdirection_on_main_tank(PlayerbotAI* ai) { return new CastMisdirectionOnMainTankAction(ai); }
|
||||
};
|
||||
|
||||
HunterAiObjectContext::HunterAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_HUNTERAIOBJECTCONTEXT_H
|
||||
@@ -11,8 +12,8 @@ class PlayerbotAI;
|
||||
|
||||
class HunterAiObjectContext : public AiObjectContext
|
||||
{
|
||||
public:
|
||||
HunterAiObjectContext(PlayerbotAI* botAI);
|
||||
public:
|
||||
HunterAiObjectContext(PlayerbotAI* botAI);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,51 +1,53 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "HunterBuffStrategies.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class BuffHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
BuffHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["aspect of the hawk"] = &aspect_of_the_hawk;
|
||||
}
|
||||
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*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aspect of the monkey"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
private:
|
||||
static ActionNode* aspect_of_the_hawk([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("aspect of the hawk",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aspect of the monkey"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
HunterBuffDpsStrategy::HunterBuffDpsStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
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::array(0,
|
||||
new NextAction("aspect of the dragonhawk", 20.1f),
|
||||
new NextAction("aspect of the hawk", 20.0f),nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("aspect of the hawk", NextAction::array(0, new NextAction("aspect of the dragonhawk", 20.1f),
|
||||
new NextAction("aspect of the hawk", 20.0f), nullptr)));
|
||||
}
|
||||
|
||||
void HunterNatureResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("aspect of the wild", NextAction::array(0, new NextAction("aspect of the wild", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("aspect of the wild",
|
||||
NextAction::array(0, new NextAction("aspect of the wild", 20.0f), nullptr)));
|
||||
}
|
||||
|
||||
void HunterBuffSpeedStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("aspect of the pack", NextAction::array(0, new NextAction("aspect of the pack", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("aspect of the pack",
|
||||
NextAction::array(0, new NextAction("aspect of the pack", 20.0f), nullptr)));
|
||||
}
|
||||
|
||||
void HunterBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("aspect of the viper", NextAction::array(0, new NextAction("aspect of the viper", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("aspect of the viper",
|
||||
NextAction::array(0, new NextAction("aspect of the viper", 20.0f), nullptr)));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_HUNTERBUFFSTRATEGIES_H
|
||||
@@ -11,38 +12,38 @@ class PlayerbotAI;
|
||||
|
||||
class HunterBuffSpeedStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterBuffSpeedStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
|
||||
public:
|
||||
HunterBuffSpeedStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "bspeed"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bspeed"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterBuffManaStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterBuffManaStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
|
||||
public:
|
||||
HunterBuffManaStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "bmana"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bmana"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterBuffDpsStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterBuffDpsStrategy(PlayerbotAI* botAI);
|
||||
public:
|
||||
HunterBuffDpsStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "bdps"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bdps"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class HunterNatureResistanceStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
HunterNatureResistanceStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
|
||||
public:
|
||||
HunterNatureResistanceStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "rnature"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "rnature"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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 "HunterTriggers.h"
|
||||
|
||||
#include "GenericTriggers.h"
|
||||
#include "HunterActions.h"
|
||||
#include "PlayerbotAIConfig.h"
|
||||
@@ -13,18 +15,16 @@
|
||||
bool HunterAspectOfTheHawkTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
return SpellTrigger::IsActive() &&
|
||||
!botAI->HasAura("aspect of the hawk", target) && !botAI->HasAura("aspect of the dragonhawk", target) &&
|
||||
(!AI_VALUE2(bool, "has mana", "self target") || AI_VALUE2(uint8, "mana", "self target") > 70);
|
||||
return SpellTrigger::IsActive() && !botAI->HasAura("aspect of the hawk", target) &&
|
||||
!botAI->HasAura("aspect of the dragonhawk", target) &&
|
||||
(!AI_VALUE2(bool, "has mana", "self target") || AI_VALUE2(uint8, "mana", "self target") > 70);
|
||||
}
|
||||
|
||||
bool HunterNoStingsActiveTrigger::IsActive()
|
||||
{
|
||||
Unit* target = AI_VALUE(Unit*, "current target");
|
||||
return DebuffTrigger::IsActive() && target &&
|
||||
!botAI->HasAura("serpent sting", target, false, true) &&
|
||||
!botAI->HasAura("scorpid sting", target, false, true) &&
|
||||
!botAI->HasAura("viper sting", target, false, true);
|
||||
Unit* target = AI_VALUE(Unit*, "current target");
|
||||
return DebuffTrigger::IsActive() && target && !botAI->HasAura("serpent sting", target, false, true) &&
|
||||
!botAI->HasAura("scorpid sting", target, false, true) && !botAI->HasAura("viper sting", target, false, true);
|
||||
}
|
||||
|
||||
bool HuntersPetDeadTrigger::IsActive()
|
||||
@@ -37,13 +37,15 @@ bool HuntersPetDeadTrigger::IsActive()
|
||||
bool HuntersPetLowHealthTrigger::IsActive()
|
||||
{
|
||||
Unit* pet = AI_VALUE(Unit*, "pet target");
|
||||
return pet && AI_VALUE2(uint8, "health", "pet target") < 40 && !AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target");
|
||||
return pet && AI_VALUE2(uint8, "health", "pet target") < 40 && !AI_VALUE2(bool, "dead", "pet target") &&
|
||||
!AI_VALUE2(bool, "mounted", "self target");
|
||||
}
|
||||
|
||||
bool HuntersPetMediumHealthTrigger::IsActive()
|
||||
{
|
||||
Unit* pet = AI_VALUE(Unit*, "pet target");
|
||||
return pet && AI_VALUE2(uint8, "health", "pet target") < sPlayerbotAIConfig->mediumHealth && !AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target");
|
||||
return pet && AI_VALUE2(uint8, "health", "pet target") < sPlayerbotAIConfig->mediumHealth &&
|
||||
!AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target");
|
||||
}
|
||||
|
||||
bool HunterPetNotHappy::IsActive()
|
||||
@@ -53,8 +55,9 @@ bool HunterPetNotHappy::IsActive()
|
||||
|
||||
bool HunterAspectOfTheViperTrigger::IsActive()
|
||||
{
|
||||
return SpellTrigger::IsActive() && !botAI->HasAura(spell, GetTarget()) &&
|
||||
AI_VALUE2(uint8, "mana", "self target") < sPlayerbotAIConfig->lowMana;;
|
||||
return SpellTrigger::IsActive() && !botAI->HasAura(spell, GetTarget()) &&
|
||||
AI_VALUE2(uint8, "mana", "self target") < sPlayerbotAIConfig->lowMana;
|
||||
;
|
||||
}
|
||||
|
||||
bool HunterAspectOfThePackTrigger::IsActive()
|
||||
@@ -64,30 +67,30 @@ bool HunterAspectOfThePackTrigger::IsActive()
|
||||
|
||||
bool HunterLowAmmoTrigger::IsActive()
|
||||
{
|
||||
return bot->GetGroup() && (AI_VALUE2(uint32, "item count", "ammo") < 100) && (AI_VALUE2(uint32, "item count", "ammo") > 0);
|
||||
return bot->GetGroup() && (AI_VALUE2(uint32, "item count", "ammo") < 100) &&
|
||||
(AI_VALUE2(uint32, "item count", "ammo") > 0);
|
||||
}
|
||||
|
||||
bool HunterHasAmmoTrigger::IsActive()
|
||||
{
|
||||
return !AmmoCountTrigger::IsActive();
|
||||
}
|
||||
bool HunterHasAmmoTrigger::IsActive() { return !AmmoCountTrigger::IsActive(); }
|
||||
|
||||
bool SwitchToRangedTrigger::IsActive()
|
||||
{
|
||||
Unit* target = AI_VALUE(Unit*, "current target");
|
||||
return botAI->HasStrategy("close", BOT_STATE_COMBAT) && target && (target->GetVictim() != bot &&
|
||||
sServerFacade->IsDistanceGreaterThan(AI_VALUE2(float, "distance", "current target"), 8.0f));
|
||||
return botAI->HasStrategy("close", BOT_STATE_COMBAT) && target &&
|
||||
(target->GetVictim() != bot &&
|
||||
sServerFacade->IsDistanceGreaterThan(AI_VALUE2(float, "distance", "current target"), 8.0f));
|
||||
}
|
||||
|
||||
bool SwitchToMeleeTrigger::IsActive()
|
||||
{
|
||||
Unit* target = AI_VALUE(Unit*, "current target");
|
||||
return botAI->HasStrategy("ranged", BOT_STATE_COMBAT) && target && (target->GetVictim() == bot &&
|
||||
sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", "current target"), 8.0f));
|
||||
return botAI->HasStrategy("ranged", BOT_STATE_COMBAT) && target &&
|
||||
(target->GetVictim() == bot &&
|
||||
sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", "current target"), 8.0f));
|
||||
}
|
||||
|
||||
bool TargetRemoveEnrageTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
return target && (botAI->HasAuraToDispel(target, DISPEL_ENRAGE) || botAI->HasAuraToDispel(target, DISPEL_MAGIC));
|
||||
Unit* target = GetTarget();
|
||||
return target && (botAI->HasAuraToDispel(target, DISPEL_ENRAGE) || botAI->HasAuraToDispel(target, DISPEL_MAGIC));
|
||||
}
|
||||
@@ -1,64 +1,65 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_HUNTERTRIGGERS_H
|
||||
#define _PLAYERBOT_HUNTERTRIGGERS_H
|
||||
|
||||
#include "CureTriggers.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "Trigger.h"
|
||||
#include "CureTriggers.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class HunterNoStingsActiveTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
HunterNoStingsActiveTrigger(PlayerbotAI* botAI): DebuffTrigger(botAI, "no stings") {}
|
||||
bool IsActive() override;
|
||||
public:
|
||||
HunterNoStingsActiveTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "no stings") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class AutoShotTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
AutoShotTrigger(PlayerbotAI* botAI) : Trigger(botAI, "auto shot") { }
|
||||
public:
|
||||
AutoShotTrigger(PlayerbotAI* botAI) : Trigger(botAI, "auto shot") {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class HunterAspectOfTheMonkeyTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
HunterAspectOfTheMonkeyTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the monkey") { }
|
||||
public:
|
||||
HunterAspectOfTheMonkeyTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the monkey") {}
|
||||
};
|
||||
|
||||
class HunterAspectOfTheHawkTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
HunterAspectOfTheHawkTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the hawk") { }
|
||||
bool IsActive() override;
|
||||
public:
|
||||
HunterAspectOfTheHawkTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the hawk") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class HunterAspectOfTheWildTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
HunterAspectOfTheWildTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the wild") { }
|
||||
public:
|
||||
HunterAspectOfTheWildTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the wild") {}
|
||||
};
|
||||
|
||||
class HunterAspectOfTheViperTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
HunterAspectOfTheViperTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the viper") { }
|
||||
public:
|
||||
HunterAspectOfTheViperTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the viper") {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class HunterAspectOfThePackTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
HunterAspectOfThePackTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the pack") { }
|
||||
public:
|
||||
HunterAspectOfThePackTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the pack") {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
BEGIN_TRIGGER(HuntersPetDeadTrigger, Trigger)
|
||||
@@ -72,38 +73,38 @@ END_TRIGGER()
|
||||
|
||||
class BlackArrowTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
BlackArrowTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "black arrow", 1, true) { }
|
||||
public:
|
||||
BlackArrowTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "black arrow", 1, true) {}
|
||||
};
|
||||
|
||||
class HuntersMarkTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "hunter's mark", 1, false, 25.0f) { }
|
||||
public:
|
||||
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "hunter's mark", 1, false, 25.0f) {}
|
||||
};
|
||||
|
||||
class FreezingTrapTrigger : public HasCcTargetTrigger
|
||||
{
|
||||
public:
|
||||
FreezingTrapTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "freezing trap") { }
|
||||
public:
|
||||
FreezingTrapTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "freezing trap") {}
|
||||
};
|
||||
|
||||
class RapidFireTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
RapidFireTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "rapid fire") { }
|
||||
public:
|
||||
RapidFireTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "rapid fire") {}
|
||||
};
|
||||
|
||||
class TrueshotAuraTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
TrueshotAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "trueshot aura") { }
|
||||
public:
|
||||
TrueshotAuraTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "trueshot aura") {}
|
||||
};
|
||||
|
||||
class SerpentStingOnAttackerTrigger : public DebuffOnAttackerTrigger
|
||||
{
|
||||
public:
|
||||
SerpentStingOnAttackerTrigger(PlayerbotAI* botAI) : DebuffOnAttackerTrigger(botAI, "serpent sting", true) { }
|
||||
public:
|
||||
SerpentStingOnAttackerTrigger(PlayerbotAI* botAI) : DebuffOnAttackerTrigger(botAI, "serpent sting", true) {}
|
||||
};
|
||||
|
||||
BEGIN_TRIGGER(HunterPetNotHappy, Trigger)
|
||||
@@ -111,64 +112,64 @@ END_TRIGGER()
|
||||
|
||||
class ConsussiveShotSnareTrigger : public SnareTargetTrigger
|
||||
{
|
||||
public:
|
||||
ConsussiveShotSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "concussive shot") { }
|
||||
public:
|
||||
ConsussiveShotSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "concussive shot") {}
|
||||
};
|
||||
|
||||
class ScareBeastTrigger : public HasCcTargetTrigger
|
||||
{
|
||||
public:
|
||||
ScareBeastTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "scare beast") { }
|
||||
public:
|
||||
ScareBeastTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "scare beast") {}
|
||||
};
|
||||
|
||||
class HunterLowAmmoTrigger : public AmmoCountTrigger
|
||||
{
|
||||
public:
|
||||
HunterLowAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 30) { }
|
||||
public:
|
||||
HunterLowAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 30) {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class HunterNoAmmoTrigger : public AmmoCountTrigger
|
||||
{
|
||||
public:
|
||||
HunterNoAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 10) { }
|
||||
public:
|
||||
HunterNoAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 10) {}
|
||||
};
|
||||
|
||||
class HunterHasAmmoTrigger : public AmmoCountTrigger
|
||||
{
|
||||
public:
|
||||
HunterHasAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 10) { }
|
||||
public:
|
||||
HunterHasAmmoTrigger(PlayerbotAI* botAI) : AmmoCountTrigger(botAI, "ammo", 1, 10) {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class SwitchToRangedTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
SwitchToRangedTrigger(PlayerbotAI* botAI) : Trigger(botAI, "switch to ranged") { }
|
||||
public:
|
||||
SwitchToRangedTrigger(PlayerbotAI* botAI) : Trigger(botAI, "switch to ranged") {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class SwitchToMeleeTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
SwitchToMeleeTrigger(PlayerbotAI* botAI) : Trigger(botAI, "switch to melee") { }
|
||||
public:
|
||||
SwitchToMeleeTrigger(PlayerbotAI* botAI) : Trigger(botAI, "switch to melee") {}
|
||||
|
||||
bool IsActive() override;
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class MisdirectionOnMainTankTrigger : public BuffOnMainTankTrigger
|
||||
{
|
||||
public:
|
||||
MisdirectionOnMainTankTrigger(PlayerbotAI* ai) : BuffOnMainTankTrigger(ai, "misdirection", true) {}
|
||||
public:
|
||||
MisdirectionOnMainTankTrigger(PlayerbotAI* ai) : BuffOnMainTankTrigger(ai, "misdirection", true) {}
|
||||
};
|
||||
|
||||
class TargetRemoveEnrageTrigger : public TargetAuraDispelTrigger
|
||||
{
|
||||
public:
|
||||
TargetRemoveEnrageTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_ENRAGE) {}
|
||||
bool IsActive() override;
|
||||
public:
|
||||
TargetRemoveEnrageTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_ENRAGE) {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user