From a02ef421b15adf9ca850dbf35993b3475415d490 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 14:08:02 +0200 Subject: [PATCH 01/19] DB/Misc: Script Several Undercity NPCs By dr-j, closes #12495 --- .../world/2014_07_19_02_world_misc.sql | 297 ++++++++++++++++++ 1 file changed, 297 insertions(+) create mode 100644 sql/updates/world/2014_07_19_02_world_misc.sql diff --git a/sql/updates/world/2014_07_19_02_world_misc.sql b/sql/updates/world/2014_07_19_02_world_misc.sql new file mode 100644 index 00000000000..2dbe9f16bd9 --- /dev/null +++ b/sql/updates/world/2014_07_19_02_world_misc.sql @@ -0,0 +1,297 @@ +SET @Guid := 79263; + +-- Script Undercity NPC's + +-- Sniffs used Undercity_full.bin (3.3.5) for spawns, etc 2014-07-17_11-12-35_19FAA762.pkt (5.4.8) for texts, emotes etc + +-- Set Spawntime of Caged Human Male to 120 seconds as is in sniff of this creature not 300 seconds +UPDATE `creature` SET `spawntimesecs`=120 WHERE `guid`=45218; + +-- Delete the incorrectly spawned human male captive, human female captive, captive ghoul, zombie and abomination as these are spawned as part of event +DELETE FROM `creature` WHERE `id` IN (5680,5681,5685,5686,5687); + +-- Delete the incorrectly spawned Caged Squirrel +DELETE FROM `creature` WHERE `guid`=45216; +DELETE FROM `creature_addon` WHERE `guid`=45216; -- Caged Squirrel + +-- Spawn overseer Kraggosh and the 4 Kor'kron overseers which are missing from the Apothacarium +DELETE FROM `creature` WHERE `guid` IN (@Guid,@Guid+1,@Guid+2,@Guid+3,@Guid+4); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@Guid, 36217, 0, 1, 1, 1438.026, 403.8299, -85.26257, 3.124139, 120, 0, 0), -- 36217 (Area: 0) +(@Guid+1, 36213, 0, 1, 1, 1388.434, 421.5955, -77.15382, 6.091199, 120, 0, 0), -- 36213 (Area: 0) +(@Guid+2, 36213, 0, 1, 1, 1446.222, 415.6059, -84.90555, 3.857178, 120, 0, 0), -- 36213 (Area: 0) +(@Guid+3, 36213, 0, 1, 1, 1414.677, 448.1597, -77.15431, 4.677482, 120, 0, 0), -- 36213 (Area: 0) +(@Guid+4, 36213, 0, 1, 1, 1419.076, 389.0208, -84.98041, 0.6981317, 120, 0, 0); -- 36213 (Area: 0) + +-- Set NPC Flags on Overseer Kraggosh and Apothacary Farnell, gossip is already in db and linked to creature but flag is not set +UPDATE `creature_template` SET `npcflag`=1 WHERE `entry`=36217; +UPDATE `creature_template` SET `npcflag`=3 WHERE `entry`=2055; + +-- Creature template addon data for Overseer Kraggosh +DELETE FROM `creature_template_addon` WHERE `entry`=36217; +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(36217, 0, 0x0, 0x101, ''); -- 36217 + +-- Smart AI +UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry` IN (5735,5736,5738,5734,5661,5657,5656, 5655, 5659, 5660, 5658, 2055, 5662, 5700, 5696, 5697, 5726,5727,5728,5729,5730, 36217); +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (5735,5736,5738,5734,5661,5657,5656, 5655, 5659, 5660, 5658, 2055, 5662, 5700, 5696, 5697, 5726,5727,5728,5729,5730, 36217) AND `source_type`=0); +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (573600,573400,566100,205500, 569600) AND `source_type`=9); + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +-- Caged human male +(5736, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 36, 5742, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Toad'), +(5736, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 36, 5739, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 2 2 Change Entry to Caged Sqirrel'), +(5736, 0, 2, 0, 38, 0, 100, 0, 3, 3, 0, 0, 36, 5741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 3 3 Change Entry to Caged Rabbit'), +(5736, 0, 3, 0, 38, 0, 100, 0, 4, 4, 0, 0, 36, 5743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 4 4 Change Entry to Caged Sheep'), +(5736, 0, 4, 5, 38, 0, 100, 0, 5, 5, 0, 0, 11, 7670, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 5 5 Cast Explode'), +(5736, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 5 5 - Run Script'), +-- Caged Human Female +(5735,0,0,0,1,0,100,0,0,13000,29000,45000,10,18,20,1,0,0,0,1,0,0,0,0,0,0,0,"Caged Human Female - Out of Combat - Play Random Emote"), +-- Caged Dwarf Male +(5738,0,0,0,1,0,100,0,0,13000,29000,45000,10,18,20,1,0,0,0,1,0,0,0,0,0,0,0,"Caged Dwarf Male - Out of Combat - Play Random Emote"), +-- Apothecary Keever +(5734, 0, 0, 0, 1, 0, 100, 0, 0, 0, 321000, 321000, 80, 573400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - OOC - Run Script'), +(573400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 1'), +(573400, 9, 2, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 2'), +(573400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 4, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 5736, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 1 1 on Caged Human'), +(573400, 9, 5, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 3'), +(573400, 9, 6, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 4'), +(573400, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 8, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 5'), +(573400, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 10, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 5742, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 2 2 on Caged Toad'), +(573400, 9, 11, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 6'), +(573400, 9, 12, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 7'), +(573400, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 14, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 8'), +(573400, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 16, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 5739, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 3 3 on Caged Squirrel'), +(573400, 9, 17, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 6'), +(573400, 9, 18, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 7'), +(573400, 9, 19, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 20, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 8'), +(573400, 9, 21, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 22, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 5741, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 4 4 on Caged Rabbit'), +(573400, 9, 23, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 6'), +(573400, 9, 24, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 25, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 7'), +(573400, 9, 26, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 27, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 5743, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 5 5 on Caged Sheep'), +(573400, 9, 28, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 8'), +(573400, 9, 39, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 30, 0, 0, 0, 100, 0, 174500, 174500, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 0'), +(573400, 9, 31, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 7794, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Cast Teleport'), +(573400, 9, 37, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +-- Brother Malach +(5661, 0, 0, 0, 1, 0, 100, 0, 0, 0, 170000, 170000, 80, 566100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - OOC - Run script'), +(566100, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 0'), +(566100, 9, 1, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 1'), +(566100, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 107, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Summon Group 0'), +(566100, 9, 3, 0, 0, 0, 100, 0, 25000, 25000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 2'), +(566100, 9, 4, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 3'), +(566100, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 107, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Summon Group 1'), +(566100, 9, 6, 0, 0, 0, 100, 0, 35000, 35000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 4'), +(566100, 9, 7, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 5'), +(566100, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 107, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Summon Group 2'), +(566100, 9, 9, 0, 0, 0, 100, 0, 50000, 50000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Brother Malach - Script - Say Line 5'), +-- Spectator NPC's +(5657, 0, 0, 0, 1, 0, 100, 0, 0, 5000, 2000, 5000, 10, 21, 4, 71, 22, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Marla Fowler - OOC - Random Emote'), +(5656, 0, 0, 0, 1, 0, 100, 0, 0, 5000, 2000, 5000, 10, 21, 4, 71, 22, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Richard Van Brunt - OOC - Random Emote'), +(5655, 0, 0, 0, 1, 0, 100, 0, 0, 5000, 2000, 5000, 10, 21, 4, 71, 22, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Robert Gossom - OOC - Random Emote'), +(5659, 0, 0, 0, 1, 0, 100, 0, 0, 5000, 2000, 5000, 10, 21, 4, 71, 22, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Andrew Hartwell - OOC - Random Emote'), +(5660, 0, 0, 0, 1, 0, 100, 0, 0, 5000, 2000, 5000, 10, 21, 4, 71, 22, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Riley Walker - OOC - Random Emote'), +(5658, 0, 0, 0, 1, 0, 100, 0, 0, 5000, 2000, 5000, 10, 21, 4, 71, 22, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chloe Curthas - OOC - Random Emote'), +-- Below sai is to stop the spectator npcs from attacking summoned npcs, unit_flags 32768 are correct according to sniff and these have flags extra civillian but this does not stop these attacking summoned npcs +(5657, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 18, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Marla Fowler - On Spawn - Set Immune to NPC'), +(5656, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 18, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Richard Van Brunt - On Spawn - Set Immune to NPC'), +(5655, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 18, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Robert Gossom - On Spawn - Set Immune to NPC'), +(5659, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 18, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Andrew Hartwell - On Spawn - Set Immune to NPC'), +(5660, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 18, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Riley Walker - On Spawn - Set Immune to NPC'), +(5658, 0, 1, 0, 11, 0, 100, 0, 0, 0, 0, 0, 18, 512, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chloe Curthas - On Spawn - Set Immune to NPC'), +-- Master Apothecary Faranell +(2055, 0, 0, 0, 1, 0, 100, 0, 90000, 180000, 150000, 320000, 80, 205500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - OOC - Run Script'), +(205500, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 0'), +(205500, 9, 1, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Set Data'), +(205500, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 1'), +(205500, 9, 3, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 1'), +(205500, 9, 4, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Face Overseer Kraggosh'), +(205500, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 1'), +(205500, 9, 6, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 1'), +(205500, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 3'), +(205500, 9, 8, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Set Data'), +(205500, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 2.26893, 'Master Apothecary Faranell - Script - Set Orientation'), +(205500, 9, 10, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 36217, 0, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 4'), +(205500, 9, 11, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, @Guid+4, 36213, 0, 0, 0, 0, 0, 'Master Apothecary Faranell - Script - Say Line 4'), +-- Sergeant Houser +(5662, 0, 0, 1, 1, 0, 100, 0, 7000, 15000, 15000, 22000, 54, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sergeant Houser - OOC - Pause WP'), +(5662, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sergeant Houser - OOC - Say'), +(5662, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 53, 0, 5662, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sergeant Houser - On Spawn - Start WP'), +(5700, 0, 0, 0, 1, 0, 100, 0, 7000, 10000, 7000, 10000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Samantha Shackleton - OOC - Say'), +-- Gerald Abernathy +(5696, 0, 0, 0, 1, 0, 100, 0, 30000, 45000, 230000, 300000, 80, 569600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - OOC - Run Script'), +(569600, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - Script - Say Line 0'), +(569600, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 5697, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - Script - Set Data Theresa'), +(569600, 9, 2, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 1, 2, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - Script - Say Line 2'), +(569600, 9, 3, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 0, 3000, 0, 0, 0, 0, 19, 5699, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - Script - Say Line 0'), +(569600, 9, 4, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 3, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - Script - Say Line 3'), +(569600, 9, 5, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 0, 3000, 0, 0, 0, 0, 19, 5698, 0, 0, 0, 0, 0, 0, 'Gerard Abernathy - Script - Say Line 0'), +-- Theresa +(5697, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 5697, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Data Set - Start WP'), +(5697, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2717, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Data Set - Equip Bottle'), +(5697, 0, 2, 3, 40, 0, 100, 0, 9, 5697, 0, 0, 54, 17000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Reached WP9 - Pause WP'), +(5697, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 10000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Reached WP9 - Say Line 1'), +(5697, 0, 4, 13, 61, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Reached WP9 - Unequip Bottle'), +(5697, 0, 5, 6, 52, 0, 100, 0, 1, 5697, 0, 0, 1, 0, 3000, 0, 0, 0, 0, 19, 4607, 0, 0, 0, 0, 0, 0, 'Theresa - On Text Over - Say'), +(5697, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 2717, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Text Over - Equip Bottle'), +(5697, 0, 7, 8, 40, 0, 100, 0, 18, 5697, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 4.27606, 'Theresa - On Reached WP18 - Set Orientation'), +(5697, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 1, 2, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Reached WP18 - Say Line 1'), +(5697, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Reached WP18 - Unequip Bottle'), +(5697, 0, 10, 0, 52, 0, 100, 0, 2, 5697, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 5696, 0, 0, 0, 0, 0, 0, 'Theresa - On Text Over - Say'), +(5697, 0, 11, 12, 52, 0, 100, 0, 0, 4607, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Text Over - Say'), +(5697, 0, 12, 0, 61, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Text Over - Stand'), +(5697, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Theresa - On Reached WP9 - Kneel'), +(5726, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jezelles Felhunter - On Spawn - Set Random Movement'), +(5727, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jezelles Felstead - On Spawn - Set Random Movement'), +(5728, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jezelles Succubus - On Spawn - Set Random Movement'), +(5729, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jezelles Voidwalker - On Spawn - Set Random Movement'), +(5730, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Jezelles Imp - On Spawn - Set Random Movement'), +(36217, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 36217, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overseer Kraggosh - On Data Set - Start WP'), +(36217, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 66, 0, 0, 0, 0, 0, 0, 10, @Guid+4, 36213, 0, 0, 0, 0, 0, 'Overseer Kraggosh - On Data Set - Face Kor kron overseer'), +(36217, 0, 2, 0, 40, 0, 100, 0, 2, 36217, 0, 0, 54, 45000, 0, 0, 0, 0, 0, 1,0, 0, 0, 0, 0, 0, 0, 'Overseer Kraggosh - On Reached WP2 - Pause WP'), +(36217, 0, 3, 0, 40, 0, 100, 0, 5, 36217, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 3.124139, 'Overseer Kraggosh - On Reached WP5 - Set Orientation'); + +-- Creature Text +DELETE FROM `creature_text` WHERE `entry` IN(5734, 36217, 2055, 36213,5662,5700,5696,5697,5698,5699,4607,5661); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(5734, 0, 0, 'Hmm, it would seem Keever needs a new subject. If that fool Abernathy keeps taking Keever''s subjects, Keever may have to have a word with him.', 12, 33, 100, 1, 0, 0, 'Apothecary Keever ', 2061), +(5734, 1, 0, 'Ahh, there we go. Now, Keever must try this vial and see if it works.', 12, 33, 100, 1, 0, 0, 'Apothecary Keever ', 2062), +(5734, 2, 0, '%s forces the fluid down the weary man''s throat.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2075), +(5734, 3, 0, '%s pokes the small toad.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2064), +(5734, 4, 0, 'Not what Keever was hoping for. Keever may have added too much earthroot. Let''s see if the second serum will do what Keever needs.', 12, 33, 100, 1, 0, 0, 'Apothecary Keever ', 2063), +(5734, 5, 0, '%s feeds the toad some of the strange liquid.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2065), +(5734, 6, 0, '%s pokes the small fuzzy squirrel with obvious disappointment.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2066), +(5734, 7, 0, 'Well, that is just not right. The creature is far too small. Let us see what Keever''s third batch will do.', 12, 33, 100, 1, 0, 0, 'Apothecary Keever ', 2067), +(5734, 8, 0, '%s feeds the squirrel some of the viscous fluid.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2068), +(5734, 9, 0, '%s pokes the skittish rabbit.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2069), +(5734, 10, 0, 'Keever is unhappy with this. Perhaps if Keever were to try a larger dose, that may fix this dilemma.', 12, 33, 100, 1, 0, 0, 'Apothecary Keever ', 2070), +(5734, 11, 0, '%s grabs the rabbit and pours the fluid down its throat, then sets it back inside the cage.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2071), +(5734, 12, 0, 'What is this? Did Keever ask for a sheep? Keever wanted a weapon of great power and all he got was this sheep. Keever is very disappointed.', 12, 33, 100, 1, 0, 0, 'Apothecary Keever ', 2072), +(5734, 13, 0, '%s pokes the wooly sheep repeatedly.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever ', 2073), +(5734, 14, 0, 'Keever is most pleased.', 12, 33, 100, 11, 0, 0, 'Apothecary Keever ', 2074), +(36217, 0, 0, 'I''ve got my eye on you, Faranell.', 12, 1, 100, 1, 0, 0, 'Overseer Kraggosh', 36299), +(36217, 1, 0, 'No abominations protecting you. No secrecy. No plotting in the dark.', 12, 1, 100, 0, 0, 0, 'Overseer Kraggosh', 36300), +(36217, 2, 0, 'If you so much as spit without my permission, this place shuts down. Forcefully.', 12, 1, 100, 0, 0, 0, 'Overseer Kraggosh', 36301), +(2055, 0, 0, 'I assure you, overseer, the Royal Apothecary Society dearly wishes to make up for the tragic misguidance which ended so many lives.', 12, 1, 100, 0, 0, 0, 'Master Apothecary Faranell ', 36302), +(2055, 1, 0, 'We will cause you no trouble. We seek only to continue our research in peace.', 12, 1, 100, 0, 0, 0, 'Master Apothecary Faranell ', 36303), +(36217, 3, 0, 'We''ll see about that.', 12, 1, 100, 1, 0, 0, 'Overseer Kraggosh', 36304), +(36217, 4, 0, 'Get that rotten nut to shut his trap!', 12, 1, 100, 5, 0, 0, 'Overseer Kraggosh', 36305), +(36213, 0, 0, 'Shut your face, you gibbering idiot!', 12, 1, 100, 0, 0, 0, 'Kor''kron Overseer', 36306), +(5662, 0, 0, 'You sorry sacks of maggot flesh can do better than that, now prove it!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1969), +(5662, 0, 1, 'Alright you sorry sacks of bones. Let''s see what you''ve got. Strike your opponent, and don''t stop till I say so.', 12, 33, 100, 1, 0, 0, 'Sergeant Houser', 1963), +(5662, 0, 2, 'What do you call that? If that''s fighting then I''m Lothar himself!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1971), +(5662, 0, 3, 'These piles of wood and straw may show mercy, but the Lich King won''t!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1968), +(5662, 0, 4, 'The sword isn''t a tool, it''s an extension of you. I expect better!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1970), +(5662, 0, 5, 'Stop! You maggots call that fighting? That is pathetic! Now put your hearts in it, you don''t need them anymore anyway!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1964), +(5662, 0, 6, 'You''re dead, not buried. Now show me your best!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1967), +(5662, 0, 7, 'You don''t fight for yourselves anymore, maggots! You fight for the Queen now so show me something worthy of her!', 12, 33, 100, 25, 0, 0, 'Sergeant Houser', 1966), +(5700, 0, 0, 'If I could just find "Magic and the Ways of Power". Ahh here it is, what was it doing over here?', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2034), +(5700, 0, 1, 'Very interesting. But if that''s the case then my theory is wrong. I must reread the other sections to see what I missed.', 12, 33, 100, 1, 0, 0, 'Samantha Shackleton', 2040), +(5700, 0, 2, 'Magical Flows and How They Effect the World", by Maginor Dumas. That''s the one I was looking for.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2030), +(5700, 0, 3, 'If this is correct then I have a lot more research to do.', 12, 33, 100, 1, 0, 0, 'Samantha Shackleton', 2042), +(5700, 0, 4, 'Ahh there it is.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2029), +(5700, 0, 5, 'I really need a better system for filing these books. Ahh that''s the one I wanted.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2031), +(5700, 0, 6, 'But this can''t be right. Where did I put that other book?', 12, 33, 100, 1, 0, 0, 'Samantha Shackleton', 2043), +(5700, 0, 7, '"Khadgar''s Mystical Journal, Volume 8." I think this is the one I wanted.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2032), +(5700, 0, 8, 'Ahh, "Mystical Conjurings of the Archmages of Dalaran." Perfect.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2033), +(5700, 0, 9, 'If I could just find "Magic and the Ways of Power". Ahh here it is, what was it doing over here?', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2034), +(5700, 0, 10, '"Magic Maladies", no. "Magic Matricies", no. Ahh here we go "Magic Mysteries".', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2035), +(5700, 0, 11, 'There''s the mystical tome I was looking for.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2036), +(5700, 0, 12, 'Yes, yes. Hmm, it seems to cross reference another tome. Guess I have to find that one too.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2037), +(5700, 0, 13, 'That wasn''t very helpful. Let me check the other one.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2038), +(5700, 0, 14, 'That''s what I wanted to know. Now I just need to find where the flux variance is discussed.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2039), +(5700, 0, 15, 'So I was right about the energies. Let''s see what the other tome has to say on the subject.', 12, 33, 100, 0, 0, 0, 'Samantha Shackleton', 2041), +(5696, 0, 0, 'Theresa, take this to Father Lankester.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 1995), +(5696, 1, 0, 'Why thank you, my pet.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2011), +(5696, 2, 0, 'As good as I told you it would be, yes?', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2003), +(5696, 2, 1, 'Didn''t I tell you my new domination techniques would work?', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2002), +(5696, 2, 2, 'So what do you think of my new toy?', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 1994), +(5696, 2, 3, 'How do you like my pet?', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2000), +(5696, 3, 0, 'A little torture, a pinch of magic, and an ample helping of invasive surgery. She was conscious, of course.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2007), +(5696, 3, 1, 'Everyone has a weakness, it''s just a matter of finding it.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2008), +(5696, 3, 2, 'It was simple once I broke her spirit.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2004), +(5696, 3, 3, 'I managed to discover that certain parts of the brain when removed or stimulated will make a subject much more docile.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2009), +(5696, 3, 4, 'You don''t expect me to give up all my secrets do you?', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2005), +(5696, 3, 5, 'A little ritual torture can go a long way.', 12, 33, 100, 1, 0, 0, 'Gerard Abernathy', 2006), +(5697, 0, 0, 'Yes My Lord.', 12, 33, 100, 0, 0, 0, 'Theresa', 1998), +(5697, 1, 0, 'My Lord Abernathy sends this to you.', 12, 33, 100, 0, 0, 0, 'Theresa', 1997), +(5697, 2, 0, 'My Lord. From Father Lankester.', 12, 33, 100, 0, 0, 0, 'Theresa', 1999), +(5698, 0, 0, 'Bravo, Gerard, you have exceeded yourself, yet again.', 12, 33, 100, 1, 0, 0, 'Joanna Whitehall', 2018), +(5698, 0, 1, 'I am truly impressed, Gerard. I thought you were all talk, but I see I have been proven wrong.', 12, 33, 100, 1, 0, 0, 'Joanna Whitehall', 2019), +(5698, 0, 2, 'I don''t agree with your turning to alchemy to fix some of the problems, but I do agree with the results. Very well done.', 12, 33, 100, 0, 0, 0, 'Joanna Whitehall', 2024), +(5698, 0, 3, 'Did you have to house train her, Gerard?', 12, 33, 100, 1, 0, 0, 'Joanna Whitehall', 2027), +(5698, 0, 4, 'An amazing discovery you have made. I would love an opportunity to look at all of the failed experiments.', 12, 33, 100, 0, 0, 0, 'Joanna Whitehall', 2023), +(5699, 0, 0, 'I''ve never seen anything like it. No concentration or loss of awareness while the subject is dominated. What did you do to her?', 12, 33, 100, 1, 0, 0, 'Leona Tharpe', 2017), +(5699, 0, 1, 'Amazing! How did you manage a permanent dominate?', 12, 33, 100, 1, 0, 0, 'Leona Tharpe', 2013), +(5699, 0, 2, 'I don''t approve of your experiments, Gerard, but I must admit the results are impressive. What exactly did you do to her?', 12, 33, 100, 1, 0, 0, 'Leona Tharpe', 2014), +(5699, 0, 3, 'She retains knowledge and speech, and even the self sufficiency to perform tasks for you. Precisely what did you do?', 12, 33, 100, 1, 0, 0, 'Leona Tharpe', 2016), +(5699, 0, 4, 'Truly amazing, Gerard. How did you do it?', 12, 33, 100, 1, 0, 0, 'Leona Tharpe', 2012), +(4607, 0, 0, 'Ugh! What is that scoundrel doing sending his vermin to me? Get out of my sight before I take what is left of your life. And take this with you.', 12, 33, 100, 1, 0, 0, 'Father Lankester', 2028), +(5661, 0, 0, 'Edward. Tyler. Prepare for your first challenge.', 12, 33, 100, 1, 0, 0, 'Brother Malach', 1978), +(5661, 1, 0, 'Lysta, summon in the captives.', 12, 33, 100, 0, 0, 0, 'Brother Malach', 1977), +(5661, 2, 0, 'Not a challenge at all it seems. Let us see how you handle your second test. Lysta, bring forth the minions of the Lich King.', 12, 33, 100, 0, 0, 0, 'Brother Malach', 1980), +(5661, 3, 0, 'Lysta, summon in undead captives.', 12, 33, 100, 0, 0, 0, 'Brother Malach', 8306), +(5661, 4, 0, 'It is time to face your final challenge young warriors! Prepare for your hardest fight yet.', 12, 33, 100, 0, 0, 0, 'Brother Malach', 1984), +(5661, 5, 0, 'Lysta, summon forth... the abomination!', 12, 33, 100, 0, 0, 0, 'Brother Malach', 8307), +(5661, 6, 0, 'Well done Edward and Tyler. You are progressing along in your training quite nicely. We shall test your mettle again soon.', 12, 33, 100, 0, 0, 0, 'Brother Malach', 1985); + +-- Update Jezelle Pruitts text as in sniff she uses emote 1 with every line as this is in sniff +UPDATE `creature_text` SET `emote`=1 WHERE `entry`=5702; + +-- Creature summon groups for Brother Malach (Human captives, captive zombie, ghoul and abomination) +DELETE FROM `creature_summon_groups` WHERE `summonerId`=5661; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(5661, 0, 0, 5680, 1735.93, 378.124, -62.2055, 3.71755, 1, 60000), +(5661, 0, 0, 5680, 1734.36, 379.952, -62.2058, 3.92699, 1, 60000), +(5661, 0, 0, 5681, 1734.67, 379.246, -62.2881, -2.78843, 1, 60000), +(5661, 0, 1, 5686, 1734.68, 378.533, -62.1315, 3.85718, 1, 60000), +(5661, 0, 1, 5685, 1735.24, 380.689, -62.2077, 3.85718, 1, 60000), +(5661, 0, 2, 5687, 1735.33, 379.152, -62.206, 3.82227, 1, 60000); + +-- Waypoints + +DELETE FROM `waypoints` WHERE `entry`IN(5697,36217,5662); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(5697, 1, 1662.228149, 353.675415, -60.742798, 'Theresa'), +(5697, 2, 1667.451416, 349.544647, -60.740757, 'Theresa'), +(5697, 3, 1678.154785, 345.241730, -60.481709, 'Theresa'), +(5697, 4, 1698.429199, 334.720062, -60.482483, 'Theresa'), +(5697, 5, 1706.992676, 324.664032, -55.392391, 'Theresa'), +(5697, 6, 1734.973267, 346.734009, -55.393040, 'Theresa'), +(5697, 7, 1782.811035, 350.868103, -62.369541, 'Theresa'), +(5697, 8, 1795.520752, 370.227966, -60.158966, 'Theresa'), +(5697, 9, 1785.445190, 400.132721, -57.214481, 'Theresa'), +(5697, 10, 1795.520752, 370.227966, -60.158966, 'Theresa'), +(5697, 11, 1782.811035, 350.868103, -62.369541, 'Theresa'), +(5697, 12, 1734.973267, 346.734009, -55.393040, 'Theresa'), +(5697, 13, 1706.992676, 324.664032, -55.392391, 'Theresa'), +(5697, 14, 1698.429199, 334.720062, -60.482483, 'Theresa'), +(5697, 15, 1662.228149, 353.675415, -60.742798, 'Theresa'), +(5697, 16, 1678.154785, 345.241730, -60.481709, 'Theresa'), +(5697, 17, 1667.451416, 349.544647, -60.740757, 'Theresa'), +(5697, 18, 1655.74, 367.394, -60.7665, 'Theresa'), +(36217, 1, 1443.416260, 402.955078, -85.267242, 'Overseer Kraggosh'), +(36217, 2, 1441.223755, 394.899078, -85.271645, 'Overseer Kraggosh'), +(36217, 3, 1432.243774, 392.635132, -85.268372, 'Overseer Kraggosh'), +(36217, 4, 1431.118286, 397.971283, -85.262215, 'Overseer Kraggosh'), +(36217, 5, 1438.026, 403.8299, -85.26257, 'Overseer Kraggosh'), +(5662, 1, 1685.04, 417.976, -62.2986, 'Sergeant Houser'), +(5662, 2, 1694.53, 418.755, -62.2986, 'Sergeant Houser'), +(5662, 3, 1704.5, 421.202, -62.3554, 'Sergeant Houser'), +(5662, 4, 1693.69, 418.24, -62.2982, 'Sergeant Houser'); + +-- Delete Sergeant Housers waypoints from waypoint_data as these moved to waypoints table so WP can be paused by SAI +DELETE FROM `waypoint_data` WHERE `id`=384350; +UPDATE `creature` SET `MovementType`=0 WHERE `guid`=38435; +UPDATE `creature_addon` SET `path_id`=0 WHERE `guid`=38435; From 5d5cbf04dfdc5e962b8b9fadbdce7c0f95fd1483 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sat, 19 Jul 2014 14:14:23 +0200 Subject: [PATCH 02/19] DB/Creature: Fix startup errors --- ...eature_misc.sql => 2014_07_19_01_world_creature_misc.sql} | 0 sql/updates/world/2014_07_19_03_world_creature_addon.sql | 5 +++++ 2 files changed, 5 insertions(+) rename sql/updates/world/{2014_07_19_00_world_creature_misc.sql => 2014_07_19_01_world_creature_misc.sql} (100%) create mode 100644 sql/updates/world/2014_07_19_03_world_creature_addon.sql diff --git a/sql/updates/world/2014_07_19_00_world_creature_misc.sql b/sql/updates/world/2014_07_19_01_world_creature_misc.sql similarity index 100% rename from sql/updates/world/2014_07_19_00_world_creature_misc.sql rename to sql/updates/world/2014_07_19_01_world_creature_misc.sql diff --git a/sql/updates/world/2014_07_19_03_world_creature_addon.sql b/sql/updates/world/2014_07_19_03_world_creature_addon.sql new file mode 100644 index 00000000000..598e78ce16e --- /dev/null +++ b/sql/updates/world/2014_07_19_03_world_creature_addon.sql @@ -0,0 +1,5 @@ +DELETE FROM `creature_addon` WHERE `guid` IN ( +45221, +45222, +45223, +45224); From fad73614960465d2d450d07ef838edc1966ed8b7 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 14:41:39 +0200 Subject: [PATCH 03/19] DB/Quest: The Missing Diplomat By dr-j, closes #12522 --- sql/updates/world/2014_07_19_04_world_misc.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sql/updates/world/2014_07_19_04_world_misc.sql diff --git a/sql/updates/world/2014_07_19_04_world_misc.sql b/sql/updates/world/2014_07_19_04_world_misc.sql new file mode 100644 index 00000000000..bff4fe8b3c6 --- /dev/null +++ b/sql/updates/world/2014_07_19_04_world_misc.sql @@ -0,0 +1,10 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=4961 AND `source_type`=0 AND `id`=3; +DELETE FROM `smart_scripts` WHERE `entryorguid`=496101 AND `source_type`=9 AND `id`=6; + +UPDATE `smart_scripts` SET `link`=3 WHERE `entryorguid`=4961 AND `source_type`=0 AND `id`=1 AND `link`=0; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(4961, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 42, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dashel Stonefist - On Quest Accept - Set invincibility HP'); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(496101, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dashel Stonefist - On Script - Set Invincibility HP'); From 4d7be91f14baef05c3c79205ec244951e4f51470 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 14:49:03 +0200 Subject: [PATCH 04/19] DB/Quest: Fool's Stout must be 2 side By Rushor, closes #12501 --- sql/updates/world/2014_07_19_05_world_quest_template.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2014_07_19_05_world_quest_template.sql diff --git a/sql/updates/world/2014_07_19_05_world_quest_template.sql b/sql/updates/world/2014_07_19_05_world_quest_template.sql new file mode 100644 index 00000000000..26c961d5197 --- /dev/null +++ b/sql/updates/world/2014_07_19_05_world_quest_template.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `RequiredRaces`=0 WHERE `Id`=1127; From 81fc4fc65c239425a9c202810280881cbcfcebeb Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 14:52:35 +0200 Subject: [PATCH 05/19] DB/SAI: Boneguard Commanders, Lieutenants and scouts By dr-j, closes #12497 --- .../world/2014_07_19_06_world_misc.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/updates/world/2014_07_19_06_world_misc.sql diff --git a/sql/updates/world/2014_07_19_06_world_misc.sql b/sql/updates/world/2014_07_19_06_world_misc.sql new file mode 100644 index 00000000000..9bffa10fcf7 --- /dev/null +++ b/sql/updates/world/2014_07_19_06_world_misc.sql @@ -0,0 +1,22 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN (34127,33550,33429); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (34127,33550,33429); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(34127,0,0,0,4,0,100,0,0,0,0,0,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Commander - On Aggro - Cast Charge'), +(34127,0,1,0,9,0,100,0,5,5,4000,7000,11,65147,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Commander - On more than 5 yard range - Cast Shield-Breaker'), +(34127,0,2,3,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Commander - On 10-12 yard range - Cast Charge'), +(34127,0,3,0,61,0,100,0,0,0,0,0,11,65147,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Commander - Linked with previous event - Cast Shield-Breaker'), +(34127,0,5,0,11,0,100,0,0,0,0,0,11,60023,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Commander - On Spawn - Cast Scourge Banner Aura'), +(34127,0,6,7,9,0,100,0,0,6000,10000,15000,46,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Commander - On Range - Move forward 15 yards'), +(34127,0,7,0,61,0,100,0,0,0,0,0,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Commander - Linked with Previous Event - Cast Charge'), +(34127,0,8,9,11,0,100,0,0,0,0,0,11,59942,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Commander - On Spawn - Cast Scourge Banner-Bearer'), +(34127,0,9,0,61,0,100,0,0,0,0,0,11,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Commander - Linked with Previous Event - Defend Aura'), +(33550,0,0,0,0,0,100,0,0,3000,3000,3000,11,63233,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Scout - IC - Cast Necrocution'), +(33429,0,0,1,4,0,100,0,0,0,0,0,11,62710,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Lieutenant - On Agro - Cast Strong Guy Sundering Thrust Aura'), +(33429,0,1,0,61,0,100,0,0,0,0,0,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Lieutenant - Linked with Previous Event - Cast Strong Guy Sundering Thrust Aura'), +(33429,0,2,0,25,0,100,0,0,0,0,0,28,62710,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Lieutenant - On Reset - Remove Strong Guy Sundering Thrust Aura'), +(33429,0,3,4,9,0,100,0,0,6000,10000,15000,46,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Lieutenant - On Range - Move forward 15 yards'), +(33429,0,4,0,61,0,100,0,0,0,0,0,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Lieutenant - Linked with Previous Event - Cast Charge'), +(33429,0,5,0,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Boneguard Lieutenant - On 10-12 yard range - Cast Charge'), +(33429,0,6,0,11,0,100,0,0,0,0,0,11,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Boneguard Lieutenant - On Spawn - Defend Aura'); From e9dd589fa8f44c3fa5685acb78957c65fab9bedc Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 15:12:28 +0200 Subject: [PATCH 06/19] DB/Quest: Beginnings completion text By Crysicle, closes #12566 --- sql/updates/world/2014_07_19_07_world_quest_template.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2014_07_19_07_world_quest_template.sql diff --git a/sql/updates/world/2014_07_19_07_world_quest_template.sql b/sql/updates/world/2014_07_19_07_world_quest_template.sql new file mode 100644 index 00000000000..81f6bbed322 --- /dev/null +++ b/sql/updates/world/2014_07_19_07_world_quest_template.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `OfferRewardText` = 'Very good, very good! You''ve done well, $N. Perhaps the interest that is being shown in you is deserved, after all.$b$bThat''ll be for the others to decide--assuming your imp doesn''t overpower you and nip your career in the bud. For now, I''m satisfied that you''ll probably survive your first few months as a %C.$b$bA word about the imp, $N. As a $R knows, don''t let its size fool you, its magic can be very dangerous.' WHERE `id` = 1599; From 318019d18bcdc4a6d2d81bfbebe211295b9b2fb2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 19:11:19 +0200 Subject: [PATCH 07/19] DB/Item: Grelin Whitebeard's Journal Closes #12568, by Crysicle --- sql/updates/world/2014_07_19_08_world_page_text.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sql/updates/world/2014_07_19_08_world_page_text.sql diff --git a/sql/updates/world/2014_07_19_08_world_page_text.sql b/sql/updates/world/2014_07_19_08_world_page_text.sql new file mode 100644 index 00000000000..4ddc7d2be74 --- /dev/null +++ b/sql/updates/world/2014_07_19_08_world_page_text.sql @@ -0,0 +1,8 @@ +-- Grelin Whitebeard's Journal page 2 +UPDATE `page_text` SET `text` = 'managed to get the better of the ugly brute, but he''s now nursing a nasty cut on his arm. Looks like I''ll have to do the chores for a while.$b$bDAY THREE$b$bCold. Snowed a bit around noon.$b$bDAY FOUR$b$bThe lad was back and in good spirits today, so we took our first look at the trolls. Frostmane, I''d say, judging by the markings on their skin and the various trinkets they wore on their bodies.' WHERE `entry` = 81; + +-- Grelin Whitebeard's Journal page 3 +UPDATE `page_text` SET `text` = 'DAY FIVE$b$bHad the lad watch over the camp and I snuck over to the cave and took a look around. The trolls numbers are somewhat troublesome. The Mountaineers might have to be summoned in force if the cave is to be cleared of the troll infestation.$b$bI realize I have not mentioned the troggs of late. They appear in the area in greater numbers, but they are so primitive that they do not pose much of a threat. Time may say if this is true or not.' WHERE `entry` = 82; + +-- Grelin Whitebeard's Journal page 4 +UPDATE `page_text` SET `text` = 'And not a drop of ale for almost a week now.$b$bDAY SIX$b$bCold again. Snows. Trolls. No ale.$b$bDAY SEVEN$b$bSnow below so white,$bSky above so blue,$bWolves will howl the night,$bNot a drop of brew.$b$bDAY EIGHT$b$bThe trolls are perhaps not as large a problem as we initially thought. They have some' WHERE `entry` = 83; From 297e63da362adaaec13617c253194726c47f60e2 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 19 Jul 2014 20:30:13 +0200 Subject: [PATCH 08/19] Scripts/AhnKahet: Elder Nadox * replaced egg core script with db content * removed useless spellscript for Guardian Aura * fixed Swarm aura * Patch 3.3.2 (2010-01-02): Elder Nadox now only gets one Ahn'Kahar Guardian during the encounter. Closes #12506 --- .../world/2014_07_19_09_world_ahn_kahet.sql | 24 +++ .../AzjolNerub/Ahnkahet/boss_elder_nadox.cpp | 171 ++++++++---------- 2 files changed, 102 insertions(+), 93 deletions(-) create mode 100644 sql/updates/world/2014_07_19_09_world_ahn_kahet.sql diff --git a/sql/updates/world/2014_07_19_09_world_ahn_kahet.sql b/sql/updates/world/2014_07_19_09_world_ahn_kahet.sql new file mode 100644 index 00000000000..5b64512f2e8 --- /dev/null +++ b/sql/updates/world/2014_07_19_09_world_ahn_kahet.sql @@ -0,0 +1,24 @@ +UPDATE `creature_template` SET `AIName`='PassiveAI', `ScriptName`='', `flags_extra`=0 WHERE `entry` IN (30172,30173); +DELETE FROM `spell_script_names` WHERE `ScriptName` LIKE 'spell_elder_nadox_guardian'; + +DELETE FROM `spell_script_names` WHERE `spell_id`=56159; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(56159,'spell_ahn_kahet_swarm'); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (30176,30178,30338,31441,31448,31447); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(30176, 0, 0x0, 0x1, '56151'), +(30178, 0, 0x0, 0x1, '56158'), +(30338, 0, 0x0, 0x1, '56158'), +(31441, 0, 0x0, 0x1, '56151'), +(31448, 0, 0x0, 0x1, '56158'), +(31447, 0, 0x0, 0x1, '56158'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=56159; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,56159,0,0,31,0,3,30178,0,0,0,0,'','Swarm can only target Ahn''kahar Swarmer'), +(13,1,56159,0,1,31,0,3,30338,0,0,0,0,'','Swarm can only target Ahn''kahar Swarmer'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=30338 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(30338,0,0,0,0,0,100,0,1000,1000,35000,45000,11,56354,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ahn''kahar Swarmer - In Combat - Cast ''Sprint'''); diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp index ab142c1375c..d4dc5efb6d5 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellAuras.h" #include "SpellScript.h" #include "ahnkahet.h" @@ -31,14 +32,16 @@ enum Yells enum Spells { + // Elder Nadox SPELL_BROOD_PLAGUE = 56130, H_SPELL_BROOD_RAGE = 59465, SPELL_ENRAGE = 26662, // Enraged if too far away from home SPELL_SUMMON_SWARMERS = 56119, // 2x 30178 -- 2x every 10secs - SPELL_SUMMON_SWARM_GUARD = 56120, // 1x 30176 -- every 25% - // Spells Adds - SPELL_SPRINT = 56354, - SPELL_GUARDIAN_AURA = 56151 + SPELL_SUMMON_SWARM_GUARD = 56120, // 1x 30176 + + // Adds + SPELL_SWARM_BUFF = 56281, + SPELL_SPRINT = 56354 }; enum Events @@ -63,7 +66,7 @@ class boss_elder_nadox : public CreatureScript void Reset() override { _Reset(); - AmountHealthModifier = 1; + GuardianSummoned = false; GuardianDied = false; } @@ -128,6 +131,7 @@ class boss_elder_nadox : public CreatureScript events.ScheduleEvent(EVENT_RAGE, urand(10 * IN_MILLISECONDS, 50 * IN_MILLISECONDS)); break; case EVENT_SUMMON_SWARMER: + /// @todo: summoned by egg DoCast(me, SPELL_SUMMON_SWARMERS); if (urand(1, 3) == 3) // 33% chance of dialog Talk(SAY_EGG_SAC); @@ -145,19 +149,20 @@ class boss_elder_nadox : public CreatureScript } } - if (me->HealthBelowPct(100 - AmountHealthModifier * 25)) + if (!GuardianSummoned && me->HealthBelowPct(50)) { + /// @todo: summoned by egg Talk(EMOTE_HATCHES, me); DoCast(me, SPELL_SUMMON_SWARM_GUARD); - ++AmountHealthModifier; + GuardianSummoned = true; } DoMeleeAttackIfReady(); } private: + bool GuardianSummoned; bool GuardianDied; - uint8 AmountHealthModifier; }; CreatureAI* GetAI(Creature* creature) const override @@ -175,20 +180,10 @@ class npc_ahnkahar_nerubian : public CreatureScript { npc_ahnkahar_nerubianAI(Creature* creature) : ScriptedAI(creature) { } - EventMap events; - void Reset() override { - if (me->GetEntry() == NPC_AHNKAHAR_GUARDIAN) - DoCast(me, SPELL_GUARDIAN_AURA, true); - - events.ScheduleEvent(EVENT_SPRINT, 13 * IN_MILLISECONDS); - } - - void JustDied(Unit* /*killer*/) override - { - if (me->GetEntry() == NPC_AHNKAHAR_GUARDIAN) - me->RemoveAurasDueToSpell(SPELL_GUARDIAN_AURA); + _events.Reset(); + _events.ScheduleEvent(EVENT_SPRINT, 13 * IN_MILLISECONDS); } void UpdateAI(uint32 diff) override @@ -196,23 +191,27 @@ class npc_ahnkahar_nerubian : public CreatureScript if (!UpdateVictim()) return; - events.Update(diff); + _events.Update(diff); if (me->HasUnitState(UNIT_STATE_CASTING)) return; - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { - case EVENT_SPRINT: - DoCast(me, SPELL_SPRINT); - events.ScheduleEvent(EVENT_SPRINT, 20 * IN_MILLISECONDS); - break; + case EVENT_SPRINT: + DoCast(me, SPELL_SPRINT); + _events.ScheduleEvent(EVENT_SPRINT, 20 * IN_MILLISECONDS); + break; } } + DoMeleeAttackIfReady(); } + + private: + EventMap _events; }; CreatureAI* GetAI(Creature* creature) const override @@ -221,95 +220,81 @@ class npc_ahnkahar_nerubian : public CreatureScript } }; -//HACK: No, AI. Replace with proper db content? -class npc_nadox_eggs : public CreatureScript +// 56159 - Swarm +class spell_ahn_kahet_swarm : public SpellScriptLoader { -public: - npc_nadox_eggs() : CreatureScript("npc_nadox_eggs") { } + public: + spell_ahn_kahet_swarm() : SpellScriptLoader("spell_ahn_kahet_swarm") { } - struct npc_nadox_eggsAI : public ScriptedAI - { - npc_nadox_eggsAI(Creature* creature) : ScriptedAI(creature) + class spell_ahn_kahet_swarm_SpellScript : public SpellScript { - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); - } + PrepareSpellScript(spell_ahn_kahet_swarm_SpellScript); - void Reset() override { } - void EnterCombat(Unit* /*who*/) override { } - void AttackStart(Unit* /*victim*/) override { } - void MoveInLineOfSight(Unit* /*who*/) override { } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SWARM_BUFF)) + return false; + return true; + } - void UpdateAI(uint32 /*diff*/) override { } - }; + bool Load() override + { + _targetCount = 0; + return true; + } - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_nadox_eggsAI(creature); - } -}; + void CountTargets(std::list& targets) + { + _targetCount = targets.size(); + } -class GuardianCheck -{ -public: - bool operator()(const WorldObject* target) const - { - if (target->GetEntry() == NPC_AHNKAHAR_GUARDIAN) - return true; + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (_targetCount) + { + if (Aura* aura = GetCaster()->GetAura(SPELL_SWARM_BUFF)) + { + aura->SetStackAmount(_targetCount); + aura->RefreshDuration(); + } + else + GetCaster()->CastCustomSpell(SPELL_SWARM_BUFF, SPELLVALUE_AURA_STACK, _targetCount, GetCaster(), TRIGGERED_FULL_MASK); + } + else + GetCaster()->RemoveAurasDueToSpell(SPELL_SWARM_BUFF); + } - return false; - } -}; + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ahn_kahet_swarm_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); + OnEffectHit += SpellEffectFn(spell_ahn_kahet_swarm_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } -class spell_elder_nadox_guardian : public SpellScriptLoader -{ -public: - spell_elder_nadox_guardian() : SpellScriptLoader("spell_elder_nadox_guardian") { } + private: + uint32 _targetCount; + }; - class spell_elder_nadox_guardian_SpellScript : public SpellScript - { - PrepareSpellScript(spell_elder_nadox_guardian_SpellScript); - - void FilterTargets(std::list& targets) + SpellScript* GetSpellScript() const override { - targets.remove_if(GuardianCheck()); + return new spell_ahn_kahet_swarm_SpellScript(); } - - void Register() override - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_elder_nadox_guardian_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_elder_nadox_guardian_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ALLY); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_elder_nadox_guardian_SpellScript(); - } }; class achievement_respect_your_elders : public AchievementCriteriaScript { -public: - achievement_respect_your_elders() : AchievementCriteriaScript("achievement_respect_your_elders") { } + public: + achievement_respect_your_elders() : AchievementCriteriaScript("achievement_respect_your_elders") { } - bool OnCheck(Player* /*player*/, Unit* target) override - { - if (!target) - return false; - - if (Creature* Nadox = target->ToCreature()) - if (Nadox->AI()->GetData(DATA_RESPECT_YOUR_ELDERS)) - return true; - - return false; - } + bool OnCheck(Player* /*player*/, Unit* target) override + { + return target && target->GetAI()->GetData(DATA_RESPECT_YOUR_ELDERS); + } }; void AddSC_boss_elder_nadox() { new boss_elder_nadox(); new npc_ahnkahar_nerubian(); - new npc_nadox_eggs(); - new spell_elder_nadox_guardian(); + new spell_ahn_kahet_swarm(); new achievement_respect_your_elders(); } From 35d508cd6d4cc1c2f587a5146f444fdb71dccbe9 Mon Sep 17 00:00:00 2001 From: MitchesD Date: Sat, 19 Jul 2014 21:05:59 +0200 Subject: [PATCH 09/19] Scripts/HoR: fixed possible exploit with taunt during escape event --- .../FrozenHalls/HallsOfReflection/halls_of_reflection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index b40cfe881dc..b4d1ee2f09b 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -961,9 +961,11 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript if (Creature* lichking = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING_ESCAPE))) { + me->CastSpell(lichking, SPELL_TAUNT_ARTHAS, true); + lichking->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + lichking->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true); AttackStart(lichking); lichking->AI()->AttackStart(me); - me->CastSpell(lichking, SPELL_TAUNT_ARTHAS, true); } me->SetHealth(JAINA_SYLVANAS_MAX_HEALTH); me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER); From 16f375f3970d047d63eb0e34c2b203e6db51433b Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 19 Jul 2014 21:29:45 +0200 Subject: [PATCH 10/19] DB/Creature: Diktynna By Rushor, updates #12540 --- sql/updates/world/2014_07_19_10_world_conditions.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2014_07_19_10_world_conditions.sql diff --git a/sql/updates/world/2014_07_19_10_world_conditions.sql b/sql/updates/world/2014_07_19_10_world_conditions.sql new file mode 100644 index 00000000000..aafa3edf9f7 --- /dev/null +++ b/sql/updates/world/2014_07_19_10_world_conditions.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7361; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 7361, 8822, 0, 0, 8, 0, 9452, 0, 0, 0, 0, 0, '', 'Show gossip text if player has quest 9452 completed'); From b153e1a47f7327f3002e26da265c3b656a969e76 Mon Sep 17 00:00:00 2001 From: leak Date: Sat, 19 Jul 2014 21:59:17 +0200 Subject: [PATCH 11/19] Fix terminate() being called on kicking a player (closing sockets twice is bad) Also, Boost, why does your is_open() suck.. --- src/server/game/Server/WorldSocket.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 3b9749dfd3b..e449f86ffe2 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -77,7 +77,12 @@ void WorldSocket::AsyncReadHeader() } else { - _socket.close(); + // _socket.is_open() till returns true even after calling close() + try + { + _socket.close(); + } + catch (std::exception const& /*ex*/) { } } }); } @@ -152,7 +157,12 @@ void WorldSocket::AsyncReadData(size_t dataSize) } else { - _socket.close(); + // _socket.is_open() till returns true even after calling close() + try + { + _socket.close(); + } + catch (std::exception const& /*ex*/) {} } }); } From 6fdcefee31a2511cc5a21b42c53bd680e0fdc743 Mon Sep 17 00:00:00 2001 From: MitchesD Date: Mon, 14 Jul 2014 22:50:28 +0200 Subject: [PATCH 12/19] Scripts/MagistersTerrace: reworked Selin Fireheart * removed ancient code * converted to EventMap * removed illogical method in instance script --- .../MagistersTerrace/boss_selin_fireheart.cpp | 493 ++++++++---------- .../instance_magisters_terrace.cpp | 24 - .../MagistersTerrace/magisters_terrace.h | 4 +- 3 files changed, 215 insertions(+), 306 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index d6c0f95f967..d34123c58b2 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2014 TrinityCore - * Copyright (C) 2006-2009 ScriptDev2 * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,13 +15,6 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Selin_Fireheart -SD%Complete: 90 -SDComment: Heroic and Normal Support. Needs further testing. -SDCategory: Magister's Terrace -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "magisters_terrace.h" @@ -39,321 +31,264 @@ enum Says enum Spells { - //Crystal effect spells - SPELL_FEL_CRYSTAL_COSMETIC = 44374, + // Crystal effect spells SPELL_FEL_CRYSTAL_DUMMY = 44329, - SPELL_FEL_CRYSTAL_VISUAL = 44355, SPELL_MANA_RAGE = 44320, // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target - //Selin's spells + // Selin's spells SPELL_DRAIN_LIFE = 44294, SPELL_FEL_EXPLOSION = 44314, SPELL_DRAIN_MANA = 46153 // Heroic only }; +enum Phases +{ + PHASE_NORMAL = 1, + PHASE_DRAIN = 2 +}; + +enum Events +{ + EVENT_FEL_EXPLOSION = 1, + EVENT_DRAIN_CRYSTAL, + EVENT_DRAIN_MANA, + EVENT_DRAIN_LIFE, + EVENT_EMPOWER +}; + enum Misc { - CRYSTALS_NUMBER = 5, - DATA_CRYSTALS = 6, - CREATURE_FEL_CRYSTAL = 24722 + ACTION_SWITCH_PHASE = 1 }; class boss_selin_fireheart : public CreatureScript { -public: - boss_selin_fireheart() : CreatureScript("boss_selin_fireheart") { } + public: + boss_selin_fireheart() : CreatureScript("boss_selin_fireheart") { } - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI(creature); - }; - - struct boss_selin_fireheartAI : public ScriptedAI - { - boss_selin_fireheartAI(Creature* creature) : ScriptedAI(creature) + struct boss_selin_fireheartAI : public BossAI { - instance = creature->GetInstanceScript(); - - Crystals.clear(); - //GUIDs per instance is static, so we only need to load them once. - uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE); - for (uint8 i = 0; i < size; ++i) + boss_selin_fireheartAI(Creature* creature) : BossAI(creature, DATA_SELIN) { - instance->SetData64(DATA_FEL_CRYSTAL, i); - uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL); - TC_LOG_DEBUG("scripts", "Selin: Adding Fel Crystal " UI64FMTD " to list", guid); - Crystals.push_back(guid); + CrystalGUID = 0; + _scheduledEvents = false; } - } - InstanceScript* instance; - - std::list Crystals; - - uint32 DrainLifeTimer; - uint32 DrainManaTimer; - uint32 FelExplosionTimer; - uint32 DrainCrystalTimer; - uint32 EmpowerTimer; - - bool IsDraining; - bool DrainingCrystal; - - uint64 CrystalGUID; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course). - - void Reset() override - { - //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for (std::list::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + void Reset() override { - //Unit* unit = ObjectAccessor::GetUnit(*me, FelCrystals[i]); - if (Creature* creature = ObjectAccessor::GetCreature(*me, *itr)) + Crystals.clear(); + me->GetCreatureListWithEntryInGrid(Crystals, NPC_FEL_CRYSTAL, 250.0f); + + for (Creature* creature : Crystals) { if (!creature->IsAlive()) - creature->Respawn(); // Let the core handle setting death state, etc. + creature->Respawn(); - // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } + + _Reset(); + CrystalGUID = 0; + _scheduledEvents = false; } - // Set Inst data for encounter - instance->SetBossState(DATA_SELIN, NOT_STARTED); - - DrainLifeTimer = urand(3000, 7000); - DrainManaTimer = DrainLifeTimer + 5000; - FelExplosionTimer = 2100; - if (IsHeroic()) - DrainCrystalTimer = urand(10000, 15000); - else - DrainCrystalTimer = urand(20000, 25000); - EmpowerTimer = 10000; - - IsDraining = false; - DrainingCrystal = false; - CrystalGUID = 0; - } - - void SelectNearestCrystal() - { - if (Crystals.empty()) - return; - - //float ShortestDistance = 0; - CrystalGUID = 0; - Unit* pCrystal = NULL; - Unit* CrystalChosen = NULL; - //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for (std::list::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + void DoAction(int32 action) override { - pCrystal = NULL; - //pCrystal = ObjectAccessor::GetUnit(*me, FelCrystals[i]); - pCrystal = ObjectAccessor::GetUnit(*me, *itr); - if (pCrystal && pCrystal->IsAlive()) + switch (action) { - // select nearest - if (!CrystalChosen || me->GetDistanceOrder(pCrystal, CrystalChosen, false)) - { - CrystalGUID = pCrystal->GetGUID(); - CrystalChosen = pCrystal; // Store a copy of pCrystal so we don't need to recreate a pointer to closest crystal for the movement and yell. - } - } - } - if (CrystalChosen) - { - Talk(SAY_ENERGY); - Talk(EMOTE_CRYSTAL); - - CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); - - float x, y, z; // coords that we move to, close to the crystal. - CrystalChosen->GetClosePoint(x, y, z, me->GetObjectSize(), CONTACT_DISTANCE); - - me->SetWalk(false); - me->GetMotionMaster()->MovePoint(1, x, y, z); - DrainingCrystal = true; - } - } - - void ShatterRemainingCrystals() - { - if (Crystals.empty()) - return; - - //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for (std::list::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) - { - //Creature* pCrystal = (ObjectAccessor::GetCreature(*me, FelCrystals[i])); - Creature* pCrystal = ObjectAccessor::GetCreature(*me, *itr); - if (pCrystal && pCrystal->IsAlive()) - pCrystal->Kill(pCrystal); - } - } - - void EnterCombat(Unit* /*who*/) override - { - Talk(SAY_AGGRO); - instance->SetBossState(DATA_SELIN, IN_PROGRESS); - } - - void KilledUnit(Unit* /*victim*/) override - { - Talk(SAY_KILL); - } - - void MovementInform(uint32 type, uint32 id) override - { - if (type == POINT_MOTION_TYPE && id == 1) - { - Unit* CrystalChosen = ObjectAccessor::GetUnit(*me, CrystalGUID); - if (CrystalChosen && CrystalChosen->IsAlive()) - { - // Make the crystal attackable - // We also remove NON_ATTACKABLE in case the database has it set. - CrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); - CrystalChosen->CastSpell(me, SPELL_MANA_RAGE, true); - IsDraining = true; - } - else - { - // Make an error message in case something weird happened here - TC_LOG_ERROR("scripts", "Selin Fireheart unable to drain crystal as the crystal is either dead or despawned"); - DrainingCrystal = false; - } - } - } - - void JustDied(Unit* /*killer*/) override - { - Talk(SAY_DEATH); - - instance->SetBossState(DATA_SELIN, DONE); // Encounter complete! - ShatterRemainingCrystals(); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - if (!DrainingCrystal) - { - uint32 maxPowerMana = me->GetMaxPower(POWER_MANA); - if (maxPowerMana && ((me->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) - { - if (DrainLifeTimer <= diff) - { - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_DRAIN_LIFE); - DrainLifeTimer = 10000; - } else DrainLifeTimer -= diff; - - // Heroic only - if (IsHeroic()) - { - if (DrainManaTimer <= diff) - { - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1), SPELL_DRAIN_MANA); - DrainManaTimer = 10000; - } else DrainManaTimer -= diff; - } - } - - if (FelExplosionTimer <= diff) - { - if (!me->IsNonMeleeSpellCast(false)) - { - DoCast(me, SPELL_FEL_EXPLOSION); - FelExplosionTimer = 2000; - } - } else FelExplosionTimer -= diff; - - // If below 10% mana, start recharging - maxPowerMana = me->GetMaxPower(POWER_MANA); - if (maxPowerMana && ((me->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) - { - if (DrainCrystalTimer <= diff) - { - SelectNearestCrystal(); - if (IsHeroic()) - DrainCrystalTimer = urand(10000, 15000); - else - DrainCrystalTimer = urand(20000, 25000); - } else DrainCrystalTimer -= diff; - } - }else - { - if (IsDraining) - { - if (EmpowerTimer <= diff) - { - IsDraining = false; - DrainingCrystal = false; - - Talk(SAY_EMPOWERED); - - Unit* CrystalChosen = ObjectAccessor::GetUnit(*me, CrystalGUID); - if (CrystalChosen && CrystalChosen->IsAlive()) - // Use Deal Damage to kill it, not setDeathState. - CrystalChosen->Kill(CrystalChosen); - - CrystalGUID = 0; - - me->GetMotionMaster()->Clear(); + case ACTION_SWITCH_PHASE: + events.SetPhase(PHASE_NORMAL); + events.ScheduleEvent(EVENT_FEL_EXPLOSION, 2000, 0, PHASE_NORMAL); + AttackStart(me->GetVictim()); me->GetMotionMaster()->MoveChase(me->GetVictim()); - } else EmpowerTimer -= diff; + break; + default: + break; } } - DoMeleeAttackIfReady(); // No need to check if we are draining crystal here, as the spell has a stun. - } - }; + void SelectNearestCrystal() + { + if (Crystals.empty()) + return; + + Crystals.sort(Trinity::ObjectDistanceOrderPred(me)); + if (Creature* CrystalChosen = Crystals.front()) + { + Talk(SAY_ENERGY); + Talk(EMOTE_CRYSTAL); + + DoCast(CrystalChosen, SPELL_FEL_CRYSTAL_DUMMY); + CrystalGUID = CrystalChosen->GetGUID(); + Crystals.remove(CrystalChosen); + + float x, y, z; + CrystalChosen->GetClosePoint(x, y, z, me->GetObjectSize(), CONTACT_DISTANCE); + + events.SetPhase(PHASE_DRAIN); + me->SetWalk(false); + me->GetMotionMaster()->MovePoint(1, x, y, z); + } + } + + void ShatterRemainingCrystals() + { + if (Crystals.empty()) + return; + + for (Creature* crystal : Crystals) + { + if (crystal && crystal->IsAlive()) + crystal->Kill(crystal); + } + } + + void EnterCombat(Unit* /*who*/) override + { + Talk(SAY_AGGRO); + _EnterCombat(); + + events.SetPhase(PHASE_NORMAL); + events.ScheduleEvent(EVENT_FEL_EXPLOSION, 2100, 0, PHASE_NORMAL); + } + + void KilledUnit(Unit* victim) override + { + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_KILL); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == 1) + { + Unit* CrystalChosen = ObjectAccessor::GetUnit(*me, CrystalGUID); + if (CrystalChosen && CrystalChosen->IsAlive()) + { + CrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + CrystalChosen->CastSpell(me, SPELL_MANA_RAGE, true); + events.ScheduleEvent(EVENT_EMPOWER, 10000, PHASE_DRAIN); + } + } + } + + void JustDied(Unit* /*killer*/) override + { + Talk(SAY_DEATH); + _JustDied(); + + ShatterRemainingCrystals(); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FEL_EXPLOSION: + DoCastAOE(SPELL_FEL_EXPLOSION); + events.ScheduleEvent(EVENT_FEL_EXPLOSION, 2000, 0, PHASE_NORMAL); + break; + case EVENT_DRAIN_CRYSTAL: + SelectNearestCrystal(); + _scheduledEvents = false; + break; + case EVENT_DRAIN_MANA: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f, true)) + DoCast(target, SPELL_DRAIN_MANA); + events.ScheduleEvent(EVENT_DRAIN_MANA, 10000, 0, PHASE_NORMAL); + break; + case EVENT_DRAIN_LIFE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f, true)) + DoCast(target, SPELL_DRAIN_LIFE); + events.ScheduleEvent(EVENT_DRAIN_LIFE, 10000, 0, PHASE_NORMAL); + break; + case EVENT_EMPOWER: + { + Talk(SAY_EMPOWERED); + + Creature* CrystalChosen = ObjectAccessor::GetCreature(*me, CrystalGUID); + if (CrystalChosen && CrystalChosen->IsAlive()) + CrystalChosen->Kill(CrystalChosen); + + CrystalGUID = 0; + + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MoveChase(me->GetVictim()); + break; + } + default: + break; + } + } + + if (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA) < 10) + { + if (events.IsInPhase(PHASE_NORMAL) && !_scheduledEvents) + { + _scheduledEvents = true; + uint32 timer = urand(3000, 7000); + events.ScheduleEvent(EVENT_DRAIN_LIFE, timer, 0, PHASE_NORMAL); + + if (IsHeroic()) + { + events.ScheduleEvent(EVENT_DRAIN_CRYSTAL, urand(10000, 15000), 0, PHASE_NORMAL); + events.ScheduleEvent(EVENT_DRAIN_MANA, timer + 5000, 0, PHASE_NORMAL); + } + else + events.ScheduleEvent(EVENT_DRAIN_CRYSTAL, urand(20000, 25000), 0, PHASE_NORMAL); + } + } + + DoMeleeAttackIfReady(); + } + + private: + std::list Crystals; + uint64 CrystalGUID; + bool _scheduledEvents; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI(creature); + }; }; class npc_fel_crystal : public CreatureScript { -public: - npc_fel_crystal() : CreatureScript("npc_fel_crystal") { } + public: + npc_fel_crystal() : CreatureScript("npc_fel_crystal") { } - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_fel_crystalAI(creature); - }; - - struct npc_fel_crystalAI : public ScriptedAI - { - npc_fel_crystalAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override { } - void EnterCombat(Unit* /*who*/) override { } - void AttackStart(Unit* /*who*/) override { } - void MoveInLineOfSight(Unit* /*who*/) override { } - - void UpdateAI(uint32 /*diff*/) override { } - - void JustDied(Unit* /*killer*/) override + struct npc_fel_crystalAI : public ScriptedAI { - if (InstanceScript* instance = me->GetInstanceScript()) + npc_fel_crystalAI(Creature* creature) : ScriptedAI(creature) { } + + void JustDied(Unit* /*killer*/) override { - Creature* Selin = (ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SELIN))); - if (Selin && Selin->IsAlive()) + if (InstanceScript* instance = me->GetInstanceScript()) { - if (CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->CrystalGUID == me->GetGUID()) - { - // Set this to false if we are the Creature that Selin is draining so his AI flows properly - CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->DrainingCrystal = false; - CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->IsDraining = false; - CAST_AI(boss_selin_fireheart::boss_selin_fireheartAI, Selin->AI())->EmpowerTimer = 10000; - if (Selin->GetVictim()) - { - Selin->AI()->AttackStart(Selin->GetVictim()); - Selin->GetMotionMaster()->MoveChase(Selin->GetVictim()); - } - } + Creature* Selin = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SELIN)); + if (Selin && Selin->IsAlive()) + Selin->AI()->DoAction(ACTION_SWITCH_PHASE); } } - } - }; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI(creature); + }; }; void AddSC_boss_selin_fireheart() diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 950d3c3d8f6..65b3553fd87 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -48,13 +48,11 @@ class instance_magisters_terrace : public InstanceMapScript SetBossNumber(EncounterCount); LoadDoorData(doorData); - FelCrystals.clear(); DelrissaDeathCount = 0; SelinGUID = 0; DelrissaGUID = 0; EscapeOrbGUID = 0; - FelCristalIndex = 0; memset(KaelStatue, 0, 2 * sizeof(uint64)); } @@ -65,8 +63,6 @@ class instance_magisters_terrace : public InstanceMapScript { case DATA_DELRISSA_DEATH_COUNT: return DelrissaDeathCount; - case DATA_FEL_CRYSTAL_SIZE: - return uint32(FelCrystals.size()); default: break; } @@ -102,9 +98,6 @@ class instance_magisters_terrace : public InstanceMapScript case NPC_DELRISSA: DelrissaGUID = creature->GetGUID(); break; - case NPC_FELCRYSTALS: - FelCrystals.push_back(creature->GetGUID()); - break; default: break; } @@ -224,35 +217,18 @@ class instance_magisters_terrace : public InstanceMapScript return KaelStatue[1]; case DATA_ESCAPE_ORB: return EscapeOrbGUID; - case DATA_FEL_CRYSTAL: - if (FelCrystals.size() < FelCristalIndex) - { - TC_LOG_ERROR("scripts", "Magisters Terrace: No Fel Crystals loaded in Inst Data"); - return 0; - } - - return FelCrystals.at(FelCristalIndex); default: break; } return 0; } - void SetData64(uint32 type, uint64 value) override - { - if (type == DATA_FEL_CRYSTAL) - FelCristalIndex = value; - } - protected: - std::vector FelCrystals; - uint64 SelinGUID; uint64 DelrissaGUID; uint64 KaelStatue[2]; uint64 EscapeOrbGUID; uint32 DelrissaDeathCount; - uint8 FelCristalIndex; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index d3517dfccf6..8b8d7d5b875 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -28,8 +28,6 @@ enum DataTypes DATA_DELRISSA, DATA_KAELTHAS, - DATA_FEL_CRYSTAL, - DATA_FEL_CRYSTAL_SIZE, DATA_KAEL_STATUE_LEFT, DATA_KAEL_STATUE_RIGHT, @@ -42,7 +40,7 @@ enum CreatureIds { NPC_SELIN = 24723, NPC_DELRISSA = 24560, - NPC_FELCRYSTALS = 24722 + NPC_FEL_CRYSTAL = 24722 }; enum GameObjectIds From 26aaf2384ca48db1c199a263ae50d3ab1da59891 Mon Sep 17 00:00:00 2001 From: karn Date: Sat, 19 Jul 2014 22:49:50 +0100 Subject: [PATCH 13/19] Core/Creature: Minigob Manabonk Closes #11097 Signed-off-by: DDuarte --- .../world/2014_07_19_09_world_misc.sql | 24 ++++ src/server/game/Spells/SpellInfo.cpp | 2 + src/server/scripts/Northrend/zone_dalaran.cpp | 110 ++++++++++++++++++ 3 files changed, 136 insertions(+) create mode 100644 sql/updates/world/2014_07_19_09_world_misc.sql diff --git a/sql/updates/world/2014_07_19_09_world_misc.sql b/sql/updates/world/2014_07_19_09_world_misc.sql new file mode 100644 index 00000000000..5cef0a600bd --- /dev/null +++ b/sql/updates/world/2014_07_19_09_world_misc.sql @@ -0,0 +1,24 @@ +SET @ENTRY_MINIGOB = 32838; +SET @GUID_MINIGOB = 44457; +SET @EVENT_ID = 33; + +-- mail loot +DELETE FROM `mail_loot_template` WHERE `entry`=264; +INSERT INTO `mail_loot_template` (`entry`, `item`) VALUES +(264, 44817); + +-- creature script +UPDATE `creature_template` SET `ScriptName`='npc_minigob_manabonk' WHERE `entry`=@ENTRY_MINIGOB; +-- creature spawn +DELETE FROM `creature` WHERE `guid`=@GUID_MINIGOB; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@GUID_MINIGOB, @ENTRY_MINIGOB, 571, 1, 1, 0, 1, 5877.88, 662.895, 644.53, 1.66366, 300, 0, 0, 3367, 8139, 0, 0, 0, 0); + + +-- game event to spawn the npc +DELETE FROM `game_event` WHERE `eventEntry`=@EVENT_ID; +INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `description`) VALUES +(@EVENT_ID, '2011-03-22 00:10:00', '2020-03-22 00:00:00', 30, 5, 'Dalaran: Minigob'); +DELETE FROM `game_event_creature` WHERE `guid`=@GUID_MINIGOB; +INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES +(@EVENT_ID, @GUID_MINIGOB); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 8d3b37cc1d5..99c3d234ef8 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -2373,6 +2373,8 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const case 61716: // Rabbit Costume case 61734: // Noblegarden Bunny case 62344: // Fists of Stone + case 61819: // Manabonked! (item) + case 61834: // Manabonked! (minigob) return true; default: break; diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp index 1e8da70bbbf..0acb89d7d6f 100644 --- a/src/server/scripts/Northrend/zone_dalaran.cpp +++ b/src/server/scripts/Northrend/zone_dalaran.cpp @@ -172,8 +172,118 @@ public: } }; +enum MinigobData +{ + ZONE_DALARAN = 4395, + + SPELL_MANABONKED = 61834, + SPELL_TELEPORT_VISUAL = 51347, + SPELL_IMPROVED_BLINK = 61995, + + EVENT_SELECT_TARGET = 1, + EVENT_BLINK = 2, + EVENT_DESPAWN_VISUAL = 3, + EVENT_DESPAWN = 4, + + MAIL_MINIGOB_ENTRY = 264, + MAIL_DELIVER_DELAY_MIN = 5*MINUTE, + MAIL_DELIVER_DELAY_MAX = 15*MINUTE +}; + +class npc_minigob_manabonk : public CreatureScript +{ + public: + npc_minigob_manabonk() : CreatureScript("npc_minigob_manabonk") {} + + struct npc_minigob_manabonkAI : public ScriptedAI + { + npc_minigob_manabonkAI(Creature* creature) : ScriptedAI(creature) + { + me->setActive(true); + } + + void Reset() + { + me->SetVisible(false); + events.ScheduleEvent(EVENT_SELECT_TARGET, IN_MILLISECONDS); + } + + Player* SelectTargetInDalaran() + { + std::list PlayerInDalaranList; + PlayerInDalaranList.clear(); + + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + if (Player* player = itr->GetSource()->ToPlayer()) + if (player->GetZoneId() == ZONE_DALARAN && !player->IsFlying() && !player->IsMounted() && !player->IsGameMaster()) + PlayerInDalaranList.push_back(player); + + if (PlayerInDalaranList.empty()) + return NULL; + return Trinity::Containers::SelectRandomContainerElement(PlayerInDalaranList); + } + + void SendMailToPlayer(Player* player) + { + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + int16 deliverDelay = irand(MAIL_DELIVER_DELAY_MIN, MAIL_DELIVER_DELAY_MAX); + MailDraft(MAIL_MINIGOB_ENTRY, true).SendMailTo(trans, MailReceiver(player), MailSender(MAIL_CREATURE, me->GetEntry()), MAIL_CHECK_MASK_NONE, deliverDelay); + CharacterDatabase.CommitTransaction(trans); + } + + void UpdateAI(uint32 diff) + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SELECT_TARGET: + me->SetVisible(true); + DoCast(me, SPELL_TELEPORT_VISUAL); + if (Player* player = SelectTargetInDalaran()) + { + me->NearTeleportTo(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f); + DoCast(player, SPELL_MANABONKED); + SendMailToPlayer(player); + } + events.ScheduleEvent(EVENT_BLINK, 3*IN_MILLISECONDS); + break; + case EVENT_BLINK: + DoCast(me, SPELL_IMPROVED_BLINK); + Position pos; + me->GetRandomNearPosition(pos, (urand(15, 40))); + me->GetMotionMaster()->MovePoint(0, pos.m_positionX, pos.m_positionY, pos.m_positionZ); + events.ScheduleEvent(EVENT_DESPAWN, 3*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_DESPAWN_VISUAL, 2.5*IN_MILLISECONDS); + break; + case EVENT_DESPAWN_VISUAL: + DoCast(me, SPELL_TELEPORT_VISUAL); + break; + case EVENT_DESPAWN: + me->DespawnOrUnsummon(); + break; + default: + break; + } + } + } + + private: + EventMap events; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_minigob_manabonkAI(creature); + } +}; + void AddSC_dalaran() { new npc_mageguard_dalaran; new npc_hira_snowdawn; + new npc_minigob_manabonk(); } From 0129213c0c86c2a8ee817de5a48170bd85ad0190 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 20 Jul 2014 00:20:45 +0200 Subject: [PATCH 14/19] DB/Quest: The Tome of Valor By untaught, closes #1680 --- .../world/2014_07_20_00_world_misc.sql | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sql/updates/world/2014_07_20_00_world_misc.sql diff --git a/sql/updates/world/2014_07_20_00_world_misc.sql b/sql/updates/world/2014_07_20_00_world_misc.sql new file mode 100644 index 00000000000..311b89ad4e3 --- /dev/null +++ b/sql/updates/world/2014_07_20_00_world_misc.sql @@ -0,0 +1,100 @@ +-- +-- Set Proper fation for Defias Raider +UPDATE `creature_template` SET `faction`=17 WHERE `entry`=6180; + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=6182; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=6180 AND `id` IN (3,4) AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(6180,0,3,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,6182,100,0,0,0,0,0,'Defias Raider - On Death Set Data 1 1'), +(6180,0,4,0,11,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,6182,100,0,0,0,0,0,'Defias Raider - On Respawn - Attack Start'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=6182 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(6182,0,0,1,19,0,100,0,1651,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On Accepted Quest ''The Tome of Valor'' - Say Line 0'), +(6182,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Store Target List'), +(6182,0,2,3,61,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Remove npcflag ''Quest Giver'''), +(6182,0,3,4,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Set Event Phase to 1'), +(6182,0,4,0,61,0,100,0,0,0,0,0,53,1,6182,0,0,0,2,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Start WP Movement'), +(6182,0,5,0,40,0,100,0,5,6182,0,0,80,618200,2,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 5 Reached - Call TAL 618200'), +(6182,0,6,0,40,0,100,0,8,6182,0,0,80,618201,2,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 8 Reached - Call TAL 618201'), +(6182,0,7,8,38,2,100,0,1,1,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On Data Set 1 1(phase 2) - Remove Root'), +(6182,0,8,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Say Line 1'), +(6182,0,9,0,40,2,100,0,9,6182,0,0,80,618202,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 9 Reached - Call TAL 618202'), +(6182,0,10,11,38,4,100,0,1,1,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On Data Set 1 1(phase 3) - Remove Root'), +(6182,0,11,0,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Say Line 2'), +(6182,0,12,0,40,0,100,0,10,6182,0,0,80,618203,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 10 Reached - Call TAL 618203'), +(6182,0,13,14,38,8,100,0,1,1,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On Data Set 1 1(phase 4) - Remove Root'), +(6182,0,14,0,61,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Say Line 3'), +(6182,0,15,0,40,8,100,0,11,6182,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 11 Reached - Disable Run'), +(6182,0,16,0,40,8,100,0,12,6182,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 12 Reached - Say Line 4'), +(6182,0,17,18,40,8,100,0,14,6182,0,0,54,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 14 Reached - Pause WP'), +(6182,0,18,19,61,8,100,0,0,0,0,0,40,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Set Sheath to 0'), +(6182,0,19,0,61,8,100,0,0,0,0,0,5,432,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Play Emote'), +(6182,0,20,21,40,8,100,0,18,6182,0,0,15,1651,0,0,0,0,0,12,1,0,0,0,0,0,0,'Daphne Stilwell - On WP 18 Reached - Area Explored Or Event Happens'), +(6182,0,21,0,61,8,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Add npcflag ''Quest Giver'''), +(6182,0,22,0,0,0,100,0,0,0,0,0,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,'Daphne Stilwell - In Combat - Cast spell ''Shoot'''), +(6182,0,23,24,11,0,100,0,0,0,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On Respawn - Remove Root'), +(6182,0,24,0,61,0,100,0,0,0,0,0,40,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Set Sheath to 0'), +(6182,0,25,26,40,0,100,0,19,6182,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - On WP 19 Reached - Stop WP'), +(6182,0,26,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Daphne Stilwell - Link With Previous - Evade'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`IN (618200,618201,618202,618203) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(618200,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 0 - Set Root'), +(618200,9,1,0,0,0,100,0,0,0,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 1 - Pause WP'), +(618200,9,2,0,0,0,100,0,500,500,0,0,5,432,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 2 - Play Emote'), +(618200,9,3,0,0,0,100,0,2000,2000,0,0,71,0,0,0,0,2511,0,1,0,0,0,0,0,0,0,'Action 3 - Equip Ranged Weapon'), +(618200,9,4,0,0,0,100,0,0,0,0,0,40,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 4 - Set Sheath to 2'), +(618200,9,5,0,0,0,100,0,1000,1000,0,0,103,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 5 - Remove Root'), +(618201,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 0 - Set Root'), +(618201,9,1,0,0,0,100,0,0,0,0,0,107,0,1,0,0,0,0,0,0,0,0,0,0,0,0,'Action 1 - Summon Group 0'), +(618201,9,2,0,0,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 2 - Set Event Phase to 2'), +(618202,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 0 - Set Root'), +(618202,9,1,0,0,0,100,0,0,0,0,0,107,1,1,0,0,0,0,0,0,0,0,0,0,0,0,'Action 1 - Summon Group 1'), +(618202,9,2,0,0,0,100,0,0,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 2 - Set Event Phase to 3'), +(618203,9,0,0,0,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 0 - Set Root'), +(618203,9,1,0,0,0,100,0,0,0,0,0,107,2,1,0,0,0,0,0,0,0,0,0,0,0,0,'Action 1 - Summon Group 2'), +(618203,9,2,0,0,0,100,0,0,0,0,0,22,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Action 2 - Set Event Phase 4'); + +DELETE FROM `script_waypoint` WHERE `entry`=6182; +DELETE FROM `waypoints` WHERE `entry`=6182; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(6182,1,-11480.7,1545.09,49.8986,''), +(6182,2,-11466.8,1530.15,50.2636,''), +(6182,3,-11465.2,1528.34,50.9544,'enter hut'), +(6182,4,-11463,1525.24,50.9377,''), +(6182,5,-11461,1526.61,50.9377,'pick up rifle'), +(6182,6,-11463,1525.24,50.9377,''), +(6182,7,-11465.2,1528.34,50.9544,''), +(6182,8,-11468.4,1535.08,50.4009,'hold, prepare for wave1'), +(6182,9,-11468.4,1535.08,50.4009,'hold, prepare for wave2'), +(6182,10,-11468.4,1535.08,50.4009,'hold, prepare for wave3'), +(6182,11,-11467.9,1532.46,50.3489,'we are done'), +(6182,12,-11466.1,1529.86,50.2094,''), +(6182,13,-11463,1525.24,50.9377,''), +(6182,14,-11461,1526.61,50.9377,'deliver rifle'), +(6182,15,-11463,1525.24,50.9377,''), +(6182,16,-11465.2,1528.34,50.9544,''), +(6182,17,-11470.3,1537.28,50.3785,''), +(6182,18,-11475.6,1548.68,50.1844,'complete quest'), +(6182,19,-11482.3,1557.41,48.6245,''); + +DELETE FROM `creature_summon_groups` WHERE `summonerid`=6182; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(6182,0,0,6180,-11450.836,1569.755,54.267,4.230,4,30000), +(6182,0,0,6180,-11449.697,1569.124,54.421,4.206,4,30000), +(6182,0,0,6180,-11448.237,1568.307,54.620,4.206,4,30000), +(6182,0,1,6180,-11450.836,1569.755,54.267,4.230,4,30000), +(6182,0,1,6180,-11449.697,1569.124,54.421,4.206,4,30000), +(6182,0,1,6180,-11448.237,1568.307,54.620,4.206,4,30000), +(6182,0,1,6180,-11448.037,1570.213,54.961,4.283,4,30000), +(6182,0,2,6180,-11450.836,1569.755,54.267,4.230,4,30000), +(6182,0,2,6180,-11449.697,1569.124,54.421,4.206,4,30000), +(6182,0,2,6180,-11448.237,1568.307,54.620,4.206,4,30000), +(6182,0,2,6180,-11448.037,1570.213,54.961,4.283,4,30000), +(6182,0,2,6180,-11449.018,1570.738,54.828,4.220,4,30000); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=4 AND `SourceEntry`=6180; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22,4,6180,0,0,29,0,6180,100,0,1,0,0,'','Execute SAI if only there is no Defias Raider in vicinity'); From a8773daf6e627ddaab0fc612a140a0417c4bca09 Mon Sep 17 00:00:00 2001 From: Duarte Duarte Date: Sat, 19 Jul 2014 23:25:30 +0100 Subject: [PATCH 15/19] SQL: Update and rename 2014_07_19_09_world_misc.sql to 2014_07_19_11_world_misc.sql Fix a typo in the number of columns of the creature insert query --- ...14_07_19_09_world_misc.sql => 2014_07_19_11_world_misc.sql} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename sql/updates/world/{2014_07_19_09_world_misc.sql => 2014_07_19_11_world_misc.sql} (89%) diff --git a/sql/updates/world/2014_07_19_09_world_misc.sql b/sql/updates/world/2014_07_19_11_world_misc.sql similarity index 89% rename from sql/updates/world/2014_07_19_09_world_misc.sql rename to sql/updates/world/2014_07_19_11_world_misc.sql index 5cef0a600bd..981d388df06 100644 --- a/sql/updates/world/2014_07_19_09_world_misc.sql +++ b/sql/updates/world/2014_07_19_11_world_misc.sql @@ -12,8 +12,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_minigob_manabonk' WHERE `entry` -- creature spawn DELETE FROM `creature` WHERE `guid`=@GUID_MINIGOB; INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES -(@GUID_MINIGOB, @ENTRY_MINIGOB, 571, 1, 1, 0, 1, 5877.88, 662.895, 644.53, 1.66366, 300, 0, 0, 3367, 8139, 0, 0, 0, 0); - +(@GUID_MINIGOB, @ENTRY_MINIGOB, 571, 1, 1, 5877.88, 662.895, 644.53, 1.66366, 300, 0, 0); -- game event to spawn the npc DELETE FROM `game_event` WHERE `eventEntry`=@EVENT_ID; From d2c120f2c2920760c56f1c2d1954bb28b9f2b678 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 20 Jul 2014 00:34:04 +0200 Subject: [PATCH 16/19] DB/Creature: Diktynna By Rushor, closes #12540 --- sql/updates/world/2014_07_20_01_world_misc.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2014_07_20_01_world_misc.sql diff --git a/sql/updates/world/2014_07_20_01_world_misc.sql b/sql/updates/world/2014_07_20_01_world_misc.sql new file mode 100644 index 00000000000..cbc3923d56b --- /dev/null +++ b/sql/updates/world/2014_07_20_01_world_misc.sql @@ -0,0 +1,6 @@ +-- Diktynna SAI +SET @ENTRY := 17101; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,20,0,100,0,9452,0,0,0,5,24,0,0,0,0,0,1,0,0,0,0,0,0,0,"Diktynna - On Quest 'Red Snapper - Very Tasty!' Finished - Play Emote 24"); From dce92611f3ff33e7db0a7234d611f5bffb0cc45f Mon Sep 17 00:00:00 2001 From: leak Date: Sun, 20 Jul 2014 00:39:43 +0200 Subject: [PATCH 17/19] Refactored singletons to enable proper deconstruction during shutdown --- src/server/authserver/Main.cpp | 4 ++-- src/server/authserver/Realms/RealmList.h | 6 +++--- src/server/authserver/Server/AuthSession.cpp | 4 ++-- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 8 ++++---- src/server/game/Accounts/AccountMgr.h | 4 ++-- src/server/game/Achievements/AchievementMgr.h | 4 ++-- src/server/game/AuctionHouse/AuctionHouseMgr.h | 4 ++-- src/server/game/Battlefield/BattlefieldMgr.h | 4 ++-- src/server/game/Battlegrounds/ArenaTeamMgr.h | 4 ++-- src/server/game/Battlegrounds/BattlegroundMgr.h | 4 ++-- src/server/game/Calendar/CalendarMgr.h | 4 ++-- src/server/game/Chat/Channels/ChannelMgr.h | 4 ++-- src/server/game/Conditions/ConditionMgr.h | 4 ++-- src/server/game/DungeonFinding/LFGMgr.h | 4 ++-- src/server/game/Entities/Creature/CreatureGroups.h | 4 ++-- src/server/game/Entities/Player/SocialMgr.h | 4 ++-- src/server/game/Events/GameEventMgr.h | 4 ++-- src/server/game/Globals/ObjectAccessor.h | 4 ++-- src/server/game/Globals/ObjectMgr.h | 4 ++-- src/server/game/Groups/GroupMgr.h | 4 ++-- src/server/game/Guilds/GuildMgr.h | 4 ++-- src/server/game/Handlers/AddonHandler.h | 4 ++-- src/server/game/Instances/InstanceSaveMgr.h | 4 ++-- src/server/game/Maps/MapManager.h | 4 ++-- src/server/game/Maps/TransportMgr.h | 4 ++-- src/server/game/Movement/Waypoints/WaypointManager.h | 4 ++-- src/server/game/OutdoorPvP/OutdoorPvPMgr.h | 4 ++-- src/server/game/Pools/PoolMgr.h | 4 ++-- src/server/game/Scripting/ScriptMgr.h | 4 ++-- src/server/game/Scripting/ScriptSystem.h | 4 ++-- src/server/game/Server/Protocol/PacketLog.h | 4 ++-- src/server/game/Spells/SpellMgr.h | 5 ++--- src/server/game/Texts/CreatureTextMgr.h | 4 ++-- src/server/game/Tickets/TicketMgr.h | 4 ++-- src/server/game/Warden/WardenCheckMgr.h | 4 ++-- src/server/game/World/World.h | 4 ++-- src/server/shared/Configuration/Config.h | 4 ++-- src/server/shared/Dynamic/ObjectRegistry.h | 4 ++-- src/server/shared/Logging/Log.h | 8 ++++---- 39 files changed, 83 insertions(+), 84 deletions(-) diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 701f65c0c14..0f200db6af4 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -99,9 +99,9 @@ int main(int argc, char** argv) return 1; // Get the list of realms for the server - sRealmList.Initialize(_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 20)); + sRealmList->Initialize(_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 20)); - if (sRealmList.size() == 0) + if (sRealmList->size() == 0) { TC_LOG_ERROR("server.authserver", "No valid realms specified."); return 1; diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h index b1c77d5a4b5..64419351b57 100644 --- a/src/server/authserver/Realms/RealmList.h +++ b/src/server/authserver/Realms/RealmList.h @@ -62,10 +62,10 @@ class RealmList public: typedef std::map RealmMap; - static RealmList& instance() + static RealmList* instance() { - static RealmList *instance = new RealmList(); - return *instance; + static RealmList instance; + return &instance; } ~RealmList(); diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp index f518dc7593b..987d6dca03f 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -797,13 +797,13 @@ bool AuthSession::_HandleRealmList() uint32 id = fields[0].GetUInt32(); // Update realm list if need - sRealmList.UpdateIfNeed(); + sRealmList->UpdateIfNeed(); // Circle through realms in the RealmList and construct the return packet (including # of user characters in each realm) ByteBuffer pkt; size_t RealmListSize = 0; - for (RealmList::RealmMap::const_iterator i = sRealmList.begin(); i != sRealmList.end(); ++i) + for (RealmList::RealmMap::const_iterator i = sRealmList->begin(); i != sRealmList->end(); ++i) { const Realm &realm = i->second; // don't work with realms which not compatible with the client diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0380ec8bae9..d4afba54498 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1403,8 +1403,8 @@ class SmartWaypointMgr public: static SmartWaypointMgr* instance() { - static SmartWaypointMgr* instance = new SmartWaypointMgr(); - return instance; + static SmartWaypointMgr instance; + return &instance; } void LoadFromDB(); @@ -1439,8 +1439,8 @@ class SmartAIMgr public: static SmartAIMgr* instance() { - static SmartAIMgr* instance = new SmartAIMgr(); - return instance; + static SmartAIMgr instance; + return &instance; } void LoadSmartAIFromDB(); diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h index 2f3137ae3cd..c4b4bd93728 100644 --- a/src/server/game/Accounts/AccountMgr.h +++ b/src/server/game/Accounts/AccountMgr.h @@ -57,8 +57,8 @@ class AccountMgr public: static AccountMgr* instance() { - static AccountMgr* instance = new AccountMgr(); - return instance; + static AccountMgr instance; + return &instance; } AccountOpResult CreateAccount(std::string username, std::string password, std::string email); diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h index 7128b8d6318..219a8fd52fb 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -310,8 +310,8 @@ class AchievementGlobalMgr public: static AchievementGlobalMgr* instance() { - static AchievementGlobalMgr* instance = new AchievementGlobalMgr(); - return instance; + static AchievementGlobalMgr instance; + return &instance; } AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type) const diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 0f42a5833a2..597da13cb1b 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -142,8 +142,8 @@ class AuctionHouseMgr public: static AuctionHouseMgr* instance() { - static AuctionHouseMgr* instance = new AuctionHouseMgr(); - return instance; + static AuctionHouseMgr instance; + return &instance; } typedef std::unordered_map ItemMap; diff --git a/src/server/game/Battlefield/BattlefieldMgr.h b/src/server/game/Battlefield/BattlefieldMgr.h index 9b51fd7710e..65b63ea2952 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.h +++ b/src/server/game/Battlefield/BattlefieldMgr.h @@ -29,8 +29,8 @@ class BattlefieldMgr public: static BattlefieldMgr* instance() { - static BattlefieldMgr* instance = new BattlefieldMgr(); - return instance; + static BattlefieldMgr instance; + return &instance; } // create battlefield events diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.h b/src/server/game/Battlegrounds/ArenaTeamMgr.h index 9a4c1184133..118e9674fbf 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.h +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.h @@ -29,8 +29,8 @@ private: public: static ArenaTeamMgr* instance() { - static ArenaTeamMgr* instance = new ArenaTeamMgr(); - return instance; + static ArenaTeamMgr instance; + return &instance; } typedef std::unordered_map ArenaTeamContainer; diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index 21b87d2bb1f..c21c34d1a10 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -64,8 +64,8 @@ class BattlegroundMgr public: static BattlegroundMgr* instance() { - static BattlegroundMgr* instance = new BattlegroundMgr(); - return instance; + static BattlegroundMgr instance; + return &instance; } void Update(uint32 diff); diff --git a/src/server/game/Calendar/CalendarMgr.h b/src/server/game/Calendar/CalendarMgr.h index 6eecd2a4e8b..e238119defb 100644 --- a/src/server/game/Calendar/CalendarMgr.h +++ b/src/server/game/Calendar/CalendarMgr.h @@ -282,8 +282,8 @@ class CalendarMgr public: static CalendarMgr* instance() { - static CalendarMgr* instance = new CalendarMgr(); - return instance; + static CalendarMgr instance; + return &instance; } void LoadFromDB(); diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h index 0fd5cdbfe24..f3ca9694176 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.h +++ b/src/server/game/Chat/Channels/ChannelMgr.h @@ -37,8 +37,8 @@ class ChannelMgr public: static ChannelMgr* instance() { - static ChannelMgr* instance = new ChannelMgr(); - return instance; + static ChannelMgr instance; + return &instance; } static ChannelMgr * forTeam(uint32 team); diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index a78434776e0..d5428ed2d14 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -230,8 +230,8 @@ class ConditionMgr static ConditionMgr* instance() { - static ConditionMgr* instance = new ConditionMgr(); - return instance; + static ConditionMgr instance; + return &instance; } void LoadConditions(bool isReload = false); diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 3b38c23232c..547d026dee0 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -298,8 +298,8 @@ class LFGMgr public: static LFGMgr* instance() { - static LFGMgr* instance = new LFGMgr(); - return instance; + static LFGMgr instance; + return &instance; } // Functions used outside lfg namespace diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index 29832e4ff76..f53de0d48f1 100644 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -47,8 +47,8 @@ class FormationMgr public: static FormationMgr* instance() { - static FormationMgr* instance = new FormationMgr(); - return instance; + static FormationMgr instance; + return &instance; } void AddCreatureToGroup(uint32 group_id, Creature* creature); diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h index 68c25fbf648..3ed41a847ef 100644 --- a/src/server/game/Entities/Player/SocialMgr.h +++ b/src/server/game/Entities/Player/SocialMgr.h @@ -129,8 +129,8 @@ class SocialMgr public: static SocialMgr* instance() { - static SocialMgr* instance = new SocialMgr(); - return instance; + static SocialMgr instance; + return &instance; } // Misc diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h index 94beb9912d5..e5c00da5e91 100644 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -101,8 +101,8 @@ class GameEventMgr public: static GameEventMgr* instance() { - static GameEventMgr* instance = new GameEventMgr(); - return instance; + static GameEventMgr instance; + return &instance; } typedef std::set ActiveEvents; diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index 79799cec55f..8c92a8f3a6e 100644 --- a/src/server/game/Globals/ObjectAccessor.h +++ b/src/server/game/Globals/ObjectAccessor.h @@ -94,8 +94,8 @@ class ObjectAccessor static ObjectAccessor* instance() { - static ObjectAccessor *instance = new ObjectAccessor(); - return instance; + static ObjectAccessor instance; + return &instance; } template static T* GetObjectInOrOutOfWorld(uint64 guid, T* /*typeSpecifier*/) diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 1a7fd311ba0..738b99778f8 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -694,8 +694,8 @@ class ObjectMgr public: static ObjectMgr* instance() { - static ObjectMgr* instance = new ObjectMgr(); - return instance; + static ObjectMgr instance; + return &instance; } typedef std::unordered_map ItemMap; diff --git a/src/server/game/Groups/GroupMgr.h b/src/server/game/Groups/GroupMgr.h index 4bf440c881e..556df1bc351 100644 --- a/src/server/game/Groups/GroupMgr.h +++ b/src/server/game/Groups/GroupMgr.h @@ -29,8 +29,8 @@ private: public: static GroupMgr* instance() { - static GroupMgr* instance = new GroupMgr(); - return instance; + static GroupMgr instance; + return &instance; } typedef std::map GroupContainer; diff --git a/src/server/game/Guilds/GuildMgr.h b/src/server/game/Guilds/GuildMgr.h index 032a8864e3e..4aa418b7e73 100644 --- a/src/server/game/Guilds/GuildMgr.h +++ b/src/server/game/Guilds/GuildMgr.h @@ -29,8 +29,8 @@ private: public: static GuildMgr* instance() { - static GuildMgr* instance = new GuildMgr(); - return instance; + static GuildMgr instance; + return &instance; } Guild* GetGuildByLeader(uint64 guid) const; diff --git a/src/server/game/Handlers/AddonHandler.h b/src/server/game/Handlers/AddonHandler.h index 31bbfa01900..c60f2942efd 100644 --- a/src/server/game/Handlers/AddonHandler.h +++ b/src/server/game/Handlers/AddonHandler.h @@ -28,8 +28,8 @@ class AddonHandler public: static AddonHandler* instance() { - static AddonHandler* instance = new AddonHandler(); - return instance; + static AddonHandler instance; + return &instance; } bool BuildAddonPacket(WorldPacket* Source, WorldPacket* Target); diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index 98b37386a3f..52e6a847211 100644 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -160,8 +160,8 @@ class InstanceSaveManager static InstanceSaveManager* instance() { - static InstanceSaveManager *instance = new InstanceSaveManager(); - return instance; + static InstanceSaveManager instance; + return &instance; } /* resetTime is a global propery of each (raid/heroic) map diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 990d5e80c1a..e028833d72d 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -32,8 +32,8 @@ class MapManager public: static MapManager* instance() { - static MapManager* instance = new MapManager(); - return instance; + static MapManager instance; + return &instance; } Map* CreateBaseMap(uint32 mapId); diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h index 6ebc6316710..04c372cc526 100644 --- a/src/server/game/Maps/TransportMgr.h +++ b/src/server/game/Maps/TransportMgr.h @@ -100,8 +100,8 @@ class TransportMgr public: static TransportMgr* instance() { - static TransportMgr* instance = new TransportMgr(); - return instance; + static TransportMgr instance; + return &instance; } void Unload(); diff --git a/src/server/game/Movement/Waypoints/WaypointManager.h b/src/server/game/Movement/Waypoints/WaypointManager.h index b12396293aa..385f4809729 100644 --- a/src/server/game/Movement/Waypoints/WaypointManager.h +++ b/src/server/game/Movement/Waypoints/WaypointManager.h @@ -39,8 +39,8 @@ class WaypointMgr public: static WaypointMgr* instance() { - static WaypointMgr* instance = new WaypointMgr(); - return instance; + static WaypointMgr instance; + return &instance; } // Attempts to reload a single path from database diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h index ab1908e273d..1a9db2b682e 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h @@ -44,8 +44,8 @@ class OutdoorPvPMgr public: static OutdoorPvPMgr* instance() { - static OutdoorPvPMgr* instance = new OutdoorPvPMgr(); - return instance; + static OutdoorPvPMgr instance; + return &instance; } // create outdoor pvp events diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h index 0a3f52b55f6..d1fcadd40de 100644 --- a/src/server/game/Pools/PoolMgr.h +++ b/src/server/game/Pools/PoolMgr.h @@ -110,8 +110,8 @@ class PoolMgr public: static PoolMgr* instance() { - static PoolMgr* instance = new PoolMgr(); - return instance; + static PoolMgr instance; + return &instance; } void LoadFromDB(); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 260c43f9b3b..325a0743d79 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -881,8 +881,8 @@ class ScriptMgr public: /* Initialization */ static ScriptMgr* instance() { - static ScriptMgr* instance = new ScriptMgr(); - return instance; + static ScriptMgr instance; + return &instance; } void Initialize(); diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h index 636343838c1..74c51e5b136 100644 --- a/src/server/game/Scripting/ScriptSystem.h +++ b/src/server/game/Scripting/ScriptSystem.h @@ -54,8 +54,8 @@ class SystemMgr public: static SystemMgr* instance() { - static SystemMgr* instance = new SystemMgr(); - return instance; + static SystemMgr instance; + return &instance; } typedef std::unordered_map PointMoveMap; diff --git a/src/server/game/Server/Protocol/PacketLog.h b/src/server/game/Server/Protocol/PacketLog.h index 71d87bf45ae..4f298fa3c50 100644 --- a/src/server/game/Server/Protocol/PacketLog.h +++ b/src/server/game/Server/Protocol/PacketLog.h @@ -37,8 +37,8 @@ class PacketLog public: static PacketLog* instance() { - static PacketLog* instance = new PacketLog(); - return instance; + static PacketLog instance; + return &instance; } void Initialize(); diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 53b4cef73e8..448ddb9860b 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -610,9 +610,8 @@ class SpellMgr public: static SpellMgr* instance() { - static SpellMgr* instance = new SpellMgr(); - - return instance; + static SpellMgr instance; + return &instance; } // Spell correctness for client using diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index f8c499f7ce6..18dc7683b8d 100644 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -89,8 +89,8 @@ class CreatureTextMgr public: static CreatureTextMgr* instance() { - static CreatureTextMgr* instance = new CreatureTextMgr(); - return instance; + static CreatureTextMgr instance; + return &instance; } void LoadCreatureTexts(); diff --git a/src/server/game/Tickets/TicketMgr.h b/src/server/game/Tickets/TicketMgr.h index 00b4e228fab..5ad44365e7f 100644 --- a/src/server/game/Tickets/TicketMgr.h +++ b/src/server/game/Tickets/TicketMgr.h @@ -180,8 +180,8 @@ private: public: static TicketMgr* instance() { - static TicketMgr* instance = new TicketMgr(); - return instance; + static TicketMgr instance; + return &instance; } void LoadTickets(); diff --git a/src/server/game/Warden/WardenCheckMgr.h b/src/server/game/Warden/WardenCheckMgr.h index c9e26283060..4a56c1fc849 100644 --- a/src/server/game/Warden/WardenCheckMgr.h +++ b/src/server/game/Warden/WardenCheckMgr.h @@ -57,8 +57,8 @@ class WardenCheckMgr public: static WardenCheckMgr* instance() { - static WardenCheckMgr* instance = new WardenCheckMgr(); - return instance; + static WardenCheckMgr instance; + return &instance; } // We have a linear key without any gaps, so we use vector for fast access diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 22dece5d4f0..7d3c7694463 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -520,8 +520,8 @@ class World public: static World* instance() { - static World* instance = new World(); - return instance; + static World instance; + return &instance; } static std::atomic m_worldLoopCounter; diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h index 68daca5440f..42c3a700f3f 100644 --- a/src/server/shared/Configuration/Config.h +++ b/src/server/shared/Configuration/Config.h @@ -35,8 +35,8 @@ public: static ConfigMgr* instance() { - static ConfigMgr *instance = new ConfigMgr(); - return instance; + static ConfigMgr instance; + return &instance; } bool Reload(); diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h index e9e57415073..fe55982f15f 100644 --- a/src/server/shared/Dynamic/ObjectRegistry.h +++ b/src/server/shared/Dynamic/ObjectRegistry.h @@ -35,8 +35,8 @@ class ObjectRegistry static ObjectRegistry* instance() { - static ObjectRegistry* instance = new ObjectRegistry(); - return instance; + static ObjectRegistry instance; + return &instance; } /// Returns a registry item diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index e739c9eaf4e..8ae8db5bf5f 100644 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -43,15 +43,15 @@ class Log static Log* instance(boost::asio::io_service* ioService = nullptr) { - static Log* instance = new Log(); + static Log instance; if (ioService != nullptr) { - instance->_ioService = ioService; - instance->_strand = new boost::asio::strand(*ioService); + instance._ioService = ioService; + instance._strand = new boost::asio::strand(*ioService); } - return instance; + return &instance; } void LoadFromConfig(); From a59ec8c8e9aa76700e4f1c78ca9eaba300ee712d Mon Sep 17 00:00:00 2001 From: Duarte Duarte Date: Sat, 19 Jul 2014 23:52:18 +0100 Subject: [PATCH 18/19] README: Update wiki install links --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6fe8f120e27..80eb03d9879 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ website at [TrinityCore.org](http://www.trinitycore.org). ## Install Detailed installation guides are available in the wiki for -[Windows](http://collab.kpsn.org/display/tc/How-to_Win), -[Linux](http://collab.kpsn.org/display/tc/How-to_Linux) and -[Mac OSX](http://collab.kpsn.org/display/tc/How-to_Mac). +[Windows](http://collab.kpsn.org/display/tc/Win), +[Linux](http://collab.kpsn.org/display/tc/Linux) and +[Mac OSX](http://collab.kpsn.org/display/tc/Mac). ## Reporting issues From 0531f52008cfc4ecb28c0b3cd67504e06452ab75 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 20 Jul 2014 02:54:12 +0200 Subject: [PATCH 19/19] Core: Fix non pch build (gcc) --- src/server/game/Chat/ChatLink.h | 1 + src/server/game/Server/Protocol/PacketLog.cpp | 1 + src/server/scripts/Northrend/zone_dalaran.cpp | 7 ++++--- .../shared/Cryptography/Authentication/AuthCrypt.cpp | 2 ++ src/server/shared/Cryptography/BigNumber.cpp | 1 + src/server/shared/Cryptography/SHA1.cpp | 1 + src/server/shared/Cryptography/WardenKeyGeneration.h | 2 ++ src/server/shared/Define.h | 7 ++++--- src/server/shared/Logging/AppenderConsole.cpp | 6 +++--- src/server/shared/Utilities/Util.cpp | 7 +++++++ 10 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index cc86cb538ea..4cfa9c34bf7 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -21,6 +21,7 @@ #include "SharedDefines.h" #include #include +#include struct ItemLocale; struct ItemTemplate; diff --git a/src/server/game/Server/Protocol/PacketLog.cpp b/src/server/game/Server/Protocol/PacketLog.cpp index 6ef33133615..23dfb3538bc 100644 --- a/src/server/game/Server/Protocol/PacketLog.cpp +++ b/src/server/game/Server/Protocol/PacketLog.cpp @@ -18,6 +18,7 @@ #include "PacketLog.h" #include "Config.h" #include "WorldPacket.h" +#include "Timer.h" #pragma pack(push, 1) diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp index 0acb89d7d6f..4cd0e929cd2 100644 --- a/src/server/scripts/Northrend/zone_dalaran.cpp +++ b/src/server/scripts/Northrend/zone_dalaran.cpp @@ -252,13 +252,14 @@ class npc_minigob_manabonk : public CreatureScript events.ScheduleEvent(EVENT_BLINK, 3*IN_MILLISECONDS); break; case EVENT_BLINK: + { DoCast(me, SPELL_IMPROVED_BLINK); - Position pos; - me->GetRandomNearPosition(pos, (urand(15, 40))); + Position pos = me->GetRandomNearPosition(frand(15, 40)); me->GetMotionMaster()->MovePoint(0, pos.m_positionX, pos.m_positionY, pos.m_positionZ); - events.ScheduleEvent(EVENT_DESPAWN, 3*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_DESPAWN, 3 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_DESPAWN_VISUAL, 2.5*IN_MILLISECONDS); break; + } case EVENT_DESPAWN_VISUAL: DoCast(me, SPELL_TELEPORT_VISUAL); break; diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp index ff94f307254..ec8913ba1bc 100644 --- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp +++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp @@ -20,6 +20,8 @@ #include "Cryptography/HMACSHA1.h" #include "Cryptography/BigNumber.h" +#include + AuthCrypt::AuthCrypt() : _clientDecrypt(SHA_DIGEST_LENGTH), _serverEncrypt(SHA_DIGEST_LENGTH), _initialized(false) diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp index c5e0635c5ec..1319e116159 100644 --- a/src/server/shared/Cryptography/BigNumber.cpp +++ b/src/server/shared/Cryptography/BigNumber.cpp @@ -19,6 +19,7 @@ #include "Cryptography/BigNumber.h" #include #include +#include #include #include diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp index c89469bafb5..d47b13067cd 100644 --- a/src/server/shared/Cryptography/SHA1.cpp +++ b/src/server/shared/Cryptography/SHA1.cpp @@ -18,6 +18,7 @@ #include "SHA1.h" #include "BigNumber.h" +#include #include SHA1Hash::SHA1Hash() diff --git a/src/server/shared/Cryptography/WardenKeyGeneration.h b/src/server/shared/Cryptography/WardenKeyGeneration.h index 11bc00d641a..9832d5a9c72 100644 --- a/src/server/shared/Cryptography/WardenKeyGeneration.h +++ b/src/server/shared/Cryptography/WardenKeyGeneration.h @@ -18,6 +18,8 @@ #include "SHA1.h" +#include + #ifndef _WARDEN_KEY_GENERATION_H #define _WARDEN_KEY_GENERATION_H diff --git a/src/server/shared/Define.h b/src/server/shared/Define.h index e173925f314..c04a2a81629 100644 --- a/src/server/shared/Define.h +++ b/src/server/shared/Define.h @@ -21,15 +21,16 @@ #include "CompilerDefs.h" +#include +#include +#include + #if COMPILER == COMPILER_GNU # if !defined(__STDC_FORMAT_MACROS) # define __STDC_FORMAT_MACROS # endif #endif -#include -#include - #define TRINITY_LITTLEENDIAN 0 #define TRINITY_BIGENDIAN 1 diff --git a/src/server/shared/Logging/AppenderConsole.cpp b/src/server/shared/Logging/AppenderConsole.cpp index 8102d3b6021..20923162906 100644 --- a/src/server/shared/Logging/AppenderConsole.cpp +++ b/src/server/shared/Logging/AppenderConsole.cpp @@ -16,14 +16,14 @@ */ #include -#if PLATFORM == PLATFORM_WINDOWS - #include -#endif #include "AppenderConsole.h" #include "Config.h" #include "Util.h" +#if PLATFORM == PLATFORM_WINDOWS + #include +#endif AppenderConsole::AppenderConsole(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags): Appender(id, name, APPENDER_CONSOLE, level, flags), _colored(false) diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index a65f54f87fc..d1799913d41 100644 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -21,8 +21,15 @@ #include "utf8.h" #include "SFMT.h" #include "Errors.h" // for ASSERT +#include #include +#if PLATFORM == PLATFORM_UNIX + #include + #include + #include +#endif + static boost::thread_specific_ptr sfmtRand; static SFMTRand* GetRng()