From 8f3a215b686697ff2f8e7573af9b5a909e089056 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 19 Mar 2023 20:49:32 -0300 Subject: [PATCH] fix(Scripts/Mechanar): Fix Mechano-Lord Capacitus's Nether Charges (#15495) Co-authored-by: Killyana --- .../rev_1679267535485784600.sql | 10 ++++++++++ .../Mechanar/boss_mechano_lord_capacitus.cpp | 18 ++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1679267535485784600.sql diff --git a/data/sql/updates/pending_db_world/rev_1679267535485784600.sql b/data/sql/updates/pending_db_world/rev_1679267535485784600.sql new file mode 100644 index 000000000..94fe84b85 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679267535485784600.sql @@ -0,0 +1,10 @@ +-- +UPDATE `creature_template` SET `speed_walk`=2.4, `speed_run`=0.857143 WHERE `entry` IN (20405,21534); +UPDATE `creature_template_addon` SET `auras`='' WHERE `entry` IN (20405,21534); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (20405) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(20405, 0, 0, 0, 60, 0, 100, 0, 1000, 1000, 2000, 2000, 11, 35151, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - IN Update - CAST \'Nether Charge Pulse\' (NO REPEAT)'), +(20405, 0, 1, 2, 25, 0, 100, 0, 0, 0, 0, 0, 75, 35150, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - IN Reset - Add aura Nether Charge Passive'), +(20405, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 11, 37670, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - IN Reset - Cast Nether Charge Timer'), +(20405, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - IN Reset - React passive'), +(20405, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 89, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Nether Charge - IN Reset - Random movement'); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 6c030b1d3..0293b2804 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -27,7 +27,14 @@ enum Spells SPELL_REFLECTIVE_MAGIC_SHIELD = 35158, SPELL_REFLECTIVE_DAMAGE_SHIELD = 35159, SPELL_POLARITY_SHIFT = 39096, - SPELL_BERSERK = 26662 + SPELL_BERSERK = 26662, + + SPELL_NETHER_CHARGE_PASSIVE = 35150, + + SPELL_SUMMON_NETHER_CHARGE_NE = 35153, + SPELL_SUMMON_NETHER_CHARGE_NW = 35904, + SPELL_SUMMON_NETHER_CHARGE_SE = 35905, + SPELL_SUMMON_NETHER_CHARGE_SW = 35906, }; enum Yells @@ -65,9 +72,12 @@ struct boss_mechano_lord_capacitus : public BossAI context.Repeat(20s); }).Schedule(10s, [this](TaskContext context) { - Position pos = me->GetRandomNearPosition(8.0f); - me->SummonCreature(NPC_NETHER_CHARGE, pos, TEMPSUMMON_TIMED_DESPAWN, 18000); - context.Repeat(5s); + uint32 spellId = RAND(SPELL_SUMMON_NETHER_CHARGE_NE, + SPELL_SUMMON_NETHER_CHARGE_NW, + SPELL_SUMMON_NETHER_CHARGE_SE, + SPELL_SUMMON_NETHER_CHARGE_SW); + DoCastAOE(spellId); + IsHeroic() ? context.Repeat(2s, 5s) : context.Repeat(9s, 11s); }).Schedule(3min, [this](TaskContext /*context*/) { DoCastSelf(SPELL_BERSERK, true);