mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-25 06:26:24 +00:00
Improve gear initialization (#909)
* Druid and paladin rotation * Improve spell effect collector for gear init * Fix mount and hit stat calculator
This commit is contained in:
@@ -115,7 +115,9 @@ CasterDruidStrategy::CasterDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrat
|
||||
|
||||
NextAction** CasterDruidStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("starfall", ACTION_DEFAULT + 0.2f),
|
||||
return NextAction::array(0,
|
||||
new NextAction("starfall", ACTION_HIGH + 1.0f),
|
||||
new NextAction("force of nature", ACTION_DEFAULT + 1.0f),
|
||||
new NextAction("wrath", ACTION_DEFAULT + 0.1f),
|
||||
// new NextAction("starfire", ACTION_NORMAL),
|
||||
nullptr);
|
||||
@@ -127,20 +129,19 @@ void CasterDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
// triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell",
|
||||
// ACTION_MOVE), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (lunar) cooldown",
|
||||
NextAction::array(0, new NextAction("starfire", ACTION_DEFAULT + 0.2f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (solar) cooldown",
|
||||
NextAction::array(0, new NextAction("wrath", ACTION_DEFAULT + 0.2f), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"insect swarm", NextAction::array(0, new NextAction("insect swarm", ACTION_NORMAL + 5), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("eclipse (solar)", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (lunar) cooldown",
|
||||
NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (lunar)",
|
||||
NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (solar) cooldown",
|
||||
NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 2), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 9), NULL)));
|
||||
triggers.push_back(new TriggerNode("enemy too close for spell",
|
||||
@@ -152,8 +153,7 @@ void CasterDruidAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("hurricane", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"light aoe", NextAction::array(0, new NextAction("starfall", ACTION_NORMAL + 5),
|
||||
new NextAction("insect swarm on attacker", ACTION_NORMAL + 3),
|
||||
"light aoe", NextAction::array(0, new NextAction("insect swarm on attacker", ACTION_NORMAL + 3),
|
||||
new NextAction("moonfire on attacker", ACTION_NORMAL + 3), NULL)));
|
||||
}
|
||||
|
||||
|
||||
@@ -323,4 +323,10 @@ public:
|
||||
Unit* GetTarget() override;
|
||||
};
|
||||
|
||||
class CastForceOfNatureAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastForceOfNatureAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "force of nature") {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -233,6 +233,7 @@ public:
|
||||
creators["insect swarm on attacker"] = &DruidAiObjectContextInternal::insect_swarm_on_attacker;
|
||||
creators["moonfire on attacker"] = &DruidAiObjectContextInternal::moonfire_on_attacker;
|
||||
creators["enrage"] = &DruidAiObjectContextInternal::enrage;
|
||||
creators["force of nature"] = &DruidAiObjectContextInternal::force_of_nature;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -317,6 +318,7 @@ private:
|
||||
static Action* insect_swarm_on_attacker(PlayerbotAI* ai) { return new CastInsectSwarmOnAttackerAction(ai); }
|
||||
static Action* moonfire_on_attacker(PlayerbotAI* ai) { return new CastMoonfireOnAttackerAction(ai); }
|
||||
static Action* enrage(PlayerbotAI* ai) { return new CastEnrageAction(ai); }
|
||||
static Action* force_of_nature(PlayerbotAI* ai) { return new CastForceOfNatureAction(ai); }
|
||||
};
|
||||
|
||||
DruidAiObjectContext::DruidAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
|
||||
Reference in New Issue
Block a user