mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +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:
@@ -8,7 +8,6 @@
|
||||
#include "DemonologyWarlockStrategy.h"
|
||||
#include "DestructionWarlockStrategy.h"
|
||||
#include "TankWarlockStrategy.h"
|
||||
#include "DpsWarlockStrategy.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "GenericWarlockNonCombatStrategy.h"
|
||||
#include "NamedObjectContext.h"
|
||||
@@ -29,15 +28,10 @@ public:
|
||||
creators["boost"] = &WarlockStrategyFactoryInternal::boost;
|
||||
creators["cc"] = &WarlockStrategyFactoryInternal::cc;
|
||||
creators["pet"] = &WarlockStrategyFactoryInternal::pet;
|
||||
creators["affli"] = &WarlockStrategyFactoryInternal::affliction;
|
||||
creators["affli aoe"] = &WarlockStrategyFactoryInternal::affliction_aoe;
|
||||
creators["demo"] = &WarlockStrategyFactoryInternal::demonology;
|
||||
creators["demo aoe"] = &WarlockStrategyFactoryInternal::demonology_aoe;
|
||||
creators["destro"] = &WarlockStrategyFactoryInternal::destruction;
|
||||
creators["destro aoe"] = &WarlockStrategyFactoryInternal::destruction_aoe;
|
||||
creators["meta melee"] = &WarlockStrategyFactoryInternal::meta_melee_aoe;
|
||||
creators["dps"] = &WarlockStrategyFactoryInternal::dps;
|
||||
creators["aoe"] = &WarlockStrategyFactoryInternal::aoe;
|
||||
creators["curse of elements"] = &WarlockStrategyFactoryInternal::curse_of_elements;
|
||||
}
|
||||
|
||||
@@ -47,15 +41,10 @@ private:
|
||||
static Strategy* pull(PlayerbotAI* botAI) { return new PullStrategy(botAI, "shoot"); }
|
||||
static Strategy* boost(PlayerbotAI* botAI) { return new WarlockBoostStrategy(botAI); }
|
||||
static Strategy* cc(PlayerbotAI* botAI) { return new WarlockCcStrategy(botAI); }
|
||||
static Strategy* affliction(PlayerbotAI* botAI) { return new AfflictionWarlockStrategy(botAI); }
|
||||
static Strategy* affliction_aoe(PlayerbotAI* botAI) { return new AfflictionWarlockAoeStrategy(botAI); }
|
||||
static Strategy* demonology(PlayerbotAI* botAI) { return new DemonologyWarlockStrategy(botAI); }
|
||||
static Strategy* demonology_aoe(PlayerbotAI* botAI) { return new DemonologyWarlockAoeStrategy(botAI); }
|
||||
static Strategy* destruction(PlayerbotAI* botAI) { return new DestructionWarlockStrategy(botAI); }
|
||||
static Strategy* destruction_aoe(PlayerbotAI* botAI) { return new DestructionWarlockAoeStrategy(botAI); }
|
||||
static Strategy* meta_melee_aoe(PlayerbotAI* botAI) { return new MetaMeleeAoeStrategy(botAI); }
|
||||
static Strategy* dps(PlayerbotAI* botAI) { return new DpsWarlockStrategy(botAI); }
|
||||
static Strategy* aoe(PlayerbotAI* botAI) { return new DpsAoeWarlockStrategy(botAI); }
|
||||
static Strategy* curse_of_elements(PlayerbotAI* botAI) { return new WarlockCurseOfTheElementsStrategy(botAI); }
|
||||
};
|
||||
|
||||
@@ -65,10 +54,16 @@ public:
|
||||
WarlockCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["tank"] = &WarlockCombatStrategyFactoryInternal::tank;
|
||||
creators["affli"] = &WarlockCombatStrategyFactoryInternal::affliction;
|
||||
creators["demo"] = &WarlockCombatStrategyFactoryInternal::demonology;
|
||||
creators["destro"] = &WarlockCombatStrategyFactoryInternal::destruction;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* tank(PlayerbotAI* botAI) { return new TankWarlockStrategy(botAI); }
|
||||
static Strategy* affliction(PlayerbotAI* botAI) { return new AfflictionWarlockStrategy(botAI); }
|
||||
static Strategy* demonology(PlayerbotAI* botAI) { return new DemonologyWarlockStrategy(botAI); }
|
||||
static Strategy* destruction(PlayerbotAI* botAI) { return new DestructionWarlockStrategy(botAI); }
|
||||
};
|
||||
|
||||
class NonCombatBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
@@ -76,11 +71,6 @@ class NonCombatBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
public:
|
||||
NonCombatBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["imp"] = &NonCombatBuffStrategyFactoryInternal::imp;
|
||||
creators["voidwalker"] = &NonCombatBuffStrategyFactoryInternal::voidwalker;
|
||||
creators["succubus"] = &NonCombatBuffStrategyFactoryInternal::succubus;
|
||||
creators["felhunter"] = &NonCombatBuffStrategyFactoryInternal::felhunter;
|
||||
creators["felguard"] = &NonCombatBuffStrategyFactoryInternal::felguard;
|
||||
creators["ss self"] = &NonCombatBuffStrategyFactoryInternal::soulstone_self;
|
||||
creators["ss master"] = &NonCombatBuffStrategyFactoryInternal::soulstone_master;
|
||||
creators["ss tank"] = &NonCombatBuffStrategyFactoryInternal::soulstone_tank;
|
||||
@@ -88,11 +78,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* imp(PlayerbotAI* ai) { return new SummonImpStrategy(ai); }
|
||||
static Strategy* voidwalker(PlayerbotAI* ai) { return new SummonVoidwalkerStrategy(ai); }
|
||||
static Strategy* succubus(PlayerbotAI* ai) { return new SummonSuccubusStrategy(ai); }
|
||||
static Strategy* felhunter(PlayerbotAI* ai) { return new SummonFelhunterStrategy(ai); }
|
||||
static Strategy* felguard(PlayerbotAI* ai) { return new SummonFelguardStrategy(ai); }
|
||||
static Strategy* soulstone_self(PlayerbotAI* ai) { return new SoulstoneSelfStrategy(ai); }
|
||||
static Strategy* soulstone_master(PlayerbotAI* ai) { return new SoulstoneMasterStrategy(ai); }
|
||||
static Strategy* soulstone_tank(PlayerbotAI* ai) { return new SoulstoneTankStrategy(ai); }
|
||||
|
||||
Reference in New Issue
Block a user