From 8279d9c2725dceef8c795c54db5c2b8ac04df5d1 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Sun, 7 Jul 2024 13:48:24 -0300 Subject: [PATCH] fix(Scripts/HyjalSummit): Rage Winterchill Spells (#19335) Update boss_rage_winterchill.cpp --- .../boss_rage_winterchill.cpp | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp index 79387d099..39bce4e6e 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp @@ -39,6 +39,7 @@ enum Texts enum Misc { + GROUP_FROST = 1, PATH_RAGE_WINTERCHILL = 177670, POINT_COMBAT_START = 7 }; @@ -50,9 +51,9 @@ public: { _recentlySpoken = false; scheduler.SetValidator([this] - { - return !me->HasUnitState(UNIT_STATE_CASTING); - }); + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } void JustEngagedWith(Unit* who) override @@ -61,26 +62,31 @@ public: scheduler.Schedule(18s, 24s, [this](TaskContext context) { + context.SetGroup(GROUP_FROST); + DoCastSelf(SPELL_FROST_ARMOR); context.Repeat(30s, 45s); }).Schedule(5s, 9s, [this](TaskContext context) { + context.SetGroup(GROUP_FROST); + DoCastRandomTarget(SPELL_ICEBOLT); context.Repeat(9s, 15s); }).Schedule(12s, 17s, [this](TaskContext context) { - if (SelectTarget(SelectTargetMethod::Random, 0, 20.f)) - { - DoCastAOE(SPELL_FROST_NOVA); + context.SetGroup(GROUP_FROST); + + if (DoCastRandomTarget(SPELL_FROST_NOVA, 0, 45.f) == SPELL_CAST_OK) Talk(SAY_NOVA); - context.Repeat(25s, 30s); - } - else - context.Repeat(1200ms); + + context.Repeat(25s, 30s); }).Schedule(21s, 28s, [this](TaskContext context) { - if (DoCastRandomTarget(SPELL_DEATH_AND_DECAY, 0, 40.f)) + if (DoCastRandomTarget(SPELL_DEATH_AND_DECAY, 0, 40.f) == SPELL_CAST_OK) + { Talk(SAY_DECAY); + context.DelayGroup(GROUP_FROST, 15s); + } context.Repeat(45s); }).Schedule(10min, [this](TaskContext context) @@ -106,9 +112,9 @@ public: case ALLIANCE_BASE_CHARGE_2: case ALLIANCE_BASE_CHARGE_3: me->m_Events.AddEventAtOffset([this]() - { - me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true); - }, 1s); + { + me->GetMotionMaster()->MovePath(urand(ALLIANCE_BASE_PATROL_1, ALLIANCE_BASE_PATROL_3), true); + }, 1s); break; } } @@ -121,9 +127,9 @@ public: _recentlySpoken = true; scheduler.Schedule(6s, [this](TaskContext) - { - _recentlySpoken = false; - }); + { + _recentlySpoken = false; + }); } }