diff options
71 files changed, 1004 insertions, 467 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 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 index 1f8eba3d33c..1f8eba3d33c 100644 --- a/sql/updates/world/2014_07_19_00_world_creature_misc.sql +++ b/sql/updates/world/2014_07_19_01_world_creature_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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society> - 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 <Royal Apothecary Society>', 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 <Royal Apothecary Society>', 2062), +(5734, 2, 0, '%s forces the fluid down the weary man''s throat.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 2075), +(5734, 3, 0, '%s pokes the small toad.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 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 <Royal Apothecary Society>', 2063), +(5734, 5, 0, '%s feeds the toad some of the strange liquid.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 2065), +(5734, 6, 0, '%s pokes the small fuzzy squirrel with obvious disappointment.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 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 <Royal Apothecary Society>', 2067), +(5734, 8, 0, '%s feeds the squirrel some of the viscous fluid.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 2068), +(5734, 9, 0, '%s pokes the skittish rabbit.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 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 <Royal Apothecary Society>', 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 <Royal Apothecary Society>', 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 <Royal Apothecary Society>', 2072), +(5734, 13, 0, '%s pokes the wooly sheep repeatedly.', 16, 0, 100, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 2073), +(5734, 14, 0, 'Keever is most pleased.', 12, 33, 100, 11, 0, 0, 'Apothecary Keever <Royal Apothecary Society>', 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; 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); 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'); 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; 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'); 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; 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; 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/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'); diff --git a/sql/updates/world/2014_07_19_11_world_misc.sql b/sql/updates/world/2014_07_19_11_world_misc.sql new file mode 100644 index 00000000000..981d388df06 --- /dev/null +++ b/sql/updates/world/2014_07_19_11_world_misc.sql @@ -0,0 +1,23 @@ +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, 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; +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/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'); 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"); diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 9fe6fb276a8..a5781171f92 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -101,9 +101,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 beb520df25a..0063b1a60c8 100644 --- a/src/server/authserver/Realms/RealmList.h +++ b/src/server/authserver/Realms/RealmList.h @@ -71,10 +71,10 @@ class RealmList public: typedef std::map<std::string, Realm> 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 3bc51ace67b..560cf75b447 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -759,13 +759,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/authserver/Server/BattlenetSession.cpp b/src/server/authserver/Server/BattlenetSession.cpp index 3725f5dbff8..127ce109b15 100644 --- a/src/server/authserver/Server/BattlenetSession.cpp +++ b/src/server/authserver/Server/BattlenetSession.cpp @@ -430,7 +430,7 @@ bool Battlenet::Session::HandleDisconnect(PacketHeader& /*header*/, BitStream& / bool Battlenet::Session::HandleRealmUpdateSubscribe(PacketHeader& /*header*/, BitStream& /*packet*/) { - sRealmList.UpdateIfNeed(); + sRealmList->UpdateIfNeed(); RealmCharacterCounts* counts = new RealmCharacterCounts(); @@ -447,7 +447,7 @@ bool Battlenet::Session::HandleRealmUpdateSubscribe(PacketHeader& /*header*/, Bi } while (countResult->NextRow()); } - for (RealmList::RealmMap::const_iterator i = sRealmList.begin(); i != sRealmList.end(); ++i) + for (RealmList::RealmMap::const_iterator i = sRealmList->begin(); i != sRealmList->end(); ++i) { Realm const& realm = i->second; @@ -501,7 +501,7 @@ bool Battlenet::Session::HandleRealmJoinRequest(PacketHeader& header, BitStream& join.Read(); RealmJoinResult* result = new RealmJoinResult(); - Realm const* realm = sRealmList.GetRealm(join.Realm); + Realm const* realm = sRealmList->GetRealm(join.Realm); if (!realm || realm->flag & (REALM_FLAG_INVALID | REALM_FLAG_OFFLINE)) { AsyncWrite(result); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index f3106ed726b..f09e16268c1 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1411,8 +1411,8 @@ class SmartWaypointMgr public: static SmartWaypointMgr* instance() { - static SmartWaypointMgr* instance = new SmartWaypointMgr(); - return instance; + static SmartWaypointMgr instance; + return &instance; } void LoadFromDB(); @@ -1447,8 +1447,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 47801f3ce19..add00ec7feb 100644 --- a/src/server/game/Accounts/AccountMgr.h +++ b/src/server/game/Accounts/AccountMgr.h @@ -58,8 +58,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 66c91ef728e..efa3e3ce5fa 100644 --- a/src/server/game/Achievements/AchievementMgr.h +++ b/src/server/game/Achievements/AchievementMgr.h @@ -307,8 +307,8 @@ class AchievementGlobalMgr static AchievementGlobalMgr* instance() { - static AchievementGlobalMgr* instance = new AchievementGlobalMgr(); - return instance; + static AchievementGlobalMgr instance; + return &instance; } AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type, bool guild = false) const diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 3222d3bfa3c..8e74b4c53a6 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<uint32, Item*> ItemMap; diff --git a/src/server/game/Battlefield/BattlefieldMgr.h b/src/server/game/Battlefield/BattlefieldMgr.h index a3aad126479..ca057367e5a 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 17b9120c7f6..eaf39278c28 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<uint32, ArenaTeam*> ArenaTeamContainer; diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index ee7fd660851..e6f8eee354e 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -63,8 +63,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 8d744988a76..3dadcbdf645 100644 --- a/src/server/game/Calendar/CalendarMgr.h +++ b/src/server/game/Calendar/CalendarMgr.h @@ -283,8 +283,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/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index e9573a631e4..ebe2583dc1c 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -21,6 +21,7 @@ #include "SharedDefines.h" #include <sstream> #include <list> +#include <cstring> struct ItemLocale; struct ItemTemplate; diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index f4130a3a619..9a48985b90d 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -231,8 +231,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 c42777c494c..b04b4f1a7ab 100644 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -304,8 +304,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 99b94357a63..5afa26ec746 100644 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -102,8 +102,8 @@ class GameEventMgr public: static GameEventMgr* instance() { - static GameEventMgr* instance = new GameEventMgr(); - return instance; + static GameEventMgr instance; + return &instance; } typedef std::set<uint16> ActiveEvents; diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h index dff783f4276..d2331f14690 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<class T> static T* GetObjectInOrOutOfWorld(uint64 guid, T* /*typeSpecifier*/) diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 46561fd7773..45671f016c8 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -730,8 +730,8 @@ class ObjectMgr public: static ObjectMgr* instance() { - static ObjectMgr* instance = new ObjectMgr(); - return instance; + static ObjectMgr instance; + return &instance; } typedef std::unordered_map<uint32, Item*> 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<uint32, Group*> GroupContainer; diff --git a/src/server/game/Guilds/GuildMgr.h b/src/server/game/Guilds/GuildMgr.h index 318445fe844..5df59f7e8ea 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 de8a0e0fc8e..75dd8ef3f74 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 e023c8be4ee..94a4ba335b1 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 fc06dca6355..bc58519fde4 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -880,8 +880,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<uint32, ScriptPointVector> PointMoveMap; 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/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/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index db8d4e8a3e8..2680df3ac3a 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -82,7 +82,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*/) { } } }); } @@ -187,7 +192,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*/) {} } }); } diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index e2c66dc6b3a..4b6e4dc2ee7 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -2576,6 +2576,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/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 775d3f0c36d..f2555820b92 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 d1db202ca68..aef38a1923e 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 557a0e62965..00c897a6f00 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -539,8 +539,8 @@ class World public: static World* instance() { - static World* instance = new World(); - return instance; + static World instance; + return &instance; } static std::atomic<uint32> m_worldLoopCounter; 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 <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * 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 <http://www.gnu.org/licenses/>. */ -/* 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") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI<boss_selin_fireheartAI>(creature); - }; + public: + boss_selin_fireheart() : CreatureScript("boss_selin_fireheart") { } - 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<uint64> 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<uint64>::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); } - } - // 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; - } + _Reset(); + CrystalGUID = 0; + _scheduledEvents = false; + } - 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<uint64>::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. - } + 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()); + break; + default: + break; } } - if (CrystalChosen) + + void SelectNearestCrystal() { - Talk(SAY_ENERGY); - Talk(EMOTE_CRYSTAL); + if (Crystals.empty()) + return; - CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); + Crystals.sort(Trinity::ObjectDistanceOrderPred(me)); + if (Creature* CrystalChosen = Crystals.front()) + { + Talk(SAY_ENERGY); + Talk(EMOTE_CRYSTAL); - float x, y, z; // coords that we move to, close to the crystal. - CrystalChosen->GetClosePoint(x, y, z, me->GetObjectSize(), CONTACT_DISTANCE); + DoCast(CrystalChosen, SPELL_FEL_CRYSTAL_DUMMY); + CrystalGUID = CrystalChosen->GetGUID(); + Crystals.remove(CrystalChosen); - me->SetWalk(false); - me->GetMotionMaster()->MovePoint(1, x, y, z); - DrainingCrystal = true; - } - } + float x, y, z; + CrystalChosen->GetClosePoint(x, y, z, me->GetObjectSize(), CONTACT_DISTANCE); - void ShatterRemainingCrystals() - { - if (Crystals.empty()) - return; + events.SetPhase(PHASE_DRAIN); + me->SetWalk(false); + me->GetMotionMaster()->MovePoint(1, x, y, z); + } + } - //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i) - for (std::list<uint64>::const_iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + void ShatterRemainingCrystals() { - //Creature* pCrystal = (ObjectAccessor::GetCreature(*me, FelCrystals[i])); - Creature* pCrystal = ObjectAccessor::GetCreature(*me, *itr); - if (pCrystal && pCrystal->IsAlive()) - pCrystal->Kill(pCrystal); + if (Crystals.empty()) + return; + + for (Creature* crystal : Crystals) + { + if (crystal && crystal->IsAlive()) + crystal->Kill(crystal); + } } - } - void EnterCombat(Unit* /*who*/) override - { - Talk(SAY_AGGRO); - instance->SetBossState(DATA_SELIN, IN_PROGRESS); - } + void EnterCombat(Unit* /*who*/) override + { + Talk(SAY_AGGRO); + _EnterCombat(); - void KilledUnit(Unit* /*victim*/) override - { - Talk(SAY_KILL); - } + events.SetPhase(PHASE_NORMAL); + events.ScheduleEvent(EVENT_FEL_EXPLOSION, 2100, 0, PHASE_NORMAL); + } - void MovementInform(uint32 type, uint32 id) override - { - if (type == POINT_MOTION_TYPE && id == 1) + void KilledUnit(Unit* victim) override { - 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 + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_KILL); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == 1) { - // 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; + 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); - instance->SetBossState(DATA_SELIN, DONE); // Encounter complete! - ShatterRemainingCrystals(); - } + void JustDied(Unit* /*killer*/) override + { + Talk(SAY_DEATH); + _JustDied(); - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; + ShatterRemainingCrystals(); + } - if (!DrainingCrystal) + void UpdateAI(uint32 diff) override { - 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; + if (!UpdateVictim()) + return; + + events.Update(diff); - // Heroic only - if (IsHeroic()) + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) { - if (DrainManaTimer <= diff) + 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: { - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1), SPELL_DRAIN_MANA); - DrainManaTimer = 10000; - } else DrainManaTimer -= diff; + 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 (FelExplosionTimer <= diff) + if (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA) < 10) { - if (!me->IsNonMeleeSpellCast(false)) + if (events.IsInPhase(PHASE_NORMAL) && !_scheduledEvents) { - DoCast(me, SPELL_FEL_EXPLOSION); - FelExplosionTimer = 2000; - } - } else FelExplosionTimer -= diff; + _scheduledEvents = true; + uint32 timer = urand(3000, 7000); + events.ScheduleEvent(EVENT_DRAIN_LIFE, timer, 0, PHASE_NORMAL); - // 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); + { + events.ScheduleEvent(EVENT_DRAIN_CRYSTAL, urand(10000, 15000), 0, PHASE_NORMAL); + events.ScheduleEvent(EVENT_DRAIN_MANA, timer + 5000, 0, PHASE_NORMAL); + } else - DrainCrystalTimer = urand(20000, 25000); - } else DrainCrystalTimer -= diff; + events.ScheduleEvent(EVENT_DRAIN_CRYSTAL, urand(20000, 25000), 0, PHASE_NORMAL); + } } - }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(); - me->GetMotionMaster()->MoveChase(me->GetVictim()); - } else EmpowerTimer -= diff; - } + DoMeleeAttackIfReady(); } - DoMeleeAttackIfReady(); // No need to check if we are draining crystal here, as the spell has a stun. - } - }; + private: + std::list<Creature*> Crystals; + uint64 CrystalGUID; + bool _scheduledEvents; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_selin_fireheartAI>(creature); + }; }; class npc_fel_crystal : public CreatureScript { -public: - npc_fel_crystal() : CreatureScript("npc_fel_crystal") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_fel_crystalAI(creature); - }; + public: + npc_fel_crystal() : CreatureScript("npc_fel_crystal") { } - 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<npc_fel_crystalAI>(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<uint64> 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 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 f415eeacc78..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 { } - - void UpdateAI(uint32 /*diff*/) override { } - }; + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SWARM_BUFF)) + return false; + return true; + } - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_nadox_eggsAI(creature); - } -}; + bool Load() override + { + _targetCount = 0; + return true; + } -class GuardianCheck -{ -public: - bool operator()(const WorldObject* target) const - { - if (target->GetEntry() == NPC_AHNKAHAR_GUARDIAN) - return true; - - return false; - } -}; + void CountTargets(std::list<WorldObject*>& targets) + { + _targetCount = targets.size(); + } -class spell_elder_nadox_guardian : public SpellScriptLoader -{ -public: - spell_elder_nadox_guardian() : SpellScriptLoader("spell_elder_nadox_guardian") { } + 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); + } - class spell_elder_nadox_guardian_SpellScript : public SpellScript - { - PrepareSpellScript(spell_elder_nadox_guardian_SpellScript); + 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); + } - void FilterTargets(std::list<WorldObject*>& targets) - { - targets.remove_if (GuardianCheck()); - } + private: + uint32 _targetCount; + }; - void Register() override + SpellScript* GetSpellScript() const 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); + return new spell_ahn_kahet_swarm_SpellScript(); } - }; - - 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") { } - - 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; + public: + achievement_respect_your_elders() : AchievementCriteriaScript("achievement_respect_your_elders") { } - 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(); } 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 022c43f4395..d0ad42d38e1 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); diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp index 2d5028bac05..0897131eaf8 100644 --- a/src/server/scripts/Northrend/zone_dalaran.cpp +++ b/src/server/scripts/Northrend/zone_dalaran.cpp @@ -128,7 +128,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<Player*> 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(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_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_mageguard_dalaran(); + new npc_minigob_manabonk(); } 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/Cryptography/Authentication/WorldPacketCrypt.cpp b/src/server/shared/Cryptography/Authentication/WorldPacketCrypt.cpp index 10403b84a1f..b9d9b86005c 100644 --- a/src/server/shared/Cryptography/Authentication/WorldPacketCrypt.cpp +++ b/src/server/shared/Cryptography/Authentication/WorldPacketCrypt.cpp @@ -20,6 +20,8 @@ #include "Cryptography/HmacHash.h" #include "Cryptography/BigNumber.h" +#include <cstring> + WorldPacketCrypt::WorldPacketCrypt() : PacketCrypt(SHA_DIGEST_LENGTH) { } diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp index 364bb8e452f..b68c91001ae 100644 --- a/src/server/shared/Cryptography/BigNumber.cpp +++ b/src/server/shared/Cryptography/BigNumber.cpp @@ -19,6 +19,7 @@ #include "Cryptography/BigNumber.h" #include <openssl/bn.h> #include <openssl/crypto.h> +#include <cstring> #include <algorithm> #include <memory> 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 <cstring> #include <stdarg.h> 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 <cstring> + #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 aa57a65167d..8865c70fdf8 100644 --- a/src/server/shared/Define.h +++ b/src/server/shared/Define.h @@ -21,15 +21,16 @@ #include "CompilerDefs.h" +#include <cstddef> +#include <cinttypes> +#include <climits> + #if COMPILER == COMPILER_GNU # if !defined(__STDC_FORMAT_MACROS) # define __STDC_FORMAT_MACROS # endif #endif -#include <cstddef> -#include <cinttypes> - #define TRINITY_LITTLEENDIAN 0 #define TRINITY_BIGENDIAN 1 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<T, Key>* instance() { - static ObjectRegistry<T, Key>* instance = new ObjectRegistry<T, Key>(); - return instance; + static ObjectRegistry<T, Key> instance; + return &instance; } /// Returns a registry item 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 <sstream> -#if PLATFORM == PLATFORM_WINDOWS - #include <windows.h> -#endif #include "AppenderConsole.h" #include "Config.h" #include "Util.h" +#if PLATFORM == PLATFORM_WINDOWS + #include <Windows.h> +#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/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(); diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index a68d836252d..446ee889c90 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 <stdarg.h> #include <boost/thread/tss.hpp> +#if PLATFORM == PLATFORM_UNIX + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> +#endif + static boost::thread_specific_ptr<SFMTRand> sfmtRand; static SFMTRand* GetRng() |