From 47ffe375192a2486fef03289c7c25710caec5525 Mon Sep 17 00:00:00 2001 From: mostlynick3 Date: Mon, 24 Mar 2025 11:26:21 +0100 Subject: [PATCH] ICC - Implement Val'kyr grabbing bots and dropping (#1098) * ICC - Implement Val'kyr grabbing bots and dropping --- .../raids/icecrown/RaidIccActions.cpp | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/strategy/raids/icecrown/RaidIccActions.cpp b/src/strategy/raids/icecrown/RaidIccActions.cpp index 42e9c0ac..9d553fe8 100644 --- a/src/strategy/raids/icecrown/RaidIccActions.cpp +++ b/src/strategy/raids/icecrown/RaidIccActions.cpp @@ -3206,8 +3206,38 @@ bool IccLichKingWinterAction::Execute(Event event) bool IccLichKingAddsAction::Execute(Event event) { + if (bot->HasAura(68985) || !bot->IsAlive()) // Don't process actions if bot is picked up by Val'kyr or is dead + return false; + Unit* boss = AI_VALUE2(Unit*, "find target", "the lich king"); Unit* spiritWarden = AI_VALUE2(Unit*, "find target", "spirit warden"); + + if (bot->HasAura(30440)) // Random aura tracking whether bot has fallen off edge / been thrown by Val'kyr + { + if(bot->GetPositionZ() > 779.0f) + return JumpTo(bot->GetMapId(), bot->GetPositionX(), bot->GetPositionY(), 740.01f); + else + { + bot->KillPlayer(); // If bot has jumped past the kill Z (780), kill + return true; + } + } + + bool hasWinterAura = boss->HasAura(72259) || boss->HasAura(74273) || boss->HasAura(74274) || boss->HasAura(74275); + bool hasWinter2Aura = boss->HasAura(68981) || boss->HasAura(74270) || boss->HasAura(74271) || boss->HasAura(74272); + + if (boss && boss->GetHealthPct() < 70 && boss->GetHealthPct() > 40 && !hasWinterAura && !hasWinter2Aura) // If boss is in p2, check if bot has been thrown off platform + { + float dx = bot->GetPositionX() - 503.0f; + float dy = bot->GetPositionY() - (-2124.0f); + float distance = sqrt(dx*dx + dy*dy); // Calculate distance from the center of the platform + + if (distance > 52.0f && distance < 70.0f && bot->GetPositionZ() > 844) // If bot has fallen off edge, distance is over 52 + { + bot->AddAura(30440, bot); // Apply random 30 sec aura to track that we've initiated a jump + return JumpTo(bot->GetMapId(), bot->GetPositionX(), bot->GetPositionY(), 740.01f); // Start jumping to the abyss + } + } /* //temp solution for bots going underground due to buggy ice platfroms and adds that go underground