diff --git a/src/Ai/Class/Hunter/Action/HunterActions.cpp b/src/Ai/Class/Hunter/Action/HunterActions.cpp index 18e5d5905..a49f9a10e 100644 --- a/src/Ai/Class/Hunter/Action/HunterActions.cpp +++ b/src/Ai/Class/Hunter/Action/HunterActions.cpp @@ -16,18 +16,15 @@ bool CastViperStingAction::isUseful() AI_VALUE2(uint8, "mana", "current target") >= 30; } -bool CastAspectOfTheCheetahAction::isUseful() -{ - return !botAI->HasAnyAuraOf(GetTarget(), "aspect of the cheetah", "aspect of the pack", nullptr); -} - bool CastAspectOfTheHawkAction::isUseful() { Unit* target = GetTarget(); if (!target) return false; + if (bot->HasSpell(61846) || bot->HasSpell(61847)) // Aspect of the Dragonhawk spell IDs return false; + return true; } @@ -36,11 +33,14 @@ bool CastArcaneShotAction::isUseful() Unit* target = GetTarget(); if (!target) return false; - if (bot->HasSpell(53301) || bot->HasSpell(60051) || bot->HasSpell(60052) || bot->HasSpell(60053)) // Explosive Shot spell IDs + + if (bot->HasSpell(53301) || bot->HasSpell(60051) || + bot->HasSpell(60052) || bot->HasSpell(60053)) // Explosive Shot spell IDs return false; // Armor Penetration rating check - will not cast Arcane Shot above 435 ArP - int32 armorPenRating = bot->GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1) + bot->GetUInt32Value(CR_ARMOR_PENETRATION); + int32 armorPenRating = + bot->GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1) + bot->GetUInt32Value(CR_ARMOR_PENETRATION); if (armorPenRating > 435) return false; @@ -52,18 +52,26 @@ bool CastImmolationTrapAction::isUseful() Unit* target = GetTarget(); if (!target) return false; - if (bot->HasSpell(13813) || bot->HasSpell(14316) || bot->HasSpell(14317) || bot->HasSpell(27025) || bot->HasSpell(49066) || bot->HasSpell(49067)) // Explosive Trap spell IDs + + if (bot->HasSpell(13813) || bot->HasSpell(14316) || bot->HasSpell(14317) || bot->HasSpell(27025) || + bot->HasSpell(49066) || bot->HasSpell(49067)) // Explosive Trap spell IDs return false; + return true; } -Value* CastFreezingTrap::GetTargetValue() { return context->GetValue("cc target", "freezing trap"); } +Value* CastFreezingTrap::GetTargetValue() +{ + return context->GetValue("cc target", "freezing trap"); +} bool FeedPetAction::Execute(Event /*event*/) { - if (Pet* pet = bot->GetPet()) - if (pet->getPetType() == HUNTER_PET && pet->GetHappinessState() != HAPPY) - pet->SetPower(POWER_HAPPINESS, pet->GetMaxPower(Powers(POWER_HAPPINESS))); + if (Pet* pet = bot->GetPet(); pet && pet->getPetType() == HUNTER_PET && + pet->GetHappinessState() != HAPPY) + { + pet->SetPower(POWER_HAPPINESS, pet->GetMaxPower(Powers(POWER_HAPPINESS))); + } return true; } @@ -79,6 +87,7 @@ bool CastAutoShotAction::isUseful() { return false; } + return AI_VALUE(uint32, "active spell") != AI_VALUE2(uint32, "spell id", getName()); } @@ -87,6 +96,7 @@ bool CastDisengageAction::Execute(Event event) Unit* target = AI_VALUE(Unit*, "current target"); if (!target) return false; + // can cast spell check passed in isUseful() bot->SetOrientation(bot->GetAngle(target)); return CastSpellAction::Execute(event); @@ -97,11 +107,20 @@ bool CastDisengageAction::isUseful() return !botAI->HasStrategy("trap weave", BOT_STATE_COMBAT); } -Value* CastScareBeastCcAction::GetTargetValue() { return context->GetValue("cc target", "scare beast"); } +Value* CastScareBeastCcAction::GetTargetValue() +{ + return context->GetValue("cc target", "scare beast"); +} -bool CastScareBeastCcAction::Execute(Event /*event*/) { return botAI->CastSpell("scare beast", GetTarget()); } +bool CastScareBeastCcAction::Execute(Event /*event*/) +{ + return botAI->CastSpell("scare beast", GetTarget()); +} -bool CastWingClipAction::isUseful() { return CastSpellAction::isUseful() && !botAI->HasAura(spell, GetTarget()); } +bool CastWingClipAction::isUseful() +{ + return CastSpellAction::isUseful() && !botAI->HasAura(spell, GetTarget()); +} std::vector CastWingClipAction::getPrerequisites() { diff --git a/src/Ai/Class/Hunter/Action/HunterActions.h b/src/Ai/Class/Hunter/Action/HunterActions.h index 8e2113525..a67f17780 100644 --- a/src/Ai/Class/Hunter/Action/HunterActions.h +++ b/src/Ai/Class/Hunter/Action/HunterActions.h @@ -19,52 +19,58 @@ class Unit; class CastTrueshotAuraAction : public CastBuffSpellAction { public: - CastTrueshotAuraAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "trueshot aura") {} + CastTrueshotAuraAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "trueshot aura") {} +}; + +class CastAspectOfTheDragonhawkAction : public CastBuffSpellAction +{ +public: + CastAspectOfTheDragonhawkAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the dragonhawk") {} }; class CastAspectOfTheHawkAction : public CastBuffSpellAction { public: - CastAspectOfTheHawkAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the hawk") {} + CastAspectOfTheHawkAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the hawk") {} bool isUseful() override; }; class CastAspectOfTheMonkeyAction : public CastBuffSpellAction { public: - CastAspectOfTheMonkeyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the monkey") {} -}; - -class CastAspectOfTheDragonhawkAction : public CastBuffSpellAction -{ -public: - CastAspectOfTheDragonhawkAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the dragonhawk") {} + CastAspectOfTheMonkeyAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the monkey") {} }; class CastAspectOfTheWildAction : public CastBuffSpellAction { public: - CastAspectOfTheWildAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the wild") {} + CastAspectOfTheWildAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the wild") {} }; class CastAspectOfTheCheetahAction : public CastBuffSpellAction { public: - CastAspectOfTheCheetahAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the cheetah") {} - - bool isUseful() override; + CastAspectOfTheCheetahAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the cheetah") {} }; class CastAspectOfThePackAction : public CastBuffSpellAction { public: - CastAspectOfThePackAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the pack") {} + CastAspectOfThePackAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the pack") {} }; class CastAspectOfTheViperAction : public CastBuffSpellAction { public: - CastAspectOfTheViperAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the viper") {} + CastAspectOfTheViperAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "aspect of the viper") {} }; // Cooldown Spells @@ -72,26 +78,28 @@ public: class CastRapidFireAction : public CastBuffSpellAction { public: - CastRapidFireAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "rapid fire") {} + CastRapidFireAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "rapid fire") {} }; class CastDeterrenceAction : public CastBuffSpellAction { public: - CastDeterrenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "deterrence") {} + CastDeterrenceAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "deterrence") {} }; class CastReadinessAction : public CastBuffSpellAction { public: - CastReadinessAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "readiness") {} + CastReadinessAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "readiness") {} }; class CastDisengageAction : public CastSpellAction { public: CastDisengageAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "disengage") {} - bool Execute(Event event) override; bool isUseful() override; }; @@ -101,14 +109,15 @@ public: class CastScareBeastAction : public CastSpellAction { public: - CastScareBeastAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scare beast") {} + CastScareBeastAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "scare beast") {} }; class CastScareBeastCcAction : public CastSpellAction { public: - CastScareBeastCcAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "scare beast on cc") {} - + CastScareBeastCcAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "scare beast on cc") {} Value* GetTargetValue() override; bool Execute(Event event) override; }; @@ -116,34 +125,41 @@ public: class CastFreezingTrap : public CastDebuffSpellAction { public: - CastFreezingTrap(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "freezing trap") {} - + CastFreezingTrap(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "freezing trap") {} Value* GetTargetValue() override; }; class CastWyvernStingAction : public CastDebuffSpellAction { public: - CastWyvernStingAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "wyvern sting", true) {} + CastWyvernStingAction(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "wyvern sting", true) {} }; class CastSilencingShotAction : public CastSpellAction { public: - CastSilencingShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "silencing shot") {} + CastSilencingShotAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "silencing shot") {} }; class CastConcussiveShotAction : public CastSnareSpellAction { public: - CastConcussiveShotAction(PlayerbotAI* botAI) : CastSnareSpellAction(botAI, "concussive shot") {} + CastConcussiveShotAction(PlayerbotAI* botAI) : + CastSnareSpellAction(botAI, "concussive shot") {} }; class CastIntimidationAction : public CastBuffSpellAction { public: - CastIntimidationAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "intimidation", false, 5000) {} - std::string const GetTargetName() override { return "pet target"; } + CastIntimidationAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "intimidation", false, 5000) {} + std::string const GetTargetName() override + { + return "pet target"; + } }; // Threat Spells @@ -151,19 +167,22 @@ public: class CastDistractingShotAction : public CastSpellAction { public: - CastDistractingShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "distracting shot") {} + CastDistractingShotAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "distracting shot") {} }; class CastMisdirectionOnMainTankAction : public BuffOnMainTankAction { public: - CastMisdirectionOnMainTankAction(PlayerbotAI* ai) : BuffOnMainTankAction(ai, "misdirection", true) {} + CastMisdirectionOnMainTankAction(PlayerbotAI* botAI) : + BuffOnMainTankAction(botAI, "misdirection", true) {} }; class CastFeignDeathAction : public CastBuffSpellAction { public: - CastFeignDeathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "feign death") {} + CastFeignDeathAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "feign death") {} }; // Pet Spells @@ -172,7 +191,6 @@ class FeedPetAction : public Action { public: FeedPetAction(PlayerbotAI* botAI) : Action(botAI, "feed pet") {} - bool Execute(Event event) override; }; @@ -186,27 +204,39 @@ class CastMendPetAction : public CastAuraSpellAction { public: CastMendPetAction(PlayerbotAI* botAI) : CastAuraSpellAction(botAI, "mend pet") {} - std::string const GetTargetName() override { return "pet target"; } + std::string const GetTargetName() override + { + return "pet target"; + } }; class CastRevivePetAction : public CastBuffSpellAction { public: - CastRevivePetAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "revive pet") {} + CastRevivePetAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "revive pet") {} }; class CastKillCommandAction : public CastBuffSpellAction { public: - CastKillCommandAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "kill command", false, 5000) {} - std::string const GetTargetName() override { return "pet target"; } + CastKillCommandAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "kill command", false, 5000) {} + std::string const GetTargetName() override + { + return "pet target"; + } }; class CastBestialWrathAction : public CastBuffSpellAction { public: - CastBestialWrathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bestial wrath", false, 5000) {} - std::string const GetTargetName() override { return "pet target"; } + CastBestialWrathAction(PlayerbotAI* botAI) : + CastBuffSpellAction(botAI, "bestial wrath", false, 5000) {} + std::string const GetTargetName() override + { + return "pet target"; + } }; // Direct Damage Spells @@ -215,14 +245,18 @@ class CastAutoShotAction : public CastSpellAction { public: CastAutoShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "auto shot") {} - ActionThreatType getThreatType() override { return ActionThreatType::None; } + ActionThreatType getThreatType() override + { + return ActionThreatType::None; + } bool isUseful() override; }; class CastArcaneShotAction : public CastSpellAction { public: - CastArcaneShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "arcane shot") {} + CastArcaneShotAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "arcane shot") {} bool isUseful() override; }; @@ -235,7 +269,8 @@ public: class CastChimeraShotAction : public CastSpellAction { public: - CastChimeraShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chimera shot") {} + CastChimeraShotAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "chimera shot") {} }; class CastSteadyShotAction : public CastSpellAction @@ -255,7 +290,8 @@ public: class CastHuntersMarkAction : public CastDebuffSpellAction { public: - CastHuntersMarkAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "hunter's mark") {} + CastHuntersMarkAction(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "hunter's mark") {} bool isUseful() override { // Bypass TTL check @@ -266,20 +302,23 @@ public: class CastTranquilizingShotAction : public CastSpellAction { public: - CastTranquilizingShotAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "tranquilizing shot") {} + CastTranquilizingShotAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "tranquilizing shot") {} }; class CastViperStingAction : public CastDebuffSpellAction { public: - CastViperStingAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "viper sting", true) {} + CastViperStingAction(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "viper sting", true) {} bool isUseful() override; }; class CastSerpentStingAction : public CastDebuffSpellAction { public: - CastSerpentStingAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "serpent sting", true) {} + CastSerpentStingAction(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "serpent sting", true) {} bool isUseful() override { // Bypass TTL check @@ -290,7 +329,8 @@ public: class CastScorpidStingAction : public CastDebuffSpellAction { public: - CastScorpidStingAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "scorpid sting", true) {} + CastScorpidStingAction(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "scorpid sting", true) {} bool isUseful() override { // Bypass TTL check @@ -301,7 +341,8 @@ public: class CastSerpentStingOnAttackerAction : public CastDebuffSpellOnAttackerAction { public: - CastSerpentStingOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "serpent sting", true) {} + CastSerpentStingOnAttackerAction(PlayerbotAI* botAI) + : CastDebuffSpellOnAttackerAction(botAI, "serpent sting", true) {} bool isUseful() override { // Bypass TTL check @@ -312,20 +353,23 @@ public: class CastImmolationTrapAction : public CastSpellAction { public: - CastImmolationTrapAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "immolation trap") {} + CastImmolationTrapAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "immolation trap") {} bool isUseful() override; }; class CastExplosiveTrapAction : public CastSpellAction { public: - CastExplosiveTrapAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "explosive trap") {} + CastExplosiveTrapAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "explosive trap") {} }; -class CastBlackArrow : public CastDebuffSpellAction +class CastBlackArrowAction : public CastDebuffSpellAction { public: - CastBlackArrow(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "black arrow", true) {} + CastBlackArrowAction(PlayerbotAI* botAI) : + CastDebuffSpellAction(botAI, "black arrow", true) {} bool isUseful() override { if (botAI->HasStrategy("trap weave", BOT_STATE_COMBAT)) @@ -335,77 +379,89 @@ public: } }; -class CastExplosiveShotAction : public CastDebuffSpellAction +class CastExplosiveShotBaseAction : public CastDebuffSpellAction { public: - CastExplosiveShotAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {} - bool isUseful() override - { - // Bypass TTL check - return CastAuraSpellAction::isUseful(); - } + CastExplosiveShotBaseAction(PlayerbotAI* botAI) + : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {} }; // Rank 4 -class CastExplosiveShotRank4Action : public CastDebuffSpellAction +class CastExplosiveShotRank4Action : public CastExplosiveShotBaseAction { public: - CastExplosiveShotRank4Action(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {} - - bool Execute(Event event) override { return botAI->CastSpell(60053, GetTarget()); } + CastExplosiveShotRank4Action(PlayerbotAI* botAI) : + CastExplosiveShotBaseAction(botAI) {} + bool Execute(Event event) override + { + return botAI->CastSpell(60053, GetTarget()); + } bool isUseful() override { Unit* target = GetTarget(); if (!target) return false; + return !target->HasAura(60053); } }; // Rank 3 -class CastExplosiveShotRank3Action : public CastDebuffSpellAction +class CastExplosiveShotRank3Action : public CastExplosiveShotBaseAction { public: - CastExplosiveShotRank3Action(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {} - - bool Execute(Event event) override { return botAI->CastSpell(60052, GetTarget()); } + CastExplosiveShotRank3Action(PlayerbotAI* botAI) : + CastExplosiveShotBaseAction(botAI) {} + bool Execute(Event event) override + { + return botAI->CastSpell(60052, GetTarget()); + } bool isUseful() override { Unit* target = GetTarget(); if (!target) return false; + return !target->HasAura(60052); } }; // Rank 2 -class CastExplosiveShotRank2Action : public CastDebuffSpellAction +class CastExplosiveShotRank2Action : public CastExplosiveShotBaseAction { public: - CastExplosiveShotRank2Action(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {} - - bool Execute(Event event) override { return botAI->CastSpell(60051, GetTarget()); } + CastExplosiveShotRank2Action(PlayerbotAI* botAI) : + CastExplosiveShotBaseAction(botAI) {} + bool Execute(Event event) override + { + return botAI->CastSpell(60051, GetTarget()); + } bool isUseful() override { Unit* target = GetTarget(); if (!target) return false; + return !target->HasAura(60051); } }; // Rank 1 -class CastExplosiveShotRank1Action : public CastDebuffSpellAction +class CastExplosiveShotRank1Action : public CastExplosiveShotBaseAction { public: - CastExplosiveShotRank1Action(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {} - - bool Execute(Event event) override { return botAI->CastSpell(53301, GetTarget()); } + CastExplosiveShotRank1Action(PlayerbotAI* botAI) : + CastExplosiveShotBaseAction(botAI) {} + bool Execute(Event event) override + { + return botAI->CastSpell(53301, GetTarget()); + } bool isUseful() override { Unit* target = GetTarget(); if (!target) return false; + return !target->HasAura(53301); } }; @@ -415,8 +471,8 @@ public: class CastWingClipAction : public CastSpellAction { public: - CastWingClipAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "wing clip") {} - + CastWingClipAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "wing clip") {} bool isUseful() override; std::vector getPrerequisites() override; }; @@ -424,13 +480,15 @@ public: class CastRaptorStrikeAction : public CastSpellAction { public: - CastRaptorStrikeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "raptor strike") {} + CastRaptorStrikeAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "raptor strike") {} }; class CastMongooseBiteAction : public CastSpellAction { public: - CastMongooseBiteAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "mongoose bite") {} + CastMongooseBiteAction(PlayerbotAI* botAI) : + CastSpellAction(botAI, "mongoose bite") {} }; // AoE Spells @@ -445,7 +503,10 @@ class CastVolleyAction : public CastSpellAction { public: CastVolleyAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "volley") {} - ActionThreatType getThreatType() override { return ActionThreatType::Aoe; } + ActionThreatType getThreatType() override + { + return ActionThreatType::Aoe; + } }; #endif diff --git a/src/Ai/Class/Hunter/HunterAiObjectContext.cpp b/src/Ai/Class/Hunter/HunterAiObjectContext.cpp index def1e4693..2a836ff5e 100644 --- a/src/Ai/Class/Hunter/HunterAiObjectContext.cpp +++ b/src/Ai/Class/Hunter/HunterAiObjectContext.cpp @@ -22,7 +22,6 @@ public: HunterStrategyFactoryInternal() { creators["nc"] = &HunterStrategyFactoryInternal::nc; - creators["boost"] = &HunterStrategyFactoryInternal::boost; creators["pet"] = &HunterStrategyFactoryInternal::pet; creators["cc"] = &HunterStrategyFactoryInternal::cc; creators["trap weave"] = &HunterStrategyFactoryInternal::trap_weave; @@ -34,7 +33,6 @@ public: private: static Strategy* nc(PlayerbotAI* botAI) { return new GenericHunterNonCombatStrategy(botAI); } - static Strategy* boost(PlayerbotAI* botAI) { return new HunterBoostStrategy(botAI); } static Strategy* pet(PlayerbotAI* botAI) { return new HunterPetStrategy(botAI); } static Strategy* cc(PlayerbotAI* botAI) { return new HunterCcStrategy(botAI); } static Strategy* trap_weave(PlayerbotAI* botAI) { return new HunterTrapWeaveStrategy(botAI); } @@ -51,14 +49,12 @@ public: { creators["bspeed"] = &HunterBuffStrategyFactoryInternal::bspeed; creators["bdps"] = &HunterBuffStrategyFactoryInternal::bdps; - creators["bmana"] = &HunterBuffStrategyFactoryInternal::bmana; creators["rnature"] = &HunterBuffStrategyFactoryInternal::rnature; } private: static Strategy* bspeed(PlayerbotAI* botAI) { return new HunterBuffSpeedStrategy(botAI); } static Strategy* bdps(PlayerbotAI* botAI) { return new HunterBuffDpsStrategy(botAI); } - static Strategy* bmana(PlayerbotAI* botAI) { return new HunterBuffManaStrategy(botAI); } static Strategy* rnature(PlayerbotAI* botAI) { return new HunterNatureResistanceStrategy(botAI); } }; @@ -67,7 +63,6 @@ class HunterTriggerFactoryInternal : public NamedObjectContext public: HunterTriggerFactoryInternal() { - creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper; creators["black arrow"] = &HunterTriggerFactoryInternal::black_arrow; creators["no stings"] = &HunterTriggerFactoryInternal::NoStings; creators["hunters pet dead"] = &HunterTriggerFactoryInternal::hunters_pet_dead; @@ -75,10 +70,9 @@ public: creators["hunters pet medium health"] = &HunterTriggerFactoryInternal::hunters_pet_medium_health; creators["hunter's mark"] = &HunterTriggerFactoryInternal::hunters_mark; creators["freezing trap"] = &HunterTriggerFactoryInternal::freezing_trap; - creators["aspect of the pack"] = &HunterTriggerFactoryInternal::aspect_of_the_pack; creators["rapid fire"] = &HunterTriggerFactoryInternal::rapid_fire; - creators["aspect of the hawk"] = &HunterTriggerFactoryInternal::aspect_of_the_hawk; - creators["aspect of the monkey"] = &HunterTriggerFactoryInternal::aspect_of_the_monkey; + creators["aspect of the pack"] = &HunterTriggerFactoryInternal::aspect_of_the_pack; + creators["aspect of the dragonhawk"] = &HunterTriggerFactoryInternal::aspect_of_the_dragonhawk; creators["aspect of the wild"] = &HunterTriggerFactoryInternal::aspect_of_the_wild; creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper; creators["trueshot aura"] = &HunterTriggerFactoryInternal::trueshot_aura; @@ -107,10 +101,8 @@ public: private: static Trigger* auto_shot(PlayerbotAI* botAI) { return new AutoShotTrigger(botAI); } static Trigger* scare_beast(PlayerbotAI* botAI) { return new ScareBeastTrigger(botAI); } - static Trigger* concussive_shot_on_snare_target(PlayerbotAI* botAI) - { - return new ConsussiveShotSnareTrigger(botAI); - } + static Trigger* concussive_shot_on_snare_target(PlayerbotAI* botAI) { + return new ConcussiveShotOnSnareTargetTrigger(botAI); } static Trigger* pet_not_happy(PlayerbotAI* botAI) { return new HunterPetNotHappy(botAI); } static Trigger* serpent_sting_on_attacker(PlayerbotAI* botAI) { return new SerpentStingOnAttackerTrigger(botAI); } static Trigger* trueshot_aura(PlayerbotAI* botAI) { return new TrueshotAuraTrigger(botAI); } @@ -125,18 +117,17 @@ private: static Trigger* freezing_trap(PlayerbotAI* botAI) { return new FreezingTrapTrigger(botAI); } static Trigger* aspect_of_the_pack(PlayerbotAI* botAI) { return new HunterAspectOfThePackTrigger(botAI); } static Trigger* rapid_fire(PlayerbotAI* botAI) { return new RapidFireTrigger(botAI); } - static Trigger* aspect_of_the_hawk(PlayerbotAI* botAI) { return new HunterAspectOfTheHawkTrigger(botAI); } - static Trigger* aspect_of_the_monkey(PlayerbotAI* botAI) { return new HunterAspectOfTheMonkeyTrigger(botAI); } + static Trigger* aspect_of_the_dragonhawk(PlayerbotAI* botAI) { return new HunterAspectOfTheDragonhawkTrigger(botAI); } static Trigger* aspect_of_the_wild(PlayerbotAI* botAI) { return new HunterAspectOfTheWildTrigger(botAI); } static Trigger* low_ammo(PlayerbotAI* botAI) { return new HunterLowAmmoTrigger(botAI); } static Trigger* no_ammo(PlayerbotAI* botAI) { return new HunterNoAmmoTrigger(botAI); } static Trigger* has_ammo(PlayerbotAI* botAI) { return new HunterHasAmmoTrigger(botAI); } static Trigger* switch_to_melee(PlayerbotAI* botAI) { return new SwitchToMeleeTrigger(botAI); } static Trigger* switch_to_ranged(PlayerbotAI* botAI) { return new SwitchToRangedTrigger(botAI); } - static Trigger* misdirection_on_main_tank(PlayerbotAI* ai) { return new MisdirectionOnMainTankTrigger(ai); } - static Trigger* remove_enrage(PlayerbotAI* ai) { return new TargetRemoveEnrageTrigger(ai); } - static Trigger* remove_magic(PlayerbotAI* ai) { return new TargetRemoveMagicTrigger(ai); } - static Trigger* immolation_trap_no_cd(PlayerbotAI* ai) { return new ImmolationTrapNoCdTrigger(ai); } + static Trigger* misdirection_on_main_tank(PlayerbotAI* botAI) { return new MisdirectionOnMainTankTrigger(botAI); } + static Trigger* remove_enrage(PlayerbotAI* botAI) { return new TargetRemoveEnrageTrigger(botAI); } + static Trigger* remove_magic(PlayerbotAI* botAI) { return new TargetRemoveMagicTrigger(botAI); } + static Trigger* immolation_trap_no_cd(PlayerbotAI* botAI) { return new ImmolationTrapNoCdTrigger(botAI); } static Trigger* kill_command(PlayerbotAI* botAI) { return new KillCommandTrigger(botAI); } static Trigger* explosive_shot(PlayerbotAI* botAI) { return new ExplosiveShotTrigger(botAI); } static Trigger* lock_and_load(PlayerbotAI* botAI) { return new LockAndLoadTrigger(botAI); } @@ -153,7 +144,6 @@ public: creators["auto shot"] = &HunterAiObjectContextInternal::auto_shot; creators["aimed shot"] = &HunterAiObjectContextInternal::aimed_shot; creators["chimera shot"] = &HunterAiObjectContextInternal::chimera_shot; - creators["explosive shot"] = &HunterAiObjectContextInternal::explosive_shot; creators["arcane shot"] = &HunterAiObjectContextInternal::arcane_shot; creators["concussive shot"] = &HunterAiObjectContextInternal::concussive_shot; creators["distracting shot"] = &HunterAiObjectContextInternal::distracting_shot; @@ -176,6 +166,7 @@ public: creators["deterrence"] = &HunterAiObjectContextInternal::deterrence; creators["readiness"] = &HunterAiObjectContextInternal::readiness; creators["aspect of the hawk"] = &HunterAiObjectContextInternal::aspect_of_the_hawk; + creators["aspect of the dragonhawk"] = &HunterAiObjectContextInternal::aspect_of_the_dragonhawk; creators["aspect of the monkey"] = &HunterAiObjectContextInternal::aspect_of_the_monkey; creators["aspect of the wild"] = &HunterAiObjectContextInternal::aspect_of_the_wild; creators["aspect of the viper"] = &HunterAiObjectContextInternal::aspect_of_the_viper; @@ -191,7 +182,6 @@ public: creators["bestial wrath"] = &HunterAiObjectContextInternal::bestial_wrath; creators["scare beast"] = &HunterAiObjectContextInternal::scare_beast; creators["scare beast on cc"] = &HunterAiObjectContextInternal::scare_beast_on_cc; - creators["aspect of the dragonhawk"] = &HunterAiObjectContextInternal::aspect_of_the_dragonhawk; creators["tranquilizing shot"] = &HunterAiObjectContextInternal::tranquilizing_shot; creators["steady shot"] = &HunterAiObjectContextInternal::steady_shot; creators["kill shot"] = &HunterAiObjectContextInternal::kill_shot; @@ -200,6 +190,7 @@ public: creators["disengage"] = &HunterAiObjectContextInternal::disengage; creators["immolation trap"] = &HunterAiObjectContextInternal::immolation_trap; creators["explosive trap"] = &HunterAiObjectContextInternal::explosive_trap; + creators["explosive shot base"] = &HunterAiObjectContextInternal::explosive_shot_base; creators["explosive shot rank 4"] = &HunterAiObjectContextInternal::explosive_shot_rank_4; creators["explosive shot rank 3"] = &HunterAiObjectContextInternal::explosive_shot_rank_3; creators["explosive shot rank 2"] = &HunterAiObjectContextInternal::explosive_shot_rank_2; @@ -218,7 +209,6 @@ private: static Action* auto_shot(PlayerbotAI* botAI) { return new CastAutoShotAction(botAI); } static Action* aimed_shot(PlayerbotAI* botAI) { return new CastAimedShotAction(botAI); } static Action* chimera_shot(PlayerbotAI* botAI) { return new CastChimeraShotAction(botAI); } - static Action* explosive_shot(PlayerbotAI* botAI) { return new CastExplosiveShotAction(botAI); } static Action* arcane_shot(PlayerbotAI* botAI) { return new CastArcaneShotAction(botAI); } static Action* concussive_shot(PlayerbotAI* botAI) { return new CastConcussiveShotAction(botAI); } static Action* distracting_shot(PlayerbotAI* botAI) { return new CastDistractingShotAction(botAI); } @@ -234,12 +224,13 @@ private: static Action* kill_command(PlayerbotAI* botAI) { return new CastKillCommandAction(botAI); } static Action* revive_pet(PlayerbotAI* botAI) { return new CastRevivePetAction(botAI); } static Action* call_pet(PlayerbotAI* botAI) { return new CastCallPetAction(botAI); } - static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); } + static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrowAction(botAI); } static Action* freezing_trap(PlayerbotAI* botAI) { return new CastFreezingTrap(botAI); } static Action* rapid_fire(PlayerbotAI* botAI) { return new CastRapidFireAction(botAI); } static Action* deterrence(PlayerbotAI* botAI) { return new CastDeterrenceAction(botAI); } static Action* readiness(PlayerbotAI* botAI) { return new CastReadinessAction(botAI); } static Action* aspect_of_the_hawk(PlayerbotAI* botAI) { return new CastAspectOfTheHawkAction(botAI); } + static Action* aspect_of_the_dragonhawk(PlayerbotAI* botAI) { return new CastAspectOfTheDragonhawkAction(botAI); } static Action* aspect_of_the_monkey(PlayerbotAI* botAI) { return new CastAspectOfTheMonkeyAction(botAI); } static Action* aspect_of_the_wild(PlayerbotAI* botAI) { return new CastAspectOfTheWildAction(botAI); } static Action* aspect_of_the_viper(PlayerbotAI* botAI) { return new CastAspectOfTheViperAction(botAI); } @@ -248,20 +239,20 @@ private: static Action* wing_clip(PlayerbotAI* botAI) { return new CastWingClipAction(botAI); } static Action* raptor_strike(PlayerbotAI* botAI) { return new CastRaptorStrikeAction(botAI); } static Action* mongoose_bite(PlayerbotAI* botAI) { return new CastMongooseBiteAction(botAI); } - static Action* aspect_of_the_dragonhawk(PlayerbotAI* ai) { return new CastAspectOfTheDragonhawkAction(ai); } - static Action* tranquilizing_shot(PlayerbotAI* ai) { return new CastTranquilizingShotAction(ai); } - static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); } - static Action* kill_shot(PlayerbotAI* ai) { return new CastKillShotAction(ai); } - static Action* misdirection_on_main_tank(PlayerbotAI* ai) { return new CastMisdirectionOnMainTankAction(ai); } - static Action* silencing_shot(PlayerbotAI* ai) { return new CastSilencingShotAction(ai); } - static Action* disengage(PlayerbotAI* ai) { return new CastDisengageAction(ai); } - static Action* immolation_trap(PlayerbotAI* ai) { return new CastImmolationTrapAction(ai); } - static Action* explosive_trap(PlayerbotAI* ai) { return new CastExplosiveTrapAction(ai); } - static Action* explosive_shot_rank_4(PlayerbotAI* ai) { return new CastExplosiveShotRank4Action(ai); } - static Action* explosive_shot_rank_3(PlayerbotAI* ai) { return new CastExplosiveShotRank3Action(ai); } - static Action* explosive_shot_rank_2(PlayerbotAI* ai) { return new CastExplosiveShotRank2Action(ai); } - static Action* explosive_shot_rank_1(PlayerbotAI* ai) { return new CastExplosiveShotRank1Action(ai); } - static Action* intimidation(PlayerbotAI* ai) { return new CastIntimidationAction(ai); } + static Action* tranquilizing_shot(PlayerbotAI* botAI) { return new CastTranquilizingShotAction(botAI); } + static Action* steady_shot(PlayerbotAI* botAI) { return new CastSteadyShotAction(botAI); } + static Action* kill_shot(PlayerbotAI* botAI) { return new CastKillShotAction(botAI); } + static Action* misdirection_on_main_tank(PlayerbotAI* botAI) { return new CastMisdirectionOnMainTankAction(botAI); } + static Action* silencing_shot(PlayerbotAI* botAI) { return new CastSilencingShotAction(botAI); } + static Action* disengage(PlayerbotAI* botAI) { return new CastDisengageAction(botAI); } + static Action* immolation_trap(PlayerbotAI* botAI) { return new CastImmolationTrapAction(botAI); } + static Action* explosive_trap(PlayerbotAI* botAI) { return new CastExplosiveTrapAction(botAI); } + static Action* explosive_shot_base(PlayerbotAI* botAI) { return new CastExplosiveShotBaseAction(botAI); } + static Action* explosive_shot_rank_4(PlayerbotAI* botAI) { return new CastExplosiveShotRank4Action(botAI); } + static Action* explosive_shot_rank_3(PlayerbotAI* botAI) { return new CastExplosiveShotRank3Action(botAI); } + static Action* explosive_shot_rank_2(PlayerbotAI* botAI) { return new CastExplosiveShotRank2Action(botAI); } + static Action* explosive_shot_rank_1(PlayerbotAI* botAI) { return new CastExplosiveShotRank1Action(botAI); } + static Action* intimidation(PlayerbotAI* botAI) { return new CastIntimidationAction(botAI); } }; SharedNamedObjectContextList HunterAiObjectContext::sharedStrategyContexts; diff --git a/src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.cpp b/src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.cpp index a2c302d37..124da0b13 100644 --- a/src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.cpp +++ b/src/Ai/Class/Hunter/Strategy/BeastMasteryHunterStrategy.cpp @@ -6,41 +6,9 @@ #include "BeastMasteryHunterStrategy.h" #include "Playerbots.h" -// ===== Action Node Factory ===== -class BeastMasteryHunterStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - BeastMasteryHunterStrategyActionNodeFactory() - { - creators["auto shot"] = &auto_shot; - creators["kill command"] = &kill_command; - creators["kill shot"] = &kill_shot; - creators["viper sting"] = &viper_sting; - creators["serpent sting"] = serpent_sting; - creators["aimed shot"] = &aimed_shot; - creators["arcane shot"] = &arcane_shot; - creators["steady shot"] = &steady_shot; - creators["multi-shot"] = &multi_shot; - creators["volley"] = &volley; - } - -private: - static ActionNode* auto_shot(PlayerbotAI*) { return new ActionNode("auto shot", {}, {}, {}); } - static ActionNode* kill_command(PlayerbotAI*) { return new ActionNode("kill command", {}, {}, {}); } - static ActionNode* kill_shot(PlayerbotAI*) { return new ActionNode("kill shot", {}, {}, {}); } - static ActionNode* viper_sting(PlayerbotAI*) { return new ActionNode("viper sting", {}, {}, {}); } - static ActionNode* serpent_sting(PlayerbotAI*) { return new ActionNode("serpent sting", {}, {}, {}); } - static ActionNode* aimed_shot(PlayerbotAI*) { return new ActionNode("aimed shot", {}, {}, {}); } - static ActionNode* arcane_shot(PlayerbotAI*) { return new ActionNode("arcane shot", {}, {}, {}); } - static ActionNode* steady_shot(PlayerbotAI*) { return new ActionNode("steady shot", {}, {}, {}); } - static ActionNode* multi_shot(PlayerbotAI*) { return new ActionNode("multi shot", {}, {}, {}); } - static ActionNode* volley(PlayerbotAI*) { return new ActionNode("volley", {}, {}, {}); } -}; - -// ===== Single Target Strategy ===== BeastMasteryHunterStrategy::BeastMasteryHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI) { - actionNodeFactories.Add(new BeastMasteryHunterStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } // ===== Default Actions ===== diff --git a/src/Ai/Class/Hunter/Strategy/GenericHunterNonCombatStrategy.cpp b/src/Ai/Class/Hunter/Strategy/GenericHunterNonCombatStrategy.cpp index 00c35dc2a..0093a490b 100644 --- a/src/Ai/Class/Hunter/Strategy/GenericHunterNonCombatStrategy.cpp +++ b/src/Ai/Class/Hunter/Strategy/GenericHunterNonCombatStrategy.cpp @@ -4,62 +4,31 @@ */ #include "GenericHunterNonCombatStrategy.h" - #include "Playerbots.h" -class GenericHunterNonCombatStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - GenericHunterNonCombatStrategyActionNodeFactory() - { - creators["rapid fire"] = &rapid_fire; - creators["boost"] = &rapid_fire; - creators["aspect of the pack"] = &aspect_of_the_pack; - } - -private: - static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("rapid fire", - /*P*/ {}, - /*A*/ { NextAction("readiness")}, - /*C*/ {}); - } - - static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("aspect of the pack", - /*P*/ {}, - /*A*/ { NextAction("aspect of the cheetah")}, - /*C*/ {}); - } -}; - GenericHunterNonCombatStrategy::GenericHunterNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { - actionNodeFactories.Add(new GenericHunterNonCombatStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } void GenericHunterNonCombatStrategy::InitTriggers(std::vector& triggers) { NonCombatStrategy::InitTriggers(triggers); - triggers.push_back(new TriggerNode("trueshot aura", { NextAction("trueshot aura", 2.0f)})); - triggers.push_back(new TriggerNode("often", { - NextAction("apply stone", 1.0f), - NextAction("apply oil", 1.0f), - })); - triggers.push_back(new TriggerNode("low ammo", { NextAction("say::low ammo", ACTION_NORMAL)})); - triggers.push_back(new TriggerNode("no track", { NextAction("track humanoids", ACTION_NORMAL)})); - triggers.push_back(new TriggerNode("no ammo", { NextAction("equip upgrades packet action", ACTION_HIGH + 1)})); + triggers.push_back(new TriggerNode("trueshot aura", { NextAction("trueshot aura", 2.0f) })); + triggers.push_back(new TriggerNode("often", { NextAction("apply stone", 1.0f), + NextAction("apply oil", 1.0f) })); + triggers.push_back(new TriggerNode("low ammo", { NextAction("say::low ammo", ACTION_NORMAL) })); + triggers.push_back(new TriggerNode("no track", { NextAction("track humanoids", ACTION_NORMAL) })); + triggers.push_back(new TriggerNode("no ammo", { NextAction("equip upgrades packet action", ACTION_HIGH + 1) })); } void HunterPetStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("no pet", { NextAction("call pet", 60.0f)})); - triggers.push_back(new TriggerNode("has pet", { NextAction("toggle pet spell", 60.0f)})); - triggers.push_back(new TriggerNode("new pet", { NextAction("set pet stance", 60.0f)})); - triggers.push_back(new TriggerNode("pet not happy", { NextAction("feed pet", 60.0f)})); - triggers.push_back(new TriggerNode("hunters pet medium health", { NextAction("mend pet", 60.0f)})); - triggers.push_back(new TriggerNode("hunters pet dead", { NextAction("revive pet", 60.0f)})); + triggers.push_back(new TriggerNode("no pet", { NextAction("call pet", 60.0f) })); + triggers.push_back(new TriggerNode("has pet", { NextAction("toggle pet spell", 60.0f) })); + triggers.push_back(new TriggerNode("new pet", { NextAction("set pet stance", 60.0f) })); + triggers.push_back(new TriggerNode("pet not happy", { NextAction("feed pet", 60.0f) })); + triggers.push_back(new TriggerNode("hunters pet medium health", { NextAction("mend pet", 60.0f) })); + triggers.push_back(new TriggerNode("hunters pet dead", { NextAction("revive pet", 60.0f) })); } diff --git a/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.cpp b/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.cpp index 0a9e88a54..eb3907dd7 100644 --- a/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.cpp +++ b/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.cpp @@ -11,11 +11,6 @@ public: GenericHunterStrategyActionNodeFactory() { creators["rapid fire"] = &rapid_fire; - creators["boost"] = &rapid_fire; - creators["aspect of the pack"] = &aspect_of_the_pack; - creators["aspect of the dragonhawk"] = &aspect_of_the_dragonhawk; - creators["feign death"] = &feign_death; - creators["wing clip"] = &wing_clip; creators["mongoose bite"] = &mongoose_bite; creators["raptor strike"] = &raptor_strike; creators["explosive trap"] = &explosive_trap; @@ -29,40 +24,6 @@ private: /*A*/ { NextAction("readiness") }, /*C*/ {}); } - - static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("aspect of the pack", - /*P*/ {}, - /*A*/ { NextAction("aspect of the cheetah") }, - /*C*/ {}); - } - - static ActionNode* aspect_of_the_dragonhawk([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("aspect of the dragonhawk", - /*P*/ {}, - /*A*/ { NextAction("aspect of the hawk") }, - /*C*/ {}); - } - - static ActionNode* feign_death([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("feign death", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* wing_clip([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("wing clip", - /*P*/ {}, - // /*A*/ { NextAction("mongoose bite") }, - {}, - /*C*/ {}); - } - static ActionNode* mongoose_bite([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("mongoose bite", @@ -70,7 +31,6 @@ private: /*A*/ { NextAction("raptor strike") }, /*C*/ {}); } - static ActionNode* raptor_strike([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("raptor strike", @@ -78,7 +38,6 @@ private: /*A*/ {}, /*C*/ {}); } - static ActionNode* explosive_trap([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("explosive trap", @@ -102,7 +61,6 @@ void GenericHunterStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("hunter's mark", { NextAction("hunter's mark", 29.5f) })); triggers.push_back(new TriggerNode("rapid fire", { NextAction("rapid fire", 29.0f) })); triggers.push_back(new TriggerNode("aspect of the viper", { NextAction("aspect of the viper", 28.0f) })); - triggers.push_back(new TriggerNode("aspect of the hawk", { NextAction("aspect of the dragonhawk", 27.5f) })); // Aggro/Threat/Defensive Triggers triggers.push_back(new TriggerNode("has aggro", { NextAction("concussive shot", 20.0f) })); @@ -118,14 +76,12 @@ void GenericHunterStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("tranquilizing shot magic", { NextAction("tranquilizing shot", 61.0f) })); // Ranged-based Triggers - triggers.push_back(new TriggerNode("enemy within melee", { - NextAction("explosive trap", 37.0f), - NextAction("mongoose bite", 22.0f), - NextAction("wing clip", 21.0f) })); + triggers.push_back(new TriggerNode("enemy within melee", { NextAction("explosive trap", 37.0f), + NextAction("mongoose bite", 22.0f), + NextAction("wing clip", 21.0f) })); - triggers.push_back(new TriggerNode("enemy too close for auto shot", { - NextAction("disengage", 35.0f), - NextAction("flee", 34.0f) })); + triggers.push_back(new TriggerNode("enemy too close for auto shot", { NextAction("disengage", 35.0f), + NextAction("flee", 34.0f) })); } // ===== AoE Strategy, 2/3+ enemies ===== @@ -138,10 +94,6 @@ void AoEHunterStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("light aoe", { NextAction("multi-shot", 21.0f) })); } -void HunterBoostStrategy::InitTriggers(std::vector& triggers) -{ -} - void HunterCcStrategy::InitTriggers(std::vector& triggers) { triggers.push_back(new TriggerNode("scare beast", { NextAction("scare beast on cc", 23.0f) })); diff --git a/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.h b/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.h index 01aef4cec..b3a2248c3 100644 --- a/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.h +++ b/src/Ai/Class/Hunter/Strategy/GenericHunterStrategy.h @@ -30,15 +30,6 @@ public: std::string const getName() override { return "aoe"; } }; -class HunterBoostStrategy : public Strategy -{ -public: - HunterBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} - - std::string const getName() override { return "boost"; } - void InitTriggers(std::vector& triggers) override; -}; - class HunterCcStrategy : public Strategy { public: diff --git a/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.cpp b/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.cpp index 3601d7711..6333f184c 100644 --- a/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.cpp +++ b/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.cpp @@ -10,9 +10,21 @@ class BuffHunterStrategyActionNodeFactory : public NamedObjectFactory { public: - BuffHunterStrategyActionNodeFactory() { creators["aspect of the hawk"] = &aspect_of_the_hawk; } + BuffHunterStrategyActionNodeFactory() + { + creators["aspect of the dragonhawk"] = &aspect_of_the_dragonhawk; + creators["aspect of the hawk"] = &aspect_of_the_hawk; + creators["aspect of the pack"] = &aspect_of_the_pack; + } private: + static ActionNode* aspect_of_the_dragonhawk([[maybe_unused]] PlayerbotAI* botAI) + { + return new ActionNode("aspect of the dragonhawk", + /*P*/ {}, + /*A*/ { NextAction("aspect of the hawk") }, + /*C*/ {}); + } static ActionNode* aspect_of_the_hawk([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("aspect of the hawk", @@ -20,9 +32,16 @@ private: /*A*/ { NextAction("aspect of the monkey") }, /*C*/ {}); } + static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI) + { + return new ActionNode("aspect of the pack", + /*P*/ {}, + /*A*/ { NextAction("aspect of the cheetah") }, + /*C*/ {}); + } }; -HunterBuffDpsStrategy::HunterBuffDpsStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) +HunterBuffDpsStrategy::HunterBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) { actionNodeFactories.Add(new BuffHunterStrategyActionNodeFactory()); } @@ -30,24 +49,35 @@ HunterBuffDpsStrategy::HunterBuffDpsStrategy(PlayerbotAI* botAI) : NonCombatStra void HunterBuffDpsStrategy::InitTriggers(std::vector& triggers) { triggers.push_back( - new TriggerNode("aspect of the hawk", { NextAction("aspect of the dragonhawk", 20.1f), - NextAction("aspect of the hawk", 20.0f) })); + new TriggerNode( + "aspect of the dragonhawk", + { + NextAction("aspect of the dragonhawk", ACTION_HIGH) + } + ) + ); } void HunterNatureResistanceStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("aspect of the wild", - { NextAction("aspect of the wild", 20.0f) })); + triggers.push_back( + new TriggerNode( + "aspect of the wild", + { + NextAction("aspect of the wild", ACTION_HIGH) + } + ) + ); } void HunterBuffSpeedStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("aspect of the pack", - { NextAction("aspect of the pack", 20.0f) })); -} - -void HunterBuffManaStrategy::InitTriggers(std::vector& triggers) -{ - triggers.push_back(new TriggerNode("aspect of the viper", - { NextAction("aspect of the viper", 20.0f) })); + triggers.push_back( + new TriggerNode( + "aspect of the pack", + { + NextAction("aspect of the pack", ACTION_HIGH) + } + ) + ); } diff --git a/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.h b/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.h index 7df8bc1bc..93155caeb 100644 --- a/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.h +++ b/src/Ai/Class/Hunter/Strategy/HunterBuffStrategies.h @@ -6,44 +6,35 @@ #ifndef _PLAYERBOT_HUNTERBUFFSTRATEGIES_H #define _PLAYERBOT_HUNTERBUFFSTRATEGIES_H -#include "NonCombatStrategy.h" +#include "Strategy.h" class PlayerbotAI; -class HunterBuffSpeedStrategy : public NonCombatStrategy +class HunterBuffSpeedStrategy : public Strategy { public: - HunterBuffSpeedStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {} + HunterBuffSpeedStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} + void InitTriggers(std::vector& triggers) override; std::string const getName() override { return "bspeed"; } - void InitTriggers(std::vector& triggers) override; }; -class HunterBuffManaStrategy : public NonCombatStrategy -{ -public: - HunterBuffManaStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {} - - std::string const getName() override { return "bmana"; } - void InitTriggers(std::vector& triggers) override; -}; - -class HunterBuffDpsStrategy : public NonCombatStrategy +class HunterBuffDpsStrategy : public Strategy { public: HunterBuffDpsStrategy(PlayerbotAI* botAI); - std::string const getName() override { return "bdps"; } void InitTriggers(std::vector& triggers) override; + std::string const getName() override { return "bdps"; } }; -class HunterNatureResistanceStrategy : public NonCombatStrategy +class HunterNatureResistanceStrategy : public Strategy { public: - HunterNatureResistanceStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) {} + HunterNatureResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} - std::string const getName() override { return "rnature"; } void InitTriggers(std::vector& triggers) override; + std::string const getName() override { return "rnature"; } }; #endif diff --git a/src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.cpp b/src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.cpp index e4e8a9a4f..8289b90bf 100644 --- a/src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.cpp +++ b/src/Ai/Class/Hunter/Strategy/MarksmanshipHunterStrategy.cpp @@ -6,45 +6,9 @@ #include "MarksmanshipHunterStrategy.h" #include "Playerbots.h" -// ===== Action Node Factory ===== -class MarksmanshipHunterStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - MarksmanshipHunterStrategyActionNodeFactory() - { - creators["auto shot"] = &auto_shot; - creators["silencing shot"] = &silencing_shot; - creators["kill command"] = &kill_command; - creators["kill shot"] = &kill_shot; - creators["viper sting"] = &viper_sting; - creators["serpent sting"] = serpent_sting; - creators["chimera shot"] = &chimera_shot; - creators["aimed shot"] = &aimed_shot; - creators["arcane shot"] = &arcane_shot; - creators["steady shot"] = &steady_shot; - creators["multi-shot"] = &multi_shot; - creators["volley"] = &volley; - } - -private: - static ActionNode* auto_shot(PlayerbotAI*) { return new ActionNode("auto shot", {}, {}, {}); } - static ActionNode* silencing_shot(PlayerbotAI*) { return new ActionNode("silencing shot", {}, {}, {}); } - static ActionNode* kill_command(PlayerbotAI*) { return new ActionNode("kill command", {}, {}, {}); } - static ActionNode* kill_shot(PlayerbotAI*) { return new ActionNode("kill shot", {}, {}, {}); } - static ActionNode* viper_sting(PlayerbotAI*) { return new ActionNode("viper sting", {}, {}, {}); } - static ActionNode* serpent_sting(PlayerbotAI*) { return new ActionNode("serpent sting", {}, {}, {}); } - static ActionNode* chimera_shot(PlayerbotAI*) { return new ActionNode("chimera shot", {}, {}, {}); } - static ActionNode* aimed_shot(PlayerbotAI*) { return new ActionNode("aimed shot", {}, {}, {}); } - static ActionNode* arcane_shot(PlayerbotAI*) { return new ActionNode("arcane shot", {}, {}, {}); } - static ActionNode* steady_shot(PlayerbotAI*) { return new ActionNode("steady shot", {}, {}, {}); } - static ActionNode* multi_shot(PlayerbotAI*) { return new ActionNode("multi shot", {}, {}, {}); } - static ActionNode* volley(PlayerbotAI*) { return new ActionNode("volley", {}, {}, {}); } -}; - -// ===== Single Target Strategy ===== MarksmanshipHunterStrategy::MarksmanshipHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI) { - actionNodeFactories.Add(new MarksmanshipHunterStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } // ===== Default Actions ===== diff --git a/src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.cpp b/src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.cpp index 796891a9b..cc8f2a64c 100644 --- a/src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.cpp +++ b/src/Ai/Class/Hunter/Strategy/SurvivalHunterStrategy.cpp @@ -12,36 +12,35 @@ class SurvivalHunterStrategyActionNodeFactory : public NamedObjectFactory& triggers) } ) ); - triggers.push_back( - new TriggerNode( - "lock and load", - { - NextAction("explosive shot rank 3", 27.5f) - } - ) - ); - triggers.push_back( - new TriggerNode( - "lock and load", - { - NextAction("explosive shot rank 2", 27.0f) - } - ) - ); - triggers.push_back( - new TriggerNode( - "lock and load", - { - NextAction("explosive shot rank 1", 26.5f) - } - ) - ); triggers.push_back( new TriggerNode( "kill command", diff --git a/src/Ai/Class/Hunter/Trigger/HunterTriggers.cpp b/src/Ai/Class/Hunter/Trigger/HunterTriggers.cpp index 972332d1a..733960bca 100644 --- a/src/Ai/Class/Hunter/Trigger/HunterTriggers.cpp +++ b/src/Ai/Class/Hunter/Trigger/HunterTriggers.cpp @@ -16,8 +16,7 @@ bool KillCommandTrigger::IsActive() { - Unit* target = GetTarget(); - return !botAI->HasAura("kill command", target); + return !botAI->HasAura("kill command", GetTarget()); } bool BlackArrowTrigger::IsActive() @@ -26,36 +25,46 @@ bool BlackArrowTrigger::IsActive() return false; return DebuffTrigger::IsActive(); - return BuffTrigger::IsActive(); } -bool HunterAspectOfTheHawkTrigger::IsActive() +bool HunterAspectOfTheDragonhawkTrigger::IsActive() { Unit* target = GetTarget(); - return SpellTrigger::IsActive() && !botAI->HasAura("aspect of the hawk", target) && - !botAI->HasAura("aspect of the dragonhawk", target) && - (!AI_VALUE2(bool, "has mana", "self target") || AI_VALUE2(uint8, "mana", "self target") > 70); + if (!target) + return false; + + if (!SpellTrigger::IsActive()) + return false; + + if (botAI->HasAura("aspect of the hawk", target) || + botAI->HasAura("aspect of the dragonhawk", target)) + return false; + + if (botAI->HasAura("aspect of the viper", target)) + return AI_VALUE2(uint8, "mana", "self target") >= 60; + + return true; } bool HunterNoStingsActiveTrigger::IsActive() { Unit* target = AI_VALUE(Unit*, "current target"); - return DebuffTrigger::IsActive() && target && !botAI->HasAura("serpent sting", target, false, true) && - !botAI->HasAura("scorpid sting", target, false, true) && !botAI->HasAura("viper sting", target, false, true); - return BuffTrigger::IsActive(); + return DebuffTrigger::IsActive() && target && + !botAI->HasAura("serpent sting", target, false, true) && + !botAI->HasAura("scorpid sting", target, false, true) && + !botAI->HasAura("viper sting", target, false, true); } bool HuntersPetDeadTrigger::IsActive() { - // Unit* pet = AI_VALUE(Unit*, "pet target"); - // return pet && AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target"); return AI_VALUE(bool, "pet dead") && !AI_VALUE2(bool, "mounted", "self target"); } bool HuntersPetLowHealthTrigger::IsActive() { Unit* pet = AI_VALUE(Unit*, "pet target"); - return pet && AI_VALUE2(uint8, "health", "pet target") < 40 && !AI_VALUE2(bool, "dead", "pet target") && + return pet && AI_VALUE2(uint8, "health", "pet target") < 40 && + !AI_VALUE2(bool, "dead", "pet target") && !AI_VALUE2(bool, "mounted", "self target"); } @@ -73,9 +82,14 @@ bool HunterPetNotHappy::IsActive() bool HunterAspectOfTheViperTrigger::IsActive() { - return SpellTrigger::IsActive() && !botAI->HasAura(spell, GetTarget()) && + if (botAI->HasStrategy("rnature", BotState::BOT_STATE_COMBAT) || + botAI->HasStrategy("rnature", BotState::BOT_STATE_NON_COMBAT) || + botAI->HasStrategy("bspeed", BotState::BOT_STATE_COMBAT) || + botAI->HasStrategy("bspeed", BotState::BOT_STATE_NON_COMBAT)) + return false; + + return BuffTrigger::IsActive() && AI_VALUE2(uint8, "mana", "self target") < (sPlayerbotAIConfig.lowMana / 2); - ; } bool HunterAspectOfThePackTrigger::IsActive() @@ -85,11 +99,14 @@ bool HunterAspectOfThePackTrigger::IsActive() bool HunterLowAmmoTrigger::IsActive() { - return bot->GetGroup() && (AI_VALUE2(uint32, "item count", "ammo") < 100) && - (AI_VALUE2(uint32, "item count", "ammo") > 0); + uint32 ammoCount = AI_VALUE2(uint32, "item count", "ammo"); + return bot->GetGroup() && ammoCount > 0 && ammoCount < 100; } -bool HunterHasAmmoTrigger::IsActive() { return !AmmoCountTrigger::IsActive(); } +bool HunterHasAmmoTrigger::IsActive() +{ + return !AmmoCountTrigger::IsActive(); +} bool SwitchToRangedTrigger::IsActive() { @@ -131,6 +148,7 @@ bool NoTrackTrigger::IsActive() if (botAI->HasAura(track, bot)) return false; } + return true; } @@ -138,17 +156,17 @@ bool SerpentStingOnAttackerTrigger::IsActive() { if (!DebuffOnAttackerTrigger::IsActive()) return false; + Unit* target = GetTarget(); if (!target) - { return false; - } + return !botAI->HasAura("scorpid sting", target, false, true) && !botAI->HasAura("viper sting", target, false, true); - return BuffTrigger::IsActive(); } -const std::set VolleyChannelCheckTrigger::VOLLEY_SPELL_IDS = { +const std::set VolleyChannelCheckTrigger::VOLLEY_SPELL_IDS = +{ 1510, // Volley Rank 1 14294, // Volley Rank 2 14295, // Volley Rank 3 @@ -159,19 +177,12 @@ const std::set VolleyChannelCheckTrigger::VOLLEY_SPELL_IDS = { bool VolleyChannelCheckTrigger::IsActive() { - Player* bot = botAI->GetBot(); - - // Check if the bot is channeling a spell - if (Spell* spell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) + if (Spell* spell = bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL); + spell && VOLLEY_SPELL_IDS.count(spell->m_spellInfo->Id)) { - // Only trigger if the spell being channeled is Volley - if (VOLLEY_SPELL_IDS.count(spell->m_spellInfo->Id)) - { - uint8 attackerCount = AI_VALUE(uint8, "attacker count"); - return attackerCount < minEnemies; - } + uint8 attackerCount = AI_VALUE(uint8, "attacker count"); + return attackerCount < minEnemies; } - // Not channeling Volley return false; } diff --git a/src/Ai/Class/Hunter/Trigger/HunterTriggers.h b/src/Ai/Class/Hunter/Trigger/HunterTriggers.h index 6bc5f3c44..7459f94bb 100644 --- a/src/Ai/Class/Hunter/Trigger/HunterTriggers.h +++ b/src/Ai/Class/Hunter/Trigger/HunterTriggers.h @@ -16,16 +16,10 @@ class PlayerbotAI; // Buff and Out of Combat Triggers -class HunterAspectOfTheMonkeyTrigger : public BuffTrigger +class HunterAspectOfTheDragonhawkTrigger : public BuffTrigger { public: - HunterAspectOfTheMonkeyTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the monkey") {} -}; - -class HunterAspectOfTheHawkTrigger : public BuffTrigger -{ -public: - HunterAspectOfTheHawkTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the hawk") {} + HunterAspectOfTheDragonhawkTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the dragonhawk") {} bool IsActive() override; }; @@ -130,10 +124,10 @@ public: FreezingTrapTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "freezing trap") {} }; -class ConsussiveShotSnareTrigger : public SnareTargetTrigger +class ConcussiveShotOnSnareTargetTrigger : public SnareTargetTrigger { public: - ConsussiveShotSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "concussive shot") {} + ConcussiveShotOnSnareTargetTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "concussive shot") {} }; class ScareBeastTrigger : public HasCcTargetTrigger @@ -212,25 +206,25 @@ public: class MisdirectionOnMainTankTrigger : public BuffOnMainTankTrigger { public: - MisdirectionOnMainTankTrigger(PlayerbotAI* ai) : BuffOnMainTankTrigger(ai, "misdirection", true) {} + MisdirectionOnMainTankTrigger(PlayerbotAI* botAI) : BuffOnMainTankTrigger(botAI, "misdirection", true) {} }; class TargetRemoveEnrageTrigger : public TargetAuraDispelTrigger { public: - TargetRemoveEnrageTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_ENRAGE) {} + TargetRemoveEnrageTrigger(PlayerbotAI* botAI) : TargetAuraDispelTrigger(botAI, "tranquilizing shot", DISPEL_ENRAGE) {} }; class TargetRemoveMagicTrigger : public TargetAuraDispelTrigger { public: - TargetRemoveMagicTrigger(PlayerbotAI* ai) : TargetAuraDispelTrigger(ai, "tranquilizing shot", DISPEL_MAGIC) {} + TargetRemoveMagicTrigger(PlayerbotAI* botAI) : TargetAuraDispelTrigger(botAI, "tranquilizing shot", DISPEL_MAGIC) {} }; class ImmolationTrapNoCdTrigger : public SpellNoCooldownTrigger { public: - ImmolationTrapNoCdTrigger(PlayerbotAI* ai) : SpellNoCooldownTrigger(ai, "immolation trap") {} + ImmolationTrapNoCdTrigger(PlayerbotAI* botAI) : SpellNoCooldownTrigger(botAI, "immolation trap") {} }; BEGIN_TRIGGER(HuntersPetDeadTrigger, Trigger) diff --git a/src/Ai/Raid/Icecrown/Multiplier/RaidIccMultipliers.cpp b/src/Ai/Raid/Icecrown/Multiplier/RaidIccMultipliers.cpp index c7f25e331..710c15e0a 100644 --- a/src/Ai/Raid/Icecrown/Multiplier/RaidIccMultipliers.cpp +++ b/src/Ai/Raid/Icecrown/Multiplier/RaidIccMultipliers.cpp @@ -647,7 +647,7 @@ float IccSindragosaMultiplier::GetValue(Action* action) dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || - dynamic_cast(action)) + dynamic_cast(action)) return 0.0f; } @@ -774,7 +774,7 @@ float IccLichKingAddsMultiplier::GetValue(Action* action) dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || dynamic_cast(action) || - dynamic_cast(action) || dynamic_cast(action)) + dynamic_cast(action) || dynamic_cast(action)) return 0.0f; } diff --git a/src/Bot/Factory/AiFactory.cpp b/src/Bot/Factory/AiFactory.cpp index 84b3a7dc5..6121789a9 100644 --- a/src/Bot/Factory/AiFactory.cpp +++ b/src/Bot/Factory/AiFactory.cpp @@ -363,7 +363,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa else engine->addStrategiesNoInit("surv", nullptr); - engine->addStrategiesNoInit("cc", "dps assist", "aoe", nullptr); + engine->addStrategiesNoInit("cc", "dps assist", "aoe", "bdps", nullptr); break; case CLASS_ROGUE: if (tab == ROGUE_TAB_ASSASSINATION || tab == ROGUE_TAB_SUBTLETY) diff --git a/src/Bot/Factory/PlayerbotFactory.cpp b/src/Bot/Factory/PlayerbotFactory.cpp index 506ad9154..b66623c58 100644 --- a/src/Bot/Factory/PlayerbotFactory.cpp +++ b/src/Bot/Factory/PlayerbotFactory.cpp @@ -3307,7 +3307,7 @@ void PlayerbotFactory::InitReagents() break; case CLASS_PALADIN: if (level >= 52) - items.push_back({21177, 80}); // Symbol of Kings + items.push_back({21177, 100}); // Symbol of Kings break; case CLASS_PRIEST: if (level >= 48 && level < 56)