mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
- Added Iron Assembly Rune of Power strategy (#1275)
This commit is contained in:
@@ -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"); }
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -68,6 +68,10 @@ void RaidUlduarStrategy::InitTriggers(std::vector<TriggerNode*>& 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
|
||||
//
|
||||
|
||||
@@ -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"); }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user