Skip to content

Commit 5ed83ed

Browse files
authored
Scripts/Spells: Get rid of some database spell scripts (#30915)
1 parent 7b0d1f0 commit 5ed83ed

23 files changed

+1375
-0
lines changed
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
--
2+
DELETE FROM `spell_scripts` WHERE `id` = 37013;
3+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_gen_despawn_target' AND `spell_id` = 37013;
4+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
5+
(37013, 'spell_gen_despawn_target');
6+
7+
DELETE FROM `spell_scripts` WHERE `id` = 32348;
8+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_mana_tombs_summon_arcane_fiends';
9+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
10+
(32348, 'spell_mana_tombs_summon_arcane_fiends');
11+
12+
DELETE FROM `spell_scripts` WHERE `id` IN (29126,29137,29135,29136,29138,29139,46672,46671);
13+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
14+
'spell_midsummer_cleansing_flames_darnassus',
15+
'spell_midsummer_cleansing_flames_stormwind',
16+
'spell_midsummer_cleansing_flames_ironforge',
17+
'spell_midsummer_cleansing_flames_orgrimmar',
18+
'spell_midsummer_cleansing_flames_thunder_bluff',
19+
'spell_midsummer_cleansing_flames_the_undercity',
20+
'spell_midsummer_cleansing_flames_silvermoon',
21+
'spell_midsummer_cleansing_flames_the_exodar');
22+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
23+
(29126, 'spell_midsummer_cleansing_flames_darnassus'),
24+
(29137, 'spell_midsummer_cleansing_flames_stormwind'),
25+
(29135, 'spell_midsummer_cleansing_flames_ironforge'),
26+
(29136, 'spell_midsummer_cleansing_flames_orgrimmar'),
27+
(29138, 'spell_midsummer_cleansing_flames_thunder_bluff'),
28+
(29139, 'spell_midsummer_cleansing_flames_the_undercity'),
29+
(46672, 'spell_midsummer_cleansing_flames_silvermoon'),
30+
(46671, 'spell_midsummer_cleansing_flames_the_exodar');
31+
32+
DELETE FROM `spell_scripts` WHERE `id` = 52933;
33+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_zuldrak_rampage_summon_zulaman_gods_master';
34+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
35+
(52933, 'spell_zuldrak_rampage_summon_zulaman_gods_master');
36+
37+
DELETE FROM `spell_scripts` WHERE `id` = 51862;
38+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_zuldrak_breaking_through_summon_zulaman_gods_master';
39+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
40+
(51862, 'spell_zuldrak_breaking_through_summon_zulaman_gods_master');
41+
42+
DELETE FROM `spell_scripts` WHERE `id` IN (29182,29188);
43+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
44+
'spell_temple_of_ahnqiraj_teleport_to_twin_emperors',
45+
'spell_temple_of_ahnqiraj_teleport_to_final_chamber');
46+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
47+
(29182, 'spell_temple_of_ahnqiraj_teleport_to_twin_emperors'),
48+
(29188, 'spell_temple_of_ahnqiraj_teleport_to_final_chamber');
49+
50+
DELETE FROM `spell_scripts` WHERE `id` IN (51864,51889);
51+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_zuldrak_summon_nass';
52+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
53+
(51864, 'spell_zuldrak_summon_nass'),
54+
(51889, 'spell_zuldrak_summon_nass');
55+
56+
DELETE FROM `spell_scripts` WHERE `id` = 36327;
57+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 21186 AND `source_type` = 0;
58+
DELETE FROM `smart_scripts` WHERE `entryorguid` = -79409 AND `source_type` = 0 AND `id` = 2;
59+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
60+
(21186,0,0,0,8,0,100,0,36327,0,0,0,0,11,36521,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Arcane Warder Target - On Spellhit 'Shoot Arcane Explosion Arrow' - Cast 'Summon Arcane Explosion'"),
61+
(-79409,0,2,0,8,0,100,0,36327,0,0,0,0,11,36521,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Arcane Warder Target - On Spellhit 'Shoot Arcane Explosion Arrow' - Cast 'Summon Arcane Explosion'");
62+
63+
DELETE FROM `spell_scripts` WHERE `id` = 45030;
64+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 25003 AND `source_type` = 0 AND `id` = 3;
65+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
66+
(25003,0,3,0,8,0,100,0,45030,0,0,0,0,11,45088,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Emissary of Hate - On Spellhit 'Impale Emissary' - Cast 'Emissary of Hate Credit'");
67+
68+
DELETE FROM `spell_scripts` WHERE `id` = 53010;
69+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_zuldrak_remove_akalis_stun';
70+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
71+
(53010, 'spell_zuldrak_remove_akalis_stun');
72+
73+
DELETE FROM `spell_scripts` WHERE `id` IN (47117,47149,47316,47405,50439);
74+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
75+
'spell_grizzly_hills_script_cast_summon_image_of_drakuru_01',
76+
'spell_grizzly_hills_script_cast_summon_image_of_drakuru_02',
77+
'spell_grizzly_hills_script_cast_summon_image_of_drakuru_03',
78+
'spell_grizzly_hills_script_cast_summon_image_of_drakuru_04',
79+
'spell_grizzly_hills_script_cast_summon_image_of_drakuru_05');
80+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
81+
(47117, 'spell_grizzly_hills_script_cast_summon_image_of_drakuru_01'),
82+
(47149, 'spell_grizzly_hills_script_cast_summon_image_of_drakuru_02'),
83+
(47316, 'spell_grizzly_hills_script_cast_summon_image_of_drakuru_03'),
84+
(47405, 'spell_grizzly_hills_script_cast_summon_image_of_drakuru_04'),
85+
(50439, 'spell_grizzly_hills_script_cast_summon_image_of_drakuru_05');
86+
87+
DELETE FROM `spell_scripts` WHERE `id` IN (58916,58917);
88+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
89+
'spell_icecrown_gift_of_the_lich_king',
90+
'spell_icecrown_consume_minions');
91+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
92+
(58916, 'spell_icecrown_gift_of_the_lich_king'),
93+
(58917, 'spell_icecrown_consume_minions');
94+
95+
DELETE FROM `spell_scripts` WHERE `id` = 37028;
96+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_bem_dispelling_analysis';
97+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
98+
(37028, 'spell_bem_dispelling_analysis');
99+
100+
DELETE FROM `spell_scripts` WHERE `id` = 37834;
101+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_shadowmoon_unbanish_azaloth';
102+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
103+
(37834, 'spell_shadowmoon_unbanish_azaloth');
104+
105+
DELETE FROM `spell_scripts` WHERE `id` = 46550;
106+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_borean_tundra_weakness_to_lightning_on_quest_complete';
107+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
108+
(46550, 'spell_borean_tundra_weakness_to_lightning_on_quest_complete');
109+
110+
DELETE FROM `spell_scripts` WHERE `id` IN (37867,37892,37894);
111+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
112+
'spell_shadowmoon_arcano_scorp_control_01',
113+
'spell_shadowmoon_arcano_scorp_control_02',
114+
'spell_shadowmoon_arcano_scorp_control_03');
115+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
116+
(37867, 'spell_shadowmoon_arcano_scorp_control_01'),
117+
(37892, 'spell_shadowmoon_arcano_scorp_control_02'),
118+
(37894, 'spell_shadowmoon_arcano_scorp_control_03');
119+
120+
DELETE FROM `spell_scripts` WHERE `id` IN (25143,29128,29129,25140);
121+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
122+
'spell_terokkar_translocation_firewing_point_building_down',
123+
'spell_terokkar_translocation_firewing_point_building_up',
124+
'spell_terokkar_translocation_firewing_point_tower_down',
125+
'spell_terokkar_translocation_firewing_point_tower_up');
126+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
127+
(25143, 'spell_terokkar_translocation_firewing_point_building_down'),
128+
(29128, 'spell_terokkar_translocation_firewing_point_building_up'),
129+
(29129, 'spell_terokkar_translocation_firewing_point_tower_down'),
130+
(25140, 'spell_terokkar_translocation_firewing_point_tower_up');
131+
132+
DELETE FROM `spell_scripts` WHERE `id` IN (25650,25652);
133+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
134+
'spell_hellfire_peninsula_translocation_falcon_watch_tower_down',
135+
'spell_hellfire_peninsula_translocation_falcon_watch_tower_up');
136+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
137+
(25650, 'spell_hellfire_peninsula_translocation_falcon_watch_tower_down'),
138+
(25652, 'spell_hellfire_peninsula_translocation_falcon_watch_tower_up');
139+
140+
DELETE FROM `spell_scripts` WHERE `id` IN (34448,34452,35376,35727);
141+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
142+
'spell_eastern_kingdoms_duskwither_spire_up',
143+
'spell_eastern_kingdoms_duskwither_spire_down',
144+
'spell_eastern_kingdoms_silvermoon_to_undercity',
145+
'spell_eastern_kingdoms_undercity_to_silvermoon');
146+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
147+
(34448, 'spell_eastern_kingdoms_duskwither_spire_up'),
148+
(34452, 'spell_eastern_kingdoms_duskwither_spire_down'),
149+
(35376, 'spell_eastern_kingdoms_silvermoon_to_undercity'),
150+
(35727, 'spell_eastern_kingdoms_undercity_to_silvermoon');
151+
152+
DELETE FROM `spell_scripts` WHERE `id` IN (47393,47615,47638);
153+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
154+
'spell_dragonblight_focus_on_the_beach_quest_completion_script',
155+
'spell_dragonblight_atop_the_woodlands_quest_completion_script',
156+
'spell_dragonblight_end_of_the_line_quest_completion_script');
157+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
158+
(47393, 'spell_dragonblight_focus_on_the_beach_quest_completion_script'),
159+
(47615, 'spell_dragonblight_atop_the_woodlands_quest_completion_script'),
160+
(47638, 'spell_dragonblight_end_of_the_line_quest_completion_script');
161+
162+
DELETE FROM `spell_scripts` WHERE `id` = 24320;
163+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_zulgurub_poisonous_blood';
164+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
165+
(24320, 'spell_zulgurub_poisonous_blood');
166+
167+
DELETE FROM `spell_scripts` WHERE `id` = 45071;
168+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_eastern_kingdoms_dead_scar_bombing_run';
169+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
170+
(45071, 'spell_eastern_kingdoms_dead_scar_bombing_run');
171+
172+
DELETE FROM `spell_scripts` WHERE `id` = 57753;
173+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 30681 AND `source_type` = 0 AND `id` = 5;
174+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
175+
(30681,0,5,0,8,0,100,0,57753,0,0,0,0,11,57752,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Onyx Blaze Mistress - On Spellhit 'Conjure Flame Orb' - Cast 'Flame Orb Summon'");
176+
177+
DELETE FROM `spell_scripts` WHERE `id` = 46237;
178+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 25861;
179+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 25861 AND `source_type` = 0;
180+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
181+
(25861,0,0,0,8,0,100,0,46237,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Orphaned Mammoth Calf - On Spellhit 'Dismiss Orphaned Mammoth' - Delayed Despawn"),
182+
(25861,0,1,0,8,0,100,0,46237,0,0,0,0,28,46233,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Orphaned Mammoth Calf - On Spellhit 'Dismiss Orphaned Mammoth' - Remove Aura 'Call Mammoth Orphan'");
183+
184+
DELETE FROM `spell_scripts` WHERE `id` = 23301;
185+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_icecrown_ebon_blade_banner';
186+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
187+
(23301, 'spell_icecrown_ebon_blade_banner');
188+
189+
DELETE FROM `spell_scripts` WHERE `id` IN (54620,58622);
190+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
191+
'spell_dalaran_teleport_to_dalaran',
192+
'spell_dalaran_teleport_to_lake_wintergrasp');
193+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
194+
(54620, 'spell_dalaran_teleport_to_dalaran'),
195+
(58622, 'spell_dalaran_teleport_to_lake_wintergrasp');
196+
197+
DELETE FROM `spell_scripts` WHERE `id` = 52124;
198+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_chapter1_sky_darkener_assault';
199+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
200+
(52124, 'spell_chapter1_sky_darkener_assault');
201+
202+
DELETE FROM `spell_scripts` WHERE `id` = 45188;
203+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_eastern_kingdoms_dawnblade_attack';
204+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
205+
(45188, 'spell_eastern_kingdoms_dawnblade_attack');
206+
207+
DELETE FROM `spell_scripts` WHERE `id` = 45958;
208+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_borean_tundra_signal_alliance';
209+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
210+
(45958, 'spell_borean_tundra_signal_alliance');
211+
212+
DELETE FROM `spell_scripts` WHERE `id` = 46289;
213+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_muru_negative_energy';
214+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
215+
(46289, 'spell_muru_negative_energy');
216+
217+
DELETE FROM `spell_scripts` WHERE `id` = 26393;
218+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_lunar_festival_elunes_blessing';
219+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
220+
(26393, 'spell_lunar_festival_elunes_blessing');
221+
222+
DELETE FROM `spell_scripts` WHERE `id` = 49466;
223+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_brewfest_mole_machine_portal_schedule';
224+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
225+
(49466, 'spell_brewfest_mole_machine_portal_schedule');

src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,32 @@ class spell_chapter1_runeforging_credit : public SpellScript
11431143
}
11441144
};
11451145

