From 6dc4ca85031373c5aa74df7dcb080318468b34ed Mon Sep 17 00:00:00 2001 From: Silker <61223313+Si1ker@users.noreply.github.com> Date: Fri, 2 Apr 2021 21:57:00 -0600 Subject: [PATCH] fix(scripts/Naxx): The art of Naxxramas (2/2) (#5057) --- .../rev_1617043134287362500.sql | 254 ++++++++++++++++++ src/server/game/Spells/SpellMgr.cpp | 10 +- .../Northrend/Naxxramas/boss_anubrekhan.cpp | 14 +- .../Northrend/Naxxramas/boss_faerlina.cpp | 41 +-- .../Naxxramas/boss_four_horsemen.cpp | 21 ++ .../Northrend/Naxxramas/boss_gothik.cpp | 9 +- .../Northrend/Naxxramas/boss_loatheb.cpp | 9 +- .../scripts/Northrend/Naxxramas/boss_noth.cpp | 25 +- .../Northrend/Naxxramas/boss_razuvious.cpp | 14 +- .../Northrend/Naxxramas/boss_thaddius.cpp | 38 ++- .../Naxxramas/instance_naxxramas.cpp | 186 ++++++++++--- .../scripts/Northrend/Naxxramas/naxxramas.h | 75 +++--- 12 files changed, 543 insertions(+), 153 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1617043134287362500.sql diff --git a/data/sql/updates/pending_db_world/rev_1617043134287362500.sql b/data/sql/updates/pending_db_world/rev_1617043134287362500.sql new file mode 100644 index 000000000..14850e31f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1617043134287362500.sql @@ -0,0 +1,254 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1617043134287362500'); + +/* Environment */ + +-- PhaseMask to 1 for all Naxx end wing eyes +UPDATE `gameobject` SET `phaseMask`=1 WHERE `guid` IN (268045, 268044, 268047, 268046); +-- Set gobject flag "GO_FLAG_NOT_SELECTABLE" for all Naxx end wing eyes +UPDATE `gameobject_template_addon` SET `flags`=16 WHERE `entry` IN (181577, 181575, 181578, 181576); +-- Fix Horsemen end wing eye location +UPDATE `gameobject` SET `position_x`=2493.02, `position_y`=-2921.78, `position_z`=241.193, `orientation`=3.14159 WHERE `guid`=268046; +-- Adjust normal portal & phased glow portal on the same location +DELETE FROM `gameobject` WHERE `id` IN (181230, 181231, 181232, 181233); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(65855, 181231, 533, 0, 0, 3, 1, 2909, -4025.02, 273.475, 3.14159, 0, 0, 1, 0, 180, 0, 1, 0), -- Plague Wing Eye Portal Boss +(65856, 181232, 533, 0, 0, 3, 1, 3507.95, -2900.4, 302.459, 0.369949, 0, 0, 0.183921, 0.982941, 180, 0, 1, 0), -- Abom Wing Eye Portal Boss +(65857, 181233, 533, 0, 0, 3, 1, 3465.16, -3940.45, 308.788, 0.441179, -0.305481, 0.637715, 0.305481, 0.637716, 180, 0, 1, 0), -- Spider Wing Eye Portal Boss +(65854, 181230, 533, 0, 0, 3, 1, 2493.02, -2921.78, 241.193, 3.14159, 0, 0, 0.411143, -0.911571, 180, 0, 1, 0); -- Deathknight Wing Eye Portal Boss +-- Update flags & faction for glow eyes at boss-side +UPDATE `gameobject_template_addon` SET `faction`=0, `flags`=16 WHERE `entry` IN (181230, 181231, 181232, 181233); +-- Fix Thaddius end wing eye location and its glow ramp +UPDATE `gameobject` SET `position_x`=3539.016, `position_y`=-2936.821, `position_z`=302.4756, `orientation`=3.141593 WHERE `guid` IN (268047, 65856); +-- Kelthuzad's throne should not be selectable otherwise player can see the name file of the gobject +UPDATE `gameobject_template_addon` SET `flags`=16 WHERE `entry`=181640; +-- Remove first and third Naxxramas trigger +DELETE FROM `creature` WHERE `guid` IN (1971312, 1971314); + + +/* Fix SAI */ +-- source for timers: https://wowgaming.altervista.org/aowow/ +-- source for spells: https://wowhead.com/ +-- Add comments on the SAI that I fix/touch + +-- Fix timer for Acid Spit on Crypt Guard +UPDATE `smart_scripts` SET `event_param3`=4000 WHERE `entryorguid`=16573 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `event_param3`=4000 WHERE `entryorguid`=16573 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix timer for Frenzy on Crypt Guard +UPDATE `smart_scripts` SET `event_flags`=0, `event_param3`=120000, `event_param4`=120000 WHERE `entryorguid`=16573 AND `source_type`=0 AND `id`=5 AND `link`=0; +UPDATE `smart_scripts` SET `event_flags`=0, `event_param3`=120000, `event_param4`=120000 WHERE `entryorguid`=16573 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Fix Frenzy on Crypt Reaver +DELETE FROM `smart_scripts` WHERE `entryorguid`=15978 AND `id` IN (1, 2); +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 +(15978, 0, 1, 0, 2, 0, 100, 0, 0, 29, 120000, 120000, 0, 11, 56625, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crypt Reaver - On 30% HP - CastSelf Frenzy'), +(15978, 0, 2, 0, 2, 0, 100, 0, 0, 29, 120000, 120000, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crypt Reaver - On 30% HP - Say EMOTE_FRENZY'); +-- Fix timer for Shadow Bolt Volley on Naxxramas Acolyte +UPDATE `smart_scripts` SET `event_param4`=16000 WHERE `entryorguid`=15981 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_param4`=16000 WHERE `entryorguid`=15981 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Fix timer for Crypt Scarab Swarm on Tomb Horror +UPDATE `smart_scripts` SET `event_param2`=19000 WHERE `entryorguid`=15979 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_param2`=19000 WHERE `entryorguid`=15979 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Fix Frenzy on Infectious Ghoul +DELETE FROM `smart_scripts` WHERE `entryorguid`=16244 AND `source_type`=0 AND `id` IN (4, 5); +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 +(16244, 0, 4, 0, 2, 0, 100, 0, 0, 30, 60000, 60000, 0, 11, 54701, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Infectious Ghoul - On 30% HP - CastSelf Frenzy'), +(16244, 0, 5, 0, 2, 0, 100, 0, 0, 30, 60000, 60000, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Infectious Ghoul - On 30% HP - Say EMOTE_FRENZY'); +-- Fix elemental immunity mechanic on Plague Slime (immunity based on elemental selection) +UPDATE `smart_scripts` SET `event_type`=4 WHERE `entryorguid`=16243 AND `source_type`=0 AND `id`=0 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16243 AND `source_type`=0 AND `id` IN (5, 6, 7, 8); +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 +(16243, 0, 5, 0, 23, 0, 100, 0, 28987, 1, 0, 0, 0, 75, 7743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plague Slime - On has aura - Add aura Immunity: Shadow'), +(16243, 0, 6, 0, 23, 0, 100, 0, 28988, 1, 0, 0, 0, 75, 7940, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plague Slime - On has aura - Add aura Immunity: Frost'), +(16243, 0, 7, 0, 23, 0, 100, 0, 28989, 1, 0, 0, 0, 75, 7941, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plague Slime - On has aura - Add aura Immunity: Nature'), +(16243, 0, 8, 0, 23, 0, 100, 0, 28990, 1, 0, 0, 0, 75, 7942, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Plague Slime - On has aura - Add aura Immunity: Fire'); +-- Add Disease/Poison immunity on Plague Slime +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|2097152 WHERE `entry`=16243; +-- Fix timer for Acid Volley on Stoneskin Gargoyle +UPDATE `smart_scripts` SET `event_param1`=3000, `event_param2`=5000, `event_param3`=5000, `event_param4`=7000, `comment`='Stoneskin Gargoyle - In Combat - Cast Acid Volley' WHERE `entryorguid`=16168 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix timer for Stoneskin on Stoneskin Gargoyle +UPDATE `smart_scripts` SET `event_param3`=60000, `event_param4`=60000, `event_phase_mask`=0, `comment`='Stoneskin Gargoyle - At 30% HP - Cast Stoneskin' WHERE `entryorguid`=16168 AND `source_type`=0 AND `id` IN (2, 3) AND `link`=0; +-- Fix target for Frenzied Dive on Frenzied Bat +UPDATE `smart_scripts` SET `target_type`=2, `comment`='Frenzied Bat - In Combat - Cast Frenzied Dive' WHERE `entryorguid`=16036 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix timer for Putrid Bite on Plagued Bat +UPDATE `smart_scripts` SET `event_param1`=3000, `event_param2`=6000, `event_param3`=9000, `event_param4`=13000, `comment`='Plagued Bat - In combat - Cast Putrid Bite' WHERE `entryorguid`=16037 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix aura of Mutated Spores on Plague Beast (must be on all of them, not just some) +DELETE FROM `creature_addon` WHERE `guid` IN (128171, 128172, 128173, 128174, 128175, 128176, 128177, 128178, 128179, 128180, 128181, 128182, 128183); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `isLarge`, `auras`) VALUES +(128171, 0, 0, 0, 1, 0, 1, '30110'), +(128172, 0, 0, 0, 1, 0, 1, '30110'), +(128173, 0, 0, 0, 1, 0, 1, '30110'), +(128174, 0, 0, 0, 1, 0, 1, '30110'), +(128175, 0, 0, 0, 1, 0, 1, '30110'), +(128176, 0, 0, 0, 1, 0, 1, '30110'), +(128177, 1281770, 0, 0, 1, 0, 1, '30110'), +(128178, 1281780, 0, 0, 1, 0, 1, '30110'), +(128179, 1281790, 0, 0, 1, 0, 1, '30110'), +(128180, 0, 0, 0, 1, 0, 1, '30110'), +(128181, 0, 0, 0, 1, 0, 1, '30110'), +(128182, 0, 0, 0, 1, 0, 1, '30110'), +(128183, 1281830, 0, 0, 1, 0, 1, '30110'); +-- Fix timer and trigger for Plague Splash on Plague Beast +UPDATE `smart_scripts` SET `event_type`=2, `event_param1`=0, `event_param2`=50, `event_param3`=25000, `event_param4`=30000, `comment`='Plague Beast - Between 0-50% HP - Cast Plague Splash' WHERE `entryorguid`=16034 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix trigger for Plague contamination on Plagued Ghoul (sniffed from shadowlands) +UPDATE `smart_scripts` SET `event_type`=6, `event_param1`=0, `event_param2`=0, `event_param3`=0, `event_param4`=0, `comment`='Plagued Ghoul - On death - Cast Plague contamination' WHERE `entryorguid`=16447 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix Blood Presence on Death Knight +UPDATE `smart_scripts` SET `event_type`=4, `event_phase_mask`=0, `event_param2`=0, `comment`='On Aggro - Cast Self - Blood Presence' WHERE `entryorguid`=16146 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix timer and target selection for Death Coil (damage) on Death Knight +UPDATE `smart_scripts` SET `event_param1`=1000, `event_param2`=1400, `event_param3`=8500, `event_param4`=20500, `target_type`=5, `comment`='Death Knight - In combat - Cast Death Coil (damage)' WHERE `entryorguid`=16146 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix Hysteria on Death Knight +UPDATE `smart_scripts` SET `event_type`=0, `event_param1`=1000, `event_param2`=7400, `event_param3`=10100, `event_param4`=17300, `target_type`=26, `target_param1`=20, `comment`='Death Knight - In combat - Cast Hysteria' WHERE `entryorguid`=16146 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Add SAI for healing with Death Coil to friendly undead +DELETE FROM `smart_scripts` WHERE `entryorguid`=16146 AND `source_type`=0 AND `id`=4; +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 +(16146, 0, 4, 0, 14, 0, 50, 0, 80, 20, 16600, 17300, 0, 11, 55210, 0, 0, 0, 0, 0, 26, 20, 0, 0, 0, 0, 0, 0, 0, 'Death Knight - On Friendly HP Deficit - Cast Death Coil (heal)'); +-- Recreate the whole SAI for Necro Knight (they will pick one magic school on aggro) +DELETE FROM `smart_scripts` WHERE entryorguid=16165 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`, `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 +(16165, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 30, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - On Agro - Pick random Event Phase (1-2-3)'), +(16165, 0, 1, 0, 0, 1, 100, 0, 1000, 3200, 2800, 5200, 0, 11, 15453, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - In combat - Cast Arcane Explosion'), +(16165, 0, 2, 0, 0, 1, 100, 0, 250, 500, 13200, 18500, 0, 11, 29883, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - In combat - Cast Blink'), +(16165, 0, 3, 0, 0, 2, 100, 0, 7600, 8100, 15000, 20000, 0, 11, 30092, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - In combat - Cast Blast Wave'), +(16165, 0, 4, 0, 0, 2, 100, 0, 1800, 8900, 9600, 15700, 0, 11, 30091, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - In combat - Cast Flamestrike'), +(16165, 0, 5, 0, 0, 4, 100, 0, 3000, 6000, 25000, 35000, 0, 11, 30094, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - In combat - Cast Frost Nova'), +(16165, 0, 6, 0, 0, 4, 100, 0, 17000, 21000, 17000, 23000, 0, 11, 30095, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Necro Knight - In combat - Cast Cone of Cold'); +-- Fix timer for Shadow Bolt Volley on Shade of Naxxramas +UPDATE `smart_scripts` SET `event_param1`=2800, `event_param2`=5100, `event_param3`=4500, `event_param4`=12000, `comment`='Shade of Naxxramas - In combat - Cast Shadow Bolt Volley' WHERE `entryorguid`=16164 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Create SAI for Portal of Shadows on Shade of Naxxramas +DELETE FROM `smart_scripts` WHERE `entryorguid`=16164 AND `source_type`=0 AND `id` IN (2, 3) AND `link`=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`, `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 +(16164, 0, 2, 0, 0, 0, 100, 0, 4100, 8700, 60000, 60000, 0, 11, 28383, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shade of Naxxramas - In combat - Cast Portal of Shadows'), +(16164, 0, 3, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 19, 16420, 0, 0, 0, 0, 0, 0, 0, 'Shade of Naxxramas - On reset - Despawn Portal of Shadows'); +-- Fix timer for Whirlwind on Dark Touched Warrior +UPDATE `smart_scripts` SET `event_param1`=3300, `event_param2`=8900, `event_param3`=18900, `comment`='Dark Touched Warrior - In combat - Cast Whirlwind' WHERE `entryorguid`=16156 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix timer for Plague Strike on Death Knight Captain +UPDATE `smart_scripts` SET `event_param1`=1600, `event_param2`=7200, `event_param3`=8100, `event_param4`=14100, `comment`='Death Knight Captain - In combat - Cast Plague Strike' WHERE `entryorguid`=16145 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix Unholy Presence on Death Knight Captain +UPDATE `smart_scripts` SET `event_type`=4, `event_phase_mask`=0, `event_param2`=0, `comment`='Death Knight Captain - On aggro - Cast Unholy Presence' WHERE `entryorguid`=16145 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix Raise Dead on Death Knight Captain +UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_param1`=3500, `event_param2`=10200, `comment`='Death Knight Captain - In combat - Cast Raise Dead' WHERE `entryorguid`=16145 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Update Deathchill Servant's values as they were unused AC +UPDATE `creature_template` SET `DamageModifier`=2 WHERE `entry`=16390; -- naxx 10mode +UPDATE `creature_template` SET `DamageModifier`=4 WHERE `entry`=29901; -- naxx 25mode +UPDATE `creature_template` SET `mechanic_immune_mask`=8388624 WHERE `entry` IN (16390, 29901); -- both versions +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16390; -- Add AI +DELETE FROM `smart_scripts` WHERE `entryorguid`=16390 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; /* Create SAI */ +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 +(16390, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Deathchill Servant - On spawn - Set in combat with zone'), +(16390, 0, 1, 0, 1, 0, 100, 0, 200, 200, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Deathchill Servant - On OOC - Despawn if OOC'); +-- Fix timer for Crush Armor on Skeletal Smith +UPDATE `smart_scripts` SET `event_param1`=1700, `event_param2`=7900, `event_param3`=10500, `event_param4`=12900, `comment`='Skeletal Smith - In combat - Cast Crush Armor' WHERE `entryorguid`=16193 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix timer for Disarm on Skeletal Smith +UPDATE `smart_scripts` SET `event_param1`=6200, `event_param2`=6700, `comment`='Skeletal Smith - In combat - Cast Disarm' WHERE `entryorguid`=16193 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- Fix timer for Brutal Swipe on Bony Construct +UPDATE `smart_scripts` SET `event_param2`=20000, `comment`='Bony Construct - In combat - Cast Brutal Swipe' WHERE `entryorguid`=16167 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix timer and target selection for Strangulate on Death Knight Cavalier +UPDATE `smart_scripts` SET `event_param3`=4600, `event_param4`=7300, `target_type`=6, `comment`='Death Knight Cavalier - In combat - Cast Strangulate' WHERE `entryorguid`=16163 AND `source_type`=0 AND `id` IN (4, 5) AND `link`=0; +-- Fix timer and target selection for Icy Touch on Death Knight Cavalier +UPDATE `smart_scripts` SET `event_param1`=1100, `event_param2`=2200, `event_param3`=4100, `event_param4`=6200, `target_type`=5, `comment`='Death Knight Cavalier - In combat - Cast Icy Touch' WHERE `entryorguid`=16163 AND `source_type`=0 AND `id` IN (2, 3) AND `link`=0; +-- Fix timer for Bone Armor on Death Knight Cavalier +UPDATE `smart_scripts` SET `event_param1`=4700, `event_param2`=6100, `event_param3`=15700, `event_param4`=19800, `comment`='Death Knight Cavalier - In combat - Cast Bone Armor' WHERE `entryorguid`=16163 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Add SAI for Dismount Deathcharger on Death Knight Cavalier +DELETE FROM `smart_scripts` WHERE `entryorguid`=16163 AND `source_type`=0 AND `id`=6 AND `link`=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`, `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 +(16163, 0, 6, 0, 2, 0, 100, 0, 0, 30, 0, 0, 0, 11, 55294, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Death Knight Cavalier - At 30% HP - Cast Dismount Deathcharger'); +-- Adjust Charge for Deathcharger Steed +UPDATE `smart_scripts` SET `event_flags`=0, `comment`='Deathcharger Steed - In combat - Cast Charge' WHERE `entryorguid`=29818 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Create SAI mechanic for appropiate mount/dismount of Deathcharger Steed (summon) +DELETE FROM `smart_scripts` WHERE `entryorguid`=29818 AND `source_type`=0 AND `id` IN (1, 2, 3) AND `link`=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`, `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 +(29818, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Deathcharger Steed - On spawn - Unmount summoner'), +(29818, 0, 2, 0, 1, 0, 100, 0, 200, 200, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Deathcharger Steed - On OOC - Despawn if OOC'), +(29818, 0, 3, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Deathcharger Steed - On spawn - Set in combat with zone'); +-- Fix timer for Pierce Armor on Risen Squire +UPDATE `smart_scripts` SET `event_param1`=4000, `event_param2`=7000, `event_param4`=48000, `comment`='Risen Squire - In combat - Cast Pierce Armor' WHERE `entryorguid`=16154 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix timer and target selection for Charge on Deathcharger Steed (non-summon) +UPDATE `smart_scripts` SET `event_param1`=3300, `event_param2`=7500, `event_param3`=10000, `event_param4`=10900, `target_type`=2, `comment`='Deathcharger Steed - On aggro - Cast Charge' WHERE `entryorguid`=16067 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix timer for Mortal Strike on Unholy Axe +UPDATE `smart_scripts` SET `event_param1`=6100, `event_param2`=13100, `event_param3`=20100, `event_param4`=20100, `comment`='Unholy Axe - In combat - Cast Mortal Strike' WHERE `entryorguid`=16194 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- Fix timer for Whirlwind on Unholy Axe +UPDATE `smart_scripts` SET `event_param1`=2200, `event_param2`=8600, `event_param3`=8800, `event_param4`=13300, `comment`='Unholy Axe - In combat - Cast Whirlwind' WHERE `entryorguid`=16194 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Fix timer for Arcane Explosion on Unholy Staff +UPDATE `smart_scripts` SET `event_param1`=2400, `event_param2`=8400, `event_param3`=8400, `event_param4`=16100, `comment`='Unholy Staff - In combat - Cast Arcane Explosion' WHERE `entryorguid`=16215 AND `source_type`=0 AND `id`=0 AND `link`=0; -- (10mode) +UPDATE `smart_scripts` SET `event_param1`=9000, `event_param2`=16000, `event_param3`=20000, `event_param4`=30000, `comment`='Unholy Staff - In combat - Cast Arcane Explosion' WHERE `entryorguid`=16215 AND `source_type`=0 AND `id`=1 AND `link`=0; -- (25mode) +-- Fix timer for Frost Nova on Unholy Staff +UPDATE `smart_scripts` SET `event_param1`=6100, `event_param2`=10800, `comment`='Unholy Staff - In combat - Cast Frost Nova' WHERE `entryorguid`=16215 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix timer for Polymorph on Unholy Staff +UPDATE `smart_scripts` SET `event_param1`=4800, `event_param2`=6200, `event_param3`=14800, `event_param4`=14900, `target_type`=6, `comment`='Unholy Staff - In combat - Cast Polymorph' WHERE `entryorguid`=16215 AND `source_type`=0 AND `id`=3 AND `link`=0; +-- Fix timer for Cleave on Unholy Swords +UPDATE `smart_scripts` SET `event_param2`=4700, `event_param3`=9200, `event_param4`=15500, `comment`='Unholy Swords - In combat - Cast Cleave' WHERE `entryorguid`=16216 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Recreate SAI for Thrash on Unholy Swords +UPDATE `smart_scripts` SET `event_type`=0, `event_param1`=2400, `event_param2`=7800, `event_param3`=12000, `event_param4`=13600, `action_param1`=12787, `comment`='Unholy Swords - In combat - Cast Thrash' WHERE `entryorguid`=16216 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- Add Disarm immunity for Unholly (Axe/Staff/Swords) +UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|4 WHERE `entry` IN (16194, 16215, 16216); +-- Re-do Invisibility on Vigilant Shade +UPDATE `smart_scripts` SET `event_type`=1, `event_param1`=1000, `event_param2`=1000, `event_param3`=5000, `event_param4`=5000, `action_type`=75, `comment`='Vigilant Shade - In OOC - Add aura Invisibility' WHERE `entryorguid`=30085 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Adjust SAI in order to remove Invisibility on Vigilant Shade when there is a player around +UPDATE `smart_scripts` SET `event_type`=101, `event_param1`=1, `event_param2`=20, `event_param3`=1000, `event_param4`=1000, `comment`='Vigilant Shade - On Player near - Remove Invisibility' WHERE `entryorguid`=30085 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- Fix timer for Shadow Bolt Volley on Shadow Shade +UPDATE `smart_scripts` SET `event_param1`=2300, `event_param2`=2300, `event_param3`=9600, `event_param4`=9900, `target_type`=2, `comment`='Vigilant Shade - In combat - Cast Shadow Bolt Volley' WHERE `entryorguid`=30085 AND `source_type`=0 AND `id` IN (2, 3) AND `link`=0; +-- Fix timer for Cleave on Patchwork Golem +UPDATE `smart_scripts` SET `event_param2`=9300, `event_param3`=15200, `event_param4`=15200, `comment`='Patchwork Golem - In combat - Cast Cleave' WHERE `entryorguid`=16017 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix timer for War Stomp on Patchwork Golem +UPDATE `smart_scripts` SET `event_param1`=4800, `event_param2`=10700, `comment`='Patchwork Golem - In combat - Cast War Stomp' WHERE `entryorguid`=16017 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix spell difficulty and timer for Execute on Patchwork Golem +UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_flags`=4, `event_param4`=43000, `comment`='Patchwork Golem - On target HP 0-20% - Cast Execute' WHERE `entryorguid`=16017 AND `source_type`=0 AND `id`=3 AND `link`=0; +UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_flags`=2, `event_param4`=43000, `comment`='Patchwork Golem - On target HP 0-20% - Cast Execute' WHERE `entryorguid`=16017 AND `source_type`=0 AND `id`=4 AND `link`=0; +-- Fix timer for Bile Vomit on Bile Retcher +UPDATE `smart_scripts` SET `event_param1`=3600, `event_param2`=6800, `event_param3`=13700, `event_param4`=19700, `comment`='Bile Retcher - In combat - Cast Bile Vomit' WHERE `entryorguid`=16018 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix timer for Acidic Sludge on Sludge Belcher +UPDATE `smart_scripts` SET `event_param1`=1900, `event_param2`=3000, `event_param3`=6000, `event_param4`=7300, `comment`='Sludge Belcher - In combat - Cast Acidic Sludge' WHERE `entryorguid`=16029 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Add SAI for Disease Cloud on Sludge Belcher +DELETE FROM `smart_scripts` WHERE `entryorguid`=16029 AND `source_type`=0 AND `id`=2 AND `link`=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`, `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 +(16029, 0, 2, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 11, 28362, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sludge Belcher - On reset - Cast Disease Cloud'); +-- Fix timer for Chain Lightning on Living Monstrosity +UPDATE `smart_scripts` SET `event_param1`=7100, `event_param2`=12500, `event_param3`=18100, `event_param4`=20900, `target_type`=5, `comment`='Living Monstrosity - In combat - Cast Chain Lightning' WHERE `entryorguid`=16021 AND `source_type`=0 AND `id`=0 AND `link`=0; -- (10mode) +UPDATE `smart_scripts` SET `event_param1`=5000, `event_param2`=8000, `event_param4`=24000, `target_type`=5, `comment`='Living Monstrosity - In combat - Cast Chain Lightning' WHERE `entryorguid`=16021 AND `source_type`=0 AND `id`=1 AND `link`=0; -- (25mode) +-- Fix timer for Lightning Totem on Living Monstrosity +UPDATE `smart_scripts` SET `event_param1`=6400, `event_param2`=10000, `event_param3`=16900, `event_param4`=18500, `comment`='Living Monstrosity - In combat - Cast Lightning Totem' WHERE `entryorguid`=16021 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix timer and target for Mana Burn on Mad Scientist +UPDATE `smart_scripts` SET `event_param1`=7600, `event_param2`=17300, `event_param3`=6000, `event_param4`=13300, `target_param1`=0, `comment`='Mad Scientist - In combat - Cast Mana Burn' WHERE `entryorguid`=16020 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix timer and target for Great Heal on Mad Scientist +UPDATE `smart_scripts` SET `event_type`=2, `event_param1`=0, `event_param2`=30, `event_param3`=18000, `event_param4`=21000, `target_type`=1, `target_param1`=0, `comment`='Mad Scientist - At 30% HP - Cast Great Heal' WHERE `entryorguid`=16020 AND `source_type`=0 AND `id` IN (2, 3) AND `link`=0; +-- Fix timer for Mind Flay on Surgical Assistant +UPDATE `smart_scripts` SET `event_param1`=1600, `event_param2`=2800, `event_param3`=7700, `event_param4`=11900, `comment`='Surgical Assistant - In combat - Cast Mind Flay' WHERE `entryorguid`=16022 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Adjust timer for Knockback on Stitched Giant +UPDATE `smart_scripts` SET `event_param1`=5100, `event_param2`=10400, `event_param3`=18800, `event_param4`=21300 WHERE `entryorguid`=16025 AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Update comment for Unstoppable Enrage on Stitched Giant +UPDATE `smart_scripts` SET `comment`='Stitched Giant - At 30% HP - Cast self Unstoppable Enrage' WHERE `entryorguid`=16025 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- Fix timer for Massive Stomp on Stitched Colossus +UPDATE `smart_scripts` SET `event_param1`=5400, `event_param2`=12200, `event_param3`=15500, `event_param4`=22300, `comment`='Stitched Colossus - In combat - Cast Massive Stomp' WHERE `entryorguid`=30071 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=0; +-- Fix Unstoppable Enrage on Stitched Colossus +UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_flags`=1, `comment`='Stitched Colossus - At 30% HP - Cast Unstoppable Enrage' WHERE `entryorguid`=30071 AND `source_type`=0 AND `id`=2 AND `link`=0; +-- Fix movement speed for KT minions +UPDATE `creature_template` SET `speed_walk`=0.1, `speed_run`=0.2 WHERE `entry` IN (16429, 30018); -- Soul Weaver +UPDATE `creature_template` SET `speed_walk`=0.2, `speed_run`=0.3 WHERE `entry` IN (16427, 30015); -- Soldier of the Frozen Wastes + + +-- Fix "Portal of Shadows" spell-mechanic which is used by Shade of Naxxramas + +-- Portal of Shadows (NPC) +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16420; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16420 AND `source_type`=0 AND `id`=0 AND `link`=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`, `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 +(16420, 0, 0, 0, 101, 0, 100, 0, 1, 40, 5000, 5000, 0, 12, 16419, 3, 10000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal of Shadows - On player near - Summon Ghost of Naxxramas'); + +-- Ghost of Naxxramas +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16419; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16419 AND `source_type`=0 AND `id` IN (0, 1) AND `link`=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`, `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 +(16419, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghost of Naxxramas - On spawn - Set in combat with zone'), +(16419, 0, 1, 0, 1, 0, 100, 0, 100, 100, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghost of Naxxramas - On OOC - Despawn if OOC'); + + +-- Fix Vigilant Shade population in Naxxramas +UPDATE `creature` SET `position_x`=2798.932, `position_y`=-2985.458, `position_z`=244.387, `orientation`=6.2765, `wander_distance`=40 WHERE `guid`=128065; +DELETE FROM `creature` WHERE `guid` IN (128062, 128063, 128064, 128081, 128125, 128126, 128127); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(128062, 30085, 533, 0, 0, 3, 1, 19329, 0, 2556.97, -3231.98, 246.370, 3.10938, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0), +(128063, 30085, 533, 0, 0, 3, 1, 19329, 0, 2557.78, -3633.28, 273.809, 3.18988, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0), +(128064, 30085, 533, 0, 0, 3, 1, 19329, 0, 2795.33, -3882.25, 279.417, 3.12988, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0), +(128081, 30085, 533, 0, 0, 3, 1, 19329, 0, 3204.13, -3881.97, 273.901, 3.10888, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0), +(128125, 30085, 533, 0, 0, 3, 1, 19329, 0, 3453.84, -3638.10, 276.313, 3.15988, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0), +(128126, 30085, 533, 0, 0, 3, 1, 19329, 0, 3454.06, -3232.31, 275.430, 3.10488, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0), +(128127, 30085, 533, 0, 0, 3, 1, 19329, 0, 3206.94, -2985.55, 275.347, 3.12938, 3600, 40, 0, 130330, 0, 1, 0, 0, 0, 0); + diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index f8d0634d9..38e4e3eb5 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3171,12 +3171,18 @@ void SpellMgr::LoadSpellCustomAttr() spellInfo->AttributesCu |= SPELL_ATTR0_CU_NO_POSITIVE_TAKEN_BONUS; break; case 65280: // Ulduar, Hodir, Singed + case 28969: // Naxxramas, Crypt Guard, Acid Spit (10 normal) + case 56098: // Naxxramas, Crypt Guard, Acid Spit (25 normal) + case 27891: // Naxxramas, Sludge Belcher, Acidic Sludge (10 normal) + case 54331: // Naxxramas, Sludge Belcher, Acidic Sludge (25 normal) + case 29325: // Naxxramas, Stoneskin Gargoyle, Acid Volley (10 normal) + case 54714: // Naxxramas, Stoneskin Gargoyle, Acid Volley (25 normal) case 65775: // Anub'arak, Swarm Scarab, Acid-Drenched Mandibles (10 normal) case 67861: // Anub'arak, Swarm Scarab, Acid-Drenched Mandibles (25 normal) case 67862: // Anub'arak, Swarm Scarab, Acid-Drenched Mandibles (10 heroic) case 67863: // Anub'arak, Swarm Scarab, Acid-Drenched Mandibles (25 heroic) - case 55604: // Naxxramas, Unrelenting Trainee, Death Plague (10 mode) - case 55645: // Naxxramas, Unrelenting Trainee, Death Plague (25 mode) + case 55604: // Naxxramas, Unrelenting Trainee, Death Plague (10 normal) + case 55645: // Naxxramas, Unrelenting Trainee, Death Plague (25 normal) case 67721: // Anub'arak, Nerubian Burrower, Expose Weakness (normal) case 67847: // Anub'arak, Nerubian Burrower, Expose Weakness (heroic) case 64638: // Ulduar, Winter Jormungar, Acidic Bite diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp index 48f8c1784..a68e7edf5 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp @@ -8,16 +8,16 @@ enum Says { - SAY_AGGRO = 0, - SAY_GREET = 1, - SAY_SLAY = 2, - EMOTE_LOCUST = 3 + SAY_AGGRO = 0, + SAY_GREET = 1, + SAY_SLAY = 2, + EMOTE_LOCUST = 3 }; enum GuardSays { - EMOTE_SPAWN = 1, - EMOTE_SCARAB = 2 + EMOTE_SPAWN = 1, + EMOTE_SCARAB = 2 }; enum Spells @@ -183,7 +183,7 @@ public: { if (!me->IsInCombat() && sayGreet) { - for( std::list::iterator itr = summons.begin(); itr != summons.end(); ++itr ) + for (std::list::iterator itr = summons.begin(); itr != summons.end(); ++itr) { if (pInstance) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp index 85e680dd3..e5aa49308 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp @@ -9,13 +9,13 @@ enum Yells { - SAY_GREET = 0, - SAY_AGGRO = 1, - SAY_SLAY = 2, - SAY_DEATH = 3, - EMOTE_WIDOWS_EMBRACE = 4, - EMOTE_FRENZY = 5, - SAY_FRENZY = 6 + SAY_GREET = 0, + SAY_AGGRO = 1, + SAY_SLAY = 2, + SAY_DEATH = 3, + EMOTE_WIDOWS_EMBRACE = 4, + EMOTE_FRENZY = 5, + SAY_FRENZY = 6 }; enum Spells @@ -40,9 +40,7 @@ enum Events enum Misc { NPC_NAXXRAMAS_WORSHIPPER = 16506, - NPC_NAXXRAMAS_FOLLOWER = 16505, - - SPIDER_WEB_ENTRANCE = 181235 + NPC_NAXXRAMAS_FOLLOWER = 16505 }; class boss_faerlina : public CreatureScript @@ -92,9 +90,12 @@ public: events.Reset(); summons.DespawnAll(); SummonHelpers(); - if (GameObject* go = me->FindNearestGameObject(SPIDER_WEB_ENTRANCE, 100.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_ACTIVE); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_FAERLINA_WEB))) + { + go->SetGoState(GO_STATE_ACTIVE); + } } } @@ -108,9 +109,12 @@ public: events.ScheduleEvent(EVENT_RAIN_OF_FIRE, urand(8000, 18000)); events.ScheduleEvent(EVENT_FRENZY, urand(60000, 80000), 1); events.SetPhase(1); - if (GameObject* go = me->FindNearestGameObject(SPIDER_WEB_ENTRANCE, 100.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_READY); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_FAERLINA_WEB))) + { + go->SetGoState(GO_STATE_READY); + } } } @@ -143,9 +147,12 @@ public: { BossAI::JustDied(killer); Talk(SAY_DEATH); - if (GameObject* go = me->FindNearestGameObject(SPIDER_WEB_ENTRANCE, 100.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_ACTIVE); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_FAERLINA_WEB))) + { + go->SetGoState(GO_STATE_ACTIVE); + } } } @@ -153,7 +160,7 @@ public: { if (!me->IsInCombat() && sayGreet) { - for( std::list::iterator itr = summons.begin(); itr != summons.end(); ++itr ) + for (std::list::iterator itr = summons.begin(); itr != summons.end(); ++itr) { if (pInstance) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 9d864d9e7..c03c21a38 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -191,6 +191,16 @@ public: events.RescheduleEvent(EVENT_PUNISH, 5000); events.RescheduleEvent(EVENT_SECONDARY_SPELL, 15000); } + if (pInstance) + { + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HORSEMEN_GATE))) + { + if (pInstance->GetBossState(BOSS_GOTHIK) == DONE) + { + go->SetGoState(GO_STATE_ACTIVE); + } + } + } } void MovementInform(uint32 type, uint32 id) override @@ -260,6 +270,10 @@ public: player->SummonGameObject(RAID_MODE(GO_HORSEMEN_CHEST_10, GO_HORSEMEN_CHEST_25), 2514.8f, -2944.9f, 245.55f, 5.51f, 0, 0, 0, 0, 0); } } + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HORSEMEN_GATE))) + { + go->SetGoState(GO_STATE_ACTIVE); + } } } Talk(SAY_DEATH); @@ -276,6 +290,13 @@ public: me->SetSpeed(MOVE_RUN, me->GetSpeedRate(MOVE_RUN), true); MoveToCorner(); } + if (pInstance) + { + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_HORSEMEN_GATE))) + { + go->SetGoState(GO_STATE_READY); + } + } } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 1cf8e8656..9bb2e1d52 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -263,13 +263,10 @@ public: { summons.DoZoneInCombat(); } - else + else if (Unit* target = me->SelectNearestTarget(50.0f)) { - if (Unit* target = me->SelectNearestTarget(50.0f)) - { - AttackStart(target); - DoZoneInCombat(); - } + AttackStart(target); + DoZoneInCombat(); } } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp index 170b66777..8c28978fc 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp @@ -154,14 +154,7 @@ public: case EVENT_INEVITABLE_DOOM: me->CastSpell(me, RAID_MODE(SPELL_INEVITABLE_DOOM_10, SPELL_INEVITABLE_DOOM_25), false); doomCounter++; - if (doomCounter < 6) - { - events.RepeatEvent(30000); - } - else - { - events.RepeatEvent(15000); - } + events.RepeatEvent(doomCounter < 6 ? 30000 : 15000); break; case EVENT_BERSERK: me->CastSpell(me, SPELL_BERSERK, true); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index 38e188b68..f04efd7f0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -49,9 +49,7 @@ enum Misc { NPC_PLAGUED_WARRIOR = 16984, NPC_PLAGUED_CHAMPION = 16983, - NPC_PLAGUED_GUARDIAN = 16981, - - NOTH_ROOM_ENTRANCE = 181200 + NPC_PLAGUED_GUARDIAN = 16981 }; const Position summoningPosition[5] = @@ -140,9 +138,12 @@ public: me->SetControlled(false, UNIT_STATE_ROOT); me->SetReactState(REACT_AGGRESSIVE); timesInBalcony = 0; - if (GameObject* go = me->FindNearestGameObject(NOTH_ROOM_ENTRANCE, 100.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_ACTIVE); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_NOTH_ENTRY_GATE))) + { + go->SetGoState(GO_STATE_ACTIVE); + } } } @@ -157,9 +158,12 @@ public: BossAI::EnterCombat(who); Talk(SAY_AGGRO); StartGroundPhase(); - if (GameObject* go = me->FindNearestGameObject(NOTH_ROOM_ENTRANCE, 100.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_READY); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_NOTH_ENTRY_GATE))) + { + go->SetGoState(GO_STATE_READY); + } } } @@ -178,9 +182,12 @@ public: } BossAI::JustDied(killer); Talk(SAY_DEATH); - if (GameObject* go = me->FindNearestGameObject(NOTH_ROOM_ENTRANCE, 100.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_ACTIVE); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_NOTH_ENTRY_GATE))) + { + go->SetGoState(GO_STATE_ACTIVE); + } } } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp index 6db395420..7216c532e 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp @@ -89,12 +89,9 @@ public: { Talk(SAY_SLAY); } - if (who->GetTypeId() == TYPEID_PLAYER) + if (who->GetTypeId() == TYPEID_PLAYER && pInstance) { - if (pInstance) - { - pInstance->SetData(DATA_IMMORTAL_FAIL, 0); - } + pInstance->SetData(DATA_IMMORTAL_FAIL, 0); } } @@ -187,12 +184,9 @@ public: void KilledUnit(Unit* who) override { - if (who->GetTypeId() == TYPEID_PLAYER) + if (who->GetTypeId() == TYPEID_PLAYER && me->GetInstanceScript()) { - if (me->GetInstanceScript()) - { - me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0); - } + me->GetInstanceScript()->SetData(DATA_IMMORTAL_FAIL, 0); } } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index dac7bfed3..ce7f0f60c 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -92,8 +92,7 @@ enum Misc ACTION_RESTORE = 3, GO_TESLA_COIL_LEFT = 181478, GO_TESLA_COIL_RIGHT = 181477, - NPC_TESLA_COIL = 16218, - THADDIUS_ROOM_DOOR = 181121 + NPC_TESLA_COIL = 16218 }; class boss_thaddius : public CreatureScript @@ -177,9 +176,15 @@ public: { go->SetGoState(GO_STATE_ACTIVE); } - if (GameObject* go = me->FindNearestGameObject(THADDIUS_ROOM_DOOR, 200.0f)) + if (pInstance) { - go->SetGoState(GO_STATE_ACTIVE); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_THADDIUS_GATE))) + { + if (pInstance->GetBossState(BOSS_GLUTH) == DONE) + { + go->SetGoState(GO_STATE_ACTIVE); + } + } } } @@ -203,10 +208,10 @@ public: { pInstance->DoRemoveAurasDueToSpellOnPlayers(28059); pInstance->DoRemoveAurasDueToSpellOnPlayers(28084); - } - if (GameObject* go = me->FindNearestGameObject(THADDIUS_ROOM_DOOR, 200.0f)) - { - go->SetGoState(GO_STATE_ACTIVE); + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_THADDIUS_GATE))) + { + go->SetGoState(GO_STATE_ACTIVE); + } } } @@ -394,10 +399,6 @@ public: void EnterCombat(Unit* pWho) override { me->SetInCombatWithZone(); - if (GameObject* go = me->FindNearestGameObject(THADDIUS_ROOM_DOOR, 200.0f)) - { - go->SetGoState(GO_STATE_READY); - } if (Creature* cr = me->FindNearestCreature(NPC_TESLA_COIL, 150.f, true)) { myCoil = cr->GetGUID(); @@ -420,6 +421,10 @@ public: } if (pInstance) { + if (GameObject* go = me->GetMap()->GetGameObject(pInstance->GetData64(DATA_THADDIUS_GATE))) + { + go->SetGoState(GO_STATE_READY); + } if (Creature* cr = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_THADDIUS_BOSS))) { cr->AI()->AttackStart(pWho); @@ -609,14 +614,7 @@ public: if (count) { uint32 spellId = 0; - if (GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE) - { - spellId = SPELL_POSITIVE_CHARGE_STACK; - } - else // if (GetSpellInfo()->Id == SPELL_NEGATIVE_CHARGE) - { - spellId = SPELL_NEGATIVE_CHARGE_STACK; - } + spellId = GetSpellInfo()->Id == SPELL_POSITIVE_CHARGE ? SPELL_NEGATIVE_CHARGE_STACK : SPELL_NEGATIVE_CHARGE_STACK; GetCaster()->SetAuraStack(spellId, GetCaster(), count); } } diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 5f16f88ed..65b7ac4e6 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -58,22 +58,24 @@ public: // GOs _patchwerkGateGUID = 0; _gluthGateGUID = 0; - _nothGateGUID = 0; + _nothEntryGateGUID = 0; + _nothExitGateGUID = 0; _heiganGateGUID = 0; _heiganGateExitGUID = 0; _loathebGateGUID = 0; _anubGateGUID = 0; _anubNextGateGUID = 0; + _faerlinaWebGUID = 0; _faerlinaGateGUID = 0; _maexxnaGateGUID = 0; _thaddiusGateGUID = 0; _horsemanGateGUID = 0; - _kelthuzadfloorGUID = 0; - _kelthuzadgateGUID = 0; - _kelthuzadportal1GUID = 0; - _kelthuzadportal2GUID = 0; - _kelthuzadportal3GUID = 0; - _kelthuzadportal4GUID = 0; + _kelthuzadFloorGUID = 0; + _kelthuzadGateGUID = 0; + _kelthuzadPortal1GUID = 0; + _kelthuzadPortal2GUID = 0; + _kelthuzadPortal3GUID = 0; + _kelthuzadPortal4GUID = 0; _sapphironGateGUID = 0; _horsemanPortalGUID = 0; _loathebPortalGUID = 0; @@ -83,6 +85,10 @@ public: _plagueEyePortalGUID = 0; _spiderEyePortalGUID = 0; _abomEyePortalGUID = 0; + _deathknightGlowEyePortalGUID = 0; + _plagueGlowEyePortalGUID = 0; + _spiderGlowEyePortalGUID = 0; + _abomGlowEyePortalGUID = 0; // NPCs PatchwerkRoomTrash.clear(); @@ -122,12 +128,14 @@ public: // GOs uint64 _patchwerkGateGUID; uint64 _gluthGateGUID; - uint64 _nothGateGUID; + uint64 _nothEntryGateGUID; + uint64 _nothExitGateGUID; uint64 _heiganGateGUID; uint64 _heiganGateExitGUID; uint64 _loathebGateGUID; uint64 _anubGateGUID; uint64 _anubNextGateGUID; + uint64 _faerlinaWebGUID; uint64 _faerlinaGateGUID; uint64 _maexxnaGateGUID; uint64 _thaddiusGateGUID; @@ -135,12 +143,12 @@ public: uint64 _gothikInnerGateGUID{}; uint64 _gothikExitGateGUID{}; uint64 _horsemanGateGUID; - uint64 _kelthuzadfloorGUID; - uint64 _kelthuzadgateGUID; - uint64 _kelthuzadportal1GUID; - uint64 _kelthuzadportal2GUID; - uint64 _kelthuzadportal3GUID; - uint64 _kelthuzadportal4GUID; + uint64 _kelthuzadFloorGUID; + uint64 _kelthuzadGateGUID; + uint64 _kelthuzadPortal1GUID; + uint64 _kelthuzadPortal2GUID; + uint64 _kelthuzadPortal3GUID; + uint64 _kelthuzadPortal4GUID; uint64 _sapphironGateGUID; uint64 _horsemanPortalGUID; uint64 _loathebPortalGUID; @@ -150,6 +158,10 @@ public: uint64 _plagueEyePortalGUID; uint64 _spiderEyePortalGUID; uint64 _abomEyePortalGUID; + uint64 _deathknightGlowEyePortalGUID; + uint64 _plagueGlowEyePortalGUID; + uint64 _spiderGlowEyePortalGUID; + uint64 _abomGlowEyePortalGUID; // NPCs std::list PatchwerkRoomTrash; @@ -293,14 +305,21 @@ public: pGo->SetGoState(GO_STATE_ACTIVE); } break; - case GO_NOTH_GATE: - _nothGateGUID = pGo->GetGUID(); + case GO_NOTH_ENTRY_GATE: + _nothEntryGateGUID = pGo->GetGUID(); if (GetBossState(BOSS_NOTH) == DONE) { pGo->SetGoState(GO_STATE_ACTIVE); } break; - case GO_HEIGAN_ENTERANCE_GATE: + case GO_NOTH_EXIT_GATE: + _nothExitGateGUID = pGo->GetGUID(); + if (GetBossState(BOSS_NOTH) == DONE) + { + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; + case GO_HEIGAN_ENTRY_GATE: _heiganGateGUID = pGo->GetGUID(); if (GetBossState(BOSS_HEIGAN) == DONE || GetBossState(BOSS_NOTH) == DONE) { @@ -342,6 +361,13 @@ public: pGo->SetGoState(GO_STATE_ACTIVE); } break; + case GO_FAERLINA_WEB: + _faerlinaWebGUID = pGo->GetGUID(); + if (GetBossState(BOSS_FAERLINA) == DONE) + { + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; case GO_MAEXXNA_GATE: _maexxnaGateGUID = pGo->GetGUID(); if (GetBossState(BOSS_FAERLINA) == DONE) @@ -369,7 +395,7 @@ public: pGo->SetGoState(GO_STATE_ACTIVE); } break; - case GO_HORSEMAN_GATE: + case GO_HORSEMEN_GATE: _horsemanGateGUID = pGo->GetGUID(); if (GetBossState(BOSS_GOTHIK) == DONE) { @@ -377,26 +403,26 @@ public: } break; case GO_KELTHUZAD_FLOOR: - _kelthuzadfloorGUID = pGo->GetGUID(); + _kelthuzadFloorGUID = pGo->GetGUID(); break; case GO_KELTHUZAD_GATE: - _kelthuzadgateGUID = pGo->GetGUID(); + _kelthuzadGateGUID = pGo->GetGUID(); if (GetBossState(BOSS_SAPPHIRON) == DONE && _speakTimer == 0) { pGo->SetGoState(GO_STATE_ACTIVE); } break; case GO_KELTHUZAD_PORTAL_1: - _kelthuzadportal1GUID = pGo->GetGUID(); + _kelthuzadPortal1GUID = pGo->GetGUID(); break; case GO_KELTHUZAD_PORTAL_2: - _kelthuzadportal2GUID = pGo->GetGUID(); + _kelthuzadPortal2GUID = pGo->GetGUID(); break; case GO_KELTHUZAD_PORTAL_3: - _kelthuzadportal3GUID = pGo->GetGUID(); + _kelthuzadPortal3GUID = pGo->GetGUID(); break; case GO_KELTHUZAD_PORTAL_4: - _kelthuzadportal4GUID = pGo->GetGUID(); + _kelthuzadPortal4GUID = pGo->GetGUID(); break; case GO_SAPPHIRON_GATE: _sapphironGateGUID = pGo->GetGUID(); @@ -405,34 +431,40 @@ public: pGo->SetGoState(GO_STATE_ACTIVE); } break; - case GO_DEATHKNIGHT_WING: + case GO_LOATHEB_PORTAL: _loathebPortalGUID = pGo->GetGUID(); if (GetBossState(BOSS_LOATHEB) == DONE) { - pGo->SetPhaseMask(1, true); + pGo->SetGoState(GO_STATE_ACTIVE); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; case GO_THADDIUS_PORTAL: _thaddiusPortalGUID = pGo->GetGUID(); if (GetBossState(BOSS_THADDIUS) == DONE) { - pGo->SetPhaseMask(1, true); + pGo->SetGoState(GO_STATE_ACTIVE); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; case GO_MAEXXNA_PORTAL: _maexxnaPortalGUID = pGo->GetGUID(); if (GetBossState(BOSS_MAEXXNA) == DONE) { - pGo->SetPhaseMask(1, true); + pGo->SetGoState(GO_STATE_ACTIVE); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; case GO_HORSEMAN_PORTAL: _horsemanPortalGUID = pGo->GetGUID(); if (GetBossState(BOSS_HORSEMAN) == DONE) { - pGo->SetPhaseMask(1, true); + pGo->SetGoState(GO_STATE_ACTIVE); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } break; + + // Glow portals at center-side case GO_DEATHKNIGHT_EYE_PORTAL: _deathknightEyePortalGUID = pGo->GetGUID(); if (GetBossState(BOSS_HORSEMAN) == DONE) @@ -461,6 +493,36 @@ public: pGo->SetGoState(GO_STATE_ACTIVE); } break; + + // Glow portals at boss-side + case GO_MILI_EYE_RAMP_BOSS: + _deathknightGlowEyePortalGUID = pGo->GetGUID(); + if (GetBossState(BOSS_HORSEMAN) == DONE) + { + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; + case GO_PLAG_EYE_RAMP_BOSS: + _plagueGlowEyePortalGUID = pGo->GetGUID(); + if (GetBossState(BOSS_LOATHEB) == DONE) + { + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; + case GO_ARAC_EYE_RAMP_BOSS: + _spiderGlowEyePortalGUID = pGo->GetGUID(); + if (GetBossState(BOSS_MAEXXNA) == DONE) + { + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; + case GO_CONS_EYE_RAMP_BOSS: + _abomGlowEyePortalGUID = pGo->GetGUID(); + if (GetBossState(BOSS_THADDIUS) == DONE) + { + pGo->SetGoState(GO_STATE_ACTIVE); + } + break; } } @@ -788,7 +850,7 @@ public: } break; case BOSS_NOTH: - if (GameObject* go = instance->GetGameObject(_nothGateGUID)) + if (GameObject* go = instance->GetGameObject(_nothExitGateGUID)) { go->SetGoState(GO_STATE_ACTIVE); } @@ -814,12 +876,17 @@ public: } if (GameObject* go = instance->GetGameObject(_loathebPortalGUID)) { - go->SetPhaseMask(1, true); + go->SetGoState(GO_STATE_ACTIVE); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } if (GameObject* go = instance->GetGameObject(_plagueEyePortalGUID)) { go->SetGoState(GO_STATE_ACTIVE); } + if (GameObject* go = instance->GetGameObject(_plagueGlowEyePortalGUID)) + { + go->SetGoState(GO_STATE_ACTIVE); + } events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); break; case BOSS_ANUB: @@ -849,12 +916,17 @@ public: } if (GameObject* go = instance->GetGameObject(_maexxnaPortalGUID)) { - go->SetPhaseMask(1, true); + go->SetGoState(GO_STATE_ACTIVE); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } if (GameObject* go = instance->GetGameObject(_spiderEyePortalGUID)) { go->SetGoState(GO_STATE_ACTIVE); } + if (GameObject* go = instance->GetGameObject(_spiderGlowEyePortalGUID)) + { + go->SetGoState(GO_STATE_ACTIVE); + } events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); break; case BOSS_GOTHIK: @@ -877,23 +949,33 @@ public: case BOSS_THADDIUS: if (GameObject* go = instance->GetGameObject(_thaddiusPortalGUID)) { - go->SetPhaseMask(1, true); + go->SetGoState(GO_STATE_ACTIVE); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } if (GameObject* go = instance->GetGameObject(_abomEyePortalGUID)) { go->SetGoState(GO_STATE_ACTIVE); } + if (GameObject* go = instance->GetGameObject(_abomGlowEyePortalGUID)) + { + go->SetGoState(GO_STATE_ACTIVE); + } events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); break; case BOSS_HORSEMAN: if (GameObject* go = instance->GetGameObject(_horsemanPortalGUID)) { - go->SetPhaseMask(1, true); + go->SetGoState(GO_STATE_ACTIVE); + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } if (GameObject* go = instance->GetGameObject(_deathknightEyePortalGUID)) { go->SetGoState(GO_STATE_ACTIVE); } + if (GameObject* go = instance->GetGameObject(_deathknightGlowEyePortalGUID)) + { + go->SetGoState(GO_STATE_ACTIVE); + } events.ScheduleEvent(EVENT_KELTHUZAD_WING_TAUNT, 6000); break; default: @@ -946,7 +1028,7 @@ public: { kel->AI()->Talk(SAY_SAPP_DIALOG6); _speakTimer = 0; - if (GameObject* go = instance->GetGameObject(_kelthuzadgateGUID)) + if (GameObject* go = instance->GetGameObject(_kelthuzadGateGUID)) { go->SetGoState(GO_STATE_ACTIVE); } @@ -1004,6 +1086,8 @@ public: return _loathebGateGUID; case DATA_ANUB_GATE: return _anubGateGUID; + case DATA_FAERLINA_WEB: + return _faerlinaWebGUID; case DATA_MAEXXNA_GATE: return _maexxnaGateGUID; case DATA_GOTHIK_ENTER_GATE: @@ -1012,18 +1096,24 @@ public: return _gothikInnerGateGUID; case DATA_GOTHIK_EXIT_GATE: return _gothikExitGateGUID; + case DATA_HORSEMEN_GATE: + return _horsemanGateGUID; + case DATA_THADDIUS_GATE: + return _thaddiusGateGUID; + case DATA_NOTH_ENTRY_GATE: + return _nothEntryGateGUID; case DATA_KELTHUZAD_FLOOR: - return _kelthuzadfloorGUID; + return _kelthuzadFloorGUID; case DATA_KELTHUZAD_GATE: - return _kelthuzadgateGUID; + return _kelthuzadGateGUID; case DATA_KELTHUZAD_PORTAL_1: - return _kelthuzadportal1GUID; + return _kelthuzadPortal1GUID; case DATA_KELTHUZAD_PORTAL_2: - return _kelthuzadportal2GUID; + return _kelthuzadPortal2GUID; case DATA_KELTHUZAD_PORTAL_3: - return _kelthuzadportal3GUID; + return _kelthuzadPortal3GUID; case DATA_KELTHUZAD_PORTAL_4: - return _kelthuzadportal4GUID; + return _kelthuzadPortal4GUID; // NPCs case DATA_THADDIUS_BOSS: @@ -1130,10 +1220,20 @@ public: timer += diff; if (timer >= 5000) { - if (Creature* cr = me->SummonCreature(NPC_LIVING_POISON, *me, TEMPSUMMON_TIMED_DESPAWN, 9000)) + if (Creature* cr = me->SummonCreature(NPC_LIVING_POISON, 3128.59, -3118.81, 293.346, 4.76754, TEMPSUMMON_TIMED_DESPAWN, 15200)) { cr->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); - cr->GetMotionMaster()->MovePoint(0, me->GetPositionX() + 50 * cos(me->GetOrientation()), me->GetPositionY() + 50 * sin(me->GetOrientation()), me->GetPositionZ(), false); + cr->GetMotionMaster()->MovePoint(0, 3130.322, -3156.51, 293.324, false); + } + if (Creature* cr = me->SummonCreature(NPC_LIVING_POISON, *me, TEMPSUMMON_TIMED_DESPAWN, 14800)) + { + cr->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + cr->GetMotionMaster()->MovePoint(0, 3144.779, -3158.416, 293.324, false); + } + if (Creature* cr = me->SummonCreature(NPC_LIVING_POISON, 3175.42, -3134.86, 293.34, 4.284, TEMPSUMMON_TIMED_DESPAWN, 14800)) + { + cr->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + cr->GetMotionMaster()->MovePoint(0, 3158.778, -3164.201, 293.312, false); } timer = 0; } diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index f36f64de8..4a1375d1d 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -29,51 +29,57 @@ enum Encouters enum NXData { - DATA_HEIGAN_ERUPTION = 100, - DATA_HEIGAN_ENTER_GATE = 101, - DATA_LOATHEB_GATE = 102, - DATA_ANUB_GATE = 103, - DATA_MAEXXNA_GATE = 104, - DATA_THADDIUS_BOSS = 105, - DATA_STALAGG_BOSS = 106, - DATA_FEUGEN_BOSS = 107, - DATA_GOTHIK_ENTER_GATE = 108, - DATA_GOTHIK_INNER_GATE = 109, - DATA_GOTHIK_EXIT_GATE = 110, - DATA_LICH_KING_BOSS = 111, - DATA_KELTHUZAD_FLOOR = 112, - DATA_ABOMINATION_KILLED = 113, - DATA_FRENZY_REMOVED = 114, - DATA_CHARGES_CROSSED = 115, - DATA_SPORE_KILLED = 116, - DATA_HUNDRED_CLUB = 117, - DATA_DANCE_FAIL = 118, - DATA_IMMORTAL_FAIL = 119, - DATA_KELTHUZAD_GATE = 120, - DATA_HAD_THADDIUS_GREET = 121, - DATA_KELTHUZAD_PORTAL_1 = 122, - DATA_KELTHUZAD_PORTAL_2 = 123, - DATA_KELTHUZAD_PORTAL_3 = 124, - DATA_KELTHUZAD_PORTAL_4 = 125 + DATA_NOTH_ENTRY_GATE = 100, + DATA_HEIGAN_ERUPTION = 101, + DATA_HEIGAN_ENTER_GATE = 102, + DATA_LOATHEB_GATE = 103, + DATA_ANUB_GATE = 104, + DATA_FAERLINA_WEB = 105, + DATA_MAEXXNA_GATE = 106, + DATA_THADDIUS_BOSS = 107, + DATA_STALAGG_BOSS = 108, + DATA_FEUGEN_BOSS = 109, + DATA_THADDIUS_GATE = 110, + DATA_GOTHIK_ENTER_GATE = 111, + DATA_GOTHIK_INNER_GATE = 112, + DATA_GOTHIK_EXIT_GATE = 113, + DATA_HORSEMEN_GATE = 114, + DATA_LICH_KING_BOSS = 115, + DATA_KELTHUZAD_FLOOR = 116, + DATA_ABOMINATION_KILLED = 117, + DATA_FRENZY_REMOVED = 118, + DATA_CHARGES_CROSSED = 119, + DATA_SPORE_KILLED = 120, + DATA_HUNDRED_CLUB = 121, + DATA_DANCE_FAIL = 122, + DATA_IMMORTAL_FAIL = 123, + DATA_KELTHUZAD_GATE = 124, + DATA_HAD_THADDIUS_GREET = 125, + DATA_KELTHUZAD_PORTAL_1 = 126, + DATA_KELTHUZAD_PORTAL_2 = 127, + DATA_KELTHUZAD_PORTAL_3 = 128, + DATA_KELTHUZAD_PORTAL_4 = 129 }; enum NXGOs { GO_PATCHWERK_GATE = 181123, GO_GLUTH_GATE = 181120, - GO_NOTH_GATE = 181201, - GO_HEIGAN_ENTERANCE_GATE = 181202, + GO_NOTH_ENTRY_GATE = 181200, + GO_NOTH_EXIT_GATE = 181201, + GO_HEIGAN_ENTRY_GATE = 181202, GO_HEIGAN_EXIT_GATE = 181203, GO_LOATHEB_GATE = 181241, GO_ANUB_GATE = 181126, GO_ANUB_NEXT_GATE = 181195, + GO_FAERLINA_WEB = 181235, GO_FAERLINA_GATE = 194022, GO_MAEXXNA_GATE = 181209, GO_THADDIUS_GATE = 181121, GO_GOTHIK_ENTER_GATE = 181124, GO_GOTHIK_INNER_GATE = 181170, GO_GOTHIK_EXIT_GATE = 181125, - GO_HORSEMAN_GATE = 181119, + GO_HORSEMEN_GATE = 181119, GO_SAPPHIRON_GATE = 181225, GO_HORSEMEN_CHEST_10 = 181366, @@ -87,15 +93,22 @@ enum NXGOs GO_KELTHUZAD_PORTAL_3 = 181404, GO_KELTHUZAD_PORTAL_4 = 181405, - GO_DEATHKNIGHT_WING = 181577, + GO_LOATHEB_PORTAL = 181577, GO_THADDIUS_PORTAL = 181576, GO_MAEXXNA_PORTAL = 181575, GO_HORSEMAN_PORTAL = 181578, + // "Glow" effect on center-side portal GO_DEATHKNIGHT_EYE_PORTAL = 181210, GO_PLAGUE_EYE_PORTAL = 181211, GO_SPIDER_EYE_PORTAL = 181212, - GO_ABOM_EYE_PORTAL = 181213 + GO_ABOM_EYE_PORTAL = 181213, + + // "Glow" effect on boss-side portal + GO_ARAC_EYE_RAMP_BOSS = 181233, + GO_PLAG_EYE_RAMP_BOSS = 181231, + GO_MILI_EYE_RAMP_BOSS = 181230, + GO_CONS_EYE_RAMP_BOSS = 181232 }; enum NXNPCs