- Added Auriaya fall from floor protection (#1318)

This commit is contained in:
kadeshar
2025-05-20 17:24:45 +02:00
committed by GitHub
parent 5910866362
commit e68c5a76c6
7 changed files with 61 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ public:
creators["kologarn eyebeam action"] = &RaidUlduarActionContext::kologarn_eyebeam_action;
creators["kologarn rti target action"] = &RaidUlduarActionContext::kologarn_rti_target_action;
creators["kologarn crunch armor action"] = &RaidUlduarActionContext::kologarn_crunch_armor_action;
creators["auriaya fall from floor action"] = &RaidUlduarActionContext::auriaya_fall_from_floor_action;
creators["hodir move snowpacked icicle"] = &RaidUlduarActionContext::hodir_move_snowpacked_icicle;
creators["hodir biting cold jump"] = &RaidUlduarActionContext::hodir_biting_cold_jump;
creators["hodir frost resistance action"] = &RaidUlduarActionContext::hodir_frost_resistance_action;
@@ -77,6 +78,7 @@ private:
static Action* kologarn_eyebeam_action(PlayerbotAI* ai) { return new KologarnEyebeamAction(ai); }
static Action* kologarn_rti_target_action(PlayerbotAI* ai) { return new KologarnRtiTargetAction(ai); }
static Action* kologarn_crunch_armor_action(PlayerbotAI* ai) { return new KologarnCrunchArmorAction(ai); }
static Action* auriaya_fall_from_floor_action(PlayerbotAI* ai) { return new AuriayaFallFromFloorAction(ai); }
static Action* hodir_move_snowpacked_icicle(PlayerbotAI* ai) { return new HodirMoveSnowpackedIcicleAction(ai); }
static Action* hodir_biting_cold_jump(PlayerbotAI* ai) { return new HodirBitingColdJumpAction(ai); }
static Action* hodir_frost_resistance_action(PlayerbotAI* ai) { return new BossFrostResistanceAction(ai, "hodir"); }

View File

@@ -1485,6 +1485,23 @@ bool KologarnCrunchArmorAction::Execute(Event event)
return true;
}
bool AuriayaFallFromFloorAction::Execute(Event event)
{
Player* master = botAI->GetMaster();
if (!master)
return false;
return bot->TeleportTo(bot->GetMapId(), master->GetPositionX(), master->GetPositionY(), master->GetPositionZ(),
master->GetOrientation());
}
bool AuriayaFallFromFloorAction::isUseful()
{
AuriayaFallFromFloorTrigger auriayaFallFromFloorTrigger(botAI);
return auriayaFallFromFloorTrigger.IsActive();
}
bool HodirMoveSnowpackedIcicleAction::isUseful()
{
// Check boss and it is alive
@@ -2096,6 +2113,9 @@ bool ThorimFallFromFloorAction::Execute(Event event)
{
Player* master = botAI->GetMaster();
if (!master)
return false;
return bot->TeleportTo(bot->GetMapId(), master->GetPositionX(), master->GetPositionY(), master->GetPositionZ(),
master->GetOrientation());
}

View File

@@ -185,6 +185,14 @@ public:
bool isUseful() override;
};
class AuriayaFallFromFloorAction : public Action
{
public:
AuriayaFallFromFloorAction(PlayerbotAI* botAI) : Action(botAI, "auriaya fall from floor action") {}
bool Execute(Event event) override;
bool isUseful() override;
};
class HodirBitingColdJumpAction : public MovementAction
{
public:

View File

@@ -107,6 +107,13 @@ void RaidUlduarStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"kologarn crunch armor trigger",
NextAction::array(0, new NextAction("kologarn crunch armor action", ACTION_RAID), nullptr)));
//
// Auriaya
//
triggers.push_back(new TriggerNode(
"auriaya fall from floor trigger",
NextAction::array(0, new NextAction("auriaya fall from floor action", ACTION_RAID), nullptr)));
//
// Hodir
//