1146+
enum SkyDarkenerAssault
1147+
{
1148+
SPELL_SKY_DARKENER_ASSAULT = 52125
1149+
};
1150+
1151+
// 52124 - Sky Darkener Assault
1152+
class spell_chapter1_sky_darkener_assault : public SpellScript
1153+
{
1154+
PrepareSpellScript(spell_chapter1_sky_darkener_assault);
1155+
1156+
bool Validate(SpellInfo const* /*spellInfo*/) override
1157+
{
1158+
return ValidateSpellInfo({ SPELL_SKY_DARKENER_ASSAULT });
1159+
}
1160+
1161+
void HandleScript(SpellEffIndex /*effIndex*/)
1162+
{
1163+
GetCaster()->CastSpell(GetHitUnit(), SPELL_SKY_DARKENER_ASSAULT);
1164+
}
1165+
1166+
void Register() override
1167+
{
1168+
OnEffectHitTarget += SpellEffectFn(spell_chapter1_sky_darkener_assault::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
1169+
}
1170+
};
1171+
11461172
void AddSC_the_scarlet_enclave_c1()
11471173
{
11481174
new npc_unworthy_initiate();
@@ -1160,4 +1186,5 @@ void AddSC_the_scarlet_enclave_c1()
11601186
RegisterCreatureAI(npc_scarlet_ghoul);
11611187
RegisterSpellScript(spell_gift_of_the_harvester);
11621188
RegisterSpellScript(spell_chapter1_runeforging_credit);
1189+
RegisterSpellScript(spell_chapter1_sky_darkener_assault);
11631190
}

src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ enum Spells
5353
SPELL_ENTROPIUS_COSMETIC_SPAWN = 46223,
5454
SPELL_DARKNESS_E = 46269,
5555
SPELL_NEGATIVE_ENERGY_PERIODIC_E = 46284,
56+
SPELL_NEGATIVE_ENERGY_DAMAGE = 46285,
5657
SPELL_BLACKHOLE = 46282,
5758
SPELL_SUMMON_DARKFIEND_E = 46263,
5859

@@ -635,6 +636,27 @@ class spell_muru_negative_energy_periodic : public AuraScript
635636
}
636637
};
637638

