mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 09:29:09 +00:00
Warlock Ranged Designation/DPS Strategy Cleanup
Hello community,
This PR focuses on 4 things:
Recognizing the Warlock as a "ranged" bot, so they will follow ranged commands and strategies, in GenericWarlockStrategy.h:
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
Cleanup/deletion of the DpsWarlockStrategy.cpp and .h (no longer used or referenced anywhere)
Fixes soulstone logic so multiple Warlocks don't soulstone the same target, and don't try to soulstone a target that is too far away or out of line of sight (WarlockActions.cpp)
Moved summoning of pets to the main non-combat strategy inittriggers:
// Pet-summoning triggers based on spec
if (tab == 0) // Affliction
{
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felhunter", 29.0f), nullptr)));
}
else if (tab == 1) // Demonology
{
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felguard", 29.0f), nullptr)));
}
else if (tab == 2) // Destruction
{
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon imp", 29.0f), nullptr)));
}
This commit is contained in:
@@ -89,77 +89,31 @@ void GenericWarlockNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& tr
|
||||
Player* bot = botAI->GetBot();
|
||||
int tab = AiFactory::GetPlayerSpecTab(bot);
|
||||
|
||||
// Firestone/Spellstone triggers
|
||||
if (tab == 2) // Destruction uses Firestone
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("no firestone", NextAction::array(0, new NextAction("create firestone", 24.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("firestone", NextAction::array(0, new NextAction("firestone", 24.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("no firestone", NextAction::array(0, new NextAction("create firestone", 24.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("firestone", NextAction::array(0, new NextAction("firestone", 24.0f), nullptr)));
|
||||
}
|
||||
else // Affliction and Demonology use Spellstone
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no spellstone",
|
||||
NextAction::array(0, new NextAction("create spellstone", 24.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("spellstone", NextAction::array(0, new NextAction("spellstone", 24.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("no spellstone", NextAction::array(0, new NextAction("create spellstone", 24.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("spellstone", NextAction::array(0, new NextAction("spellstone", 24.0f), nullptr)));
|
||||
}
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Imp
|
||||
// Enabled by default for the Destruction spec
|
||||
// To enable, type "nc +imp"
|
||||
// To disable, type "nc -imp"
|
||||
SummonImpStrategy::SummonImpStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonImpStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon imp", 29.0f), NULL)));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Voidwalker
|
||||
// Disabled by default
|
||||
// To enable, type "nc +voidwalker"
|
||||
// To disable, type "nc -voidwalker"
|
||||
SummonVoidwalkerStrategy::SummonVoidwalkerStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonVoidwalkerStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("no pet", NextAction::array(0, new NextAction("summon voidwalker", 29.0f), NULL)));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Succubus
|
||||
// Disabled by default
|
||||
// To enable, type "nc +succubus"
|
||||
// To disable, type "nc -succubus"
|
||||
SummonSuccubusStrategy::SummonSuccubusStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonSuccubusStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon succubus", 29.0f), NULL)));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Felhunter
|
||||
// Enabled by default for the Affliction spec
|
||||
// To enable, type "nc +felhunter"
|
||||
// To disable, type "nc -felhunter"
|
||||
SummonFelhunterStrategy::SummonFelhunterStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonFelhunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felhunter", 29.0f), NULL)));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Felguard
|
||||
// Enabled by default for the Demonology spec
|
||||
// To enable, type "nc +felguard"
|
||||
// To disable, type "nc -felguard"
|
||||
SummonFelguardStrategy::SummonFelguardStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonFelguardStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felguard", 29.0f), NULL)));
|
||||
// Pet-summoning triggers based on spec
|
||||
if (tab == 0) // Affliction
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felhunter", 29.0f), nullptr)));
|
||||
}
|
||||
else if (tab == 1) // Demonology
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felguard", 29.0f), nullptr)));
|
||||
}
|
||||
else if (tab == 2) // Destruction
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon imp", 29.0f), nullptr)));
|
||||
}
|
||||
}
|
||||
|
||||
// Non-combat strategy for selecting themselves to receive soulstone
|
||||
|
||||
Reference in New Issue
Block a user