diff --git a/sql/migrations/20220727031508_world.sql b/sql/migrations/20220727031508_world.sql new file mode 100644 index 000000000..13712dfec --- /dev/null +++ b/sql/migrations/20220727031508_world.sql @@ -0,0 +1,408 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20220727031508'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20220727031508'); +-- Add your query below. + + +-- 237: No Player in 50 Yards +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (237, 56, 0, 50, 0, 0, 1); +-- 8502: TYPE_AVATAR is NOT_STARTED +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8502, 34, 8, 0, 0, 0, 0); +-- 8503: TYPE_AVATAR is IN_PROGRESS +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8503, 34, 8, 1, 0, 0, 0); +-- 8504: TYPE_ETERNAL_FLAME is 1 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8504, 34, 10, 1, 0, 0, 0); +-- 8505: TYPE_ETERNAL_FLAME is 2 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8505, 34, 10, 2, 0, 0, 0); +-- 8506: TYPE_ETERNAL_FLAME is 3 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8506, 34, 10, 3, 0, 0, 0); +-- 8507: TYPE_ETERNAL_FLAME is 4 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8507, 34, 10, 4, 0, 0, 0); +-- 8508: Scripted Map Event 8502 Is Active +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8508, 36, 8502, 0, 0, 0, 0); +-- 8509: Spawned Nightmare Suppressor Count is 0 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8509, 35, 8502, 0, 0, 0, 0); +-- 8510: Spawned Nightmare Suppressor Count is 1 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8510, 35, 8502, 0, 1, 0, 0); +-- 8511: Spawned Nightmare Suppressor Count is 2 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8511, 35, 8502, 0, 2, 0, 0); +-- 8512: Spawned Nightmare Suppressor Count is 3 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8512, 35, 8502, 0, 3, 0, 0); +-- 8440: Source's Entry Is 8440 +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (8440, 16, 8440, 0, 0, 0, 0); + +-- Eternal Flame On Use Scripts +DELETE FROM `gameobject_scripts` WHERE `id`=47561; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47561, 0, 0, 39, 850220, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8503, 'Avatar of Hakkar Fight: Eternal Flame - Start Script'); +DELETE FROM `gameobject_scripts` WHERE `id`=47562; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47562, 0, 0, 39, 850220, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8503, 'Avatar of Hakkar Fight: Eternal Flame - Start Script'); +DELETE FROM `gameobject_scripts` WHERE `id`=47563; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47563, 0, 0, 39, 850220, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8503, 'Avatar of Hakkar Fight: Eternal Flame - Start Script'); +DELETE FROM `gameobject_scripts` WHERE `id`=47564; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(47564, 0, 0, 39, 850220, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8503, 'Avatar of Hakkar Fight: Eternal Flame - Start Script'); +DELETE FROM `generic_scripts` WHERE `id`=850220; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850220, 0, 1, 37, 10, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Eternal Flame - Increment Flames Counter'), +(850220, 0, 2, 39, 850213, 0, 0, 0, 8440, 100, 8, 2, 100, 0, 0, 0, 0, 0, 0, 0, 8504, 'Avatar of Hakkar Fight: Eternal Flame - Start Wave 1 Script'), +(850220, 0, 3, 39, 850215, 0, 0, 0, 8440, 100, 8, 2, 100, 0, 0, 0, 0, 0, 0, 0, 8505, 'Avatar of Hakkar Fight: Eternal Flame - Start Wave 2 Script'), +(850220, 0, 4, 39, 850217, 0, 0, 0, 8440, 100, 8, 2, 100, 0, 0, 0, 0, 0, 0, 0, 8506, 'Avatar of Hakkar Fight: Eternal Flame - Start Wave 3 Script'), +(850220, 0, 5, 39, 850219, 0, 0, 0, 8440, 100, 8, 2, 100, 0, 0, 0, 0, 0, 0, 0, 8507, 'Avatar of Hakkar Fight: Eternal Flame - Start Wave 4 Script'), +(850220, 2, 0, 80, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Eternal Flame - Set Go State to Alternative'); + +-- GameObjects spawned during script. +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `state`, `animprogress`, `spawn_flags`) VALUES +(399162, 148998, 109, -467.622, 290.573, -90.8275, 0.523598, 0, 0, 0.258819, 0.965926, 0, 0, 1, 100, 2), +(399163, 148998, 109, -456.914, 286.912, -90.8275, 1.09956, 0, 0, 0.522498, 0.85264, 0, 0, 1, 100, 2), +(399165, 148998, 109, -451.389, 272.707, -90.8275, 2.49582, 0, 0, 0.948323, 0.317306, 0, 0, 1, 100, 2), +(399168, 148998, 109, -456.843, 261.305, -90.8275, 0.715585, 0, 0, 0.350207, 0.936672, 0, 0, 1, 100, 2), +(399179, 148998, 109, -467.861, 257.761, -90.8275, 3.15906, 0, 0, -0.999962, 0.00873464, 0, 0, 1, 100, 2), +(399182, 148998, 109, -476.698, 260.68, -90.8275, 5.044, 0, 0, -0.580703, 0.814116, 0, 0, 1, 100, 2), +(399184, 148998, 109, -482.814, 271.267, -90.8275, 6.26573, 0, 0, -0.00872612, 0.999962, 0, 0, 1, 100, 2), +(399188, 148998, 109, -477.915, 285.49, -90.8275, 4.31097, 0, 0, -0.833885, 0.551938, 0, 0, 1, 100, 2); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399162) +DELETE FROM `generic_scripts` WHERE `id`=850205; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850205, 0, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850205, 0, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.63, 290.649, -90.7441, 1.22173, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399163) +DELETE FROM `generic_scripts` WHERE `id`=850206; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850206, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850206, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.909, 287.061, -90.7442, 0.977384, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399165) +DELETE FROM `generic_scripts` WHERE `id`=850207; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850207, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850207, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -451.506, 272.673, -90.7442, 3.07178, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399168) +DELETE FROM `generic_scripts` WHERE `id`=850208; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850208, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850208, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.858, 261.533, -90.7442, 0.628319, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399179) +DELETE FROM `generic_scripts` WHERE `id`=850209; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850209, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850209, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.922, 257.83, -90.7441, 3.1765, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399182) +DELETE FROM `generic_scripts` WHERE `id`=850210; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850210, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850210, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -476.667, 260.69, -90.7441, 2.61799, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399184) +DELETE FROM `generic_scripts` WHERE `id`=850211; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850211, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850211, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -482.947, 271.299, -90.7441, 2.79253, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Generic script for GameObject Evil God Summoning Circle (Entry: 148998 Guid: 399188) +DELETE FROM `generic_scripts` WHERE `id`=850212; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850212, 0, 0, 89, 1, 0, 0, 0, 8440, 100, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Evil God Summoning Circle - Play Custom Anim 1'), +(850212, 0, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -477.82, 285.663, -90.7441, 3.76991, 0, 'Avatar of Hakkar Fight: Summon Creature Hakkari Minion'); + +-- Event Start Script +DELETE FROM `event_scripts` WHERE `id`=8502; +INSERT INTO `event_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(8502, 0, 0, 10, 8440, 1200000, 1, 100, 0, 0, 0, 0, 8, 850200, -1, 1, -466.868, 272.312, -90.7441, 3.52557, 8502, 'Avatar of Hakkar Fight: Summon Creature Shade of Hakkar'); + +-- Spawn Script for Shade of Hakkar +DELETE FROM `generic_scripts` WHERE `id`=850200; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850200, 0, 0, 61, 8502, 1200, 0, 0, 0, 0, 0, 12, 0, 850201, 237, 850204, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Start Scripted Map Event'), +(850200, 0, 1, 37, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Set Data Avatar to In Progress'), +(850200, 0, 2, 82, 399188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 3, 82, 399184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 4, 82, 399182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 5, 82, 399179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 6, 82, 399168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 7, 82, 399165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 8, 82, 399163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 0, 9, 82, 399162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Respawn GameObject Evil God Summoning Circle'), +(850200, 1, 0, 80, 1, 0, 0, 0, 149432, 100, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: DOOR1 - Set Go State to GO_STATE_READY'), +(850200, 1, 0, 80, 1, 0, 0, 0, 149433, 100, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: DOOR2 - Set Go State to GO_STATE_READY'), +(850200, 1, 0, 4, 9, 16, 2, 0, 47561, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Eternal Flame 1 - Remove No Interact Flag'), +(850200, 1, 0, 4, 9, 16, 2, 0, 47562, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Eternal Flame 2 - Remove No Interact Flag'), +(850200, 1, 0, 4, 9, 16, 2, 0, 47563, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Eternal Flame 3 - Remove No Interact Flag'), +(850200, 1, 0, 4, 9, 16, 2, 0, 47564, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Eternal Flame 4 - Remove No Interact Flag'), +(850200, 4, 0, 39, 850212, 0, 0, 0, 399188, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850211, 0, 0, 0, 399184, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850210, 0, 0, 0, 399182, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850209, 0, 0, 0, 399179, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850208, 0, 0, 0, 399168, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850207, 0, 0, 0, 399165, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850206, 0, 0, 0, 399163, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'), +(850200, 4, 0, 39, 850205, 0, 0, 0, 399162, 0, 12, 2, 100, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Spawn Mobs at Summoning Circle'); + +-- Success Script for Scripted Map Event +DELETE FROM `generic_scripts` WHERE `id`=850201; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850201, 0, 37, 8, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight Completed: Set Data Avatar to Done'), +(850201, 1, 41, 0, 0, 0, 0, 399162, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399163, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399165, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399168, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399179, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399182, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399184, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'), +(850201, 1, 41, 0, 0, 0, 0, 399188, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Completed: Evil God Summoning Circle - Despawn GameObject'); + +-- Fail Script for Scripted Map Event +DELETE FROM `generic_scripts` WHERE `id`=850204; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850204, 0, 0, 41, 0, 0, 0, 0, 399162, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399163, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399165, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399168, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399179, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399182, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399184, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 41, 0, 0, 0, 0, 399188, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Evil God Summoning Circle - Despawn'), +(850204, 0, 0, 80, 0, 0, 0, 0, 149432, 100, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: DOOR1 - Open Door'), +(850204, 0, 0, 80, 0, 0, 0, 0, 149433, 100, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: DOOR2 - Open Door'), +(850204, 0, 0, 37, 8, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Set Data Avatar to Failed'), +(850204, 0, 0, 37, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Set Data Eternal Flame to 0'), +(850204, 0, 0, 41, 0, 0, 0, 0, 47561, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Despawn Eternal Flame 1'), +(850204, 0, 0, 41, 0, 0, 0, 0, 47562, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Despawn Eternal Flame 2'), +(850204, 0, 0, 41, 0, 0, 0, 0, 47563, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Despawn Eternal Flame 3'), +(850204, 0, 0, 41, 0, 0, 0, 0, 47564, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Despawn Eternal Flame 4'), +(850204, 1, 0, 82, 47561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Spawn Eternal Flame 1'), +(850204, 1, 0, 82, 47562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Spawn Eternal Flame 2'), +(850204, 1, 0, 82, 47563, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Spawn Eternal Flame 3'), +(850204, 1, 0, 82, 47564, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Spawn Eternal Flame 4'), +(850204, 1, 1, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Failed: Shade of Hakkar - Despawn'); + +-- Summon script for creatures. +DELETE FROM `generic_scripts` WHERE `id`=850202; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850202, 0, 0, 63, 8502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 850203, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Add Creature to Scripted Map Event'); + +-- Script to despawn creatures on event ending. +DELETE FROM `generic_scripts` WHERE `id`=850203; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850203, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fight: Despawn Creature'); + +-- First Brazier Script +DELETE FROM `generic_scripts` WHERE `id`=850213; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850213, 0, 16, 5867, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Shade of Hakkar - Play Sound A_Avatar Of Hakkar Brazier01'), +(850213, 0, 15, 12639, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Shade of Hakkar - Cast Spell Summon Hakkar'), +(850213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4543, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Shade of Hakkar - Say Text'), +(850213, 46, 89, 1, 0, 0, 0, 399168, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 46, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.858, 261.533, -90.7442, 0.628319, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 51, 89, 1, 0, 0, 0, 399165, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 52, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -451.506, 272.673, -90.7442, 3.07178, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 57, 89, 1, 0, 0, 0, 399163, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 57, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.909, 287.061, -90.7442, 0.977384, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 62, 89, 1, 0, 0, 0, 399184, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 62, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -482.947, 271.299, -90.7441, 2.79253, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 67, 89, 1, 0, 0, 0, 399188, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 67, 89, 1, 0, 0, 0, 399182, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 67, 89, 1, 0, 0, 0, 399179, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 68, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.922, 257.83, -90.7441, 3.1765, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 68, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -477.82, 285.663, -90.7441, 3.76991, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 68, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -476.667, 260.69, -90.7441, 2.61799, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'), +(850213, 72, 89, 1, 0, 0, 0, 399162, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar First Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850213, 73, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.63, 290.649, -90.7441, 1.22173, 0, 'Avatar of Hakkar First Brazier: Summon Creature Hakkari Minion'); + +-- Second Brazier Script +DELETE FROM `generic_scripts` WHERE `id`=850215; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850215, 0, 89, 1, 0, 0, 0, 399168, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 0, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.858, 261.533, -90.7442, 0.628319, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 1, 16, 5868, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Shade of Hakkar - Play Sound A_Avatar Of Hakkar Brazier02'), +(850215, 1, 15, 12639, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Shade of Hakkar - Cast Spell Summon Hakkar'), +(850215, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6252, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Shade of Hakkar - Say Text'), +(850215, 10, 89, 1, 0, 0, 0, 399165, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 10, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -451.506, 272.673, -90.7442, 3.07178, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 26, 89, 1, 0, 0, 0, 399182, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 26, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -476.667, 260.69, -90.7441, 2.61799, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 31, 89, 1, 0, 0, 0, 399179, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 31, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.922, 257.83, -90.7441, 3.1765, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 36, 89, 1, 0, 0, 0, 399188, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 36, 89, 1, 0, 0, 0, 399163, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 36, 89, 1, 0, 0, 0, 399184, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 37, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -477.82, 285.663, -90.7441, 3.76991, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 37, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -482.947, 271.299, -90.7441, 2.79253, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 37, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.909, 287.061, -90.7442, 0.977384, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 52, 89, 1, 0, 0, 0, 399162, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 53, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.63, 290.649, -90.7441, 1.22173, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 63, 89, 1, 0, 0, 0, 399168, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 63, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.858, 261.533, -90.7442, 0.628319, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'), +(850215, 73, 89, 1, 0, 0, 0, 399165, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Second Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850215, 74, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -451.506, 272.673, -90.7442, 3.07178, 0, 'Avatar of Hakkar Second Brazier: Summon Creature Hakkari Minion'); + +-- Third Brazier Script +DELETE FROM `generic_scripts` WHERE `id`=850217; +INSERT INTO `generic_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850217, 0, 16, 5869, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Shade of Hakkar - Play Sound A_Avatar Of Hakkar Brazier03'), +(850217, 0, 15, 12639, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Shade of Hakkar - Cast Spell Summon Hakkar'), +(850217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6253, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Shade of Hakkar - Say Text'), +(850217, 7, 89, 1, 0, 0, 0, 399182, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 7, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -476.667, 260.69, -90.7441, 2.61799, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 12, 89, 1, 0, 0, 0, 399179, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 12, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.922, 257.83, -90.7441, 3.1765, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 17, 89, 1, 0, 0, 0, 399184, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 17, 89, 1, 0, 0, 0, 399163, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 18, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -482.947, 271.299, -90.7441, 2.79253, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 18, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.909, 287.061, -90.7442, 0.977384, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 23, 89, 1, 0, 0, 0, 399162, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 23, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.63, 290.649, -90.7441, 1.22173, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 28, 89, 1, 0, 0, 0, 399188, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 28, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -477.82, 285.663, -90.7441, 3.76991, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 49, 89, 1, 0, 0, 0, 399168, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 49, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -456.858, 261.533, -90.7442, 0.628319, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 54, 89, 1, 0, 0, 0, 399165, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 55, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -451.506, 272.673, -90.7442, 3.07178, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 65, 89, 1, 0, 0, 0, 399182, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 65, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -476.667, 260.69, -90.7441, 2.61799, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 70, 89, 1, 0, 0, 0, 399179, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 70, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -467.922, 257.83, -90.7441, 3.1765, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'), +(850217, 75, 89, 1, 0, 0, 0, 399184, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Third Brazier: Evil God Summoning Circle - Play Custom Anim 1'), +(850217, 76, 10, 8437, 300000, 0, 0, 0, 0, 0, 0, 0, 850202, -1, 1, -482.947, 271.299, -90.7441, 2.79253, 0, 'Avatar of Hakkar Third Brazier: Summon Creature Hakkari Minion'); + +-- Fourth Brazier Script +DELETE FROM `generic_scripts` WHERE `id`=850219; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850219, 0, 0, 16, 5870, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Play Sound A_Avatar Of Hakkar Brazier04'), +(850219, 0, 1, 15, 12639, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Cast Spell Summon Hakkar'), +(850219, 0, 2, 27, 8443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Update Entry to Avatar of Hakkar'), +(850219, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4545, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Say Text'), +(850219, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6254, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Say Text'), +(850219, 1, 0, 15, 12948, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Cast Spell Avatar of Hakkar is summoned'), +(850219, 1, 1, 62, 8502, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Complete Scripted Map Event'), +(850219, 3, 0, 16, 5871, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Play Sound A_Avatar Of Hakkar Aggro01'), +(850219, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4546, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Say Text'), +(850219, 5, 0, 20, 1, 1, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 45, 0, 0, 0, 117, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Move Random'), +(850219, 6, 0, 4, 46, 33554688, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Avatar of Hakkar Fourth Brazier: Shade of Hakkar - Remove Unit Flags'); + +-- Assign condition to check if event is still running on long scripts with delays. +UPDATE `generic_scripts` SET `condition_id`=8508 WHERE `id` IN (850213, 850215, 850217); + +-- Events list for Hakkari Bloodkeeper +DELETE FROM `creature_ai_scripts` WHERE `id` IN (843801, 843802); +DELETE FROM `creature_ai_events` WHERE `creature_id`=8438; +REPLACE INTO `creature_spells` (`entry`, `name`, `spellId_1`, `probability_1`, `castTarget_1`, `targetParam1_1`, `targetParam2_1`, `castFlags_1`, `delayInitialMin_1`, `delayInitialMax_1`, `delayRepeatMin_1`, `delayRepeatMax_1`, `scriptId_1`, `spellId_2`, `probability_2`, `castTarget_2`, `targetParam1_2`, `targetParam2_2`, `castFlags_2`, `delayInitialMin_2`, `delayInitialMax_2`, `delayRepeatMin_2`, `delayRepeatMax_2`, `scriptId_2`, `spellId_3`, `probability_3`, `castTarget_3`, `targetParam1_3`, `targetParam2_3`, `castFlags_3`, `delayInitialMin_3`, `delayInitialMax_3`, `delayRepeatMin_3`, `delayRepeatMax_3`, `scriptId_3`, `spellId_4`, `probability_4`, `castTarget_4`, `targetParam1_4`, `targetParam2_4`, `castFlags_4`, `delayInitialMin_4`, `delayInitialMax_4`, `delayRepeatMin_4`, `delayRepeatMax_4`, `scriptId_4`, `spellId_5`, `probability_5`, `castTarget_5`, `targetParam1_5`, `targetParam2_5`, `castFlags_5`, `delayInitialMin_5`, `delayInitialMax_5`, `delayRepeatMin_5`, `delayRepeatMax_5`, `scriptId_5`, `spellId_6`, `probability_6`, `castTarget_6`, `targetParam1_6`, `targetParam2_6`, `castFlags_6`, `delayInitialMin_6`, `delayInitialMax_6`, `delayRepeatMin_6`, `delayRepeatMax_6`, `scriptId_6`, `spellId_7`, `probability_7`, `castTarget_7`, `targetParam1_7`, `targetParam2_7`, `castFlags_7`, `delayInitialMin_7`, `delayInitialMax_7`, `delayRepeatMin_7`, `delayRepeatMax_7`, `scriptId_7`, `spellId_8`, `probability_8`, `castTarget_8`, `targetParam1_8`, `targetParam2_8`, `castFlags_8`, `delayInitialMin_8`, `delayInitialMax_8`, `delayRepeatMin_8`, `delayRepeatMax_8`, `scriptId_8`) VALUES (84380, 'Sunken Temple - Hakkari Bloodkeeper', 11671, 100, 4, 0, 0, 32, 0, 4, 0, 4, 0, 12471, 100, 1, 0, 0, 8, 0, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +UPDATE `creature_template` SET `ai_name`='', `spell_list_id`=84380, `movement_type`=1, `spawn_spell_id`=7741 WHERE `entry`=8438; + +-- Events list for Nightmare Suppressor +DELETE FROM `creature_ai_events` WHERE `creature_id`=8497; +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES +(849701, 8497, 0, 29, 0, 100, 0, 8, 1, 0, 0, 849701, 0, 0, 'Nightmare Suppressor - Cast Spell Suppression on Reaching Point'), +(849702, 8497, 8512, 6, 0, 100, 0, 0, 0, 0, 0, 849702, 0, 0, 'Nightmare Suppressor - Reset Event Data on Death'); +DELETE FROM `creature_ai_scripts` WHERE `id`=849701; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(849701, 0, 0, 15, 12623, 0, 0, 0, 8440, 30, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Cast Spell Suppression'), +(849701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4547, 0, 0, 0, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Say Text'); +DELETE FROM `creature_ai_scripts` WHERE `id`=849702; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(849702, 0, 0, 65, 8502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Set Event Data to 0'); +UPDATE `creature_template` SET `ai_name`='EventAI', `movement_type`=0 WHERE `entry`=8497; + +-- Nightmare Suppressor 1 Spawn Script +DELETE FROM `generic_scripts` WHERE `id`=850214; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850214, 0, 0, 63, 8502, 0, 0, 0, 0, 0, 0, 0, 0, 850203, 0, 850203, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Add Creature to Scripted Map Event'), +(850214, 0, 0, 65, 8502, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Set Event Data to 1'), +(850214, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4529, 4530, 4531, 4532, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Say Text'), +(850214, 2, 0, 3, 0, 0, 3, 2, 0, 0, 0, 0, 1, 0, 0, 0, -479.385, 266.634, -90.5644, 0, 0, 'Nightmare Suppressor - Move'); + +-- Nightmare Suppressor 2 Spawn Script +DELETE FROM `generic_scripts` WHERE `id`=850216; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850216, 0, 0, 63, 8502, 0, 0, 0, 0, 0, 0, 0, 0, 850203, 0, 850203, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Add Creature to Scripted Map Event'), +(850216, 0, 0, 65, 8502, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Set Event Data to 2'), +(850216, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4529, 4530, 4531, 4532, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Say Text'), +(850216, 2, 0, 3, 0, 0, 3, 2, 0, 0, 0, 0, 1, 0, 0, 0, -454.664, 267.629, -90.7051, 0, 0, 'Nightmare Suppressor - Move'); + +-- Nightmare Suppressor 3 Spawn Script +DELETE FROM `generic_scripts` WHERE `id`=850218; +INSERT INTO `generic_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(850218, 0, 0, 63, 8502, 0, 0, 0, 0, 0, 0, 0, 0, 850203, 0, 850203, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Add Creature to Scripted Map Event'), +(850218, 0, 0, 65, 8502, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Set Event Data to 3'), +(850218, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4529, 4530, 4531, 4532, 0, 0, 0, 0, 0, 'Nightmare Suppressor - Say Text'), +(850218, 2, 0, 3, 0, 0, 3, 2, 0, 0, 0, 0, 1, 0, 0, 0, -457.903, 285.8, -90.6785, 0, 0, 'Nightmare Suppressor - Move'); + +-- Events list for Shade of Hakkar +DELETE FROM `creature_ai_events` WHERE `creature_id`=8440; +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (844001, 8440, 0, 1, 7, 100, 1, 3000, 3000, 3000, 3000, 844001, 0, 0, 'Shade of Hakkar - Fail Event on Hit By Suppression 3 Times'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (844002, 8440, 0, 6, 0, 100, 0, 0, 0, 0, 0, 844002, 0, 0, 'Shade of Hakkar - Open Doors on Death'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (844003, 8440, 0, 7, 0, 100, 0, 0, 0, 0, 0, 844002, 0, 0, 'Shade of Hakkar - Open Doors on Evade'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (844004, 8440, 8440, 1, 0, 100, 1, 60000, 60000, 60000, 110000, 844004, 0, 0, 'Shade of Hakkar - Summon Nightmare Suppressor OOC'); +INSERT INTO `creature_ai_events` (`id`, `creature_id`, `condition_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_script`, `action2_script`, `action3_script`, `comment`) VALUES (844005, 8440, 8440, 1, 0, 100, 1, 4000, 5000, 60000, 110000, 844005, 0, 0, 'Shade of Hakkar - Summon Hakkari Bloodkeeper OOC'); +DELETE FROM `creature_ai_scripts` WHERE `id`=844001; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(844001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4544, 0, 0, 0, 0, 0, 0, 0, 0, 'Shade of Hakkar - Say Text'), +(844001, 0, 0, 62, 8502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Shade of Hakkar - Fail Scripted Map Event'); +DELETE FROM `creature_ai_scripts` WHERE `id`=844002; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(844002, 0, 0, 80, 0, 0, 0, 0, 149432, 100, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Shade of Hakkar - Open Door 1'), +(844002, 0, 0, 80, 0, 0, 0, 0, 149433, 100, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Shade of Hakkar - Open Door 2'); +DELETE FROM `creature_ai_scripts` WHERE `id`=844004; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(844004, 0, 0, 10, 8497, 300000, 0, 0, 0, 0, 0, 0, 0, 850214, -1, 1, -511.953, 277.613, -90.7445, 6.24828, 8509, 'Shade of Hakkar - Summon Creature Nightmare Suppressor 1'), +(844004, 0, 0, 10, 8497, 300000, 0, 0, 0, 0, 0, 0, 0, 850216, -1, 1, -420.937, 279.458, -90.7446, 3.1765, 8510, 'Shade of Hakkar - Summon Creature Nightmare Suppressor 2'), +(844004, 0, 0, 10, 8497, 300000, 0, 0, 0, 0, 0, 0, 0, 850218, -1, 1, -419.751, 286.416, -90.7447, 3.07178, 8511, 'Shade of Hakkar - Summon Creature Nightmare Suppressor 3'); +DELETE FROM `creature_ai_scripts` WHERE `id`=844005; +INSERT INTO `creature_ai_scripts` (`id`, `delay`, `priority`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `target_param1`, `target_param2`, `target_type`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `condition_id`, `comments`) VALUES +(844005, 0, 0, 10, 8438, 300000, 4, 100, 148998, 50, 27, 6, 8, 0, -1, 1, 0, 0, 0, 0, 0, 'Shade of Hakkar - Summon Hakkari Bloodkeeper on Random Summoning Circle'); +REPLACE INTO `creature_spells` (`entry`, `name`, `spellId_1`, `probability_1`, `castTarget_1`, `targetParam1_1`, `targetParam2_1`, `castFlags_1`, `delayInitialMin_1`, `delayInitialMax_1`, `delayRepeatMin_1`, `delayRepeatMax_1`, `scriptId_1`, `spellId_2`, `probability_2`, `castTarget_2`, `targetParam1_2`, `targetParam2_2`, `castFlags_2`, `delayInitialMin_2`, `delayInitialMax_2`, `delayRepeatMin_2`, `delayRepeatMax_2`, `scriptId_2`, `spellId_3`, `probability_3`, `castTarget_3`, `targetParam1_3`, `targetParam2_3`, `castFlags_3`, `delayInitialMin_3`, `delayInitialMax_3`, `delayRepeatMin_3`, `delayRepeatMax_3`, `scriptId_3`, `spellId_4`, `probability_4`, `castTarget_4`, `targetParam1_4`, `targetParam2_4`, `castFlags_4`, `delayInitialMin_4`, `delayInitialMax_4`, `delayRepeatMin_4`, `delayRepeatMax_4`, `scriptId_4`, `spellId_5`, `probability_5`, `castTarget_5`, `targetParam1_5`, `targetParam2_5`, `castFlags_5`, `delayInitialMin_5`, `delayInitialMax_5`, `delayRepeatMin_5`, `delayRepeatMax_5`, `scriptId_5`, `spellId_6`, `probability_6`, `castTarget_6`, `targetParam1_6`, `targetParam2_6`, `castFlags_6`, `delayInitialMin_6`, `delayInitialMax_6`, `delayRepeatMin_6`, `delayRepeatMax_6`, `scriptId_6`, `spellId_7`, `probability_7`, `castTarget_7`, `targetParam1_7`, `targetParam2_7`, `castFlags_7`, `delayInitialMin_7`, `delayInitialMax_7`, `delayRepeatMin_7`, `delayRepeatMax_7`, `scriptId_7`, `spellId_8`, `probability_8`, `castTarget_8`, `targetParam1_8`, `targetParam2_8`, `castFlags_8`, `delayInitialMin_8`, `delayInitialMax_8`, `delayRepeatMin_8`, `delayRepeatMax_8`, `scriptId_8`) VALUES (84430, 'Sunken Temple - Avatar of Hakkar', 6607, 100, 1, 0, 0, 32, 9, 18, 9, 18, 0, 12888, 100, 1, 0, 0, 32, 9, 10, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +UPDATE `creature_template` SET `ai_name`='EventAI', `script_name`='', `spell_list_id`=84430, `auras`='9617', `unit_flags`=33554752 WHERE `entry`=8440; + +-- Events list for Avatar of Hakkar +DELETE FROM `creature_ai_scripts` WHERE `id` IN (844301, 844302, 844303); +DELETE FROM `creature_ai_events` WHERE `creature_id`=8443; +UPDATE `creature_template` SET `ai_name`='', `spell_list_id`=84430, `unit_flags`=33554752 WHERE `entry`=8443; + +-- Remove hardcoded script from Eternal Flame. +UPDATE `gameobject_template` SET `flags`=16, `script_name`='' WHERE `entry` IN (148418, 148419, 148420, 148421); + +-- Type: Yell Text: No! We cannot allow you to summon Hakkar! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4529; +-- Type: Yell Text: You must not summon our god! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4530; +-- Type: Yell Text: No! You must not do this! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4531; +-- Type: Yell Text: Stop! Infidels! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4532; +-- Type: Yell Text: I DRAW CLOSER TO THIS WORLD! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4543; +-- Type: Yell Text: NOOOO!! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4544; +-- Type: Yell Text: I AM HERE! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4545; +-- Type: Yell Text: DIE, MORTALS! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=4546; +-- Type: Yell Text: I TASTE THE BLOOD OF LIFE! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=6252; +-- Type: Yell Text: I AM NEAR! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=6253; +-- Type: Yell Text: HAKKAR LIVES! +UPDATE `broadcast_text` SET `chat_type`=1 WHERE `entry`=6254; + +-- Remove texts from custom table. +DELETE FROM `script_texts` WHERE `entry` IN (-1109006, -1109007, -1109008, -1109009, -1109010); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/game/Conditions.cpp b/src/game/Conditions.cpp index ae6998403..2852bdc5e 100644 --- a/src/game/Conditions.cpp +++ b/src/game/Conditions.cpp @@ -105,6 +105,7 @@ uint8 const ConditionTargetsInternal[] = CONDITION_REQ_NONE, // 53 CONDITION_REQ_TARGET_WORLDOBJECT, // 54 CONDITION_REQ_TARGET_GAMEOBJECT, // 55 + CONDITION_REQ_TARGET_UNIT, // 56 }; // Starts from 4th element so that -3 will return first element. @@ -596,6 +597,19 @@ bool inline ConditionEntry::Evaluate(WorldObject const* target, Map const* map, { return target->ToGameObject()->GetGoState() == m_value1; } + case CONDITION_NEARBY_PLAYER: + { + switch (m_value1) + { + case 0: + return (bool)target->ToUnit()->FindNearestPlayer(m_value2); + case 1: + return (bool)target->ToUnit()->FindNearestHostilePlayer(m_value2); + case 2: + return (bool)target->ToUnit()->FindNearestFriendlyPlayer(m_value2); + } + return false; + } } return false; } @@ -1220,6 +1234,20 @@ bool ConditionEntry::IsValid() } break; } + case CONDITION_NEARBY_PLAYER: + { + if (m_value1 < 0 || m_value1 > 2) + { + sLog.outErrorDb("CONDITION_NEARBY_PLAYER (entry %u, type %u) has invalid value1 %u, skipped", m_entry, m_condition, m_value1); + return false; + } + if (m_value2 <= 0) + { + sLog.outErrorDb("CONDITION_NEARBY_PLAYER (entry %u, type %d) does not have max distance set in value2, skipped", m_entry, m_condition); + return false; + } + break; + } case CONDITION_NONE: case CONDITION_INSTANCE_SCRIPT: case CONDITION_ACTIVE_HOLIDAY: diff --git a/src/game/Conditions.h b/src/game/Conditions.h index 9895b54e2..6ed4fe210 100644 --- a/src/game/Conditions.h +++ b/src/game/Conditions.h @@ -246,6 +246,10 @@ enum ConditionType CONDITION_OBJECT_GO_STATE = 55, // Checks the current go state of a GameObject. // Requirement: GameObject Target // Value1: go_state (see enum GOState) + CONDITION_NEARBY_PLAYER = 56, // Checks if there is a player nearby. + // Requirement: Unit Target + // Value1: 0, 1, or 2 (0: any, 1: hostile, 2: friendly) + // Value2: search_radius }; enum ConditionFlags diff --git a/src/game/Maps/GridNotifiers.h b/src/game/Maps/GridNotifiers.h index cbf5c087d..c9e76ba23 100644 --- a/src/game/Maps/GridNotifiers.h +++ b/src/game/Maps/GridNotifiers.h @@ -1298,6 +1298,48 @@ namespace MaNGOS uint32 i_spellId; }; + class NearestAlivePlayerCheck + { + public: + NearestAlivePlayerCheck(WorldObject const* source, float dist) : me(source), m_range(dist) {} + bool operator() (Player* pPlayer) + { + if (me == pPlayer) + return false; + + if (pPlayer->IsGameMaster()) + return false; + + if (!pPlayer->IsAlive()) + return false; + + if (!me->IsWithinDistInMap(pPlayer, m_range)) + return false; + + m_range = me->GetDistance(pPlayer); // use found unit range as new range limit for next check + return true; + } + + private: + WorldObject const* me; + float m_range; + }; + + class PlayerAtMinimumRangeAway + { + public: + PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : pUnit(unit), fRange(fMinRange) {} + bool operator() (Player* pPlayer) + { + //No threat list check, must be done explicit if expected to be in combat with creature + return !pPlayer->IsGameMaster() && pPlayer->IsAlive() && !pUnit->IsWithinDist(pPlayer,fRange,false); + } + + private: + Unit const* pUnit; + float fRange; + }; + // Prepare using Builder localized packets with caching and send to player template class LocalizedPacketDo @@ -1419,21 +1461,6 @@ namespace MaNGOS float m_fRange; }; - class PlayerAtMinimumRangeAway - { - public: - PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : pUnit(unit), fRange(fMinRange) {} - bool operator() (Player* pPlayer) - { - //No threat list check, must be done explicit if expected to be in combat with creature - return !pPlayer->IsGameMaster() && pPlayer->IsAlive() && !pUnit->IsWithinDist(pPlayer,fRange,false); - } - - private: - Unit const* pUnit; - float fRange; - }; - class NearestUnitCheck { public: diff --git a/src/game/Maps/GridSearchers.h b/src/game/Maps/GridSearchers.h index 2caa70a72..b6cedee13 100644 --- a/src/game/Maps/GridSearchers.h +++ b/src/game/Maps/GridSearchers.h @@ -99,24 +99,6 @@ class AllCreaturesOfEntryInRangeCheck uint32 m_uiEntry; float m_fRange; }; - -class PlayerAtMinimumRangeAway -{ - public: - PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : pUnit(unit), fRange(fMinRange) {} - bool operator() (Player* pPlayer) - { - //No threat list check, must be done explicit if expected to be in combat with creature - if (!pPlayer->IsGameMaster() && pPlayer->IsAlive() && !pUnit->IsWithinDist(pPlayer,fRange,false)) - return true; - - return false; - } - - private: - Unit const* pUnit; - float fRange; -}; */ #endif diff --git a/src/game/Maps/Map.h b/src/game/Maps/Map.h index f719a6938..343c69cc1 100644 --- a/src/game/Maps/Map.h +++ b/src/game/Maps/Map.h @@ -849,6 +849,7 @@ class Map : public GridRefManager bool ScriptCommand_SetPvP(ScriptInfo const& script, WorldObject* source, WorldObject* target); bool ScriptCommand_ResetDoorOrButton(ScriptInfo const& script, WorldObject* source, WorldObject* target); bool ScriptCommand_SetCommandState(ScriptInfo const& script, WorldObject* source, WorldObject* target); + bool ScriptCommand_PlayCustomAnim(ScriptInfo const& script, WorldObject* source, WorldObject* target); // Add any new script command functions to the array. ScriptCommandFunction const m_ScriptCommands[SCRIPT_COMMAND_MAX] = @@ -942,6 +943,7 @@ class Map : public GridRefManager &Map::ScriptCommand_SetPvP, // 86 &Map::ScriptCommand_ResetDoorOrButton, // 87 &Map::ScriptCommand_SetCommandState, // 88 + &Map::ScriptCommand_PlayCustomAnim, // 89 }; public: diff --git a/src/game/Maps/ScriptCommands.cpp b/src/game/Maps/ScriptCommands.cpp index f7a387d28..5d0c90737 100644 --- a/src/game/Maps/ScriptCommands.cpp +++ b/src/game/Maps/ScriptCommands.cpp @@ -2288,7 +2288,7 @@ bool Map::ScriptCommand_LoadGameObject(ScriptInfo const& script, WorldObject* so return ShouldAbortScript(script); // already spawned GameObject* pGameobject = GameObject::CreateGameObject(pGameObjectData->id); - if (!pGameobject->LoadFromDB(script.loadGo.goGuid, this)) + if (!pGameobject->LoadFromDB(script.loadGo.goGuid, this, true)) delete pGameobject; else Add(pGameobject); @@ -2399,4 +2399,19 @@ bool Map::ScriptCommand_SetCommandState(ScriptInfo const& script, WorldObject* s pSource->HandlePetCommand((CommandStates)script.setCommandState.commandState, ToUnit(target)); return false; -} \ No newline at end of file +} + +// SCRIPT_COMMAND_PLAY_CUSTOM_ANIM (89) +bool Map::ScriptCommand_PlayCustomAnim(ScriptInfo const& script, WorldObject* source, WorldObject* target) +{ + GameObject* pGo = nullptr; + + if (!((pGo = ToGameObject(target)) || (pGo = ToGameObject(source)))) + { + sLog.outError("SCRIPT_COMMAND_PLAY_CUSTOM_ANIM (script id %u) call for a nullptr gameobject, skipping.", script.id); + return ShouldAbortScript(script); + } + + pGo->SendGameObjectCustomAnim(script.playCustomAnim.animId); + return false; +} diff --git a/src/game/Maps/ScriptCommands.h b/src/game/Maps/ScriptCommands.h index c8ddf7ae7..0c9cc4ac6 100644 --- a/src/game/Maps/ScriptCommands.h +++ b/src/game/Maps/ScriptCommands.h @@ -324,6 +324,8 @@ enum eScriptCommand SCRIPT_COMMAND_RESET_DOOR_OR_BUTTON = 87, // source = GameObject SCRIPT_COMMAND_SET_COMMAND_STATE = 88, // source = Creature // datalong = command_state (see enum CommandStates) + SCRIPT_COMMAND_PLAY_CUSTOM_ANIM = 89, // source = GameObject + // datalong = anim_id SCRIPT_COMMAND_MAX, @@ -1044,6 +1046,11 @@ struct ScriptInfo uint32 commandState; // datalong } setCommandState; + struct // SCRIPT_COMMAND_PLAY_CUSTOM_ANIM (89) + { + uint32 animId; // datalong + } playCustomAnim; + struct { uint32 data[9]; diff --git a/src/game/Objects/Creature.cpp b/src/game/Objects/Creature.cpp index 7af66cddf..919e812ff 100644 --- a/src/game/Objects/Creature.cpp +++ b/src/game/Objects/Creature.cpp @@ -1714,7 +1714,7 @@ bool Creature::CreateFromProto(uint32 guidlow, CreatureInfo const* cinfo, uint32 return UpdateEntry(cinfo->entry, data, eventData, false); } -bool Creature::LoadFromDB(uint32 guidlow, Map* map) +bool Creature::LoadFromDB(uint32 guidlow, Map* map, bool force) { CreatureData const* data = sObjectMgr.GetCreatureData(guidlow); @@ -1723,7 +1723,8 @@ bool Creature::LoadFromDB(uint32 guidlow, Map* map) sLog.outErrorDb("Creature (GUID: %u) not found in table `creature`, can't load. ", guidlow); return false; } - if (data->spawn_flags & SPAWN_FLAG_DISABLED) + + if (!force && (data->spawn_flags & SPAWN_FLAG_DISABLED)) return false; uint32 const creatureId = data->ChooseCreatureId(); diff --git a/src/game/Objects/Creature.h b/src/game/Objects/Creature.h index ba6106822..6c7c6397f 100644 --- a/src/game/Objects/Creature.h +++ b/src/game/Objects/Creature.h @@ -265,7 +265,7 @@ class Creature : public Unit void SetDeathState(DeathState s) override; // overwrite virtual Unit::SetDeathState bool FallGround(); - bool LoadFromDB(uint32 guid, Map* map); + bool LoadFromDB(uint32 guid, Map* map, bool force = false); void SaveToDB(); // overwrited in Pet virtual void SaveToDB(uint32 mapid); diff --git a/src/game/Objects/GameObject.cpp b/src/game/Objects/GameObject.cpp index 57be314cc..709d9ce2d 100644 --- a/src/game/Objects/GameObject.cpp +++ b/src/game/Objects/GameObject.cpp @@ -913,7 +913,7 @@ void GameObject::SaveToDB(uint32 mapid) WorldDatabase.CommitTransaction(); } -bool GameObject::LoadFromDB(uint32 guid, Map* map) +bool GameObject::LoadFromDB(uint32 guid, Map* map, bool force) { GameObjectData const* data = sObjectMgr.GetGOData(guid); @@ -922,9 +922,9 @@ bool GameObject::LoadFromDB(uint32 guid, Map* map) sLog.outErrorDb("Gameobject (GUID: %u) not found in table `gameobject`, can't load. ", guid); return false; } - if (data->spawn_flags & SPAWN_FLAG_DISABLED) - return false; + if (!force && (data->spawn_flags & SPAWN_FLAG_DISABLED)) + return false; uint32 entry = data->id; //uint32 map_id = data->position.mapId; // already used before call @@ -1629,7 +1629,7 @@ void GameObject::Use(Unit* user) uint32 time_to_restore = info->GetAutoCloseTime(); // this appear to be ok, however others exist in addition to this that should have custom (ex: 190510, 188692, 187389) - if (time_to_restore && info->goober.customAnim) + if (HasCustomAnim() || time_to_restore && info->goober.customAnim) SendGameObjectCustomAnim(); else SetGoState(GO_STATE_ACTIVE); @@ -2406,6 +2406,7 @@ bool GameObject::HasCustomAnim() const { switch (GetDisplayId()) { + case 2570: // eternal flame case 3071: // freezing trap case 3072: // explosive trap case 3073: // frost trap, fixed trap diff --git a/src/game/Objects/GameObject.h b/src/game/Objects/GameObject.h index f00100746..97c661ea8 100644 --- a/src/game/Objects/GameObject.h +++ b/src/game/Objects/GameObject.h @@ -63,7 +63,7 @@ class GameObject : public SpellCaster void SaveToDB(); void SaveToDB(uint32 mapid); - bool LoadFromDB(uint32 guid, Map* map); + bool LoadFromDB(uint32 guid, Map* map, bool force = false); void DeleteFromDB() const; #if SUPPORTED_CLIENT_BUILD > CLIENT_BUILD_1_4_2 diff --git a/src/game/Objects/Object.cpp b/src/game/Objects/Object.cpp index 996fb280b..82232ea1b 100644 --- a/src/game/Objects/Object.cpp +++ b/src/game/Objects/Object.cpp @@ -2949,8 +2949,8 @@ GameObject* WorldObject::FindRandomGameObject(uint32 entry, float range) const Player* WorldObject::FindNearestPlayer(float range) const { Player* target = nullptr; - MaNGOS::NearestUnitCheck check(this, range); - MaNGOS::PlayerLastSearcher searcher(target, check); + MaNGOS::NearestAlivePlayerCheck check(this, range); + MaNGOS::PlayerLastSearcher searcher(target, check); Cell::VisitWorldObjects(this, searcher, range); return target; diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index dfcac2c21..93afb2ca6 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -1181,6 +1181,16 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename) } break; } + case SCRIPT_COMMAND_PLAY_CUSTOM_ANIM: + { + if (tmp.playCustomAnim.animId > 3) + { + sLog.outErrorDb("Table `%s` using invalid anim id in datalong (%u) in SCRIPT_COMMAND_PLAY_CUSTOM_ANIM for script id %u", + tablename, tmp.setGoState.state, tmp.id); + continue; + } + break; + } } if (scripts.find(tmp.id) == scripts.end()) diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index 236c5de27..5300f17d7 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -1713,6 +1713,22 @@ void Aura::HandleAuraDummy(bool apply, bool Real) } return; } + case 12623: // Suppression + { + if (Creature* pCreature = target->ToCreature()) + { + // Using script command to avoid including EventAI header. + ScriptInfo si; + si.command = SCRIPT_COMMAND_SET_PHASE; + si.setPhase.phase = 1; + if (apply) + si.setPhase.mode = SO_SETPHASE_INCREMENT; + else + si.setPhase.mode = SO_SETPHASE_DECREMENT; + pCreature->GetMap()->ScriptCommandStartDirect(si, pCreature, pCreature); + } + return; + } case 13139: // net-o-matic { // root to self part of (root_target->charge->root_self sequence diff --git a/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/instance_sunken_temple.cpp b/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/instance_sunken_temple.cpp index ef08585f3..012bd0734 100644 --- a/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/instance_sunken_temple.cpp +++ b/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/instance_sunken_temple.cpp @@ -56,8 +56,6 @@ struct instance_sunken_temple : public ScriptedInstance uint64 m_uiShadeHakkarGUID; uint64 m_uiAtalarionGUID; uint64 m_uiJammalanBarrierGUID; - uint64 m_uiHakkarDoor1GUID; - uint64 m_uiHakkarDoor2GUID; uint64 m_uiIdolHakkarGUID; uint64 m_uiShadeEranikusGUID; uint64 m_uiJammalanGUID; @@ -68,19 +66,15 @@ struct instance_sunken_temple : public ScriptedInstance uint32 RemoveTimer; - uint64 m_luiFlameGUIDs[4]; uint64 m_luiAtalaiStatueGUIDs[6]; uint64 m_luiBigLightGUIDs[6]; - uint64 m_luiCircleGUIDs[8]; void Initialize() override { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_luiProtectorGUIDs, 0, sizeof(m_luiProtectorGUIDs)); - memset(&m_luiFlameGUIDs, 0, sizeof(m_luiFlameGUIDs)); memset(&m_luiAtalaiStatueGUIDs, 0, sizeof(m_luiAtalaiStatueGUIDs)); memset(&m_luiBigLightGUIDs, 0, sizeof(m_luiBigLightGUIDs)); - memset(&m_luiCircleGUIDs, 0, sizeof(m_luiCircleGUIDs)); m_uiStatueCounter = 0; m_uiCurrentStatueVar = 0; @@ -90,8 +84,6 @@ struct instance_sunken_temple : public ScriptedInstance m_bIsFirstHakkarWave = false; m_uiShadeHakkarGUID = 0; m_uiAtalarionGUID = 0; - m_uiHakkarDoor1GUID = 0; - m_uiHakkarDoor2GUID = 0; m_uiJammalanBarrierGUID = 0; m_uiIdolHakkarGUID = 0; m_uiShadeEranikusGUID = 0; @@ -164,30 +156,8 @@ struct instance_sunken_temple : public ScriptedInstance return true; } - void DoUpdateFlamesFlags(bool bRestore) - { - for (uint64 guid : m_luiFlameGUIDs) - { - if (GameObject* pFlame = instance->GetGameObject(guid)) - { - // Remove the flags of the flames for Hakkar event - if (!bRestore) - { - pFlame->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - pFlame->SetGoState(GO_STATE_READY); - } - else - { - pFlame->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - pFlame->SetGoState(GO_STATE_ACTIVE); - } - } - } - } - void OnObjectCreate(GameObject* pGo) override { - int countCircle = 0; int countLight = 0; switch (pGo->GetEntry()) { @@ -199,12 +169,6 @@ struct instance_sunken_temple : public ScriptedInstance case GO_IDOL_OF_HAKKAR: m_uiIdolHakkarGUID = pGo->GetGUID(); break; - case GO_HAKKAR_DOOR_1: - m_uiHakkarDoor1GUID = pGo->GetGUID(); - break; - case GO_HAKKAR_DOOR_2: - m_uiHakkarDoor2GUID = pGo->GetGUID(); - break; case GO_ATALAI_STATUE_1: m_luiAtalaiStatueGUIDs[0] = pGo->GetGUID(); break; @@ -231,27 +195,6 @@ struct instance_sunken_temple : public ScriptedInstance } m_luiBigLightGUIDs[countLight] = pGo->GetGUID(); break; - case GO_EVIL_CIRCLE: - for (uint64 guid : m_luiCircleGUIDs) - { - if (guid != 0 && guid != pGo->GetGUID()) - ++countCircle; - } - m_luiCircleGUIDs[countCircle] = pGo->GetGUID(); - break; - - case GO_ETERNAL_FLAME_1: - m_luiFlameGUIDs[0] = pGo->GetGUID(); - break; - case GO_ETERNAL_FLAME_2: - m_luiFlameGUIDs[1] = pGo->GetGUID(); - break; - case GO_ETERNAL_FLAME_3: - m_luiFlameGUIDs[2] = pGo->GetGUID(); - break; - case GO_ETERNAL_FLAME_4: - m_luiFlameGUIDs[3] = pGo->GetGUID(); - break; default: break; } @@ -348,24 +291,6 @@ struct instance_sunken_temple : public ScriptedInstance case NPC_SHADE_OF_ERANIKUS: pCreature->SetStandState(UNIT_STAND_STATE_STAND); break; - case NPC_AVATAR_OF_HAKKAR: - DoScriptText(SAY_AVATAR_SPAWN, pCreature); - break; - } - } - - void OnCreatureDeath(Creature *pCreature) override - { - if (m_uiShadeHakkarGUID && (pCreature->GetEntry() == NPC_HAKKARI_MINION || pCreature->GetEntry() == NPC_BLOODKEEPER)) - { - if (Creature *shade = GetMap()->GetCreature(m_uiShadeHakkarGUID)) - { - if (!shade->IsAlive() || !shade->AI()) - return; - - if (npc_shade_hakkarAI *ai = dynamic_cast(shade->AI())) - ai->SummonJustDied(pCreature); - } } } @@ -519,62 +444,6 @@ struct instance_sunken_temple : public ScriptedInstance m_auiEncounter[3] = uiData; break; case TYPE_AVATAR: - if (uiData == IN_PROGRESS) - { - // Use combat doors - if (GameObject* pGob = instance->GetGameObject(m_uiHakkarDoor1GUID)) - if (pGob->GetGoState() == GO_STATE_ACTIVE) // Ouverte - DoUseDoorOrButton(m_uiHakkarDoor1GUID); - if (GameObject* pGob = instance->GetGameObject(m_uiHakkarDoor2GUID)) - if (pGob->GetGoState() == GO_STATE_ACTIVE) // Ouverte - DoUseDoorOrButton(m_uiHakkarDoor2GUID); - - Creature* pAvatar = instance->GetCreature(GetData64(NPC_AVATAR_OF_HAKKAR)); - if (pAvatar) - break; - - if (m_auiEncounter[4] != IN_PROGRESS) - { - for (uint64 guid : m_luiCircleGUIDs) - DoRespawnGameObject(guid, HOUR * IN_MILLISECONDS); - } - } - else if (uiData == FAIL) - { - if (GameObject* pGob = instance->GetGameObject(m_uiHakkarDoor1GUID)) - if (pGob->GetGoState() != GO_STATE_ACTIVE) // Fermée - DoUseDoorOrButton(m_uiHakkarDoor1GUID); - if (GameObject* pGob = instance->GetGameObject(m_uiHakkarDoor2GUID)) - if (pGob->GetGoState() != GO_STATE_ACTIVE) // Fermée - DoUseDoorOrButton(m_uiHakkarDoor2GUID); - - Creature* pAvatar = instance->GetCreature(GetData64(NPC_AVATAR_OF_HAKKAR)); - if (pAvatar) - break; - - Creature* pShade = instance->GetCreature(GetData64(NPC_SHADE_OF_HAKKAR)); - if (!pShade) - break; - - // We only get one attempt - DoUpdateFlamesFlags(false); - - for (uint64 guid : m_luiCircleGUIDs) - { - if (GameObject* pGob = instance->GetGameObject(guid)) - pGob->Use(pShade); - } - m_uiFlameCounter = 0; - } - if (uiData == DONE) - { - if (GameObject* pGob = instance->GetGameObject(m_uiHakkarDoor1GUID)) - if (pGob->GetGoState() != GO_STATE_ACTIVE) // Fermée - DoUseDoorOrButton(m_uiHakkarDoor1GUID); - if (GameObject* pGob = instance->GetGameObject(m_uiHakkarDoor2GUID)) - if (pGob->GetGoState() != GO_STATE_ACTIVE) // Fermée - DoUseDoorOrButton(m_uiHakkarDoor2GUID); - } m_auiEncounter[4] = uiData; break; case TYPE_ERANIKUS: @@ -611,6 +480,9 @@ struct instance_sunken_temple : public ScriptedInstance mobsEntries.clear(); } break; + case TYPE_ETERNAL_FLAME: + m_uiFlameCounter = uiData; + break; } if (uiData == DONE) @@ -683,6 +555,8 @@ struct instance_sunken_temple : public ScriptedInstance return m_auiEncounter[4]; case TYPE_ERANIKUS: return m_auiEncounter[5]; + case TYPE_ETERNAL_FLAME: + return m_uiFlameCounter; default: return 0; } @@ -698,14 +572,6 @@ struct instance_sunken_temple : public ScriptedInstance return m_uiAtalarionGUID; case NPC_AVATAR_OF_HAKKAR: return m_uiAvatarHakkarGUID; - case GO_ETERNAL_FLAME_1: - return m_luiFlameGUIDs[0]; - case GO_ETERNAL_FLAME_2: - return m_luiFlameGUIDs[1]; - case GO_ETERNAL_FLAME_3: - return m_luiFlameGUIDs[2]; - case GO_ETERNAL_FLAME_4: - return m_luiFlameGUIDs[3]; } return 0; } diff --git a/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.cpp b/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.cpp index 423f50c3f..0e9edb2d9 100644 --- a/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.cpp +++ b/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.cpp @@ -28,9 +28,6 @@ EndScriptData */ at_shade_of_eranikus npc_malfurion_stormrage event_antalarion_statue_activation -event_avatar_of_hakkar -go_eternal_flame -effectDummy_summon_hakkar EndContentData */ #include "scriptPCH.h" @@ -171,420 +168,10 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p return false; } -/*###### -## go_eternal_flame -######*/ -struct go_eternal_flameAI: public GameObjectAI -{ - go_eternal_flameAI(GameObject* pGo) : GameObjectAI(pGo) {} - - bool OnUse(Unit* pUser) override - { - if (me->GetGoState() == GO_STATE_ACTIVE) // already used - script handler calls twice - return true; - - ScriptedInstance* pInstance = (ScriptedInstance*)me->GetInstanceData(); - - if (!pInstance) - return false; - - if (pInstance->GetData(TYPE_AVATAR) != IN_PROGRESS) - return false; - - if (Creature *shade = pInstance->GetCreature(pInstance->GetData64(NPC_SHADE_OF_HAKKAR))) - { - if (npc_shade_hakkarAI *ai = dynamic_cast(shade->AI())) - { - ai->UpdateBrazierState(me, true); - return true; - } - } - - return false; - } -}; - -GameObjectAI* GetAIgo_eternal_flame(GameObject *pGo) -{ - return new go_eternal_flameAI(pGo); -} - -/*###### -## npc_shade_hakkar -######*/ - -struct SpawnLocation -{ - float m_fX, m_fY, m_fZ, m_fO; -}; - -static SpawnLocation const aMobLocs[8] = -{ - { -451.838f, 270.88f, -90.5418f, 2.39622f}, - { -477.712f, 283.707f, -90.5464f, 3.9631f}, - { -476.58f, 261.124f, -90.4991f, 4.94248f}, - { -467.589f, 257.202f, -90.5792f, 3.14941f}, - { -483.749f, 272.907f, -90.6463f, 0.023527f}, - { -469.401f, 290.183f, -90.5949f, 0.475917f}, - { -457.525f, 260.605f, -90.5002f, 0.715479f}, - { -457.922f, 286.686f, -90.5413f, 1.02569f} -}; - -static SpawnLocation const aMobDest[8] = -{ - { -441.838f, 270.387f, -90.791f, 6.23f}, - { -487.712f, 291.707f, -90.7024f, 2.448f}, - { -484.988f, 254.289f, -90.652f, 3.824f}, - { -466.789f, 248.819f, -90.773f, 4.807f}, - { -494.863f, 273.234f, -90.927f, 3.110f}, - { -472.606f, 300.384f, -90.748f, 1.867f}, - { -451.712f, 253.742f, -90.659f, 5.406f}, - { -451.815f, 296.753f, -90.693f, 0.992f} -}; - -enum -{ - SPELL_SUPPRESSION = 12623 -}; - -static uint32 const brazierEntries[] = { GO_ETERNAL_FLAME_1, GO_ETERNAL_FLAME_2, GO_ETERNAL_FLAME_3, GO_ETERNAL_FLAME_4 }; - -npc_shade_hakkarAI::npc_shade_hakkarAI(Creature* pCreature) : ScriptedAI(pCreature) -{ - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - if (m_pInstance) - { - m_pInstance->SetData64(NPC_SHADE_OF_HAKKAR, pCreature->GetGUID()); - if (m_pInstance->GetData(TYPE_AVATAR) == DONE || m_pInstance->GetData(TYPE_AVATAR) == FAIL) - { - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->ForcedDespawn(1000); - - return; - } - else - EngagedOnce = false; - } - Reset(); -} - -void npc_shade_hakkarAI::Reset() -{ - m_uiHakkariTimer = 6000; - CheckTimer = 2000; - m_uiSuppressorTimer = 0; - m_uiSuppressingTimer = 10000; - m_uiBraziersUsed = 0; - FirstPop = true; - - while (Creature* Cre = m_creature->FindNearestCreature(NPC_HAKKARI_MINION, 150.0f)) - Cre->DisappearAndDie(); - - while (Creature* Cre = m_creature->FindNearestCreature(NPC_BLOODKEEPER, 150.0f)) - Cre->DisappearAndDie(); - - while (Creature* Cre = m_creature->FindNearestCreature(NPC_SUPPRESSOR, 150.0f)) - Cre->DisappearAndDie(); - - while (Creature* Cre = m_creature->FindNearestCreature(NPC_AVATAR_OF_HAKKAR, 150.0f)) - Cre->DisappearAndDie(); - - if (EngagedOnce) - { - if (m_pInstance && m_pInstance->GetData(TYPE_AVATAR) != DONE) - m_pInstance->SetData(TYPE_AVATAR, FAIL); - - EngagedOnce = false; - m_creature->ForcedDespawn(1000); - } - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SPAWNING); - - for (uint32 & eventSpawn : eventSpawns) - eventSpawn = 0; - - if (m_pInstance) - { - for (uint32 i : brazierEntries) - { - if (GameObject *go = m_pInstance->GetGameObject(m_pInstance->GetData64(i))) - UpdateBrazierState(go, false); - } - } -} - -void npc_shade_hakkarAI::UpdateBrazierState(GameObject *go, bool used) -{ - if (go) - { - if (used) - { - ++m_uiBraziersUsed; - m_uiSuppressorTimer = 1000; - - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - go->SetGoState(GO_STATE_ACTIVE); - } - else - { - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT); - go->SetGoState(GO_STATE_READY); - } - } - - switch (m_uiBraziersUsed) - { - case 1: - DoScriptText(SAY_AVATAR_BRAZIER_1, m_creature); - break; - case 2: - DoScriptText(SAY_AVATAR_BRAZIER_2, m_creature); - break; - case 3: - DoScriptText(SAY_AVATAR_BRAZIER_3, m_creature); - break; - // Summon the avatar of all flames are used - case 4: - DoScriptText(SAY_AVATAR_BRAZIER_4, m_creature); - SummonTheAvatar(); - break; - } -} - -void npc_shade_hakkarAI::SummonTheAvatar() -{ - m_creature->CastSpell(m_creature, 12639, true); // Summon Hakkar (Visual) - if (Creature* Avatar = m_creature->SummonCreature(NPC_AVATAR_OF_HAKKAR, -466.8673f, 272.31204f, -90.7441f, 3.5255f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - { - if (m_pInstance) - m_pInstance->SetData64(NPC_AVATAR_OF_HAKKAR, Avatar->GetGUID()); - - Avatar->CastSpell(Avatar, 12948, true); // Summon Hakkar (Visual) - //Avatar->SetInCombatWithZone(); - } - - std::list circles; - m_creature->GetGameObjectListWithEntryInGrid(circles, GO_EVIL_CIRCLE, 20); - - for (const auto go : circles) - go->Use(m_creature); - - m_creature->ForcedDespawn(500); -} - -void npc_shade_hakkarAI::Aggro(Unit* pWho) -{ - if (m_pInstance) - m_pInstance->SetData(TYPE_AVATAR, IN_PROGRESS); -} - -void npc_shade_hakkarAI::JustSummoned(Creature* summoned) -{ - switch (summoned->GetEntry()) - { - case NPC_SUPPRESSOR: - summoned->CastSpell(summoned, 7741, true); // Summoned Demon (Visual) - break; - case NPC_BLOODKEEPER: - summoned->CastSpell(summoned, 7741, true); // Summoned Demon (Visual) - ++eventSpawns[SHADE_KEEPER_TYPE]; - break; - case NPC_HAKKARI_MINION: - ++eventSpawns[SHADE_HAKKARI_TYPE]; - break; - } -} - -void npc_shade_hakkarAI::SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) -{ - if (uiMotionType != POINT_MOTION_TYPE || !pSummoned->IsAlive()) - return; - - if (pSummoned->GetEntry() == NPC_HAKKARI_MINION) - { - switch (uiPointId) - { - case 0: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 1: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 2: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 3: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 4: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 5: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 6: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 7: - pSummoned->GetMotionMaster()->MovePoint(uiPointId + 10, -466.110f, 274.284f, -90.460f, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 10: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[0].m_fX, aMobDest[0].m_fY, aMobDest[0].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 11: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[1].m_fX, aMobDest[1].m_fY, aMobDest[1].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 12: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[2].m_fX, aMobDest[2].m_fY, aMobDest[2].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 13: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[3].m_fX, aMobDest[3].m_fY, aMobDest[3].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 14: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[4].m_fX, aMobDest[4].m_fY, aMobDest[4].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 15: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[5].m_fX, aMobDest[5].m_fY, aMobDest[5].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 16: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[6].m_fX, aMobDest[6].m_fY, aMobDest[6].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - case 17: - pSummoned->GetMotionMaster()->MovePoint(uiPointId - 10, aMobDest[7].m_fX, aMobDest[7].m_fY, aMobDest[7].m_fZ, MOVE_PATHFINDING | MOVE_WALK_MODE | MOVE_FORCE_DESTINATION); - break; - } - } - if (pSummoned->GetEntry() == NPC_SUPPRESSOR) - { - switch (uiPointId) - { - case 0: - pSummoned->GetMotionMaster()->MoveIdle(); - if (pSummoned->IsAlive()) - if (Creature* Shade = pSummoned->FindNearestCreature(8440, 150.0f)) // NPC_SHADE_OF_HAKKAR - pSummoned->CastSpell(Shade, SPELL_SUPPRESSION, false); - break; - } - } -} - -void npc_shade_hakkarAI::UpdateAI(uint32 const uiDiff) -{ - if (CheckTimer <= uiDiff && !EngagedOnce) - { - /*if (Creature* Cre = m_creature->FindNearestCreature(8440, 20.0f)) // NPC_SHADE_OF_HAKKAR - if (Cre->GetGUID() != m_pInstance->GetData64(8440)) - Cre->DisappearAndDie();*/ - - m_creature->SetInCombatWithZone(); - SetCombatMovement(false); - EngagedOnce = true; - return; - } - else - CheckTimer -= uiDiff; - - if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim() || !m_pInstance) - return; - - if (m_creature->HasAura(SPELL_SUPPRESSION)) - { - if (m_uiSuppressingTimer <= uiDiff) - { - EnterEvadeMode(); - return; - } - else - m_uiSuppressingTimer -= uiDiff; - } - else - m_uiSuppressingTimer = 10000; - - if (m_uiHakkariTimer <= uiDiff) - { - uint32 uiRoll = urand(0, 99); - int uiMaxSummons = uiRoll < 75 ? 1 : uiRoll < 95 ? 2 : 3; - - // NPC_BLOODKEEPER - if (FirstPop) - { - int RandomLoc = urand(0, 7); - m_creature->SummonCreature(NPC_BLOODKEEPER, aMobLocs[RandomLoc].m_fX, aMobLocs[RandomLoc].m_fY, aMobLocs[RandomLoc].m_fZ, aMobLocs[RandomLoc].m_fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000); - } - else if (!urand(0, 3) && eventSpawns[SHADE_KEEPER_TYPE] < MAX_BLOODKEEPER) - { - int RandomLoc = urand(0, 7); - m_creature->SummonCreature(NPC_BLOODKEEPER, aMobLocs[RandomLoc].m_fX, aMobLocs[RandomLoc].m_fY, aMobLocs[RandomLoc].m_fZ, aMobLocs[RandomLoc].m_fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000); - --uiMaxSummons; - } - - // NPC_HAKKARI_MINION - if (FirstPop) - { - for (int i = 0; i < 8; i++) - if (Creature* Minion = m_creature->SummonCreature(NPC_HAKKARI_MINION, aMobLocs[i].m_fX, aMobLocs[i].m_fY, aMobLocs[i].m_fZ, aMobLocs[i].m_fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - Minion->GetMotionMaster()->MovePoint(i, aMobDest[i].m_fX, aMobDest[i].m_fY, aMobDest[i].m_fZ, MOVE_PATHFINDING | MOVE_FORCE_DESTINATION | MOVE_WALK_MODE); - } - else if (eventSpawns[SHADE_HAKKARI_TYPE] < MAX_HAKKARI_MINION) - { - for (int i = 0; i < uiMaxSummons; i++) - { - int rand = urand(0, 7); - if (Creature* Minion = m_creature->SummonCreature(NPC_HAKKARI_MINION, aMobLocs[rand].m_fX, aMobLocs[rand].m_fY, aMobLocs[rand].m_fZ, aMobLocs[rand].m_fO, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - Minion->GetMotionMaster()->MovePoint(rand, aMobDest[rand].m_fX, aMobDest[rand].m_fY, aMobDest[rand].m_fZ, MOVE_PATHFINDING | MOVE_FORCE_DESTINATION | MOVE_WALK_MODE); - } - } - - if (FirstPop) - FirstPop = false; - - m_uiHakkariTimer = urand(5000, 15000); - } - else - m_uiHakkariTimer -= uiDiff; - - if (m_uiSuppressorTimer) - { - if (m_uiSuppressorTimer <= uiDiff) - { - // NPC_SUPPRESSOR - if (urand(0, 1)) - { - if (Creature* Suppressor = m_creature->SummonCreature(NPC_SUPPRESSOR, -415.681f, 276.184f, -91.201f, 3.174f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - Suppressor->GetMotionMaster()->MovePoint(0, -448.663f, 276.239f, -90.615f, MOVE_PATHFINDING | MOVE_FORCE_DESTINATION | MOVE_WALK_MODE); - } - else if (Creature* Suppressor = m_creature->SummonCreature(NPC_SUPPRESSOR, -518.494f, 276.067f, -91.201f, 6.280f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - Suppressor->GetMotionMaster()->MovePoint(0, -485.250f, 276.099f, -90.672f, MOVE_PATHFINDING | MOVE_FORCE_DESTINATION | MOVE_WALK_MODE); - m_uiSuppressorTimer = 0; - } - else - m_uiSuppressorTimer -= uiDiff; - } -} - -void npc_shade_hakkarAI::SummonJustDied(Creature *m_creature) -{ - switch (m_creature->GetEntry()) - { - case NPC_HAKKARI_MINION: - if (eventSpawns[SHADE_HAKKARI_TYPE] > 0) - --eventSpawns[SHADE_HAKKARI_TYPE]; - break; - case NPC_BLOODKEEPER: - if (eventSpawns[SHADE_KEEPER_TYPE] > 0) - --eventSpawns[SHADE_KEEPER_TYPE]; - break; - } -} - -CreatureAI* GetAI_npc_shade_hakkar(Creature* pCreature) -{ - return new npc_shade_hakkarAI(pCreature); -} - /*###### ## go_atalai_light ######*/ + struct go_atalai_lightAI: public GameObjectAI { go_atalai_lightAI(GameObject* pGo) : GameObjectAI(pGo) {} @@ -622,16 +209,6 @@ void AddSC_sunken_temple() pNewScript->pAreaTrigger = &AreaTrigger_at_shade_of_eranikus; pNewScript->RegisterSelf(); - pNewScript = new Script; - pNewScript->Name = "go_eternal_flame"; - pNewScript->GOGetAI = &GetAIgo_eternal_flame; - pNewScript->RegisterSelf(); - - pNewScript = new Script; - pNewScript->Name = "npc_shade_hakkar"; - pNewScript->GetAI = &GetAI_npc_shade_hakkar; - pNewScript->RegisterSelf(); - pNewScript = new Script; pNewScript->Name = "go_atalai_light"; pNewScript->GOGetAI = &GetAIgo_atalai_light; diff --git a/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.h b/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.h index af9e1e0f2..6983b1d63 100644 --- a/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.h +++ b/src/scripts/eastern_kingdoms/swamp_of_sorrows/sunken_temple/sunken_temple.h @@ -37,6 +37,7 @@ enum TYPE_MALFURION = 7, TYPE_AVATAR = 8, TYPE_ERANIKUS = 9, + TYPE_ETERNAL_FLAME = 10, NPC_ATALARION = 8580, NPC_DREAMSCYTH = 5721, @@ -102,11 +103,6 @@ enum SPELL_AVATAR_SUMMONED = 12948, SAY_JAMMALAN_INTRO = -1109005, - SAY_AVATAR_BRAZIER_1 = -1109006, - SAY_AVATAR_BRAZIER_2 = -1109007, - SAY_AVATAR_BRAZIER_3 = -1109008, - SAY_AVATAR_BRAZIER_4 = -1109009, - SAY_AVATAR_SPAWN = -1109010, SAY_DREAMSCYTHE_INTRO = -1109011, SAY_DREAMSCYTHE_AGGRO = -1109012, @@ -114,40 +110,4 @@ enum SAY_ATALALARION_SPAWN = -1109014, }; -enum ShadeOfHakkar -{ - SHADE_SPAWN_TYPES = 2, // The number of different event spawn types for the Shade of Hakkar - SHADE_HAKKARI_TYPE = 0, - SHADE_KEEPER_TYPE = 1, - MAX_HAKKARI_MINION = 17, // Maximum number of Hakkari minions that can be alive at once 8 + 3 + 3 + 3 = 17 (4 waves w/ max spawn each time) - MAX_BLOODKEEPER = 4, // Maximum number of blood keepers that can be alive at once - NUM_BRAZIERS = 4, -}; - -struct npc_shade_hakkarAI : public ScriptedAI -{ - npc_shade_hakkarAI(Creature *m_creature); - - ScriptedInstance* m_pInstance; - - uint32 m_uiBraziersUsed; - uint32 m_uiHakkariTimer; - uint32 m_uiSuppressorTimer; - uint32 m_uiSuppressingTimer; - uint32 CheckTimer; - bool EngagedOnce; - bool FirstPop; - uint32 eventSpawns[SHADE_SPAWN_TYPES]; - - void Reset() override; - void Aggro(Unit *pWho) override; - void JustSummoned(Creature *m_creature) override; - void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) override; - void UpdateAI(uint32 const uiDiff) override; - - void SummonJustDied(Creature *m_pcreature); - void UpdateBrazierState(GameObject *go, bool used); - void SummonTheAvatar(); -}; - #endif