mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Migrate important cooldowns over to BoostStrategy
This commit focuses on the changes requested - Migrate important cooldowns over to BoostStrategy. Just tested it, and it is working fine - The player has more control over when they can boost. Also, added Mirror Image to the Boost Strategy, after other cooldowns are used - this way the mirror images get the buffs.
This commit is contained in:
@@ -53,10 +53,6 @@ void ArcaneMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
{
|
{
|
||||||
GenericMageStrategy::InitTriggers(triggers);
|
GenericMageStrategy::InitTriggers(triggers);
|
||||||
|
|
||||||
// Cooldown Triggers
|
|
||||||
triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 29.0f), nullptr)));
|
|
||||||
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 28.5f), nullptr)));
|
|
||||||
|
|
||||||
// Proc Trigger
|
// Proc Trigger
|
||||||
triggers.push_back(new TriggerNode("arcane blast 4 stacks and missile barrage", NextAction::array(0, new NextAction("arcane missiles", 15.0f), nullptr)));
|
triggers.push_back(new TriggerNode("arcane blast 4 stacks and missile barrage", NextAction::array(0, new NextAction("arcane missiles", 15.0f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ void FireMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
{
|
{
|
||||||
GenericMageStrategy::InitTriggers(triggers);
|
GenericMageStrategy::InitTriggers(triggers);
|
||||||
|
|
||||||
// Cooldown Trigger
|
|
||||||
triggers.push_back(new TriggerNode("combustion", NextAction::array(0, new NextAction("combustion", 18.0f), nullptr)));
|
|
||||||
|
|
||||||
// Debuff Triggers
|
// Debuff Triggers
|
||||||
triggers.push_back(new TriggerNode("improved scorch", NextAction::array(0, new NextAction("scorch", 19.0f), nullptr)));
|
triggers.push_back(new TriggerNode("improved scorch", NextAction::array(0, new NextAction("scorch", 19.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("living bomb", NextAction::array(0, new NextAction("living bomb", 18.5f), nullptr)));
|
triggers.push_back(new TriggerNode("living bomb", NextAction::array(0, new NextAction("living bomb", 18.5f), nullptr)));
|
||||||
|
|||||||
@@ -50,10 +50,6 @@ void FrostFireMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
{
|
{
|
||||||
GenericMageStrategy::InitTriggers(triggers);
|
GenericMageStrategy::InitTriggers(triggers);
|
||||||
|
|
||||||
// Cooldown Triggers
|
|
||||||
triggers.push_back(new TriggerNode("combustion", NextAction::array(0, new NextAction("combustion", 18.0f), nullptr)));
|
|
||||||
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 17.5f), nullptr)));
|
|
||||||
|
|
||||||
// Debuff Triggers
|
// Debuff Triggers
|
||||||
triggers.push_back(new TriggerNode("improved scorch", NextAction::array(0, new NextAction("scorch", 19.0f), nullptr)));
|
triggers.push_back(new TriggerNode("improved scorch", NextAction::array(0, new NextAction("scorch", 19.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("living bomb", NextAction::array(0, new NextAction("living bomb", 18.5f), nullptr)));
|
triggers.push_back(new TriggerNode("living bomb", NextAction::array(0, new NextAction("living bomb", 18.5f), nullptr)));
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ void FrostMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
{
|
{
|
||||||
GenericMageStrategy::InitTriggers(triggers);
|
GenericMageStrategy::InitTriggers(triggers);
|
||||||
|
|
||||||
// Cooldown triggers
|
|
||||||
triggers.push_back(new TriggerNode("cold snap", NextAction::array(0, new NextAction("cold snap", 28.0f), nullptr)));
|
|
||||||
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 27.5f), nullptr)));
|
|
||||||
|
|
||||||
// Pet/Defensive triggers
|
// Pet/Defensive triggers
|
||||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon water elemental", 30.0f), nullptr)));
|
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon water elemental", 30.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", 29.5f), nullptr)));
|
triggers.push_back(new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", 29.5f), nullptr)));
|
||||||
|
|||||||
@@ -203,6 +203,35 @@ void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
|
|
||||||
void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
|
Player* bot = botAI->GetBot();
|
||||||
|
int tab = AiFactory::GetPlayerSpecTab(bot);
|
||||||
|
|
||||||
|
if (tab == 0) // Arcane
|
||||||
|
{
|
||||||
|
triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 29.0f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 28.5f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 28.0f), nullptr)));
|
||||||
|
}
|
||||||
|
else if (tab == 1)
|
||||||
|
{
|
||||||
|
if (bot->HasSpell(44614) /*Frostfire Bolt*/ && bot->HasAura(15047) /*Ice Shards*/)
|
||||||
|
{ // Frostfire
|
||||||
|
triggers.push_back(new TriggerNode("combustion", NextAction::array(0, new NextAction("combustion", 18.0f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 17.5f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 17.0f), nullptr)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // Fire
|
||||||
|
triggers.push_back(new TriggerNode("combustion", NextAction::array(0, new NextAction("combustion", 18.0f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 17.5f), nullptr)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (tab == 2) // Frost
|
||||||
|
{
|
||||||
|
triggers.push_back(new TriggerNode("cold snap", NextAction::array(0, new NextAction("cold snap", 28.0f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 27.5f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 26.0f), nullptr)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -115,10 +115,10 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CombustionTrigger : public BuffTrigger
|
class CombustionTrigger : public BoostTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CombustionTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "combustion") {}
|
CombustionTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "combustion") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class IcyVeinsCooldownTrigger : public SpellCooldownTrigger
|
class IcyVeinsCooldownTrigger : public SpellCooldownTrigger
|
||||||
@@ -141,27 +141,27 @@ public:
|
|||||||
ColdSnapTrigger(PlayerbotAI* ai) : TwoTriggers(ai, "icy veins on cd", "deep freeze on cd") {}
|
ColdSnapTrigger(PlayerbotAI* ai) : TwoTriggers(ai, "icy veins on cd", "deep freeze on cd") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MirrorImageTrigger : public BuffTrigger
|
class MirrorImageTrigger : public BoostTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MirrorImageTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "mirror image") {}
|
MirrorImageTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "mirror image") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class IcyVeinsTrigger : public BuffTrigger
|
class IcyVeinsTrigger : public BoostTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IcyVeinsTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "icy veins") {}
|
IcyVeinsTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "icy veins") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArcanePowerTrigger : public BuffTrigger
|
class ArcanePowerTrigger : public BoostTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArcanePowerTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "arcane power") {}
|
ArcanePowerTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "arcane power") {}
|
||||||
};
|
};
|
||||||
class PresenceOfMindTrigger : public BuffTrigger
|
class PresenceOfMindTrigger : public BoostTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PresenceOfMindTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "presence of mind") {}
|
PresenceOfMindTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "presence of mind") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// CC, Interrupt, and Dispel Triggers
|
// CC, Interrupt, and Dispel Triggers
|
||||||
|
|||||||
Reference in New Issue
Block a user