View File

@@ -38,6 +38,7 @@ public:
creators["kologarn rti target trigger"] = &RaidUlduarTriggerContext::kologarn_rti_target_trigger;
creators["kologarn crunch armor trigger"] = &RaidUlduarTriggerContext::kologarn_crunch_armor_trigger;
creators["kologarn attack dps target trigger"] = &RaidUlduarTriggerContext::kologarn_attack_dps_target_trigger;
creators["auriaya fall from floor trigger"] = &RaidUlduarTriggerContext::auriaya_fall_from_floor_trigger;
creators["hodir biting cold"] = &RaidUlduarTriggerContext::hodir_biting_cold;
creators["hodir near snowpacked icicle"] = &RaidUlduarTriggerContext::hodir_near_snowpacked_icicle;
creators["hodir frost resistance trigger"] = &RaidUlduarTriggerContext::hodir_frost_resistance_trigger;
@@ -80,6 +81,7 @@ private:
static Trigger* kologarn_rti_target_trigger(PlayerbotAI* ai) { return new KologarnRtiTargetTrigger(ai); }
static Trigger* kologarn_crunch_armor_trigger(PlayerbotAI* ai) { return new KologarnCrunchArmorTrigger(ai); }
static Trigger* kologarn_attack_dps_target_trigger(PlayerbotAI* ai) { return new KologarnAttackDpsTargetTrigger(ai); }
static Trigger* auriaya_fall_from_floor_trigger(PlayerbotAI* ai) { return new AuriayaFallFromFloorTrigger(ai); }
static Trigger* hodir_biting_cold(PlayerbotAI* ai) { return new HodirBitingColdTrigger(ai); }
static Trigger* hodir_near_snowpacked_icicle(PlayerbotAI* ai) { return new HodirNearSnowpackedIcicleTrigger(ai); }
static Trigger* hodir_frost_resistance_trigger(PlayerbotAI* ai) { return new BossFrostResistanceTrigger(ai, "hodir"); }

View File

@@ -487,6 +487,17 @@ bool KologarnCrunchArmorTrigger::IsActive()
return bot->HasAura(SPELL_CRUNCH_ARMOR);
}
bool AuriayaFallFromFloorTrigger::IsActive()
{
// Check boss and it is alive
Unit* boss = AI_VALUE2(Unit*, "find target", "auriaya");
if (!boss || !boss->IsAlive())
return false;
// Check if bot is on the floor
return bot->GetPositionZ() < ULDUAR_AURIAYA_AXIS_Z_PATHING_ISSUE_DETECT;
}
bool HodirBitingColdTrigger::IsActive()
{
Unit* boss = AI_VALUE2(Unit*, "find target", "hodir");

View File

@@ -74,7 +74,7 @@ const float ULDUAR_KOLOGARN_AXIS_Z_PATHING_ISSUE_DETECT = 420.0f;
const float ULDUAR_KOLOGARN_EYEBEAM_RADIUS = 3.0f;
const float ULDUAR_THORIM_AXIS_Z_FLOOR_THRESHOLD = 429.6094f;
const float ULDUAR_THORIM_AXIS_Z_PATHING_ISSUE_DETECT = 410.0f;
const float ULDUAR_AURIAYA_AXIS_Z_PATHING_ISSUE_DETECT = 410.0f;
const Position ULDUAR_THORIM_NEAR_ARENA_CENTER = Position(2134.9854f, -263.11853f, 419.8465f);
const Position ULDUAR_THORIM_NEAR_ENTRANCE_POSITION = Position(2172.4355f, -258.27957f, 418.47162f);
@@ -240,6 +240,16 @@ public:
bool IsActive() override;
};
//
// Auriaya
//
class AuriayaFallFromFloorTrigger : public Trigger
{
public:
AuriayaFallFromFloorTrigger(PlayerbotAI* ai) : Trigger(ai, "auriaya fall from floor trigger") {}
bool IsActive() override;
};
//
// Hodir
//