diff --git a/sql/migrations/20190824203219_world.sql b/sql/migrations/20190824203219_world.sql new file mode 100644 index 000000000..434840101 --- /dev/null +++ b/sql/migrations/20190824203219_world.sql @@ -0,0 +1,239 @@ +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`='20190824203219'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20190824203219'); +-- Add your query below. + + +-- The Severed Head of Onyxia is added in patch 1.3. +UPDATE `gameobject_template` SET `patch`=1 WHERE `entry` IN (179556, 179558); + +-- The Severed Head of Nefarian is added in patch 1.6. +UPDATE `gameobject_template` SET `patch`=4 WHERE `entry` IN (179881, 179882); + +-- Correct factions for The Severed Head of Onyxia and The Severed Head of Nefarian. +UPDATE `gameobject_template` SET `faction`=114 WHERE `entry` IN(179556, 179558, 179881, 179882); + +-- Correct spawn positions for The Severed Head of Onyxia and The Severed Head of Nefarian. +DELETE FROM `gameobject` WHERE `id` IN (179556, 179558, 179881, 179882); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecsmin`, `spawntimesecsmax`, `animprogress`, `state`, `spawnFlags`, `visibilitymod`, `patch_min`, `patch_max`) VALUES +(40134, 179556, 1, 1536.94, -4409.44, 8.05935, 1.64061, 0, 0, 0.731353, 0.681999, -21600, -21600, 100, 1, 0, 0, 1, 10), +(40135, 179558, 0, -8971.19, 554.141, 105.972, -2.25147, 0, 0, -0.902585, 0.430512, -21600, -21600, 0, 2, 0, 0, 1, 10), +(40150, 179881, 1, 1537.89, -4421.62, 7.55304, -1.15192, 0, 0, -0.544639, 0.838671, -21600, -21600, 255, 1, 0, 0, 4, 10), +(40151, 179882, 0, -8926.29, 495.856, 103.465, 2.37364, 0, 0, 0.927183, 0.374608, -21600, -21600, 255, 1, 0, 0, 4, 10); + +-- Correct size of The Severed Head of Nefarian. +UPDATE `gameobject_template` SET `size`=1.25 WHERE `entry` IN(179881); +UPDATE `gameobject_template` SET `size`=1.15 WHERE `entry` IN(179882); + +-- Events list for High Overlord Saurfang +DELETE FROM `creature_ai_scripts` WHERE `id` IN (1472005); +DELETE FROM `creature_ai_events` WHERE `creature_id`=14720; +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 (1472001, 14720, 0, 12, 0, 100, 1, 20, 0, 2500, 3500, 1472001, 0, 0, 'Saurfang - Execute 20% Target HP'); +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 (1472002, 14720, 0, 5, 0, 100, 0, 0, 0, 1, 0, 1472002, 0, 0, 'Saurfang - Say Text on Kill'); +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 (1472003, 14720, 0, 9, 0, 100, 1, 8, 25, 25000, 25000, 1472003, 0, 0, 'Saurfang - Cast Shield Charge'); +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 (1472004, 14720, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1472004, 0, 0, 'Saurfang - Cast Saurfang Rage On Aggro'); +DELETE FROM `creature_ai_scripts` WHERE `id`=1472002; +INSERT INTO `creature_ai_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 (1472002, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11564, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Say Text'); +DELETE FROM `creature_ai_scripts` WHERE `id`=1472003; +INSERT INTO `creature_ai_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 (1472003, 0, 15, 15749, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Cast Spell Shield Charge'); +DELETE FROM `creature_ai_scripts` WHERE `id`=1472004; +INSERT INTO `creature_ai_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 (1472004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11563, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Say Text'); +INSERT INTO `creature_ai_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 (1472004, 0, 15, 9347, 34, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Cast Spell Mortal Strike'); +INSERT INTO `creature_ai_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 (1472004, 0, 15, 26341, 34, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Cast Spell Saurfang s Rage'); +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 (147200, 'Orgrimmar - High Overlord Saurfang', 16044, 100, 1, 0, 0, 0, 5, 8, 7, 7, 0, 14100, 100, 0, 0, 0, 0, 3, 9, 15, 15, 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`=147200 WHERE `entry`=14720; + +-- Remove unused scripts. +DELETE FROM `creature_ai_scripts` WHERE `id` IN (3001531, 3001532, 3001533); + +/* + -------------------------------------------------- + Data for Onyxia's Head quest event - Horde Version + -------------------------------------------------- +*/ + +-- Remove no longer used texts. +DELETE FROM `script_texts` WHERE `entry` IN (-1900113, -1900112); + +-- Remove hardcoded script for Overlord Runthak. +UPDATE `creature_template` SET `script_name`='' WHERE `entry`=14392; + +-- Waypoints for Overlord Runthak. +INSERT INTO `creature_movement_template` (`entry`, `point`, `position_x`, `position_y`, `position_z`, `waittime`, `wander_distance`, `script_id`, `textid1`, `textid2`, `textid3`, `textid4`, `textid5`, `emote`, `spell`, `orientation`, `model1`, `model2`) VALUES +(14392, 1, 1540.2, -4405.02, 11.18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(14392, 2, 1541.95, -4405.1, 10.244, 18000, 0, 1439202, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0), +(14392, 3, 1568, -4405.87, 8.13371, 2000, 0, 1439203, 0, 0, 0, 0, 0, 0, 0, 3.31613, 0, 0), +(14392, 4, 1568, -4405.87, 8.13371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.31613, 0, 0); + +-- Condition: The Severed Head of Onyxia is not spawned. +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (61, 48, 0, 0, 0, 0, 1); +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (7491, 50, 40134, 61, 0, 0, 0); + +-- Completion script for quest For All To See. +UPDATE `quest_template` SET `CompleteScript`=7491 WHERE `entry`=7491; +DELETE FROM `quest_end_scripts` WHERE `id`=7491; +INSERT INTO `quest_end_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 (7491, 0, 39, 7491, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 7491, 'For All To See: Start Script'); +DELETE FROM `event_scripts` WHERE `id`=7491; +INSERT INTO `event_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 (7491, 0, 4, 147, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'For All To See: Overlord Runthak - Remove Gossip Flag'); +INSERT INTO `event_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 (7491, 0, 4, 46, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'For All To See: Overlord Runthak - Add Unattackable Flag'); +INSERT INTO `event_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 (7491, 0, 61, 7491, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'For All To See: Start Map Event'); +INSERT INTO `event_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 (7491, 2, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'For All To See: Overlord Runthak - Start Waypoints'); +DELETE FROM `creature_movement_scripts` WHERE `id`=1439202; +INSERT INTO `creature_movement_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 (1439202, 1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Emote Shout'); +INSERT INTO `creature_movement_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 (1439202, 1, 0, 6, 0, 0, 0, 7491, 0, 21, 0, 9491, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Say Text'); +INSERT INTO `creature_movement_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 (1439202, 1, 9, 40134, 7200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Respawn The Severed Head of Onyxia'); +INSERT INTO `creature_movement_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 (1439202, 9, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Emote Shout'); +INSERT INTO `creature_movement_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 (1439202, 9, 0, 6, 0, 0, 0, 0, 0, 0, 0, 9492, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Say Text'); +INSERT INTO `creature_movement_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 (1439202, 9, 80, 0, 0, 0, 0, 40134, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Set GO State of The Severed Head of Onyxia'); +INSERT INTO `creature_movement_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 (1439202, 16, 15, 22888, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Cast Rallying Cry of the Dragonslayer'); +INSERT INTO `creature_movement_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 (1439202, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1678.6, -4355.3, 61.73, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 1'); +INSERT INTO `creature_movement_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 (1439202, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1550.3, -4186.2, 40.95, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 2'); +INSERT INTO `creature_movement_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 (1439202, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1931.2, -4279.3, 29.9, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 3'); +INSERT INTO `creature_movement_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 (1439202, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1919, -4117.2, 43.45, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 4'); +INSERT INTO `creature_movement_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 (1439202, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1804.3, -4344.9, -2.9, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 5'); +INSERT INTO `creature_movement_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 (1439202, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1881, -4518.5, 27.74, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 6'); +DELETE FROM `event_scripts` WHERE `id`=21001; +INSERT INTO `event_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 (21001, 0, 15, 22888, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Rallying Cry Generator - Cast Rallying Cry of the Dragonslayer'); +DELETE FROM `creature_movement_scripts` WHERE `id`=1439203; +INSERT INTO `creature_movement_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 (1439203, 0, 20, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Move Idle'); +INSERT INTO `creature_movement_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 (1439203, 2, 4, 147, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Add Gossip Flag'); +INSERT INTO `creature_movement_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 (1439203, 2, 4, 46, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Overlord Runthak - Remove Unattackable Flag'); + +/* + -------------------------------------------------- + Data for Nefarian's Head quest event - Horde Version + -------------------------------------------------- +*/ + +-- Remove no longer used texts. +DELETE FROM `script_texts` WHERE `entry` IN (-1900106, -1900105); + +-- Waypoints for High Overlord Saurfang. +INSERT INTO `creature_movement_template` (`entry`, `point`, `position_x`, `position_y`, `position_z`, `waittime`, `wander_distance`, `script_id`, `textid1`, `textid2`, `textid3`, `textid4`, `textid5`, `emote`, `spell`, `orientation`, `model1`, `model2`) VALUES +(14720, 1, 1540.54, -4427.2, 11.29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(14720, 2, 1542.73, -4425.55, 10.87, 35000, 0, 1472002, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0), +(14720, 3, 1567.39, -4394.9, 6.89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(14720, 4, 1565.79, -4395.27, 6.9866, 2000, 0, 1472004, 0, 0, 0, 0, 0, 0, 0, 3.35103, 0, 0), +(14720, 5, 1565.79, -4395.27, 6.9866, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.35103, 0, 0); + +-- Condition: The Severed Head of Nefarian is not spawned. +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (7784, 50, 40150, 61, 0, 0, 0); + +-- Completion script for quest The Lord of Blackrock. +UPDATE `quest_template` SET `CompleteScript`=7784 WHERE `entry`=7784; +DELETE FROM `quest_end_scripts` WHERE `id`=7784; +INSERT INTO `quest_end_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 (7784, 0, 39, 7784, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 7784, 'The Lord of Blackrock: Start Script'); +DELETE FROM `event_scripts` WHERE `id`=7784; +INSERT INTO `event_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 (7784, 0, 4, 147, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: High Overlord Saurfang - Remove Gossip Flag'); +INSERT INTO `event_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 (7784, 0, 4, 46, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: High Overlord Saurfang - Add Unattackable Flag'); +INSERT INTO `event_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 (7784, 0, 61, 7784, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Start Map Event'); +INSERT INTO `event_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 (7784, 2, 20, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: High Overlord Saurfang - Start Waypoints'); +DELETE FROM `creature_movement_scripts` WHERE `id`=1472002; +INSERT INTO `creature_movement_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 (1472002, 1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Emote Shout'); +INSERT INTO `creature_movement_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 (1472002, 1, 0, 6, 0, 0, 0, 7784, 0, 21, 0, 9867, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Say Text'); +INSERT INTO `creature_movement_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 (1472002, 1, 9, 40150, 7200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Respawn The Severed Head of Nefarian'); +INSERT INTO `creature_movement_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 (1472002, 11, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Emote Shout'); +INSERT INTO `creature_movement_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 (1472002, 11, 0, 6, 0, 0, 0, 7784, 0, 21, 0, 9868, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Say Text'); +INSERT INTO `creature_movement_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 (1472002, 11, 80, 0, 0, 0, 0, 40150, 0, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Set Go State of Severed Head of Nefarian'); +INSERT INTO `creature_movement_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 (1472002, 16, 15, 22888, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Cast Rallying Cry of the Dragonslayer'); +INSERT INTO `creature_movement_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 (1472002, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1678.6, -4355.3, 61.73, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 1'); +INSERT INTO `creature_movement_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 (1472002, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1550.3, -4186.2, 40.95, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 2'); +INSERT INTO `creature_movement_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 (1472002, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1931.2, -4279.3, 29.9, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 3'); +INSERT INTO `creature_movement_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 (1472002, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1919, -4117.2, 43.45, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 4'); +INSERT INTO `creature_movement_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 (1472002, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1804.3, -4344.9, -2.9, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 5'); +INSERT INTO `creature_movement_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 (1472002, 16, 10, 21001, 3000, 0, 0, 0, 0, 0, 0, 2, 21001, 6, 3, 1881, -4518.5, 27.74, 0, 0, 'Overlord Runthak - Summon Horde Rallying Cry Generator 6'); +DELETE FROM `creature_movement_scripts` WHERE `id`=1472004; +INSERT INTO `creature_movement_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 (1472004, 0, 20, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Move Idle'); +INSERT INTO `creature_movement_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 (1472004, 0, 4, 147, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Add Gossip Flag'); +INSERT INTO `creature_movement_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 (1472004, 0, 4, 46, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'High Overlord Saurfang - Remove Unattackable Flag'); + +/* + -------------------------------------------------- + Data for Nefarian's Head quest event - Alliance Version + -------------------------------------------------- +*/ + +-- Remove no longer used texts. +DELETE FROM `script_texts` WHERE `entry` IN (-1900104, -1900103); + +-- Remove hardcoded script for Field Marshal Afrasiabi. +UPDATE `creature_template` SET `script_name`='' WHERE `entry`=14721; + +-- Condition: The Severed Head of Nefarian is not spawned. +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (7782, 50, 40151, 61, 0, 0, 0); + +-- Completion script for quest The Lord of Blackrock. +UPDATE `quest_template` SET `CompleteScript`=7782 WHERE `entry`=7782; +DELETE FROM `quest_end_scripts` WHERE `id`=7782; +INSERT INTO `quest_end_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 (7782, 0, 39, 7782, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 7782, 'The Lord of Blackrock: Start Script'); +DELETE FROM `event_scripts` WHERE `id`=7782; +INSERT INTO `event_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 (7782, 0, 4, 147, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Remove Gossip Flag'); +INSERT INTO `event_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 (7782, 0, 4, 46, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Add Unattackable Flag'); +INSERT INTO `event_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 (7782, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 9870, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Say Text'); +INSERT INTO `event_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 (7782, 3, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Emote Shout'); +INSERT INTO `event_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 (7782, 14, 0, 6, 0, 0, 0, 0, 0, 0, 0, 9872, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Say Text'); +INSERT INTO `event_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 (7782, 14, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Emote Shout'); +INSERT INTO `event_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 (7782, 14, 9, 40151, 7200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: The Severed Head of Nefarian - Respawn'); +INSERT INTO `event_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 (7782, 20, 15, 22888, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Cast Rallying Cry of the Dragonslayer'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8800.6, 643.17, 94.29, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 1'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8643.5, 758.1, 97.28, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 2'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8523, 848.78, 106.8, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 3'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8951.7, 865.88, 104.9, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 4'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8424, 619.94, 95.55, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 5'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8705.6, 418.51, 99.35, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 6'); +INSERT INTO `event_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 (7782, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8734.6, 1043.2, 92.15, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Summon Alliance Rallying Cry Generator 7'); +INSERT INTO `event_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 (7782, 25, 4, 46, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Remove Unattackable Flag'); +INSERT INTO `event_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 (7782, 25, 4, 147, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'The Lord of Blackrock: Field Marshal Afrasiabi - Add Gossip Flag'); +DELETE FROM `event_scripts` WHERE `id`=21002; +INSERT INTO `event_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 (21002, 0, 15, 22888, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Rallying Cry Generator - Cast Rallying Cry of the Dragonslayer'); + +/* + -------------------------------------------------- + Data for Onyxia's Head quest event - Alliance Version + -------------------------------------------------- +*/ + +-- Remove no longer used texts. +DELETE FROM `script_texts` WHERE `entry` IN (-1900111, -1900110); + +-- Remove hardcoded script for Major Mattingly. +UPDATE `creature_template` SET `script_name`='' WHERE `entry`=14394; + +-- Condition: The Severed Head of Onyxia is not spawned. +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`, `value3`, `value4`, `flags`) VALUES (7496, 50, 40135, 61, 0, 0, 0); + +-- Completion script for quest Celebrating Good Times. +UPDATE `quest_template` SET `CompleteScript`=7496 WHERE `entry`=7496; +DELETE FROM `quest_end_scripts` WHERE `id`=7496; +INSERT INTO `quest_end_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 (7496, 0, 39, 7496, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 7496, 'Celebrating Good Times: Start Script'); +DELETE FROM `event_scripts` WHERE `id`=7496; +INSERT INTO `event_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 (7496, 0, 4, 147, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Remove Gossip Flag'); +INSERT INTO `event_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 (7496, 0, 4, 46, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Add Unattackable Flag'); +INSERT INTO `event_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 (7496, 3, 0, 6, 0, 0, 0, 0, 0, 0, 0, 9495, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Say Text'); +INSERT INTO `event_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 (7496, 3, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Emote Shout'); +INSERT INTO `event_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 (7496, 12, 0, 6, 0, 0, 0, 0, 0, 0, 0, 9496, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Say Text'); +INSERT INTO `event_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 (7496, 12, 1, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Emote Shout'); +INSERT INTO `event_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 (7496, 12, 9, 40135, 7200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: The Severed Head of Onyxia - Respawn'); +INSERT INTO `event_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 (7496, 20, 15, 22888, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Cast Rallying Cry of the Dragonslayer'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8800.6, 643.17, 94.29, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 1'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8643.5, 758.1, 97.28, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 2'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8523, 848.78, 106.8, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 3'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8951.7, 865.88, 104.9, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 4'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8424, 619.94, 95.55, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 5'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8705.6, 418.51, 99.35, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 6'); +INSERT INTO `event_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 (7496, 20, 10, 21002, 3000, 0, 0, 0, 0, 0, 4, 2, 21002, 6, 3, -8734.6, 1043.2, 92.15, 0, 0, 'Celebrating Good Times: Major Mattingly - Summon Alliance Rallying Cry Generator 7'); +INSERT INTO `event_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 (7496, 25, 4, 46, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Remove Unattackable Flag'); +INSERT INTO `event_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 (7496, 25, 4, 147, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Celebrating Good Times: Major Mattingly - Add Gossip Flag'); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index 713c1becd..7c624e79b 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -335,6 +335,8 @@ ChatCommand * ChatHandler::getCommandTable() { NODE, "toggle", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectToggleCommand, "", nullptr }, { NODE, "reset", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectResetCommand, "", nullptr }, { NODE, "respawn", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectRespawnCommand, "", nullptr }, + { NODE, "setgostate", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectSetGoStateCommand,"", nullptr }, + { NODE, "setlootstate", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectSetLootStateCommand,"", nullptr }, { MSTR, nullptr, 0, false, nullptr, "", nullptr } }; diff --git a/src/game/Chat/Chat.h b/src/game/Chat/Chat.h index ac893d2b0..e04c651c5 100644 --- a/src/game/Chat/Chat.h +++ b/src/game/Chat/Chat.h @@ -467,6 +467,8 @@ class MANGOS_DLL_SPEC ChatHandler bool HandleGameObjectSelectCommand(char* args); bool HandleGameObjectRespawnCommand(char* args); bool HandleGameObjectInfoCommand(char* args); + bool HandleGameObjectSetGoStateCommand(char* args); + bool HandleGameObjectSetLootStateCommand(char* args); GameObject* getSelectedGameObject(); bool HandleGMCommand(char* args); diff --git a/src/game/Commands/ObjectCommands.cpp b/src/game/Commands/ObjectCommands.cpp index c45f4501a..793a3c246 100644 --- a/src/game/Commands/ObjectCommands.cpp +++ b/src/game/Commands/ObjectCommands.cpp @@ -623,3 +623,75 @@ bool ChatHandler::HandleGameObjectResetCommand(char*) go->ResetDoorOrButton(); return true; } + +bool ChatHandler::HandleGameObjectSetGoStateCommand(char* args) +{ + // number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r + uint32 lowguid; + if (!ExtractUint32KeyFromLink(&args, "Hgameobject", lowguid)) + return false; + + if (!lowguid) + return false; + + GameObject* pGameObject = nullptr; + + // by DB guid + if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid)) + pGameObject = GetGameObjectWithGuid(lowguid, go_data->id); + + if (!pGameObject) + { + PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid); + SetSentErrorMessage(true); + return false; + } + + uint32 uiGoState; + if (!ExtractUInt32(&args, uiGoState)) + return false; + + if (uiGoState > GO_STATE_ACTIVE_ALTERNATIVE) + return false; + + pGameObject->SetGoState(GOState(uiGoState)); + PSendSysMessage("You changed GO State of %s (GUID %u) to %u.", pGameObject->GetName(), pGameObject->GetGUIDLow(), uiGoState); + + return true; +} + +bool ChatHandler::HandleGameObjectSetLootStateCommand(char* args) +{ + // number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r + uint32 lowguid; + if (!ExtractUint32KeyFromLink(&args, "Hgameobject", lowguid)) + return false; + + if (!lowguid) + return false; + + GameObject* pGameObject = nullptr; + + // by DB guid + if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid)) + pGameObject = GetGameObjectWithGuid(lowguid, go_data->id); + + if (!pGameObject) + { + PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid); + SetSentErrorMessage(true); + return false; + } + + uint32 uiLootState; + if (!ExtractUInt32(&args, uiLootState)) + return false; + + if (uiLootState > GO_JUST_DEACTIVATED) + return false; + + pGameObject->SetLootState(LootState(uiLootState)); + PSendSysMessage("You changed Loot State of %s (GUID %u) to %u.", pGameObject->GetName(), pGameObject->GetGUIDLow(), uiLootState); + + return true; +} \ No newline at end of file diff --git a/src/game/Maps/Map.h b/src/game/Maps/Map.h index 957487a13..e2c1792cf 100644 --- a/src/game/Maps/Map.h +++ b/src/game/Maps/Map.h @@ -896,6 +896,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::Obj bool ScriptCommand_SetFly(const ScriptInfo& script, WorldObject* source, WorldObject* target); bool ScriptCommand_JoinCreatureGroup(const ScriptInfo& script, WorldObject* source, WorldObject* target); bool ScriptCommand_LeaveCreatureGroup(const ScriptInfo& script, WorldObject* source, WorldObject* target); + bool ScriptCommand_SetGoState(const ScriptInfo& script, WorldObject* source, WorldObject* target); // Add any new script command functions to the array. const ScriptCommandFunction m_ScriptCommands[SCRIPT_COMMAND_MAX] = @@ -980,6 +981,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::Obj &Map::ScriptCommand_SetFly, // 77 &Map::ScriptCommand_JoinCreatureGroup, // 78 &Map::ScriptCommand_LeaveCreatureGroup, // 79 + &Map::ScriptCommand_SetGoState, // 80 }; public: diff --git a/src/game/Maps/ScriptCommands.cpp b/src/game/Maps/ScriptCommands.cpp index 7991e45dd..ad5ecfd03 100644 --- a/src/game/Maps/ScriptCommands.cpp +++ b/src/game/Maps/ScriptCommands.cpp @@ -2180,4 +2180,19 @@ bool Map::ScriptCommand_LeaveCreatureGroup(const ScriptInfo& script, WorldObject pSource->LeaveCreatureGroup(); return false; -} \ No newline at end of file +} + +// SCRIPT_COMMAND_SET_GO_STATE (80) +bool Map::ScriptCommand_SetGoState(const ScriptInfo& script, WorldObject* source, WorldObject* target) +{ + GameObject *pGo = nullptr; + + if (!((pGo = ToGameObject(target)) || (pGo = ToGameObject(source)))) + { + sLog.outError("SCRIPT_COMMAND_SET_GO_STATE (script id %u) call for a NULL gameobject, skipping.", script.id); + return ShouldAbortScript(script); + } + + pGo->SetGoState(GOState(script.setGoState.state)); + return false; +} diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index 6edfe2832..92c01f0b5 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -1206,6 +1206,16 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename) } break; } + case SCRIPT_COMMAND_SET_GO_STATE: + { + if (tmp.setGoState.state > GO_STATE_ACTIVE_ALTERNATIVE) + { + sLog.outErrorDb("Table `%s` using invalid go state in datalong (%u) in SCRIPT_COMMAND_SET_GO_STATE for script id %u", + tablename, tmp.setGoState.state, tmp.id); + continue; + } + break; + } } if (scripts.find(tmp.id) == scripts.end()) diff --git a/src/game/ScriptMgr.h b/src/game/ScriptMgr.h index c04a9db76..25f7d021a 100644 --- a/src/game/ScriptMgr.h +++ b/src/game/ScriptMgr.h @@ -323,6 +323,8 @@ enum eScriptCommand // x = distance // o = angle SCRIPT_COMMAND_LEAVE_CREATURE_GROUP = 79, // source = Creature + SCRIPT_COMMAND_SET_GO_STATE = 80, // source = GameObject + // datalong = GOState SCRIPT_COMMAND_MAX, SCRIPT_COMMAND_DISABLED = 9999 // Script action was disabled during loading. @@ -985,6 +987,11 @@ struct ScriptInfo // SCRIPT_COMMAND_LEAVE_CREATURE_GROUP (79) + struct // SCRIPT_COMMAND_SET_GO_STATE (80) + { + uint32 state; // datalong + } setGoState; + struct { uint32 data[9]; diff --git a/src/scripts/eastern_kingdoms/stormwind_city/stormwind_city.cpp b/src/scripts/eastern_kingdoms/stormwind_city/stormwind_city.cpp index 65f3790fe..55de24b6e 100644 --- a/src/scripts/eastern_kingdoms/stormwind_city/stormwind_city.cpp +++ b/src/scripts/eastern_kingdoms/stormwind_city/stormwind_city.cpp @@ -1224,252 +1224,6 @@ bool QuestAccept_npc_tyrion(Player* pPlayer, Creature* pCreature, const Quest* p return true; } -struct SpawnLocation -{ - float m_fX, m_fY, m_fZ; -}; - -// NOTE: Stormwind Keep is explicitly not supposed to receive the buff -static const SpawnLocation aRallyGeneratorLocs[7] = -{ - { -8800.6f, 643.17f, 94.29f }, // Trade District - { -8643.5f, 758.10f, 97.28f }, // Cathedral Square - { -8523.0f, 848.78f, 106.8f }, // Cathedral of Light - { -8951.7f, 865.88f, 104.9f }, // Mage District - { -8424.0f, 619.94f, 95.55f }, // Blacksmith District - { -8705.6f, 418.51f, 99.35f }, // Old Town - { -8734.6f, 1043.2f, 92.15f } // The Park -}; - -enum -{ - SPELL_RALLYING_CRY_DRAGONSLAYER = 22888, - NPC_RALLY_CRY_GENERATOR_ALLY = 21002, - - MAX_RALLY_GENERATORS = 7 -}; - -/*###### -## npc_major_mattingly -######*/ - -enum -{ - QUEST_CELEBRATING_GOOD_TIMES = 7496, - - YELL_ONY_ALLY_REWARD_1 = -1900111, - YELL_ONY_ALLY_REWARD_2 = -1900110, - - GO_ONYXIAS_HEAD_ALLY = 179558, - -}; - -struct npc_major_mattinglyAI : public ScriptedAI -{ - npc_major_mattinglyAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - uint32 m_uiTick; - uint32 m_uiDialogueTimer; - bool m_bRallyingCryEvent; - ObjectGuid m_playerGuid; - - void Reset() - { - m_uiTick = 0; - m_uiDialogueTimer = 2000; - m_bRallyingCryEvent = false; - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void StartRallyEvent(ObjectGuid playerGuid) - { - m_playerGuid = playerGuid; - m_bRallyingCryEvent = true; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void UpdateAI(uint32 const uiDiff) - { - if (m_bRallyingCryEvent) - { - if (m_uiDialogueTimer <= uiDiff) - { - switch (m_uiTick) - { - case 0: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_ONY_ALLY_REWARD_1, 0, pPlayer); - } - m_uiDialogueTimer = 10000; - break; - case 1: - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_ONY_ALLY_REWARD_2); - if (GameObject* pGo = m_creature->FindNearestGameObject(GO_ONYXIAS_HEAD_ALLY, 150.0f)) - { - if (!pGo->isSpawned()) - { - pGo->SetRespawnTime(7200); - pGo->Refresh(); - } - } - m_uiDialogueTimer = 7000; - break; - case 2: - m_creature->CastSpell(m_creature, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - for (uint8 i = 0; i < MAX_RALLY_GENERATORS; ++i) - { - if (Creature* pGenerator = m_creature->SummonCreature(NPC_RALLY_CRY_GENERATOR_ALLY, aRallyGeneratorLocs[i].m_fX, aRallyGeneratorLocs[i].m_fY, aRallyGeneratorLocs[i].m_fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) - pGenerator->CastSpell(pGenerator, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - } - Reset(); - return; - } - m_uiTick++; - } - else m_uiDialogueTimer -= uiDiff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_major_mattingly(Creature* pCreature) -{ - return new npc_major_mattinglyAI(pCreature); -} - -bool QuestRewarded_npc_major_mattingly(Player* pPlayer, Creature* pCreature, Quest const* quest) -{ - if (quest->GetQuestId() == QUEST_CELEBRATING_GOOD_TIMES) - { - if (npc_major_mattinglyAI* pMattingly = dynamic_cast(pCreature->AI())) - pMattingly->StartRallyEvent(pPlayer->GetObjectGuid()); - } - return true; -} - -/*###### -## npc_field_marshal_afrasiabi -######*/ - -enum -{ - QUEST_LORD_OF_BLACKROCK_ALLY = 7782, - - YELL_NEF_REWARD_1_ALLY = -1900104, - YELL_NEF_REWARD_2_ALLY = -1900103, - - GO_NEFARIANS_HEAD_ALLY = 179882, -}; - -struct npc_field_marshal_afrasiabiAI : public ScriptedAI -{ - npc_field_marshal_afrasiabiAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 m_uiTick; - uint32 m_uiDialogueTimer; - bool m_bRallyingCryEvent; - ObjectGuid m_playerGuid; - - void Reset() - { - m_uiTick = 0; - m_uiDialogueTimer = 2000; - m_bRallyingCryEvent = false; - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void StartRallyEvent(ObjectGuid playerGuid) - { - m_playerGuid = playerGuid; - m_bRallyingCryEvent = true; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void UpdateAI(uint32 const uiDiff) - { - if (m_bRallyingCryEvent) - { - if (m_uiDialogueTimer <= uiDiff) - { - switch (m_uiTick) - { - case 0: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_NEF_REWARD_1_ALLY, 0, pPlayer); - } - m_uiDialogueTimer = 10000; - break; - case 1: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_NEF_REWARD_2_ALLY, 0, pPlayer); - } - if (GameObject* pGo = m_creature->FindNearestGameObject(GO_NEFARIANS_HEAD_ALLY, 150.0f)) - { - if (!pGo->isSpawned()) - { - pGo->SetRespawnTime(7200); - pGo->Refresh(); - } - } - m_uiDialogueTimer = 7000; - break; - case 2: - m_creature->CastSpell(m_creature, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - for (uint8 i = 0; i < MAX_RALLY_GENERATORS; ++i) - { - if (Creature* pGenerator = m_creature->SummonCreature(NPC_RALLY_CRY_GENERATOR_ALLY, aRallyGeneratorLocs[i].m_fX, aRallyGeneratorLocs[i].m_fY, aRallyGeneratorLocs[i].m_fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) - pGenerator->CastSpell(pGenerator, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - } - Reset(); - return; - } - m_uiTick++; - } - else m_uiDialogueTimer -= uiDiff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_field_marshal_afrasiabi(Creature* pCreature) -{ - return new npc_field_marshal_afrasiabiAI(pCreature); -} - -bool QuestRewarded_npc_field_marshal_afrasiabi(Player* pPlayer, Creature* pCreature, Quest const* quest) -{ - if (quest->GetQuestId() == QUEST_LORD_OF_BLACKROCK_ALLY) - { - if (npc_field_marshal_afrasiabiAI* pAfrasiabi = dynamic_cast(pCreature->AI())) - pAfrasiabi->StartRallyEvent(pPlayer->GetObjectGuid()); - } - return true; -} - /*###### ## npc_master_wood ######*/ @@ -1584,18 +1338,6 @@ void AddSC_stormwind_city() newscript->pGossipHello = &GossipHello_npc_tyrion; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_major_mattingly"; - newscript->GetAI = &GetAI_npc_major_mattingly; - newscript->pQuestRewardedNPC = &QuestRewarded_npc_major_mattingly; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_field_marshal_afrasiabi"; - newscript->GetAI = &GetAI_npc_field_marshal_afrasiabi; - newscript->pQuestRewardedNPC = &QuestRewarded_npc_field_marshal_afrasiabi; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_master_wood"; newscript->GetAI = &GetAI_npc_master_wood; diff --git a/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp b/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp index f73ae3922..38f4c4209 100644 --- a/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp +++ b/src/scripts/kalimdor/orgrimmar/orgrimmar.cpp @@ -120,413 +120,6 @@ bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, const Quest* return true; } -struct SpawnLocation -{ - float m_fX, m_fY, m_fZ; -}; - -// NOTE: Valley of Honor is explicitly not supposed to receive the buff -static const SpawnLocation aRallyGeneratorLocs[6] = -{ - { 1678.6f, -4355.3f, 61.73f }, // Valley of Strength (North) - { 1550.3f, -4186.2f, 40.95f }, // Valley of Spirits - { 1931.2f, -4279.3f, 29.90f }, // Valley of Wisdom - { 1919.0f, -4117.2f, 43.45f }, // Thrall's Chamber - { 1804.3f, -4344.9f, -2.9f }, // The Cleft of Shadow - { 1881.0f, -4518.5f, 27.74f } // The Drag -}; - -enum -{ - SPELL_RALLYING_CRY_DRAGONSLAYER = 22888, - NPC_RALLY_CRY_GENERATOR_HORDE = 21001, - - MAX_RALLY_GENERATORS = 6 -}; - -/*###### -## npc_overlord_runthak -######*/ - -enum -{ - QUEST_FOR_ALL_TO_SEE = 7491, - - YELL_ONY_REWARD_1_HORDE = -1900113, - YELL_ONY_REWARD_2_HORDE = -1900112, - - GO_ONYXIAS_HEAD_HORDE = 179556 -}; - -struct npc_overlord_runthakAI : public ScriptedAI -{ - npc_overlord_runthakAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - uint32 m_uiTick; - uint32 m_uiDialogueTimer; - bool m_bRallyingCryEvent; - ObjectGuid m_playerGuid; - - void Reset() - { - m_uiTick = 0; - m_uiDialogueTimer = 2000; - m_bRallyingCryEvent = false; - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void StartRallyEvent(ObjectGuid playerGuid) - { - m_playerGuid = playerGuid; - m_bRallyingCryEvent = true; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void MovementInform(uint32 uiType, uint32 uiPointId) - { - if (uiType != POINT_MOTION_TYPE) - return; - - switch (uiPointId) - { - case 0: - m_creature->GetMotionMaster()->MovePoint(1, 1541.95f, -4405.1f, 10.244f); - break; - case 1: - m_uiDialogueTimer = 1000; - m_uiTick++; - break; - case 2: - m_creature->GetMotionMaster()->MovePoint(3, 1568.0f, -4405.87f, 8.13371f); - break; - case 3: - Reset(); - break; - } - } - - void UpdateAI(uint32 const uiDiff) - { - if (m_bRallyingCryEvent) - { - if (m_uiDialogueTimer <= uiDiff) - { - switch (m_uiTick) - { - case 0: - m_creature->GetMotionMaster()->MovePoint(0, 1540.2f, -4405.02f, 11.18f, MOVE_PATHFINDING); - m_uiDialogueTimer = 30000; //handled by MovementInform - break; - case 1: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_ONY_REWARD_1_HORDE, 0, pPlayer); - } - if (GameObject* pGo = m_creature->FindNearestGameObject(GO_ONYXIAS_HEAD_HORDE, 150.0f)) - { - if (!pGo->isSpawned()) - { - pGo->SetRespawnTime(7200); - pGo->Refresh(); - } - } - m_uiDialogueTimer = 8000; - m_uiTick++; - break; - case 2: - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_ONY_REWARD_2_HORDE); - if (GameObject* pGo = m_creature->FindNearestGameObject(GO_ONYXIAS_HEAD_HORDE, 150.0f)) - { - pGo->SetGoState(GO_STATE_ACTIVE); - } - m_uiDialogueTimer = 7000; - m_uiTick++; - break; - case 3: - m_creature->CastSpell(m_creature, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - for (uint8 i = 0; i < MAX_RALLY_GENERATORS; ++i) - { - if (Creature* pGenerator = m_creature->SummonCreature(NPC_RALLY_CRY_GENERATOR_HORDE, aRallyGeneratorLocs[i].m_fX, aRallyGeneratorLocs[i].m_fY, aRallyGeneratorLocs[i].m_fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) - pGenerator->CastSpell(pGenerator, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - } - m_uiDialogueTimer = 2000; - m_uiTick++; - break; - case 4: - m_creature->GetMotionMaster()->MovePoint(2, 1570.0f, -4405.89f, 7.63613f); - m_uiDialogueTimer = 30000; //handled by MovementInform - return; - } - } - else m_uiDialogueTimer -= uiDiff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_npc_overlord_runthak(Creature* pCreature) -{ - return new npc_overlord_runthakAI(pCreature); -} - -bool QuestRewarded_npc_overlord_runthak(Player* pPlayer, Creature* pCreature, Quest const* quest) -{ - if (quest->GetQuestId() == QUEST_FOR_ALL_TO_SEE) - { - if (npc_overlord_runthakAI* pRunthak = dynamic_cast(pCreature->AI())) - pRunthak->StartRallyEvent(pPlayer->GetObjectGuid()); - } - return true; -} - -/*###### -## npc_overlord_saurfang -######*/ - -enum -{ - SPELL_SF_EXECUTE = 7160, //OK - SPELL_SF_CLEAVE = 15284, //OK - SPELL_SF_CHARGE = 22886, //OK - SPELL_SF_THUNDERCLAP = 23931, //? - SPELL_SF_MORTALSTRIKE = 12294, //? - SPELL_SF_SAURFANGRAGE = 26339, - - QUEST_LORD_OF_BLACKROCK_HORDE = 7784, - - YELL_NEF_REWARD_1_HORDE = -1900106, - YELL_NEF_REWARD_2_HORDE = -1900105, - - GO_NEFARIANS_HEAD_HORDE = 179881, -}; - -struct npc_overlord_saurfangAI : public ScriptedAI -{ - npc_overlord_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint32 m_uiExecute_Timer; - uint32 m_uiCleave_Timer; - uint32 m_uiCharge_Timer; - uint32 m_uiThunderClap_Timer; - uint32 m_uiMortalStrike_Timer; - uint32 m_uiSaurfangRage_Timer; - bool isInCombat; - - uint32 m_uiTick; - uint32 m_uiDialogueTimer; - bool m_bRallyingCryEvent; - ObjectGuid m_playerGuid; - - void Reset() - { - isInCombat = false; - m_uiExecute_Timer = 0; - m_uiCleave_Timer = 7000; - m_uiCharge_Timer = 0; - m_uiThunderClap_Timer = 5000; - m_uiMortalStrike_Timer = 13000; - m_uiSaurfangRage_Timer = urand(3000, 8000); - - m_uiTick = 0; - m_uiDialogueTimer = 2000; - m_bRallyingCryEvent = false; - m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void Aggro(Unit* pWho) - { - if (isInCombat == false) - { - m_creature->MonsterTextEmote("Saurfang's eyes glow red for a brief moment"); - isInCombat = true; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - } - } - - void KilledUnit(Unit* pVictim) - { - if (pVictim->GetTypeId() == TYPEID_PLAYER) - m_creature->MonsterSay("Is that the best you can do?", 0, 0); - } - - void StartRallyEvent(ObjectGuid playerGuid) - { - m_playerGuid = playerGuid; - m_bRallyingCryEvent = true; - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - } - - void MovementInform(uint32 uiType, uint32 uiPointId) override - { - if (uiType != POINT_MOTION_TYPE) - return; - - switch (uiPointId) - { - case 0: - m_creature->GetMotionMaster()->MovePoint(1, 1542.73f, -4425.55f, 10.87f); - break; - case 1: - m_uiDialogueTimer = 1000; - m_uiTick++; - break; - case 2: - m_creature->GetMotionMaster()->MovePoint(3, 1565.79f, -4395.27f, 6.9866f); - break; - case 3: - Reset(); - break; - } - } - - void UpdateAI(const uint32 diff) - { - if (m_bRallyingCryEvent) - { - if (m_uiDialogueTimer <= diff) - { - switch (m_uiTick) - { - case 0: - m_creature->GetMotionMaster()->MovePoint(0, 1540.54f, -4427.2f, 11.29f, MOVE_PATHFINDING); - m_uiDialogueTimer = 30000; //handled by MovementInform - break; - case 1: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_NEF_REWARD_1_HORDE, 0, pPlayer); - } - m_uiDialogueTimer = 10000; - m_uiTick++; - break; - case 2: - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_playerGuid)) - { - m_creature->HandleEmote(EMOTE_ONESHOT_SHOUT); - m_creature->MonsterYellToZone(YELL_NEF_REWARD_2_HORDE, 0, pPlayer); - } - if (GameObject* pGo = m_creature->FindNearestGameObject(GO_NEFARIANS_HEAD_HORDE, 150.0f)) - { - if (!pGo->isSpawned()) - { - pGo->SetRespawnTime(7200); - pGo->Refresh(); - } - } - m_uiDialogueTimer = 8000; - m_uiTick++; - break; - case 3: - if (GameObject* pGo = m_creature->FindNearestGameObject(GO_NEFARIANS_HEAD_HORDE, 150.0f)) - { - pGo->SetGoState(GO_STATE_ACTIVE); - } - m_uiDialogueTimer = 5000; - m_uiTick++; - break; - case 4: - m_creature->CastSpell(m_creature, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - for (uint8 i = 0; i < MAX_RALLY_GENERATORS; ++i) - { - if (Creature* pGenerator = m_creature->SummonCreature(NPC_RALLY_CRY_GENERATOR_HORDE, aRallyGeneratorLocs[i].m_fX, aRallyGeneratorLocs[i].m_fY, aRallyGeneratorLocs[i].m_fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) - pGenerator->CastSpell(pGenerator, SPELL_RALLYING_CRY_DRAGONSLAYER, true); - } - m_uiDialogueTimer = 10000; - m_uiTick++; - break; - case 5: - m_creature->GetMotionMaster()->MovePoint(2, 1567.39f, -4394.9f, 6.89f); - m_uiDialogueTimer = 30000; //handled by MovementInform - return; - } - } - else - m_uiDialogueTimer -= diff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_creature->getVictim()->GetHealth() <= m_creature->getVictim()->GetMaxHealth() * 0.2f && m_uiExecute_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SF_EXECUTE); - m_uiExecute_Timer = 2000; - } - else m_uiExecute_Timer -= diff; - - if (m_uiMortalStrike_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SF_MORTALSTRIKE); - m_uiMortalStrike_Timer = 13000; - } - else m_uiMortalStrike_Timer -= diff; - - /* if (m_uiCleave_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SF_CLEAVE); - m_uiCleave_Timer = 7000; - } - else m_uiCleave_Timer -= diff; - */ - if (m_uiCharge_Timer < diff && m_creature->GetDistance(m_creature->getVictim()->GetPositionX(), - m_creature->getVictim()->GetPositionY(), - m_creature->getVictim()->GetPositionZ()) >= 8.0f) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SF_CHARGE); - m_uiCharge_Timer = 9000; - } - else m_uiCharge_Timer -= diff; - /* - if (m_uiThunderClap_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SF_THUNDERCLAP); - m_uiThunderClap_Timer = 9000; - } - else m_uiThunderClap_Timer -= diff; - */ - if (m_uiSaurfangRage_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SF_SAURFANGRAGE) ; - m_uiSaurfangRage_Timer = 8000; - } - else m_uiSaurfangRage_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - - -CreatureAI* GetAI_npc_overlord_saurfang(Creature* pCreature) -{ - return new npc_overlord_saurfangAI(pCreature); -} - -bool QuestRewarded_npc_overlord_saurfang(Player* pPlayer, Creature* pCreature, Quest const* quest) -{ - if (quest->GetQuestId() == QUEST_LORD_OF_BLACKROCK_HORDE) - { - if (npc_overlord_saurfangAI* pSaurfang = dynamic_cast(pCreature->AI())) - pSaurfang->StartRallyEvent(pPlayer->GetObjectGuid()); - } - return true; -} - bool GossipHello_npc_eitrigg(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) @@ -553,16 +146,4 @@ void AddSC_orgrimmar() newscript->Name = "npc_eitrigg"; newscript->pGossipHello = &GossipHello_npc_eitrigg; newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_overlord_runthak"; - newscript->GetAI = &GetAI_npc_overlord_runthak; - newscript->pQuestRewardedNPC = &QuestRewarded_npc_overlord_runthak; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_overlord_saurfang"; - newscript->GetAI = &GetAI_npc_overlord_saurfang; - newscript->pQuestRewardedNPC = &QuestRewarded_npc_overlord_saurfang; - newscript->RegisterSelf(); }