639+
// 46289 - Negative Energy
640+
class spell_muru_negative_energy : public SpellScript
641+
{
642+
PrepareSpellScript(spell_muru_negative_energy);
643+
644+
bool Validate(SpellInfo const* /*spellInfo*/) override
645+
{
646+
return ValidateSpellInfo({ SPELL_NEGATIVE_ENERGY_DAMAGE });
647+
}
648+
649+
void HandleScript(SpellEffIndex /*effIndex*/)
650+
{
651+
GetCaster()->CastSpell(GetHitUnit(), SPELL_NEGATIVE_ENERGY_DAMAGE, true);
652+
}
653+
654+
void Register() override
655+
{
656+
OnEffectHitTarget += SpellEffectFn(spell_muru_negative_energy::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
657+
}
658+
};
659+
638660
void AddSC_boss_muru()
639661
{
640662
RegisterSunwellPlateauCreatureAI(boss_muru);
@@ -649,4 +671,5 @@ void AddSC_boss_muru()
649671
RegisterSpellScript(spell_transform_visual_missile_periodic);
650672
RegisterSpellScript(spell_summon_blood_elves_periodic);
651673
RegisterSpellScript(spell_muru_negative_energy_periodic);
674+
RegisterSpellScript(spell_muru_negative_energy);
652675
}

src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
*/
1717

1818
#include "ScriptMgr.h"
19+
#include "SpellScript.h"
1920
#include "zulgurub.h"
2021
#include "GameEventMgr.h"
2122
#include "GameObject.h"
2223
#include "GameObjectAI.h"
24+
#include "Unit.h"
2325

2426
/*######
2527
## go_brazier_of_madness
@@ -74,7 +76,34 @@ class go_brazier_of_madness : public GameObjectScript
7476
}
7577
};
7678

79+
enum PoisonousBlood
80+
{
81+
SPELL_POISONOUS_BLOOD = 24321
82+
};
83+
84+
// 24320 - Poisonous Blood
85+
class spell_zulgurub_poisonous_blood : public SpellScript
86+
{
87+
PrepareSpellScript(spell_zulgurub_poisonous_blood);
88+
89+
bool Validate(SpellInfo const* /*spellInfo*/) override
90+
{
91+
return ValidateSpellInfo({ SPELL_POISONOUS_BLOOD });
92+
}
93+
94+
void HandleScript(SpellEffIndex /*effIndex*/)
95+
{
96+
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_POISONOUS_BLOOD);
97+
}
98+
99+
void Register() override
100+
{
101+
OnEffectHitTarget += SpellEffectFn(spell_zulgurub_poisonous_blood::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
102+
}
103+
};
104+
77105
void AddSC_zulgurub()
78106
{
79107
new go_brazier_of_madness();
108+
RegisterSpellScript(spell_zulgurub_poisonous_blood);
80109
}

0 commit comments

Comments
 (0)