From ea047f2cf254803913bbd29eb49c22d1085cc134 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:09:11 -0300 Subject: [PATCH] fix(Scripts/Mechanar): Add missing Enrage event for Pathaleon the Calculator (#15650) * init * 2 * indentation * 3 --- .../rev_1680124416269252400.sql | 8 +++++ .../boss_pathaleon_the_calculator.cpp | 35 ++++++++++++++----- 2 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1680124416269252400.sql diff --git a/data/sql/updates/pending_db_world/rev_1680124416269252400.sql b/data/sql/updates/pending_db_world/rev_1680124416269252400.sql new file mode 100644 index 000000000..b9fdb9510 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680124416269252400.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceEntry` = 35301) AND (`ConditionTypeOrReference` = 31) AND (`ConditionValue2` = 21062); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 35301, 0, 0, 31, 0, 3, 21062, 0, 0, 0, 0, '', 'Spell Suicide (35301) only targets Nether Wraith (21062)'); + +DELETE FROM `creature_equip_template` WHERE (`CreatureID` = 19220 AND `ID` = 2); +INSERT INTO `creature_equip_template` (`CreatureID`, `ID`, `ItemID1`, `ItemID2`, `ItemID3`, `VerifiedBuild`) VALUES +(19220, 2, 29455, 0, 0, 48526); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 209aaae4b..0dabf465e 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -37,6 +37,8 @@ enum Spells SPELL_ARCANE_TORRENT = 36022, SPELL_MANA_TAP = 36021, SPELL_DOMINATION = 35280, + SPELL_FRENZY = 36992, + SPELL_SUICIDE = 35301, SPELL_ETHEREAL_TELEPORT = 34427, SPELL_GREATER_INVISIBILITY = 34426, SPELL_SUMMON_NETHER_WRAITH_1 = 35285, @@ -48,6 +50,8 @@ enum Spells enum Misc { ACTION_BRIDGE_MOB_DEATH = 1, // Used by SAI + EQUIPMENT_NORMAL = 1, + EQUIPMENT_FRENZY = 2, }; struct boss_pathaleon_the_calculator : public BossAI @@ -60,9 +64,13 @@ struct boss_pathaleon_the_calculator : public BossAI }); } + bool _isEnraged; + void Reset() override { _Reset(); + _isEnraged = false; + me->LoadEquipment(EQUIPMENT_NORMAL); if (instance->GetPersistentData(DATA_BRIDGE_MOB_DEATH_COUNT) < 4) { @@ -81,18 +89,23 @@ struct boss_pathaleon_the_calculator : public BossAI ScheduleHealthCheckEvent(20, [&]() { - summons.DespawnAll(); - DoCastSelf(SPELL_DISGRUNTLED_ANGER, true); + DoCastSelf(SPELL_SUICIDE, true); + DoCastSelf(SPELL_FRENZY, true); Talk(SAY_ENRAGE); + _isEnraged = true; + me->LoadEquipment(EQUIPMENT_FRENZY); }); - scheduler.Schedule(30s, [this](TaskContext context) + scheduler.Schedule(20s, 25s, [this](TaskContext context) { - for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i) - me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1 + i, true); + if (!_isEnraged) + { + for (uint8 i = 0; i < DUNGEON_MODE(3, 4); ++i) + me->CastSpell(me, SPELL_SUMMON_NETHER_WRAITH_1 + i, true); - Talk(SAY_SUMMON); - context.Repeat(30s, 40s); + Talk(SAY_SUMMON); + } + context.Repeat(45s, 50s); }).Schedule(12s, [this](TaskContext context) { if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false))) @@ -106,13 +119,17 @@ struct boss_pathaleon_the_calculator : public BossAI me->ModifyPower(POWER_MANA, 5000); DoCastSelf(SPELL_ARCANE_TORRENT); context.Repeat(15s); - }).Schedule(25s, [this](TaskContext context) + }).Schedule(10s, 15s, [this](TaskContext context) { if (DoCastRandomTarget(SPELL_DOMINATION, 1, 50.0f) == SPELL_CAST_OK) { Talk(SAY_DOMINATION); } - context.Repeat(30s); + context.Repeat(27s, 40s); + }).Schedule(25s, [this](TaskContext context) + { + DoCast(SPELL_DISGRUNTLED_ANGER); + context.Repeat(40s, 90s); }); if (IsHeroic())