mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
bots in BWL will now use hourglass-sand to cure affliction-bronze
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -14,10 +14,14 @@
|
||||
class RaidTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
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
|
||||
@@ -28,3 +28,5 @@ bool BwlTurnOffSuppressionDeviceAction::Execute(Event event)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BwlUseHourglassSandAction::Execute(Event event) { return botAI->CastSpell(23645, bot); }
|
||||
|
||||
@@ -23,4 +23,11 @@ public:
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class BwlUseHourglassSandAction : public Action
|
||||
{
|
||||
public:
|
||||
BwlUseHourglassSandAction(PlayerbotAI* botAI) : Action(botAI, "bwl use hourglass sand") {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -4,10 +4,12 @@
|
||||
|
||||
void RaidBwlStrategy::InitTriggers(std::vector<TriggerNode*>& 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)));
|
||||
|
||||
triggers.push_back(new TriggerNode("bwl affliction bronze",
|
||||
NextAction::array(0, new NextAction("bwl use hourglass sand", ACTION_RAID), NULL)));
|
||||
}
|
||||
@@ -20,3 +20,5 @@ bool BwlSuppressionDeviceTrigger::IsActive()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BwlAfflictionBronzeTrigger::IsActive() { return bot->HasAura(23170); }
|
||||
|
||||
@@ -12,4 +12,11 @@ public:
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class BwlAfflictionBronzeTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
BwlAfflictionBronzeTrigger(PlayerbotAI* botAI) : Trigger(botAI, "bwl affliction bronze") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user