diff --git a/src/strategy/raids/RaidActionContext.h b/src/strategy/raids/RaidActionContext.h index e96c71e1..f8f4445f 100644 --- a/src/strategy/raids/RaidActionContext.h +++ b/src/strategy/raids/RaidActionContext.h @@ -17,6 +17,7 @@ public: { creators["bwl check onyxia scale cloak"] = &RaidActionContext::bwl_check_onyxia_scale_cloak; creators["bwl turn off suppression device"] = &RaidActionContext::bwl_turn_off_suppression_device; + creators["bwl use hourglass sand"] = &RaidActionContext::bwl_use_hourglass_sand; } private: @@ -28,6 +29,10 @@ private: { return new BwlTurnOffSuppressionDeviceAction(botAI); } + static Action* bwl_use_hourglass_sand(PlayerbotAI* botAI) + { + return new BwlUseHourglassSandAction(botAI); + } }; #endif diff --git a/src/strategy/raids/RaidTriggerContext.h b/src/strategy/raids/RaidTriggerContext.h index 69b45002..fffcd729 100644 --- a/src/strategy/raids/RaidTriggerContext.h +++ b/src/strategy/raids/RaidTriggerContext.h @@ -14,10 +14,14 @@ class RaidTriggerContext : public NamedObjectContext { public: - RaidTriggerContext() { creators["bwl suppression device"] = &RaidTriggerContext::bwl_suppression_device; } + RaidTriggerContext() { + creators["bwl suppression device"] = &RaidTriggerContext::bwl_suppression_device; + creators["bwl affliction bronze"] = &RaidTriggerContext::bwl_affliction_bronze; + } private: static Trigger* bwl_suppression_device(PlayerbotAI* ai) { return new BwlSuppressionDeviceTrigger(ai); } + static Trigger* bwl_affliction_bronze(PlayerbotAI* ai) { return new BwlAfflictionBronzeTrigger(ai); } }; -#endif \ No newline at end of file +#endif diff --git a/src/strategy/raids/blackwinglair/RaidBwlActions.cpp b/src/strategy/raids/blackwinglair/RaidBwlActions.cpp index 5ab02fef..54b21791 100644 --- a/src/strategy/raids/blackwinglair/RaidBwlActions.cpp +++ b/src/strategy/raids/blackwinglair/RaidBwlActions.cpp @@ -27,4 +27,6 @@ bool BwlTurnOffSuppressionDeviceAction::Execute(Event event) go->SetGoState(GO_STATE_ACTIVE); } return true; -} \ No newline at end of file +} + +bool BwlUseHourglassSandAction::Execute(Event event) { return botAI->CastSpell(23645, bot); } diff --git a/src/strategy/raids/blackwinglair/RaidBwlActions.h b/src/strategy/raids/blackwinglair/RaidBwlActions.h index 1822ebde..24dcf399 100644 --- a/src/strategy/raids/blackwinglair/RaidBwlActions.h +++ b/src/strategy/raids/blackwinglair/RaidBwlActions.h @@ -23,4 +23,11 @@ public: bool Execute(Event event) override; }; -#endif \ No newline at end of file +class BwlUseHourglassSandAction : public Action +{ +public: + BwlUseHourglassSandAction(PlayerbotAI* botAI) : Action(botAI, "bwl use hourglass sand") {} + bool Execute(Event event) override; +}; + +#endif diff --git a/src/strategy/raids/blackwinglair/RaidBwlStrategy.cpp b/src/strategy/raids/blackwinglair/RaidBwlStrategy.cpp index 6c7d79e5..1b784683 100644 --- a/src/strategy/raids/blackwinglair/RaidBwlStrategy.cpp +++ b/src/strategy/raids/blackwinglair/RaidBwlStrategy.cpp @@ -4,10 +4,12 @@ void RaidBwlStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode( - "often", NextAction::array(0, new NextAction("bwl check onyxia scale cloak", ACTION_RAID), NULL))); + triggers.push_back(new TriggerNode("often", + NextAction::array(0, new NextAction("bwl check onyxia scale cloak", ACTION_RAID), NULL))); - triggers.push_back( - new TriggerNode("bwl suppression device", + triggers.push_back(new TriggerNode("bwl suppression device", NextAction::array(0, new NextAction("bwl turn off suppression device", ACTION_RAID), NULL))); -} \ No newline at end of file + + triggers.push_back(new TriggerNode("bwl affliction bronze", + NextAction::array(0, new NextAction("bwl use hourglass sand", ACTION_RAID), NULL))); +} diff --git a/src/strategy/raids/blackwinglair/RaidBwlTriggers.cpp b/src/strategy/raids/blackwinglair/RaidBwlTriggers.cpp index 089a3f11..e34e7a9a 100644 --- a/src/strategy/raids/blackwinglair/RaidBwlTriggers.cpp +++ b/src/strategy/raids/blackwinglair/RaidBwlTriggers.cpp @@ -19,4 +19,6 @@ bool BwlSuppressionDeviceTrigger::IsActive() return true; } return false; -} \ No newline at end of file +} + +bool BwlAfflictionBronzeTrigger::IsActive() { return bot->HasAura(23170); } diff --git a/src/strategy/raids/blackwinglair/RaidBwlTriggers.h b/src/strategy/raids/blackwinglair/RaidBwlTriggers.h index 8f26ad7b..fc19acd5 100644 --- a/src/strategy/raids/blackwinglair/RaidBwlTriggers.h +++ b/src/strategy/raids/blackwinglair/RaidBwlTriggers.h @@ -12,4 +12,11 @@ public: bool IsActive() override; }; -#endif \ No newline at end of file +class BwlAfflictionBronzeTrigger : public Trigger +{ +public: + BwlAfflictionBronzeTrigger(PlayerbotAI* botAI) : Trigger(botAI, "bwl affliction bronze") {} + bool IsActive() override; +}; + +#endif