fix(Scripts/SSC): Rewrite Coilfang Water Handling (#24559)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Gultask
2026-02-06 19:19:23 -03:00
committed by GitHub
parent fe71aca415
commit 57090a5302
3 changed files with 174 additions and 39 deletions

View File

@@ -0,0 +1,124 @@
--
DELETE FROM `spell_area` WHERE `spell` = 37280 AND `area` = 3607;
INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES
(37280, 3607, 0, 0, 0, 0, 2, 1, 64, 11);
DELETE FROM `spell_script_names` WHERE `spell_id`=37025 AND `ScriptName`='spell_serpentshrine_cavern_coilfang_water';
DELETE FROM `spell_script_names` WHERE `spell_id`=37280 AND `ScriptName`='spell_serpentshrine_cavern_coilfang_water';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(37280, 'spell_serpentshrine_cavern_coilfang_water');
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|134217728 WHERE (`entry` IN (21218, 21220, 21263, 21301));
DELETE FROM `smart_scripts` WHERE `action_type` = 34 AND `action_param1` IN (20, 21) AND `entryorguid` IN (21220, 21301) AND `source_type` = 0;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `id` IN (1004, 1005) AND `action_type` = 34 AND `entryorguid` IN (-153022,-153023,-153024,-153025,-153026,-153027,-153028,-153029,-153030,-153031,-153032,-153033,-153034,-153035,-153036,-153037,-153038,-153039,-153040,-153041,-153042,-153043,-153044,-153045,-153046,-153047,-153048,-153049,-153050,-153051,-153052,-153053,-153054,-153055,-153056,-153057,-153058,-153059,-153060,-153061,-153062,-153063,-153064,-153065,-153066,-153067,-153068,-153069,-153070,-153071,-153072,-153073,-153074,-153075);
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`, `event_param6`, `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
(-153022, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153022, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153023, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153023, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153024, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153024, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153025, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153025, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153026, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153026, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153027, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153027, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153028, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153028, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153029, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153029, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153030, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153030, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153031, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153031, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153032, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153032, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153033, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153033, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153034, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153034, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153035, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153035, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153036, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153036, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153037, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153037, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153038, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153038, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153039, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153039, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153040, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153040, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153041, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153041, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153042, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153042, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153043, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153043, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153044, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153044, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153045, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153045, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153046, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153046, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153047, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153047, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153048, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153048, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153049, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153049, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153050, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153050, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153051, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153051, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153052, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153052, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153053, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153053, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153054, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153054, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153055, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153055, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153056, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153056, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153057, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153057, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153058, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153058, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153059, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153059, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153060, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153060, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153061, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153061, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153062, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153062, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153063, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153063, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153064, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153064, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153065, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153065, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153066, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153066, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153067, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153067, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153068, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153068, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153069, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153069, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153070, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153070, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153071, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153071, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153072, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153072, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153073, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153073, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153074, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153074, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1'),
(-153075, 0, 1004, 0, 11, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Respawn - Set Instance Data 20 to 1'),
(-153075, 0, 1005, 0, 6, 0, 100, 512, 0, 0, 0, 0, 0, 0, 34, 21, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Coilfang Keeper Trash - On Just Died - Set Instance Data 21 to 1');

View File

@@ -89,6 +89,7 @@ public:
LoadSummonData(summonData);
_aliveKeepersCount = 0;
_frenzyCount = 0;
}
bool SetBossState(uint32 type, EncounterState state) override
@@ -129,11 +130,6 @@ public:
{
switch (creature->GetEntry())
{
case NPC_COILFANG_SHATTERER:
case NPC_COILFANG_PRIESTESS:
if (creature->GetPositionX() > 190.0f)
--_aliveKeepersCount;
break;
case NPC_CYCLONE_KARATHRESS:
creature->GetMotionMaster()->MoveRandom(50.0f);
break;
@@ -141,12 +137,27 @@ public:
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
creature->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
break;
case NPC_COILFANG_FRENZY:
if (!creature->IsInWater() || _frenzyCount >= MAX_FRENZY_COUNT)
creature->DespawnOrUnsummon();
else
++_frenzyCount;
break;
default:
break;
}
InstanceScript::OnCreatureCreate(creature);
}
void OnCreatureRemove(Creature* creature) override
{
if (creature->GetEntry() == NPC_COILFANG_FRENZY)
if (_frenzyCount > 0)
--_frenzyCount;
InstanceScript::OnCreatureRemove(creature);
}
void SetData(uint32 type, uint32 /*data*/) override
{
switch (type)
@@ -185,7 +196,8 @@ public:
private:
ObjectGuid _shieldGeneratorGUID[4];
int32 _aliveKeepersCount;
uint32 _aliveKeepersCount;
uint32 _frenzyCount;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
@@ -269,53 +281,46 @@ class spell_serpentshrine_cavern_coilfang_water : public AuraScript
{
PrepareAuraScript(spell_serpentshrine_cavern_coilfang_water);
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (InstanceScript* instance = GetUnitOwner()->GetInstanceScript())
if (instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE)
if (instance->GetData(DATA_ALIVE_KEEPERS) == 0)
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SCALDING_WATER, true);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->RemoveAurasDueToSpell(SPELL_SCALDING_WATER);
}
void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude)
{
InstanceScript* instance = GetUnitOwner()->GetInstanceScript();
if (!instance || instance->GetBossState(DATA_THE_LURKER_BELOW) == DONE)
return;
isPeriodic = true;
amplitude = 8 * IN_MILLISECONDS;
}
void HandlePeriodic(AuraEffect const* /*aurEff*/)
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
PreventDefaultAction();
InstanceScript* instance = GetUnitOwner()->GetInstanceScript();
if (!instance || GetUnitOwner()->GetMapId() != MAP_COILFANG_SERPENTSHRINE_CAVERN)
{
SetDuration(0);
GetAura()->SetDuration(1);
return;
}
if (instance->GetBossState(DATA_THE_LURKER_BELOW) == DONE || instance->GetData(DATA_ALIVE_KEEPERS) == 0 || GetUnitOwner()->GetPositionZ() > -20.5f || !GetUnitOwner()->IsInWater())
return;
if (instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE && GetUnitOwner()->IsInWater())
{
if (instance->GetData(DATA_ALIVE_KEEPERS) > 0)
for (uint8 i = 0; i < urand(2, 3); ++i)
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SERVERSIDE_SUMMON_FRENZY, true);
for (uint8 i = 0; i < 3; ++i)
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_FRENZY_WATER, true);
if (instance->GetData(DATA_ALIVE_KEEPERS) <= 0 && !GetUnitOwner()->HasAura(SPELL_SCALDING_WATER))
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SCALDING_WATER, true);
return;
}
else if (instance->GetBossState(DATA_THE_LURKER_BELOW) == DONE)
{
GetAura()->SetDuration(1);
return;
}
GetUnitOwner()->RemoveAurasDueToSpell(SPELL_SCALDING_WATER);
}
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_serpentshrine_cavern_coilfang_water::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_serpentshrine_cavern_coilfang_water::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_serpentshrine_cavern_coilfang_water::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_serpentshrine_cavern_coilfang_water::HandlePeriodic, EFFECT_0, SPELL_AURA_DUMMY);
AfterEffectRemove += AuraEffectRemoveFn(spell_serpentshrine_cavern_coilfang_water::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_serpentshrine_cavern_coilfang_water::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};

View File

@@ -69,6 +69,7 @@ enum SSNPCs
NPC_COILFANG_STRIDER = 22056,
NPC_TAINTED_ELEMENTAL = 22009,
NPC_TOXIC_SPOREBAT = 22140,
NPC_COILFANG_FRENZY = 21508,
GO_LADY_VASHJ_BRIDGE_CONSOLE = 184568,
GO_COILFANG_BRIDGE1 = 184203,
@@ -88,13 +89,18 @@ enum SSSpells
SPELL_SUMMON_SERPENTSHRINE_PARASITE = 39045,
SPELL_RAMPART_INFECTION = 39042,
SPELL_SCALDING_WATER = 37284,
SPELL_FRENZY_WATER = 37026
// SPELL_SERVERSIDE_COILFANG_WATER = 37025, // Dummy Aura, unused
SPELL_SERVERSIDE_SUMMON_FRENZY = 37026,
SPELL_SERVERSIDE_FRENZY_WATER_PERIODIC = 37280
};
enum KeeperCount
enum SSNPCCount
{
MIN_KEEPER_COUNT = 0,
MAX_KEEPER_COUNT = 24
MAX_KEEPER_COUNT = 54,
MAX_FRENZY_COUNT = 50
};
template <class AI, class T>