mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08: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)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user