From dccbccc090da37624c5b8c3fb42f4e7107f543da Mon Sep 17 00:00:00 2001 From: kadeshar Date: Mon, 31 Mar 2025 16:47:30 +0200 Subject: [PATCH] - Added Biting Cold cheat (#1131) --- .../raids/ulduar/RaidUlduarActions.cpp | 52 ++++++++++--------- .../raids/ulduar/RaidUlduarTriggers.cpp | 11 ++-- .../raids/ulduar/RaidUlduarTriggers.h | 1 + 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/src/strategy/raids/ulduar/RaidUlduarActions.cpp b/src/strategy/raids/ulduar/RaidUlduarActions.cpp index de7a60e6..33759ae4 100644 --- a/src/strategy/raids/ulduar/RaidUlduarActions.cpp +++ b/src/strategy/raids/ulduar/RaidUlduarActions.cpp @@ -1255,32 +1255,36 @@ bool HodirMoveSnowpackedIcicleAction::Execute(Event event) bool HodirBitingColdJumpAction::Execute(Event event) { - // This needs improving but maybe it should be done in the playerbot core. - - int mapId = bot->GetMap()->GetId(); - int x = bot->GetPositionX(); - int y = bot->GetPositionY(); - int z = bot->GetPositionZ() + 3.98f; - float speed = 7.96f; - - UpdateMovementState(); - if (!IsMovingAllowed(mapId, x, y, z)) - { - return false; - } - MovementPriority priority; - if (IsWaitingForLastMove(priority)) - { - return false; - } - - MotionMaster& mm = *bot->GetMotionMaster(); - mm.Clear(); - mm.MoveJump(x, y, z, speed, speed, 1, AI_VALUE(Unit*, "current target")); - mm.MoveFall(0, true); - AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), 1000, priority); + bot->RemoveAurasDueToSpell(SPELL_BITING_COLD_PLAYER_AURA); return true; + + // Backup when the overall strategy without cheat will be more vialable + + // int mapId = bot->GetMap()->GetId(); + // int x = bot->GetPositionX(); + // int y = bot->GetPositionY(); + // int z = bot->GetPositionZ() + 3.98f; + // float speed = 7.96f; + + // UpdateMovementState(); + // if (!IsMovingAllowed(mapId, x, y, z)) + //{ + // return false; + // } + // MovementPriority priority; + // if (IsWaitingForLastMove(priority)) + //{ + // return false; + // } + + // MotionMaster& mm = *bot->GetMotionMaster(); + // mm.Clear(); + // mm.MoveJump(x, y, z, speed, speed, 1, AI_VALUE(Unit*, "current target")); + // mm.MoveFall(0, true); + // AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation(), 1000, priority); + + // return true; } bool FreyaMoveAwayNatureBombAction::isUseful() diff --git a/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp b/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp index 5ae7b193..61ccdf6a 100644 --- a/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp +++ b/src/strategy/raids/ulduar/RaidUlduarTriggers.cpp @@ -287,13 +287,12 @@ bool HodirBitingColdTrigger::IsActive() return false; } - // Override if boss is casting Flash Freeze - if (!boss->HasUnitState(UNIT_STATE_CASTING) || !boss->FindCurrentSpellBySpellId(SPELL_FLASH_FREEZE)) - { - return true; - } + Player* master = botAI->GetMaster(); + if (!master || !master->IsAlive()) + return false; - return boss && botAI->GetAura("biting cold", bot, false, false, 2); + return botAI->GetAura("biting cold", bot, false, false, 2) && + !botAI->GetAura("biting cold", master, false, false, 2); } //Snowpacked Icicle Target diff --git a/src/strategy/raids/ulduar/RaidUlduarTriggers.h b/src/strategy/raids/ulduar/RaidUlduarTriggers.h index 1782eb7d..06d145d2 100644 --- a/src/strategy/raids/ulduar/RaidUlduarTriggers.h +++ b/src/strategy/raids/ulduar/RaidUlduarTriggers.h @@ -21,6 +21,7 @@ enum UlduarIDs NPC_SNOWPACKED_ICICLE = 33174, NPC_TOASTY_FIRE = 33342, SPELL_FLASH_FREEZE = 61968, + SPELL_BITING_COLD_PLAYER_AURA = 62039, // Freya NPC_EONARS_GIFT = 33228,