diff options
| author | offl <suffle.o@gmail.com> | 2025-05-17 13:19:16 +0200 |
|---|---|---|
| committer | ModoX <moardox@gmail.com> | 2025-05-17 13:20:21 +0200 |
| commit | d5470b9ea78af3f725473023960e0509b0a2775d (patch) | |
| tree | d515e093dfce800cfbeb366752c609ed751461f3 | |
| parent | 06041687565754562b2c266b4195b00cf3e53260 (diff) | |
Scripts/Mechanar: Modernize scripts
5 files changed, 192 insertions, 197 deletions
diff --git a/sql/updates/world/3.3.5/2025_05_17_05_world.sql b/sql/updates/world/3.3.5/2025_05_17_05_world.sql new file mode 100644 index 00000000000..6aef90e9b0f --- /dev/null +++ b/sql/updates/world/3.3.5/2025_05_17_05_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_pathaleon_summon_nether_wraiths'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(35284, 'spell_pathaleon_summon_nether_wraiths'); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp index 1697cf13df2..e1c2bb69ab5 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp @@ -15,51 +15,38 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: boss_gatewatcher_gyrokill -SD%Complete: 99% -SDComment: -SDCategory: Tempest Keep, The Mechanar -EndScriptData */ - #include "ScriptMgr.h" +#include "SpellInfo.h" #include "mechanar.h" #include "ScriptedCreature.h" -enum Say +enum GyroKillTexts { SAY_AGGRO = 0, SAY_SLAY = 1, - SAY_SAW_BLADEs = 2, + SAY_SAW_BLADES = 2, SAY_DEATH = 3 }; -enum Spells +enum GyroKillSpells { SPELL_STREAM_OF_MACHINE_FLUID = 35311, SPELL_SAW_BLADE = 35318, - H_SPELL_SAW_BLADE = 39192, - SPELL_SHADOW_POWER = 35322, - H_SPELL_SHADOW_POWER = 39193 + SPELL_SHADOW_POWER = 35322 }; -enum Events +enum GyroKillEvents { EVENT_STREAM_OF_MACHINE_FLUID = 1, - EVENT_SAW_BLADE = 2, - EVENT_SHADOW_POWER = 3 + EVENT_SAW_BLADE, + EVENT_SHADOW_POWER }; +// 19218 - Gatewatcher Gyro-Kill struct boss_gatewatcher_gyrokill : public BossAI { boss_gatewatcher_gyrokill(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) { } - void JustDied(Unit* /*killer*/) override - { - _JustDied(); - Talk(SAY_DEATH); - } - void JustEngagedWith(Unit* who) override { BossAI::JustEngagedWith(who); @@ -69,11 +56,23 @@ struct boss_gatewatcher_gyrokill : public BossAI Talk(SAY_AGGRO); } + void OnSpellCast(SpellInfo const* spell) override + { + if (spell->Id == SPELL_SAW_BLADE) + Talk(SAY_SAW_BLADES); + } + void KilledUnit(Unit* /*victim*/) override { Talk(SAY_SLAY); } + void JustDied(Unit* /*killer*/) override + { + _JustDied(); + Talk(SAY_DEATH); + } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) @@ -89,17 +88,16 @@ struct boss_gatewatcher_gyrokill : public BossAI switch (eventId) { case EVENT_STREAM_OF_MACHINE_FLUID: - DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID, true); - events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 13s, 17s); + DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID); + events.Repeat(13s, 17s); break; case EVENT_SAW_BLADE: - DoCast(me, SPELL_SAW_BLADE); - Talk(SAY_SAW_BLADEs); - events.ScheduleEvent(EVENT_SAW_BLADE, 20s, 30s); + DoCastVictim(SPELL_SAW_BLADE); + events.Repeat(20s, 30s); break; case EVENT_SHADOW_POWER: - DoCast(me, SPELL_SHADOW_POWER); - events.ScheduleEvent(EVENT_SAW_BLADE, 25s, 35s); + DoCastSelf(SPELL_SHADOW_POWER); + events.Repeat(25s, 35s); break; default: break; diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index 8d09645b02a..64f9013d63f 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -15,18 +15,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss_Gatewatcher_Ironhand -SD%Complete: 75 -SDComment: -SDCategory: Tempest Keep, The Mechanar -EndScriptData */ - #include "ScriptMgr.h" #include "mechanar.h" #include "ScriptedCreature.h" -enum Says +enum IronHandTexts { SAY_AGGRO = 0, SAY_HAMMER = 1, @@ -35,23 +28,22 @@ enum Says EMOTE_HAMMER = 4 }; -enum Spells +enum IronHandSpells { SPELL_SHADOW_POWER = 35322, - H_SPELL_SHADOW_POWER = 39193, SPELL_HAMMER_PUNCH = 35326, SPELL_JACKHAMMER = 35327, - H_SPELL_JACKHAMMER = 39194, SPELL_STREAM_OF_MACHINE_FLUID = 35311 }; -enum Events +enum IronHandEvents { EVENT_STREAM_OF_MACHINE_FLUID = 1, - EVENT_JACKHAMMER = 2, - EVENT_SHADOW_POWER = 3 + EVENT_JACKHAMMER, + EVENT_SHADOW_POWER }; +// 19710 - Gatewatcher Iron-Hand struct boss_gatewatcher_iron_hand : public BossAI { boss_gatewatcher_iron_hand(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) { } @@ -92,20 +84,20 @@ struct boss_gatewatcher_iron_hand : public BossAI switch (eventId) { case EVENT_STREAM_OF_MACHINE_FLUID: - DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID, true); - events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 35s, 50s); + DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID); + events.Repeat(35s, 50s); break; case EVENT_JACKHAMMER: Talk(EMOTE_HAMMER); /// @todo expect cast this about 5 times in a row (?), announce it by emote only once - DoCastVictim(SPELL_JACKHAMMER, true); + DoCastVictim(SPELL_JACKHAMMER); if (roll_chance_i(50)) Talk(SAY_HAMMER); - events.ScheduleEvent(EVENT_JACKHAMMER, 30s); + events.Repeat(30s); break; case EVENT_SHADOW_POWER: - DoCast(me, SPELL_SHADOW_POWER); - events.ScheduleEvent(EVENT_SHADOW_POWER, 20s, 28s); + DoCastSelf(SPELL_SHADOW_POWER); + events.Repeat(20s, 28s); break; default: break; 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 a8cf171c383..fda9de6ae85 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 @@ -22,15 +22,22 @@ #include "SpellInfo.h" #include "SpellScript.h" -enum Spells +enum CapacitusTexts +{ + SAY_AGGRO = 0, + SAY_REFLECTIVE_MAGIC_SHIELD = 1, + SAY_REFLECTIVE_DAMAGE_SHIELD = 2, + SAY_SLAY = 3, + SAY_DEATH = 4 +}; + +enum CapacitusSpells { SPELL_HEADCRACK = 35161, SPELL_REFLECTIVE_MAGIC_SHIELD = 35158, SPELL_REFLECTIVE_DAMAGE_SHIELD = 35159, SPELL_POLARITY_SHIFT = 39096, SPELL_BERSERK = 26662, - SPELL_NETHER_CHARGE_TIMER = 37670, - SPELL_NETHER_CHARGE_PASSIVE = 35150, SPELL_SUMMON_NETHER_CHARGE_NE = 35153, SPELL_SUMMON_NETHER_CHARGE_NW = 35904, @@ -46,32 +53,17 @@ enum Spells SPELL_NEGATIVE_CHARGE = 39093 }; -enum Yells -{ - YELL_AGGRO = 0, - YELL_REFLECTIVE_MAGIC_SHIELD = 1, - YELL_REFLECTIVE_DAMAGE_SHIELD = 2, - YELL_KILL = 3, - YELL_DEATH = 4 -}; - -enum Creatures +enum CapacitusEvents { - NPC_NETHER_CHARGE = 20405 -}; - -enum Events -{ - EVENT_NONE = 0, - EVENT_HEADCRACK = 1, - EVENT_REFLECTIVE_DAMAGE_SHIELD = 2, - EVENT_REFLECTIVE_MAGIE_SHIELD = 3, - EVENT_POSITIVE_SHIFT = 4, - EVENT_SUMMON_NETHER_CHARGE = 5, - EVENT_BERSERK = 6 + EVENT_REFLECTIVE_DAMAGE_SHIELD, + EVENT_REFLECTIVE_MAGIE_SHIELD, + EVENT_POSITIVE_SHIFT, + EVENT_SUMMON_NETHER_CHARGE, + EVENT_BERSERK }; +// 19219 - Mechano-Lord Capacitus struct boss_mechano_lord_capacitus : public BossAI { boss_mechano_lord_capacitus(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS) { } @@ -79,7 +71,7 @@ struct boss_mechano_lord_capacitus : public BossAI void JustEngagedWith(Unit* who) override { BossAI::JustEngagedWith(who); - Talk(YELL_AGGRO); + Talk(SAY_AGGRO); events.ScheduleEvent(EVENT_HEADCRACK, 10s); events.ScheduleEvent(EVENT_REFLECTIVE_DAMAGE_SHIELD, 15s); events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 10s); @@ -91,13 +83,13 @@ struct boss_mechano_lord_capacitus : public BossAI void KilledUnit(Unit* /*victim*/) override { - Talk(YELL_KILL); + Talk(SAY_SLAY); } void JustDied(Unit* /*killer*/) override { _JustDied(); - Talk(YELL_DEATH); + Talk(SAY_DEATH); } void UpdateAI(uint32 diff) override @@ -116,21 +108,21 @@ struct boss_mechano_lord_capacitus : public BossAI { case EVENT_HEADCRACK: DoCastVictim(SPELL_HEADCRACK); - events.ScheduleEvent(EVENT_HEADCRACK, 10s); + events.Repeat(10s); break; case EVENT_REFLECTIVE_DAMAGE_SHIELD: - Talk(YELL_REFLECTIVE_DAMAGE_SHIELD); - DoCast(me, SPELL_REFLECTIVE_DAMAGE_SHIELD); - events.ScheduleEvent(EVENT_REFLECTIVE_MAGIE_SHIELD, 30s); + Talk(SAY_REFLECTIVE_DAMAGE_SHIELD); + DoCastSelf(SPELL_REFLECTIVE_DAMAGE_SHIELD); + events.Repeat(30s); break; case EVENT_REFLECTIVE_MAGIE_SHIELD: - Talk(YELL_REFLECTIVE_MAGIC_SHIELD); - DoCast(me, SPELL_REFLECTIVE_MAGIC_SHIELD); - events.ScheduleEvent(EVENT_REFLECTIVE_DAMAGE_SHIELD, 30s); + Talk(SAY_REFLECTIVE_MAGIC_SHIELD); + DoCastSelf(SPELL_REFLECTIVE_MAGIC_SHIELD); + events.Repeat(30s); break; case EVENT_POSITIVE_SHIFT: DoCastAOE(SPELL_POLARITY_SHIFT); - events.ScheduleEvent(EVENT_POSITIVE_SHIFT, 45s, 60s); + events.Repeat(45s, 60s); break; case EVENT_SUMMON_NETHER_CHARGE: { @@ -140,11 +132,11 @@ struct boss_mechano_lord_capacitus : public BossAI SPELL_SUMMON_NETHER_CHARGE_SW); Milliseconds netherChargeTimer = DUNGEON_MODE(randtime(9s, 11s), randtime(2s, 5s)); DoCastSelf(spellId); - events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, netherChargeTimer); + events.Repeat(netherChargeTimer); break; } case EVENT_BERSERK: - DoCast(me, SPELL_BERSERK); + DoCastSelf(SPELL_BERSERK); break; default: break; 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 11dbd778ab8..a9878890e2b 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 @@ -15,57 +15,54 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss Pathaleon the Calculator -SD%Complete: 50 -SDComment: Event missing. Script for himself 99% blizzlike. -SDCategory: Tempest Keep, The Mechanar -EndScriptData */ - #include "ScriptMgr.h" #include "mechanar.h" #include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellInfo.h" #include "TemporarySummon.h" -enum Says -{ - SAY_AGGRO = 0, - SAY_DOMINATION = 1, - SAY_SUMMON = 2, - SAY_ENRAGE = 3, - SAY_SLAY = 4, - SAY_DEATH = 5 -}; - -enum Spells +enum PathaleonTexts { - SPELL_MANA_TAP = 36021, - SPELL_ARCANE_TORRENT = 36022, - SPELL_DOMINATION = 35280, - H_SPELL_ARCANE_EXPLOSION = 15453, - SPELL_FRENZY = 36992, - SPELL_SUMMON_NETHER_WRAITH_1 = 35285, // Not scripted - SPELL_SUMMON_NETHER_WRAITH_2 = 35286, // Not scripted - SPELL_SUMMON_NETHER_WRAITH_3 = 35287, // Not scripted - SPELL_SUMMON_NETHER_WRAITH_4 = 35288, // Not scripted - SPELL_DETONATION = 35058, // Used by Nether Wraith - SPELL_ARCANE_MISSILES = 35034 // Used by Nether Wraith + SAY_AGGRO = 0, + SAY_DOMINATION = 1, + SAY_SUMMON = 2, + SAY_ENRAGE = 3, + SAY_SLAY = 4, + SAY_DEATH = 5 }; -enum Events +enum PathaleonSpells { - EVENT_SUMMON = 1, - EVENT_MANA_TAP = 2, - EVENT_ARCANE_TORRENT = 3, - EVENT_DOMINATION = 4, - EVENT_ARCANE_EXPLOSION = 5 + SPELL_MANA_TAP = 36021, + SPELL_ARCANE_TORRENT = 36022, + SPELL_DOMINATION = 35280, + SPELL_ARCANE_EXPLOSION_H = 15453, + SPELL_FRENZY = 36992, + SPELL_SUICIDE = 35301, // NYI + + SPELL_SUMMON_NETHER_WRAITHS = 35284, + SPELL_SUMMON_NETHER_WRAITH_LEFT = 35285, + SPELL_SUMMON_NETHER_WRAITH_RIGHT = 35286, // Unused + SPELL_SUMMON_NETHER_WRAITH_FRONT = 35287, + SPELL_SUMMON_NETHER_WRAITH_BACK = 35288, + + // Nether Wraith + SPELL_ARCANE_BOLT = 20720, + SPELL_NETHER_EXPLOSION = 35058 }; -enum Creatures +enum PathaleonEvents { - NPC_NETHER_WRAITH = 21062 + EVENT_SUMMON = 1, + EVENT_MANA_TAP, + EVENT_ARCANE_TORRENT, + EVENT_DOMINATION, + EVENT_ARCANE_EXPLOSION, + EVENT_FRENZY }; +// 19220 - Pathaleon the Calculator struct boss_pathaleon_the_calculator : public BossAI { boss_pathaleon_the_calculator(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { } @@ -77,7 +74,8 @@ struct boss_pathaleon_the_calculator : public BossAI events.ScheduleEvent(EVENT_MANA_TAP, 12s, 20s); events.ScheduleEvent(EVENT_ARCANE_TORRENT, 16s, 25s); events.ScheduleEvent(EVENT_DOMINATION, 25s, 40s); - events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 8s, 13s); + if (IsHeroic()) + events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 8s, 13s); Talk(SAY_AGGRO); } @@ -92,15 +90,30 @@ struct boss_pathaleon_the_calculator : public BossAI Talk(SAY_DEATH); } - void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override + void OnSpellCast(SpellInfo const* spell) override { - if (me->HealthBelowPctDamaged(20, damage) && !me->HasAura(SPELL_FRENZY)) + switch (spell->Id) { - DoCast(me, SPELL_FRENZY); - Talk(SAY_ENRAGE); + case SPELL_SUMMON_NETHER_WRAITHS: + Talk(SAY_SUMMON); + break; + case SPELL_DOMINATION: + Talk(SAY_DOMINATION); + break; + case SPELL_FRENZY: + Talk(SAY_ENRAGE); + break; + default: + break; } } + void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override + { + if (me->HealthBelowPctDamaged(20, damage) && !me->HasAura(SPELL_FRENZY)) + events.ScheduleEvent(EVENT_FRENZY, 0s); + } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) @@ -116,33 +129,27 @@ struct boss_pathaleon_the_calculator : public BossAI switch (eventId) { case EVENT_SUMMON: - for (uint8 i = 0; i < 3; ++i) - { - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - { - if (Creature* Wraith = me->SummonCreature(NPC_NETHER_WRAITH, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25s)) - Wraith->AI()->AttackStart(target); - } - } - Talk(SAY_SUMMON); - events.ScheduleEvent(EVENT_SUMMON, 30s, 45s); + DoCastSelf(SPELL_SUMMON_NETHER_WRAITHS); + events.Repeat(30s, 45s); break; case EVENT_MANA_TAP: - DoCastVictim(SPELL_MANA_TAP, true); - events.ScheduleEvent(EVENT_MANA_TAP, 14s, 22s); + DoCastVictim(SPELL_MANA_TAP); + events.Repeat(14s, 22s); break; case EVENT_ARCANE_TORRENT: - DoCastVictim(SPELL_ARCANE_TORRENT, true); - events.ScheduleEvent(EVENT_ARCANE_TORRENT, 12s, 18s); + DoCastVictim(SPELL_ARCANE_TORRENT); + events.Repeat(12s, 18s); break; case EVENT_DOMINATION: - Talk(SAY_DOMINATION); - DoCastVictim(SPELL_DOMINATION, true); - events.ScheduleEvent(EVENT_DOMINATION, 25s, 30s); + DoCastVictim(SPELL_DOMINATION); + events.Repeat(25s, 30s); + break; + case EVENT_ARCANE_EXPLOSION: + DoCastSelf(SPELL_ARCANE_EXPLOSION_H); + events.Repeat(10s, 14s); break; - case EVENT_ARCANE_EXPLOSION: // Heroic only - DoCastVictim(H_SPELL_ARCANE_EXPLOSION, true); - events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 10s, 14s); + case EVENT_FRENZY: + DoCastSelf(SPELL_FRENZY); break; default: break; @@ -158,69 +165,70 @@ struct boss_pathaleon_the_calculator : public BossAI struct npc_nether_wraith : public ScriptedAI { - npc_nether_wraith(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } + npc_nether_wraith(Creature* creature) : ScriptedAI(creature) { } - void Initialize() + void Reset() override { - ArcaneMissiles_Timer = urand(1000, 4000); - Detonation_Timer = 20000; - Die_Timer = 2200; - Detonation = false; + me->SetCorpseDelay(15, true); + _scheduler.CancelAll(); } - uint32 ArcaneMissiles_Timer; - uint32 Detonation_Timer; - uint32 Die_Timer; - bool Detonation; - - void Reset() override + void JustEngagedWith(Unit* /*who*/) override { - Initialize(); - } + _scheduler.Schedule(0s, 10s, [this](TaskContext task) + { + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) + DoCast(target, SPELL_ARCANE_BOLT); + task.Repeat(5s, 10s); + }); - void JustEngagedWith(Unit* /*who*/) override { } + _scheduler.Schedule(5s, 10s, [this](TaskContext task) + { + DoCastSelf(SPELL_NETHER_EXPLOSION); + task.Repeat(10s, 15s); + }); + } void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; - if (ArcaneMissiles_Timer <= diff) - { - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1)) - DoCast(target, SPELL_ARCANE_MISSILES); - else - DoCastVictim(SPELL_ARCANE_MISSILES); - ArcaneMissiles_Timer = urand(5000, 10000); - } - else - ArcaneMissiles_Timer -=diff; + _scheduler.Update(diff); - if (!Detonation) - { - if (Detonation_Timer <= diff) - { - DoCast(me, SPELL_DETONATION); - Detonation = true; - } - else - Detonation_Timer -= diff; - } + DoMeleeAttackIfReady(); + } - if (Detonation) +private: + TaskScheduler _scheduler; +}; + +// 35284 - Summon Nether Wraiths +class spell_pathaleon_summon_nether_wraiths : public SpellScript +{ + PrepareSpellScript(spell_pathaleon_summon_nether_wraiths); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( { - if (Die_Timer <= diff) - { - me->DespawnOrUnsummon(); - return; - } - else - Die_Timer -= diff; - } - DoMeleeAttackIfReady(); + SPELL_SUMMON_NETHER_WRAITH_LEFT, + SPELL_SUMMON_NETHER_WRAITH_FRONT, + SPELL_SUMMON_NETHER_WRAITH_BACK + }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + caster->CastSpell(caster, SPELL_SUMMON_NETHER_WRAITH_LEFT); + caster->CastSpell(caster, SPELL_SUMMON_NETHER_WRAITH_FRONT); + caster->CastSpell(caster, SPELL_SUMMON_NETHER_WRAITH_BACK); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_pathaleon_summon_nether_wraiths::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; @@ -228,4 +236,5 @@ void AddSC_boss_pathaleon_the_calculator() { RegisterMechanarCreatureAI(boss_pathaleon_the_calculator); RegisterMechanarCreatureAI(npc_nether_wraith); + RegisterSpellScript(spell_pathaleon_summon_nether_wraiths); } |
