diff --git a/src/strategy/raids/ulduar/RaidUlduarActionContext.h b/src/strategy/raids/ulduar/RaidUlduarActionContext.h index cdfd6af5..ddcbc523 100644 --- a/src/strategy/raids/ulduar/RaidUlduarActionContext.h +++ b/src/strategy/raids/ulduar/RaidUlduarActionContext.h @@ -29,6 +29,7 @@ public: creators["ignis fire resistance action"] = &RaidUlduarActionContext::ignis_fire_resistance_action; creators["iron assembly lightning tendrils action"] = &RaidUlduarActionContext::iron_assembly_lightning_tendrils_action; creators["iron assembly overload action"] = &RaidUlduarActionContext::iron_assembly_overload_action; + creators["iron assembly rune of power action"] = &RaidUlduarActionContext::iron_assembly_rune_of_power_action; creators["kologarn mark dps target action"] = &RaidUlduarActionContext::kologarn_mark_dps_target_action; creators["kologarn fall from floor action"] = &RaidUlduarActionContext::kologarn_fall_from_floor_action; creators["kologarn nature resistance action"] = &RaidUlduarActionContext::kologarn_nature_resistance_action; @@ -62,6 +63,7 @@ private: static Action* ignis_fire_resistance_action(PlayerbotAI* ai) { return new BossFireResistanceAction(ai, "ignis the furnace master"); } static Action* iron_assembly_lightning_tendrils_action(PlayerbotAI* ai) { return new IronAssemblyLightningTendrilsAction(ai); } static Action* iron_assembly_overload_action(PlayerbotAI* ai) { return new IronAssemblyOverloadAction(ai); } + static Action* iron_assembly_rune_of_power_action(PlayerbotAI* ai) { return new IronAssemblyRuneOfPowerAction(ai); } static Action* kologarn_mark_dps_target_action(PlayerbotAI* ai) { return new KologarnMarkDpsTargetAction(ai); } static Action* kologarn_fall_from_floor_action(PlayerbotAI* ai) { return new KologarnFallFromFloorAction(ai); } static Action* kologarn_nature_resistance_action(PlayerbotAI* ai) { return new BossNatureResistanceAction(ai, "kologarn"); } diff --git a/src/strategy/raids/ulduar/RaidUlduarActions.cpp b/src/strategy/raids/ulduar/RaidUlduarActions.cpp index 42cb0e43..6190a128 100644 --- a/src/strategy/raids/ulduar/RaidUlduarActions.cpp +++ b/src/strategy/raids/ulduar/RaidUlduarActions.cpp @@ -1215,6 +1215,21 @@ bool IronAssemblyOverloadAction::Execute(Event event) return false; } +bool IronAssemblyRuneOfPowerAction::isUseful() +{ + IronAssemblyRuneOfPowerTrigger ironAssemblyRuneOfPowerTrigger(botAI); + return ironAssemblyRuneOfPowerTrigger.IsActive(); +} + +bool IronAssemblyRuneOfPowerAction::Execute(Event event) +{ + Unit* target = botAI->GetUnit(bot->GetTarget()); + if (!target || !target->IsAlive()) + return false; + + return MoveAway(target, 10.0f, true); +} + bool KologarnMarkDpsTargetAction::isUseful() { KologarnMarkDpsTargetTrigger kologarnMarkDpsTargetTrigger(botAI); diff --git a/src/strategy/raids/ulduar/RaidUlduarActions.h b/src/strategy/raids/ulduar/RaidUlduarActions.h index 16c4e213..31677e6f 100644 --- a/src/strategy/raids/ulduar/RaidUlduarActions.h +++ b/src/strategy/raids/ulduar/RaidUlduarActions.h @@ -130,6 +130,14 @@ public: bool isUseful() override; }; +class IronAssemblyRuneOfPowerAction : public MovementAction +{ +public: + IronAssemblyRuneOfPowerAction(PlayerbotAI* botAI) : MovementAction(botAI, "iron assembly rune of power action") {} + bool Execute(Event event) override; + bool isUseful() override; +}; + class KologarnMarkDpsTargetAction : public Action { public: diff --git a/src/strategy/raids/ulduar/RaidUlduarStrategy.cpp b/src/strategy/raids/ulduar/RaidUlduarStrategy.cpp index e14d0687..cb1b9a65 100644 --- a/src/strategy/raids/ulduar/RaidUlduarStrategy.cpp +++ b/src/strategy/raids/ulduar/RaidUlduarStrategy.cpp @@ -68,6 +68,10 @@ void RaidUlduarStrategy::InitTriggers(std::vector& triggers) "iron assembly overload trigger", NextAction::array(0, new NextAction("iron assembly overload action", ACTION_RAID), nullptr))); + triggers.push_back(new TriggerNode( + "iron assembly rune of power trigger", + NextAction::array(0, new NextAction("iron assembly rune of power action", ACTION_RAID), nullptr))); + // // Kologarn // diff --git a/src/strategy/raids/ulduar/RaidUlduarTriggerContext.h b/src/strategy/raids/ulduar/RaidUlduarTriggerContext.h index a676ac0e..eda5b7d0 100644 --- a/src/strategy/raids/ulduar/RaidUlduarTriggerContext.h +++ b/src/strategy/raids/ulduar/RaidUlduarTriggerContext.h @@ -29,6 +29,7 @@ public: creators["ignis fire resistance trigger"] = &RaidUlduarTriggerContext::ignis_fire_resistance_trigger; creators["iron assembly lightning tendrils trigger"] = &RaidUlduarTriggerContext::iron_assembly_lightning_tendrils_trigger; creators["iron assembly overload trigger"] = &RaidUlduarTriggerContext::iron_assembly_overload_trigger; + creators["iron assembly rune of power trigger"] = &RaidUlduarTriggerContext::iron_assembly_rune_of_power_trigger; creators["kologarn mark dps target trigger"] = &RaidUlduarTriggerContext::kologarn_mark_dps_target_trigger; creators["kologarn fall from floor trigger"] = &RaidUlduarTriggerContext::kologarn_fall_from_floor_trigger; creators["kologarn nature resistance trigger"] = &RaidUlduarTriggerContext::kologarn_nature_resistance_trigger; @@ -63,6 +64,7 @@ private: static Trigger* ignis_fire_resistance_trigger(PlayerbotAI* ai) { return new BossFireResistanceTrigger(ai, "ignis the furnace master"); } static Trigger* iron_assembly_lightning_tendrils_trigger(PlayerbotAI* ai) { return new IronAssemblyLightningTendrilsTrigger(ai); } static Trigger* iron_assembly_overload_trigger(PlayerbotAI* ai) { return new IronAssemblyOverloadTrigger(ai); } + static Trigger* iron_assembly_rune_of_power_trigger(PlayerbotAI* ai) { return new IronAssemblyRuneOfPowerTrigger(ai); } static Trigger* kologarn_mark_dps_target_trigger(PlayerbotAI* ai) { return new KologarnMarkDpsTargetTrigger(ai); } static Trigger* kologarn_fall_from_floor_trigger(PlayerbotAI* ai) { return new KologarnFallFromFloorTrigger(ai); } static Trigger* kologarn_nature_resistance_trigger(PlayerbotAI* ai) { return new BossNatureResistanceTrigger(ai, "kologarn"); } diff --git a/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp b/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp index 7f3cd0fb..67d863f6 100644 --- a/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp +++ b/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp @@ -277,6 +277,18 @@ bool IronAssemblyOverloadTrigger::IsActive() boss->HasAura(SPELL_OVERLOAD_10_MAN_2) || boss->HasAura(SPELL_OVERLOAD_25_MAN_2); } +bool IronAssemblyRuneOfPowerTrigger::IsActive() +{ + Unit* target = botAI->GetUnit(bot->GetTarget()); + if (!target || !target->IsAlive()) + return false; + + if (!target->HasAura(SPELL_RUNE_OF_POWER)) + return false; + + return botAI->IsTank(bot); +} + bool KologarnMarkDpsTargetTrigger::IsActive() { // Check boss and it is alive diff --git a/src/strategy/raids/ulduar/RaidUlduarTriggers.h b/src/strategy/raids/ulduar/RaidUlduarTriggers.h index a426ed59..8306d899 100644 --- a/src/strategy/raids/ulduar/RaidUlduarTriggers.h +++ b/src/strategy/raids/ulduar/RaidUlduarTriggers.h @@ -16,6 +16,7 @@ enum UlduarIDs SPELL_OVERLOAD_25_MAN = 63481, SPELL_OVERLOAD_10_MAN_2 = 63485, SPELL_OVERLOAD_25_MAN_2 = 61886, + SPELL_RUNE_OF_POWER = 64320, //Kologarn NPC_RIGHT_ARM = 32934, @@ -140,6 +141,13 @@ public: bool IsActive() override; }; +class IronAssemblyRuneOfPowerTrigger : public Trigger +{ +public: + IronAssemblyRuneOfPowerTrigger(PlayerbotAI* ai) : Trigger(ai, "iron assembly rune of power trigger") {} + bool IsActive() override; +}; + // // Kologarn //