diff options
165 files changed, 8641 insertions, 1828 deletions
diff --git a/.gitattributes b/.gitattributes index 15410b16b46..40a4005bf43 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,3 +15,6 @@ # special files which must ignore whitespace *.patch whitespace=-trailing-space eol=lf *.diff whitespace=-trailing-space eol=lf + +# Ignore sql/* files +sql/* linguist-documentation diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index 87f8a2f82c8..32ef8172534 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -17,3 +17,4 @@ endif() # -Wno-narrowing needed to suppress a warning in g3d # -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1") diff --git a/sql/updates/world/2015_05_04_00_world.sql b/sql/updates/world/2015_05_04_00_world.sql new file mode 100644 index 00000000000..ca6f5657346 --- /dev/null +++ b/sql/updates/world/2015_05_04_00_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `conditions` where `SourceTypeOrReferenceId`=17 AND `SourceEntry`=72590; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 72590, 0, 0,27, 1, 70, 3, 0, 0, 0, 0, '', 'Minimum Level for Runescroll of Fortitude on players (70)'); diff --git a/sql/updates/world/2015_05_09_00_world_335.sql b/sql/updates/world/2015_05_09_00_world_335.sql new file mode 100644 index 00000000000..003fa276542 --- /dev/null +++ b/sql/updates/world/2015_05_09_00_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_equip_template` SET `itemEntry1`=2147, `itemEntry2`=2053, `VerifiedBuild`=0 WHERE `entry`=5809; diff --git a/sql/updates/world/2015_05_09_01_world_335.sql b/sql/updates/world/2015_05_09_01_world_335.sql new file mode 100644 index 00000000000..68f578812f8 --- /dev/null +++ b/sql/updates/world/2015_05_09_01_world_335.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `gameobject_template` WHERE `entry` IN (180055); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayid`, `name`, `size`, `data0`, `data1`, `data2`, `data3`, `VerifiedBuild`) VALUES +(180055, 2, 51, 'Mysterious Wailing Caverns Chest', 0.4, 43, 6811, 2, 0, -18019); diff --git a/sql/updates/world/2015_05_09_02_world.sql b/sql/updates/world/2015_05_09_02_world.sql new file mode 100644 index 00000000000..e2e45095730 --- /dev/null +++ b/sql/updates/world/2015_05_09_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `InhabitType`=7 WHERE `entry` IN (28086, 28085); +UPDATE `smart_scripts` SET `target_type`=21, `target_param1`=8 WHERE `entryorguid` IN (32639, 32638, 32641, 32642) AND `id`=2; -- fix text target for Traveler's Tundra Mammoth's npcs diff --git a/sql/updates/world/2015_05_09_03_world.sql b/sql/updates/world/2015_05_09_03_world.sql new file mode 100644 index 00000000000..137ae636800 --- /dev/null +++ b/sql/updates/world/2015_05_09_03_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature_formations` WHERE `memberGUID` BETWEEN 45823 AND 45831; diff --git a/sql/updates/world/2015_05_09_04_world_335.sql b/sql/updates/world/2015_05_09_04_world_335.sql new file mode 100644 index 00000000000..814459be957 --- /dev/null +++ b/sql/updates/world/2015_05_09_04_world_335.sql @@ -0,0 +1,34 @@ +-- Remove Midsummer Double Spawns +DELETE FROM `creature` WHERE (`guid` IN (94696,94723,94698,94724) AND `id`=16781) OR (`guid`=94513 AND `id`=25994);-- Tanaris Horde +DELETE FROM `creature` WHERE (`guid` IN (94735,94734,94716,94733) AND `id`=16781) OR (`guid`=86895 AND `id`=25962);-- Tanaris Alliance +DELETE FROM `creature` WHERE (`guid` IN (94710,94656,94711,94694) AND `id`=16781) OR (`guid`=94518 AND `id`=25994);-- Stranglethorn Horde +DELETE FROM `creature` WHERE (`guid` IN (94553,94551,94554,94555) AND `id`=16781) OR (`guid`=86711 AND `id`=25962);-- Stranglethorn Alliance +DELETE FROM `creature` WHERE (`guid` IN (94557,94605,94556,94704) AND `id`=16781) OR (`guid`=90490 AND `id`=25962);-- Arathi Alliance +DELETE FROM `creature` WHERE (`guid` IN (94649,94738,94700,94579) AND `id`=16781) OR (`guid`=86704 AND `id`=25962);-- Silithus Alliance +DELETE FROM `creature` WHERE `guid` IN (202858,202859,202860,202861) AND `id`=16781;-- Ironforge +DELETE FROM `creature` WHERE `guid`=202862 AND `id`=16817; +DELETE FROM `creature` WHERE `guid`=202863 AND `id`=25975; +DELETE FROM `creature` WHERE `guid`=86165 AND `id`=26123; + +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (94696,94723,94698,94724,94513); +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (94735,94734,94716,94733,86895); +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (94710,94656,94711,94694,94518); +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (94553,94551,94554,94555,86711); +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (94557,94605,94556,94704,90490); +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (94649,94738,94700,94579,86704); +DELETE FROM `game_event_creature` WHERE `eventEntry`=1 AND `guid` IN (202858,202859,202860,202861,202862,202863,86165); + +DELETE FROM `gameobject` WHERE `guid` IN (51596,52357,50996,50855,50750,50747,52277,52467,51350,50692,52548,52284,51349);-- Tanaris horde +DELETE FROM `gameobject` WHERE `guid` IN (52273,52527,52275,50683,51343,52272,52279,50994,50854,50710,52466,50709,51342);-- Tanaris Alliance +DELETE FROM `gameobject` WHERE `guid` IN (51791,50690,52560,52333,52329,52511,50740,50741,50869,52399,52334);-- Stranglethorn horde +DELETE FROM `gameobject` WHERE `guid` IN (52393,52541,50682,51782,52325,51028,51797,51798,50784,50871,50785,51545,52331,52509); -- Stranglethorn Alliance +DELETE FROM `gameobject` WHERE `guid` IN (52335,51814,52409,51573,51014,51554,51579,51981,52412,52407,51578,50931,52481,52542,50836,51580,50553,51820,50802,50897,50803); -- Arathi Alliance +DELETE FROM `gameobject` WHERE `guid` IN (52344,50991,50743,50852,52463,50679,52267,52526);-- Silithus Alliance +DELETE FROM `gameobject` WHERE `guid`=49313;-- Silithus Horde + +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid` IN (51596,52357,50996,50855,50750,50747,52277,52467,51350,50692,52548,52284,51349); +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid` IN (52273,52527,52275,50683,51343,52272,52279,50994,50854,50710,52466,50709,51342); +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid` IN (51791,50690,52560,52333,52329,52511,50740,50741,50869,52399,52334); +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid` IN (52393,52541,50682,51782,52325,51028,51797,51798,50784,50871,50785,51545,52331,52509); +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid` IN (52335,51814,52409,51573,51014,51554,51579,51981,52412,52407,51578,50931,52481,52542,50836,51580,50553,51820,50802,50897,50803); +DELETE FROM `game_event_gameobject` WHERE `eventEntry`=1 AND `guid` IN (52344,50991,50743,50852,52463,50679,52267,52526); diff --git a/sql/updates/world/2015_05_09_05_world.sql b/sql/updates/world/2015_05_09_05_world.sql new file mode 100644 index 00000000000..41576ac375c --- /dev/null +++ b/sql/updates/world/2015_05_09_05_world.sql @@ -0,0 +1,835 @@ +-- Add SAI support for Lance a Lot achievement ID: 2836 +-- Champions SAI mechanic +SET @Sen_Valiant := 33285; +SET @Script := 3328500; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Sen_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sen_Valiant; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +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 +(@Sen_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - On Reset - Remove auras from Defend'), +(@Sen_Valiant,0,1,2,62,0,100,0,10469,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sen Valiant - On gossip select - Close gossip'), +(@Sen_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - store target'), +(@Sen_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Call timed actionlist'), +(@Sen_Valiant,0,4,0,52,0,100,0,0,@Sen_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sen Valiant - On text over - Cast Charge'), +(@Sen_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Valiant - IC - Cast Thrust'), +(@Sen_Valiant,0,6,0,9,0,100,0,5,5,4000,7000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@Sen_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - IC - Move forward 12 yards'), +(@Sen_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Valiant - On 10-12 yard range - Cast Charge'), +(@Sen_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Cast Shield-Breaker'), +(@Sen_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@Sen_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Say text'), +(@Sen_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Sen_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64812,0,0,0,0,0,12,1,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Cast credit'), +(@Sen_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Evade'), +(@Sen_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - On player killed - Say text'), +(@Sen_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Set unseen'), +(@Sen_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Valiant - Linked with previous event - Despawn in 1 ms'), +-- Timed actionlist 1 +(@Script,9,1,0,0,0,100,0,0,0,0,0,42,0,1,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Set INVINCIBILITY'), +(@Script,9,2,0,0,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Set run ON'), +(@Script,9,3,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast Defend on self/Layer 1/'), +(@Script,9,4,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast Defend on self/Layer 2/'), +(@Script,9,5,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast Defend on self/Layer 3/'), +(@Script,9,6,0,0,0,100,0,0,0,0,0,46,20,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Move forward 15 yards'), +(@Script,9,7,0,0,0,100,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Set run Off'), +(@Script,9,8,0,0,0,100,0,0,0,0,0,11,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast aura TriggerS for Defend /10 sec one/'), +(@Script,9,9,0,0,0,100,0,3500,3500,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Change faction to 14'), +(@Script,9,10,0,0,0,100,0,0,0,0,0,1,0,1500,0,0,0,0,2,0,0,0,0,0,0,0,'All champions - Script 1 - Say text'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @Sen_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Sen_Valiant,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Valiant', 33757), +(@Sen_Valiant,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Valiant', 33755), +(@Sen_Valiant,0,2,'On your guard!',12,1,100,0,0,0,'Argent Valiant', 33756), +(@Sen_Valiant,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Valiant', 33758), +(@Sen_Valiant,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Valiant', 33777), +(@Sen_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Valiant', 33764), +(@Sen_Valiant,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Valiant', 33779), +(@Sen_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Valiant', 33778), +(@Sen_Valiant,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33774), +(@Sen_Valiant,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33776), +(@Sen_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Valiant', 33775), +(@Sen_Valiant,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Valiant', 33760); +-- Add condition for gossip option to show only, if player has quest: The Grand Melee is on tournament mount and have the spear equiped +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10469, 10468, 10470, 10472, 10473, 10466, 10464, 10471, 10465, 10467); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTarget`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`,`NegativeCondition`) VALUES +(15,10469,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,1,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,2,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,3,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,4,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,5,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,6,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,7,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,8,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,9,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10469,0,0,10,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10469,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10469,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,1,1,64811,0,0,0,'','Show gossip menu only if don''t have the auran',1), +(15,10468,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,2,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,3,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,4,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,5,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,6,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,7,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,8,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,9,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10468,0,0,10,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10468,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10468,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,1,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,2,1,64813,0,0,0,'','Show gossip menu only if don''t have the auran',1), +(15,10470,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,3,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,4,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,5,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,6,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,7,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,8,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,9,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,10,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10470,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10470,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10470,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,1,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,2,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,3,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,4,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,5,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,6,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,7,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,8,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,9,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10472,0,0,10,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10472,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10472,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,1,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,2,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,3,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,4,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,5,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,6,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,7,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,8,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,9,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10473,0,0,10,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10473,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10473,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,1,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,2,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,3,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,4,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,5,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,6,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,7,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,8,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,9,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10466,0,0,10,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10466,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10466,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,1,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,2,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,3,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,4,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,5,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,6,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,7,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,8,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,9,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10464,0,0,10,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10464,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10464,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,1,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,2,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,3,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,4,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,5,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,6,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,7,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,8,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,9,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10471,0,0,10,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10471,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10471,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,1,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,2,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,3,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,4,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,5,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,6,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,7,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,8,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,9,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10465,0,0,10,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10465,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10465,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,1,9,13772,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,1,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,2,9,13777,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,2,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,3,9,13782,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,3,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,4,9,13787,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,4,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,5,9,13767,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,5,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,5,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,5,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,6,9,13761,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,6,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,6,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,6,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,7,9,13745,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,7,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,7,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,7,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,8,9,13750,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,8,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,8,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,8,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,9,9,13756,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,9,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,9,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,9,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,10,9,13665,0,0,0,'','Show gossip menu only if quest The Grand Mele is taken',0), +(15,10467,0,0,10,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10467,0,0,10,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10467,0,0,10,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0); + +SET @Orgri_Valiant := 33306; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Orgri_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Orgri_Valiant; +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 +(@Orgri_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - On Reset - Remove auras from Defend'), +(@Orgri_Valiant,0,1,2,62,0,100,0,10468,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgri Valiant - On gossip select - Close gossip'), +(@Orgri_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - store target'), +(@Orgri_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Call timed actionlist'), +(@Orgri_Valiant,0,4,0,52,0,100,0,0,@Orgri_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgri Valiant - On text over - Cast Charge'), +(@Orgri_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Valiant - IC - Cast Thrust'), +(@Orgri_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@Orgri_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - IC - Move forward 12 yards'), +(@Orgri_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Valiant - On 10-12 yard range - Cast Charge'), +(@Orgri_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Cast Shield-Breaker'), +(@Orgri_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@Orgri_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Say text'), +(@Orgri_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Orgri_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64811,0,0,0,0,0,12,1,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Cast credit'), +(@Orgri_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri_Valiant - Linked with previous event - Evade'), +(@Orgri_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - On player killed - Say text'), +(@Orgri_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Set unseen'), +(@Orgri_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @Orgri_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Orgri_Valiant,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Valiant', 33757), +(@Orgri_Valiant,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Valiant', 33755), +(@Orgri_Valiant,0,2,'On your guard!',12,1,100,0,0,0,'Argent Valiant', 33756), +(@Orgri_Valiant,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Valiant', 33758), +(@Orgri_Valiant,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Valiant', 33777), +(@Orgri_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Valiant', 33764), +(@Orgri_Valiant,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Valiant', 33779), +(@Orgri_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Valiant', 33778), +(@Orgri_Valiant,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33774), +(@Orgri_Valiant,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33776), +(@Orgri_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Valiant', 33775), +(@Orgri_Valiant,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Valiant', 33760); +SET @TB_Valiant := 33383; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@TB_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TB_Valiant; +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 +(@TB_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - On Reset - Remove auras from Defend'), +(@TB_Valiant,0,1,2,62,0,100,0,10472,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'TB Valiant - On gossip select - Close gossip'), +(@TB_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'TB_Valiant - Linked with previous event - store target'), +(@TB_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Call timed actionlist'), +(@TB_Valiant,0,4,0,52,0,100,0,0,@TB_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'TB Valiant - On text over - Cast Charge'), +(@TB_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Valiant - IC - Cast Thrust'), +(@TB_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@TB_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - IC - Move forward 12 yards'), +(@TB_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Valiant - On 10-12 yard range - Cast Charge'), +(@TB_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Cast Shield-Breaker'), +(@TB_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@TB_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Say text'), +(@TB_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@TB_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64815,0,0,0,0,0,12,1,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Cast credit'), +(@TB_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB_Valiant - Linked with previous event - Evade'), +(@TB_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - On player killed - Say text'), +(@TB_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Set unseen'), +(@TB_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @TB_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@TB_Valiant,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Valiant', 33757), +(@TB_Valiant,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Valiant', 33755), +(@TB_Valiant,0,2,'On your guard!',12,1,100,0,0,0,'Argent Valiant', 33756), +(@TB_Valiant,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Valiant', 33758), +(@TB_Valiant,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Valiant', 33777), +(@TB_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Valiant', 33764), +(@TB_Valiant,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Valiant', 33779), +(@TB_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Valiant', 33778), +(@TB_Valiant,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33774), +(@TB_Valiant,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33776), +(@TB_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Valiant', 33775), +(@TB_Valiant,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Valiant', 33760); +SET @SM_Valiant := 33382; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@SM_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SM_Valiant; +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 +(@SM_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - On Reset - Remove auras from Defend'), +(@SM_Valiant,0,1,2,62,0,100,0,10470,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'SM Valiant - On gossip select - Close gossip'), +(@SM_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'SM_Valiant - Linked with previous event - store target'), +(@SM_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Call timed actionlist'), +(@SM_Valiant,0,4,0,52,0,100,0,0,@SM_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'SM Valiant - On text over - Cast Charge'), +(@SM_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Valiant - IC - Cast Thrust'), +(@SM_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@SM_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - IC - Move forward 12 yards'), +(@SM_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Valiant - On 10-12 yard range - Cast Charge'), +(@SM_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Cast Shield-Breaker'), +(@SM_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@SM_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Say text'), +(@SM_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@SM_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64813,0,0,0,0,0,12,1,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Cast credit'), +(@SM_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM_Valiant - Linked with previous event - Evade'), +(@SM_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - On player killed - Say text'), +(@SM_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Set unseen'), +(@SM_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @SM_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@SM_Valiant,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Valiant', 33757), +(@SM_Valiant,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Valiant', 33755), +(@SM_Valiant,0,2,'On your guard!',12,1,100,0,0,0,'Argent Valiant', 33756), +(@SM_Valiant,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Valiant', 33758), +(@SM_Valiant,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Valiant', 33777), +(@SM_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Valiant', 33764), +(@SM_Valiant,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Valiant', 33779), +(@SM_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Valiant', 33778), +(@SM_Valiant,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33774), +(@SM_Valiant,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33776), +(@SM_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Valiant', 33775), +(@SM_Valiant,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Valiant', 33760); +SET @GR_Valiant := 33558; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@GR_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GR_Valiant; +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 +(@GR_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - On Reset - Remove auras from Defend'), +(@GR_Valiant,0,1,2,62,0,100,0,10466,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'GR Valiant - On gossip select - Close gossip'), +(@GR_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'GR_Valiant - Linked with previous event - store target'), +(@GR_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Call timed actionlist'), +(@GR_Valiant,0,4,0,52,0,100,0,0,@GR_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'GR Valiant - On text over - Cast Charge'), +(@GR_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Valiant - IC - Cast Thrust'), +(@GR_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@GR_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - IC - Move forward 12 yards'), +(@GR_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Valiant - On 10-12 yard range - Cast Charge'), +(@GR_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Cast Shield-Breaker'), +(@GR_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@GR_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Say text'), +(@GR_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@GR_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64809,0,0,0,0,0,12,1,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Cast credit'), +(@GR_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR_Valiant - Linked with previous event - Evade'), +(@GR_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - On player killed - Say text'), +(@GR_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Set unseen'), +(@GR_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @GR_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@GR_Valiant,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Valiant', 33757), +(@GR_Valiant,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Valiant', 33755), +(@GR_Valiant,0,2,'On your guard!',12,7,100,0,0,0,'Argent Valiant', 33756), +(@GR_Valiant,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Valiant', 33758), +(@GR_Valiant,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Valiant', 33777), +(@GR_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Valiant', 33764), +(@GR_Valiant,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Valiant', 33779), +(@GR_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Valiant', 33778), +(@GR_Valiant,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33774), +(@GR_Valiant,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33776), +(@GR_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Valiant', 33775), +(@GR_Valiant,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Valiant', 33760); +SET @IF_Valiant := 33564; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@IF_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@IF_Valiant; +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 +(@IF_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - On Reset - Remove auras from Defend'), +(@IF_Valiant,0,1,2,62,0,100,0,10467,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'IF Valiant - On gossip select - Close gossip'), +(@IF_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'IF_Valiant - Linked with previous event - store target'), +(@IF_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Call timed actionlist'), +(@IF_Valiant,0,4,0,52,0,100,0,0,@IF_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'IF Valiant - On text over - Cast Charge'), +(@IF_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Valiant - IC - Cast Thrust'), +(@IF_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@IF_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - IC - Move forward 12 yards'), +(@IF_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Valiant - On 10-12 yard range - Cast Charge'), +(@IF_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Cast Shield-Breaker'), +(@IF_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@IF_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Say text'), +(@IF_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@IF_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64810,0,0,0,0,0,12,1,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Cast credit'), +(@IF_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF_Valiant - Linked with previous event - Evade'), +(@IF_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - On player killed - Say text'), +(@IF_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Set unseen'), +(@IF_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @IF_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@IF_Valiant,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Valiant', 33757), +(@IF_Valiant,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Valiant', 33755), +(@IF_Valiant,0,2,'On your guard!',12,7,100,0,0,0,'Argent Valiant', 33756), +(@IF_Valiant,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Valiant', 33758), +(@IF_Valiant,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Valiant', 33777), +(@IF_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Valiant', 33764), +(@IF_Valiant,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Valiant', 33779), +(@IF_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Valiant', 33778), +(@IF_Valiant,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33774), +(@IF_Valiant,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33776), +(@IF_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Valiant', 33775), +(@IF_Valiant,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Valiant', 33760); +SET @SW_Valiant := 33561; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@SW_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SW_Valiant; +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 +(@SW_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - On Reset - Remove auras from Defend'), +(@SW_Valiant,0,1,2,62,0,100,0,10471,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'SW Valiant - On gossip select - Close gossip'), +(@SW_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'SW_Valiant - Linked with previous event - store target'), +(@SW_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Call timed actionlist'), +(@SW_Valiant,0,4,0,52,0,100,0,0,@SW_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'SW Valiant - On text over - Cast Charge'), +(@SW_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Valiant - IC - Cast Thrust'), +(@SW_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@SW_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - IC - Move forward 12 yards'), +(@SW_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Valiant - On 10-12 yard range - Cast Charge'), +(@SW_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Cast Shield-Breaker'), +(@SW_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@SW_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Say text'), +(@SW_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@SW_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64814,0,0,0,0,0,12,1,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Cast credit'), +(@SW_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW_Valiant - Linked with previous event - Evade'), +(@SW_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - On player killed - Say text'), +(@SW_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Set unseen'), +(@SW_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @SW_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@SW_Valiant,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Valiant', 33757), +(@SW_Valiant,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Valiant', 33755), +(@SW_Valiant,0,2,'On your guard!',12,7,100,0,0,0,'Argent Valiant', 33756), +(@SW_Valiant,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Valiant', 33758), +(@SW_Valiant,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Valiant', 33777), +(@SW_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Valiant', 33764), +(@SW_Valiant,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Valiant', 33779), +(@SW_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Valiant', 33778), +(@SW_Valiant,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33774), +(@SW_Valiant,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33776), +(@SW_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Valiant', 33775), +(@SW_Valiant,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Valiant', 33760); +SET @Darn_Valiant := 33559; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Darn_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Darn_Valiant; +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 +(@Darn_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - On Reset - Remove auras from Defend'), +(@Darn_Valiant,0,1,2,62,0,100,0,10464,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Darn Valiant - On gossip select - Close gossip'), +(@Darn_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Darn_Valiant - Linked with previous event - store target'), +(@Darn_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Call timed actionlist'), +(@Darn_Valiant,0,4,0,52,0,100,0,0,@Darn_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Darn Valiant - On text over - Cast Charge'), +(@Darn_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Valiant - IC - Cast Thrust'), +(@Darn_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@Darn_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - IC - Move forward 12 yards'), +(@Darn_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Valiant - On 10-12 yard range - Cast Charge'), +(@Darn_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Cast Shield-Breaker'), +(@Darn_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@Darn_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Say text'), +(@Darn_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Darn_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64805,0,0,0,0,0,12,1,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Cast credit'), +(@Darn_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn_Valiant - Linked with previous event - Evade'), +(@Darn_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - On player killed - Say text'), +(@Darn_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Set unseen'), +(@Darn_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @Darn_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Darn_Valiant,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Valiant', 33757), +(@Darn_Valiant,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Valiant', 33755), +(@Darn_Valiant,0,2,'On your guard!',12,7,100,0,0,0,'Argent Valiant', 33756), +(@Darn_Valiant,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Valiant', 33758), +(@Darn_Valiant,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Valiant', 33777), +(@Darn_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Valiant', 33764), +(@Darn_Valiant,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Valiant', 33779), +(@Darn_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Valiant', 33778), +(@Darn_Valiant,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33774), +(@Darn_Valiant,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33776), +(@Darn_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Valiant', 33775), +(@Darn_Valiant,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Valiant', 33760); +SET @Exo_Valiant := 33562; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Exo_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Exo_Valiant; +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 +(@Exo_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - On Reset - Remove auras from Defend'), +(@Exo_Valiant,0,1,2,62,0,100,0,10465,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Exo Valiant - On gossip select - Close gossip'), +(@Exo_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Exo_Valiant - Linked with previous event - store target'), +(@Exo_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Call timed actionlist'), +(@Exo_Valiant,0,4,0,52,0,100,0,0,@Exo_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Exo Valiant - On text over - Cast Charge'), +(@Exo_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Valiant - IC - Cast Thrust'), +(@Exo_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@Exo_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - IC - Move forward 12 yards'), +(@Exo_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Valiant - On 10-12 yard range - Cast Charge'), +(@Exo_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Cast Shield-Breaker'), +(@Exo_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@Exo_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Say text'), +(@Exo_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Exo_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64808,0,0,0,0,0,12,1,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Cast credit'), +(@Exo_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo_Valiant - Linked with previous event - Evade'), +(@Exo_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - On player killed - Say text'), +(@Exo_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Set unseen'), +(@Exo_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @Exo_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Exo_Valiant,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Valiant', 33757), +(@Exo_Valiant,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Valiant', 33755), +(@Exo_Valiant,0,2,'On your guard!',12,7,100,0,0,0,'Argent Valiant', 33756), +(@Exo_Valiant,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Valiant', 33758), +(@Exo_Valiant,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Valiant', 33777), +(@Exo_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Valiant', 33764), +(@Exo_Valiant,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Valiant', 33779), +(@Exo_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Valiant', 33778), +(@Exo_Valiant,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33774), +(@Exo_Valiant,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Valiant', 33776), +(@Exo_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Valiant', 33775), +(@Exo_Valiant,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Valiant', 33760); +SET @UC_Valiant := 33384; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@UC_Valiant; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@UC_Valiant; +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 +(@UC_Valiant,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - On Reset - Remove auras from Defend'), +(@UC_Valiant,0,1,2,62,0,100,0,10473,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'UC Valiant - On gossip select - Close gossip'), +(@UC_Valiant,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'UC_Valiant - Linked with previous event - store target'), +(@UC_Valiant,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Call timed actionlist'), +(@UC_Valiant,0,4,0,52,0,100,0,0,@UC_Valiant,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'UC Valiant - On text over - Cast Charge'), +(@UC_Valiant,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Valiant - IC - Cast Thrust'), +(@UC_Valiant,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Valiant - On more than 5 yard range - Cast Shield-Breaker'), +(@UC_Valiant,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - IC - Move forward 12 yards'), +(@UC_Valiant,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Valiant - On 10-12 yard range - Cast Charge'), +(@UC_Valiant,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Cast Shield-Breaker'), +(@UC_Valiant,0,10,11,2,0,100,1,1,3,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - On HP% between 1% and 3% - Change faction to 35'), +(@UC_Valiant,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Say text'), +(@UC_Valiant,0,12,13,61,0,100,0,0,0,0,0,85,62724,0,0,0,0,0,12,1,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@UC_Valiant,0,13,14,61,0,100,0,0,0,0,0,85,64816,0,0,0,0,0,12,1,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Cast credit'), +(@UC_Valiant,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC_Valiant - Linked with previous event - Evade'), +(@UC_Valiant,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - On player killed - Say text'), +(@UC_Valiant,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Set unseen'), +(@UC_Valiant,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Valiant - Linked with previous event - Despawn in 1 ms'); +-- Argent Valiants texts +DELETE FROM `creature_text` WHERE `entry`= @UC_Valiant; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@UC_Valiant,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Valiant', 33757), +(@UC_Valiant,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Valiant', 33755), +(@UC_Valiant,0,2,'On your guard!',12,1,100,0,0,0,'Argent Valiant', 33756), +(@UC_Valiant,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Valiant', 33758), +(@UC_Valiant,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Valiant', 33777), +(@UC_Valiant,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Valiant', 33764), +(@UC_Valiant,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Valiant', 33779), +(@UC_Valiant,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Valiant', 33778), +(@UC_Valiant,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33774), +(@UC_Valiant,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Valiant', 33776), +(@UC_Valiant,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Valiant', 33775), +(@UC_Valiant,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Valiant', 33760); + +DELETE FROM `gossip_menu` WHERE `entry` IN (10469, 10468, 10470, 10472, 10473, 10466, 10464, 10471, 10465, 10467); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10469, 14384), +(10469, 14492), +(10468, 14384), +(10468, 14492), +(10470, 14384), +(10470, 14492), +(10472, 14384), +(10472, 14492), +(10473, 14384), +(10473, 14492), +(10466, 14384), +(10466, 14492), +(10464, 14384), +(10464, 14492), +(10471, 14384), +(10471, 14492), +(10465, 14384), +(10465, 14492), +(10467, 14384), +(10467, 14492); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup` IN (10469, 10468, 10470, 10472, 10473, 10466, 10464, 10471, 10465, 10467); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14,10469,14384,0,1,64812,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10469,14492,0,1,64812,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10468,14384,0,1,64811,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10468,14492,0,1,64811,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10470,14384,0,1,64813,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10470,14492,0,1,64813,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10472,14384,0,1,64815,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10472,14492,0,1,64815,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10473,14384,0,1,64816,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10473,14492,0,1,64816,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10466,14384,0,1,64809,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10466,14492,0,1,64809,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10464,14384,0,1,64805,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10464,14492,0,1,64805,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10471,14384,0,1,64814,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10471,14492,0,1,64814,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10465,14384,0,1,64808,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10465,14492,0,1,64808,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10467,14384,0,1,64810,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10467,14492,0,1,64810,0,0,0,'','Show gossip menu text if the player have the aura', 0); diff --git a/sql/updates/world/2015_05_09_06_world.sql b/sql/updates/world/2015_05_09_06_world.sql new file mode 100644 index 00000000000..5038deab480 --- /dev/null +++ b/sql/updates/world/2015_05_09_06_world.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_text` SET `groupid`=0, `id`=1, `comment`='engineer helice SAY_WP_1' WHERE `entry`=28787 AND `BroadcastTextId`=28856; +UPDATE `creature_text` SET `groupid`=6, `id`=1, `COMMENT`='engineer helice SAY_WP_7' WHERE `entry`=28787 AND `BroadcastTextId`=28865; +UPDATE `creature_text` SET `groupid`=1, `id`=1, `COMMENT`='engineer helice SAY_WP_2' WHERE `entry`=28787 AND `BroadcastTextId`=28857; +UPDATE `creature_text` SET `groupid`=2, `id`=1, `COMMENT`='engineer helice SAY_WP_3' WHERE `entry`=28787 AND `BroadcastTextId`=28859; +UPDATE `creature_text` SET `groupid`=5, `id`=1, `COMMENT`='engineer helice SAY_WP_6' WHERE `entry`=28787 AND `BroadcastTextId`=28864; +UPDATE `creature_text` SET `groupid`=4, `id`=1, `COMMENT`='engineer helice SAY_WP_5' WHERE `entry`=28787 AND `BroadcastTextId`=28862; diff --git a/sql/updates/world/2015_05_09_07_world.sql b/sql/updates/world/2015_05_09_07_world.sql new file mode 100644 index 00000000000..459c0c3e1f8 --- /dev/null +++ b/sql/updates/world/2015_05_09_07_world.sql @@ -0,0 +1,103 @@ +-- +UPDATE `smart_scripts` SET `event_type`=25, `event_flags`=0 WHERE `entryorguid` IN (21784,21815, 21801) AND `source_type`=0 AND `id`=0; + +DELETE FROM `creature_formations` WHERE `leaderGUID`=76082; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(76082,76082,0,0,2), +(76082,76083,7,360,2), +(76082,76084,14,360,2), +(76082,76085,21,360,2); + +UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `guid` IN (76083, 76084, 76085); +UPDATE `creature` SET `MovementType`=2 WHERE `guid` IN (76082); +DELETE FROM `creature_addon` WHERE `guid` IN (76082); +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`, `emote`, `auras`) VALUES +(76082,760820,16777216,4097,0,""); +DELETE FROM `creature` WHERE `id`=21998; -- wrong spawn, must be summoned by quest item only + +DELETE FROM `waypoint_data` WHERE (`id`=760820); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(760820, 1, -3116.419922, 821.828979, -21.856766, 0, 0, 1, 0, 100, 0), +(760820, 2, -3127.299561, 795.134766, -22.401117, 0, 0, 1, 0, 100, 0), +(760820, 3, -3150.103027, 782.489380, -21.864737, 0, 0, 1, 0, 100, 0), +(760820, 4, -3219.880615, 780.314880, -19.754417, 0, 0, 1, 0, 100, 0), +(760820, 5, -3251.568604, 783.067688, -19.069899, 0, 0, 1, 0, 100, 0), +(760820, 6, -3295.924072, 767.111877, -21.192102, 0, 0, 1, 0, 100, 0), +(760820, 7, -3403.222656, 752.732056, -35.531361, 0, 0, 1, 0, 100, 0), +(760820, 8, -3617.548828, 732.945862, -8.339263, 0, 0, 1, 0, 100, 0), +(760820, 9, -3631.188965, 727.337463, -5.722647, 0, 0, 1, 0, 100, 0), +(760820, 10, -3733.907471, 751.174744, 7.209823, 0, 0, 1, 0, 100, 0), +(760820, 11, -3782.882813, 746.945984, 9.761057, 0, 0, 1, 0, 100, 0), +(760820, 12, -3859.570068, 752.093506, 10.382468, 0, 0, 1, 0, 100, 0), +(760820, 13, -3879.040283, 773.671936, 9.449715, 0, 0, 1, 0, 100, 0), +(760820, 14, -3888.581787, 854.766663, 15.828053, 0, 0, 1, 0, 100, 0), +(760820, 15, -3880.752930, 897.569763, 19.081347, 0, 0, 1, 0, 100, 0), +(760820, 16, -3886.515137, 944.770691, 21.956785, 0, 0, 1, 0, 100, 0), +(760820, 17, -3880.704834, 985.264221, 23.311592, 0, 0, 1, 0, 100, 0), +(760820, 18, -3883.812012, 1007.772705, 23.589699, 0, 0, 1, 0, 100, 0), +(760820, 19, -3975.737061, 1099.026733, 30.213566, 0, 0, 1, 0, 100, 0), +(760820, 20, -4000.627197, 1143.911499, 41.125046, 0, 0, 1, 0, 100, 0), +(760820, 21, -4036.700928, 1163.023804, 51.072033, 0, 0, 1, 0, 100, 0), +(760820, 22, -4052.043457, 1183.807129, 57.569439, 0, 0, 1, 0, 100, 0), +(760820, 23, -4053.111816, 1202.003784, 62.920666, 0, 0, 1, 0, 100, 0), +(760820, 24, -4037.213623, 1261.900757, 78.336632, 0, 0, 1, 0, 100, 0), +(760820, 25, -4038.152588, 1296.390991, 83.919540, 0, 0, 1, 0, 100, 0), +(760820, 26, -4053.791504, 1370.539185, 84.908981, 0, 0, 1, 0, 100, 0), +(760820, 27, -4054.700439, 1618.686279, 93.997330, 0, 0, 1, 0, 100, 0), +(760820, 28, -4045.018799, 1643.987061, 94.251122, 0, 0, 1, 0, 100, 0), +(760820, 29, -3983.812988, 1705.642944, 97.803833, 0, 0, 1, 0, 100, 0), +(760820, 30, -3938.369141, 1738.914917, 98.837524, 0, 0, 1, 0, 100, 0), +(760820, 31, -3900.309814, 1758.672363, 97.922089, 0, 0, 1, 0, 100, 0), +(760820, 32, -3867.449707, 1786.059937, 94.361740, 0, 0, 1, 0, 100, 0), +(760820, 33, -3850.530273, 1826.876221, 90.358040, 0, 0, 1, 0, 100, 0), +(760820, 34, -3847.338867, 1880.751831, 86.640762, 0, 0, 1, 0, 100, 0), +(760820, 35, -3814.812988, 1960.993286, 85.844566, 0, 0, 1, 0, 100, 0), +(760820, 36, -3756.163574, 2030.727905, 84.516495, 0, 0, 1, 0, 100, 0), +(760820, 37, -3752.126221, 2094.629395, 78.208092, 0, 0, 1, 0, 100, 0), +(760820, 38, -3755.360352, 2146.251221, 75.892380, 0, 0, 1, 0, 100, 0), +(760820, 39, -3743.547119, 2204.366699, 76.086136, 0, 0, 1, 0, 100, 0), +(760820, 40, -3744.448975, 2262.760742, 76.763046, 0, 0, 1, 0, 100, 0), +(760820, 41, -3714.628662, 2328.074219, 76.275826, 0, 0, 1, 0, 100, 0), +(760820, 42, -3688.062256, 2347.847168, 76.348412, 0, 0, 1, 0, 100, 0), +(760820, 43, -3674.596680, 2318.612061, 75.835876, 0, 0, 1, 0, 100, 0), +(760820, 44, -3624.145264, 2310.810791, 74.901398, 0, 0, 1, 0, 100, 0), +(760820, 45, -3596.897217, 2321.221191, 73.494583, 0, 0, 1, 0, 100, 0), +(760820, 46, -3570.569824, 2315.111572, 71.091606, 0, 0, 1, 0, 100, 0), +(760820, 47, -3505.514648, 2275.580811, 66.201355, 0, 0, 1, 0, 100, 0), +(760820, 48, -3444.574219, 2289.437500, 63.707752, 0, 0, 1, 0, 100, 0), +(760820, 49, -3402.431396, 2291.413818, 62.819668, 0, 0, 1, 0, 100, 0), +(760820, 50, -3344.245605, 2280.061523, 61.217396, 0, 0, 1, 0, 100, 0), +(760820, 51, -3266.743164, 2283.391113, 60.007225, 0, 0, 1, 0, 100, 0), +(760820, 52, -3233.561279, 2292.924561, 59.882648, 0, 0, 1, 0, 100, 0), +(760820, 53, -3221.570313, 2250.202393, 61.123081, 0, 0, 1, 0, 100, 0), +(760820, 54, -3189.590088, 2199.339844, 64.705276, 0, 0, 1, 0, 100, 0), +(760820, 55, -3175.489502, 2098.237549, 75.678909, 0, 0, 1, 0, 100, 0), +(760820, 56, -3160.424316, 2081.004150, 80.764908, 0, 0, 1, 0, 100, 0), +(760820, 57, -3141.073242, 2027.865112, 92.255219, 0, 0, 1, 0, 100, 0), +(760820, 58, -3100.545654, 1987.315796, 100.928787, 0, 0, 1, 0, 100, 0), +(760820, 59, -3079.955811, 1952.478638, 109.271744, 0, 0, 1, 0, 100, 0), +(760820, 60, -3043.312744, 1921.660156, 112.361816, 0, 0, 1, 0, 100, 0), +(760820, 61, -2973.852539, 1910.639648, 104.475471, 0, 0, 1, 0, 100, 0), +(760820, 62, -2956.038086, 1893.901855, 99.170197, 0, 0, 1, 0, 100, 0), +(760820, 63, -2950.733643, 1858.555664, 88.703011, 0, 0, 1, 0, 100, 0), +(760820, 64, -2923.169678, 1824.131348, 70.827278, 0, 0, 1, 0, 100, 0), +(760820, 65, -2889.111816, 1758.524658, 47.417206, 0, 0, 1, 0, 100, 0), +(760820, 66, -2879.456299, 1722.608887, 39.589905, 0, 0, 1, 0, 100, 0), +(760820, 67, -2865.740723, 1710.794922, 36.381069, 0, 0, 1, 0, 100, 0), +(760820, 68, -2848.158691, 1707.713623, 32.244236, 0, 0, 1, 0, 100, 0), +(760820, 69, -2824.067383, 1685.606934, 23.045313, 0, 0, 1, 0, 100, 0), +(760820, 70, -2819.241943, 1641.792847, 13.334887, 0, 0, 1, 0, 100, 0), +(760820, 71, -2871.091064, 1569.277466, 15.303233, 0, 0, 1, 0, 100, 0), +(760820, 72, -2893.539063, 1492.087402, 14.836093, 0, 0, 1, 0, 100, 0), +(760820, 73, -2981.375000, 1436.377686, 11.891064, 0, 0, 1, 0, 100, 0), +(760820, 74, -2987.835693, 1401.822510, 11.926711, 0, 0, 1, 0, 100, 0), +(760820, 75, -2988.486572, 1347.793457, 9.330483, 0, 0, 1, 0, 100, 0), +(760820, 76, -3078.444580, 1254.076050, 10.399191, 0, 0, 1, 0, 100, 0), +(760820, 77, -3090.341797, 1206.203125, 18.388882, 0, 0, 1, 0, 100, 0), +(760820, 78, -3114.885986, 1174.320313, 25.699680, 0, 0, 1, 0, 100, 0), +(760820, 79, -3112.093506, 1126.753174, 24.259985, 0, 0, 1, 0, 100, 0), +(760820, 80, -3120.531982, 1096.862549, 19.402412, 0, 0, 1, 0, 100, 0), +(760820, 81, -3113.394287, 1034.310425, 4.188662, 0, 0, 1, 0, 100, 0), +(760820, 82, -3117.856445, 982.948914, -7.988031, 0, 0, 1, 0, 100, 0), +(760820, 83, -3091.906494, 930.465881, -17.414244, 0, 0, 1, 0, 100, 0), +(760820, 84, -3116.419922, 821.828979, -21.856766, 0, 0, 1, 0, 100, 0); diff --git a/sql/updates/world/2015_05_09_08_world.sql b/sql/updates/world/2015_05_09_08_world.sql new file mode 100644 index 00000000000..4c6ed7ef6ab --- /dev/null +++ b/sql/updates/world/2015_05_09_08_world.sql @@ -0,0 +1,23 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (29489, 29490); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (29489, 29490) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2949000, 2949001) 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 +(29489, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Captain Welsington- On Death - Say text 1'), +(29489, 0, 1, 0, 9, 0, 100, 0, 8, 25000, 8000, 12000, 11, 20615, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Captain Welsington - On 8-25 yard range - cast Intercept'), +(29489, 0, 2, 0, 0, 0, 100, 0, 3000, 7000, 5000, 10000, 11, 16856, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Captain Welsington- IC - cast Mortal Strike'), +(29490, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Captain Hartford - On Death - Say text 1'), +(29490, 0, 1, 0, 9, 0, 100, 0, 0, 25000, 3000, 4000, 87, 2949000, 2949001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Captain Hartford - On 1-25 yard range - Random action list'), +(2949000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 20823, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Captain Hartford - action list - cast Fireball'), +(2949001, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 20822, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Captain Hartford - action list - cast Frostbolt'), +(29490, 0, 2, 0, 0, 0, 100, 0, 5000, 10000, 10000, 15000, 11, 11831, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Captain Hartford - IC - cast Frost Nova'); + +DELETE FROM `creature_text` WHERE `entry` IN (29489, 29490); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(29489,0,0,'Archbishop Landgren must know! Aaaaaagggghhhh.....!',12,0,100,0,0,0,'Captain Welsington', 30161), +(29490,0,0,'I don''t know where the grand admiral is. Go to hell!',12,0,100,0,0,0,'Captain Hartford', 30146); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (29489, 29490); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,1,29489,0,0,9,0,12840,0,0,0,0,0,'','Captain Welsington- On Death - Say text 1 require quest 12840 taken'), +(22,1,29490,0,0,9,0,12840,0,0,0,0,0,'','Captain Hartford - On Death - Say text 1 require quest 12840 taken'); diff --git a/sql/updates/world/2015_05_09_09_world.sql b/sql/updates/world/2015_05_09_09_world.sql new file mode 100644 index 00000000000..77c55e87dfd --- /dev/null +++ b/sql/updates/world/2015_05_09_09_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=8996; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8996 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 +(8996, 0, 0, 0, 0, 0, 100, 0, 10000, 15000, 25000, 30000, 11, 33916, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Voidwalker Minion - IC - Void Drain'), +(8996, 0, 1, 0, 0, 0, 100, 0, 2000, 5000, 4000, 6000, 11, 33914, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Voidwalker Minion - IC - Shadowstrike'); diff --git a/sql/updates/world/2015_05_09_10_world.sql b/sql/updates/world/2015_05_09_10_world.sql new file mode 100644 index 00000000000..06b5eb9cd88 --- /dev/null +++ b/sql/updates/world/2015_05_09_10_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `creature_text` WHERE `entry` = 7779; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextID`) VALUES +(7779,1,0,"Good day to you both. I would speak to Lord Lescovar.",12,0,100,0,0,0,'Priestess Tyriona', 3781), +(7779,2,0,"Thank you. The Light be with you both.",12,0,100,0,0,0,'Priestess Tyriona', 3782), +(7779,3,0,"Milord, your guest has arrived. He awaits your presence.",12,0,100,0,0,0,'Priestess Tyriona', 3762), +(7779,4,0,"I shall use the time wisely, milord. Thank you.",12,0,100,0,0,0,'Priestess Tyriona', 3791); diff --git a/sql/updates/world/2015_05_09_11_world.sql b/sql/updates/world/2015_05_09_11_world.sql new file mode 100644 index 00000000000..c09cb1c9850 --- /dev/null +++ b/sql/updates/world/2015_05_09_11_world.sql @@ -0,0 +1,595 @@ +-- Add SAI support for Lance a Lot achievement ID: 2836 and Amongts the Champions quest +-- Champions SAI mechanic +SET @Sen_Champion := 33745; +SET @Script := 3374500; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Sen_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sen_Champion; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +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 +(@Sen_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - On Reset - Remove auras from Defend'), +(@Sen_Champion,0,1,2,62,0,100,0,10458,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sen Champion - On gossip select - Close gossip'), +(@Sen_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - store target'), +(@Sen_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Call timed actionlist'), +(@Sen_Champion,0,4,0,52,0,100,0,0,@Sen_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sen Champion - On text over - Cast Charge'), +(@Sen_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Champion - IC - Cast Thrust'), +(@Sen_Champion,0,6,0,9,0,100,0,5,5,4000,7000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@Sen_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - IC - Move forward 12 yards'), +(@Sen_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Champion - On 10-12 yard range - Cast Charge'), +(@Sen_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Cast Shield-Breaker'), +(@Sen_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - On HP% between 1% and 6% - Change faction to 35'), +(@Sen_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Say text'), +(@Sen_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Sen_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64812,0,0,0,0,0,12,1,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Cast credit'), +(@Sen_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Evade'), +(@Sen_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - On player killed - Say text'), +(@Sen_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Set unseen'), +(@Sen_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sen Champion - Linked with previous event - Despawn in 1 ms'), +-- Timed actionlist 1 +(@Script,9,1,0,0,0,100,0,0,0,0,0,42,0,1,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Set INVINCIBILITY'), +(@Script,9,2,0,0,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Set run ON'), +(@Script,9,3,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast Defend on self/Layer 1/'), +(@Script,9,4,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast Defend on self/Layer 2/'), +(@Script,9,5,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast Defend on self/Layer 3/'), +(@Script,9,6,0,0,0,100,0,0,0,0,0,46,20,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Move forward 15 yards'), +(@Script,9,7,0,0,0,100,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Set run Off'), +(@Script,9,8,0,0,0,100,0,0,0,0,0,11,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Cast aura TriggerS for Defend /10 sec one/'), +(@Script,9,9,0,0,0,100,0,3500,3500,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'All champions - Script 1 - Change faction to 14'), +(@Script,9,10,0,0,0,100,0,0,0,0,0,1,0,1500,0,0,0,0,2,0,0,0,0,0,0,0,'All champions - Script 1 - Say text'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @Sen_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Sen_Champion,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Champion', 33757), +(@Sen_Champion,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Champion', 33755), +(@Sen_Champion,0,2,'On your guard!',12,1,100,0,0,0,'Argent Champion', 33756), +(@Sen_Champion,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Champion', 33758), +(@Sen_Champion,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Champion', 33777), +(@Sen_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Champion', 33764), +(@Sen_Champion,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Champion', 33779), +(@Sen_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Champion', 33778), +(@Sen_Champion,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Champion', 33774), +(@Sen_Champion,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Champion', 33776), +(@Sen_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Champion', 33775), +(@Sen_Champion,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Champion', 33760); + +SET @Orgri_Champion := 33744; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Orgri_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Orgri_Champion; +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 +(@Orgri_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - On Reset - Remove auras from Defend'), +(@Orgri_Champion,0,1,2,62,0,100,0,10457,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgri Champion - On gossip select - Close gossip'), +(@Orgri_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - store target'), +(@Orgri_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Call timed actionlist'), +(@Orgri_Champion,0,4,0,52,0,100,0,0,@Orgri_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Orgri Champion - On text over - Cast Charge'), +(@Orgri_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Champion - IC - Cast Thrust'), +(@Orgri_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@Orgri_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - IC - Move forward 12 yards'), +(@Orgri_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Champion - On 10-12 yard range - Cast Charge'), +(@Orgri_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Cast Shield-Breaker'), +(@Orgri_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - On HP% between 1% and 6% - Change faction to 35'), +(@Orgri_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Say text'), +(@Orgri_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Orgri_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64811,0,0,0,0,0,12,1,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Cast credit'), +(@Orgri_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Evade'), +(@Orgri_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - On player killed - Say text'), +(@Orgri_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Set unseen'), +(@Orgri_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Orgri Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @Orgri_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Orgri_Champion,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Champion', 33757), +(@Orgri_Champion,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Champion', 33755), +(@Orgri_Champion,0,2,'On your guard!',12,1,100,0,0,0,'Argent Champion', 33756), +(@Orgri_Champion,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Champion', 33758), +(@Orgri_Champion,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Champion', 33777), +(@Orgri_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Champion', 33764), +(@Orgri_Champion,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Champion', 33779), +(@Orgri_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Champion', 33778), +(@Orgri_Champion,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Champion', 33774), +(@Orgri_Champion,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Champion', 33776), +(@Orgri_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Champion', 33775), +(@Orgri_Champion,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Champion', 33760); +SET @TB_Champion := 33748; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@TB_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TB_Champion; +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 +(@TB_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - On Reset - Remove auras from Defend'), +(@TB_Champion,0,1,2,62,0,100,0,10461,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'TB Champion - On gossip select - Close gossip'), +(@TB_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'TB Champion - Linked with previous event - store target'), +(@TB_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - Linked with previous event - Call timed actionlist'), +(@TB_Champion,0,4,0,52,0,100,0,0,@TB_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'TB Champion - On text over - Cast Charge'), +(@TB_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Champion - IC - Cast Thrust'), +(@TB_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@TB_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - IC - Move forward 12 yards'), +(@TB_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Champion - On 10-12 yard range - Cast Charge'), +(@TB_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'TB Champion - Linked with previous event - Cast Shield-Breaker'), +(@TB_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - On HP% between 1% and 6% - Change faction to 35'), +(@TB_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - Linked with previous event - Say text'), +(@TB_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'TB Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@TB_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64815,0,0,0,0,0,12,1,0,0,0,0,0,0,'TB Champion - Linked with previous event - Cast credit'), +(@TB_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB_Valiant - Linked with previous event - Evade'), +(@TB_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - On player killed - Say text'), +(@TB_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - Linked with previous event - Set unseen'), +(@TB_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'TB Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @TB_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@TB_Champion,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Champion', 33757), +(@TB_Champion,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Champion', 33755), +(@TB_Champion,0,2,'On your guard!',12,1,100,0,0,0,'Argent Champion', 33756), +(@TB_Champion,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Champion', 33758), +(@TB_Champion,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Champion', 33777), +(@TB_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Champion', 33764), +(@TB_Champion,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Champion', 33779), +(@TB_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Champion', 33778), +(@TB_Champion,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Champion', 33774), +(@TB_Champion,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Champion', 33776), +(@TB_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Champion', 33775), +(@TB_Champion,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Champion', 33760); +SET @SM_Champion := 33746; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@SM_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SM_Champion; +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 +(@SM_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - On Reset - Remove auras from Defend'), +(@SM_Champion,0,1,2,62,0,100,0,10459,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'SM Champion - On gossip select - Close gossip'), +(@SM_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - store target'), +(@SM_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - Call timed actionlist'), +(@SM_Champion,0,4,0,52,0,100,0,0,@SM_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'SM Champion - On text over - Cast Charge'), +(@SM_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Champion - IC - Cast Thrust'), +(@SM_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@SM_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - IC - Move forward 12 yards'), +(@SM_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Champion - On 10-12 yard range - Cast Charge'), +(@SM_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - Cast Shield-Breaker'), +(@SM_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - On HP% between 1% and 6% - Change faction to 35'), +(@SM_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - Say text'), +(@SM_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'SM Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@SM_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64813,0,0,0,0,0,12,1,0,0,0,0,0,0,'SM Champion - Linked with previous event - Cast credit'), +(@SM_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - Evade'), +(@SM_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - On player killed - Say text'), +(@SM_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - Set unseen'), +(@SM_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SM Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @SM_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@SM_Champion,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Champion', 33757), +(@SM_Champion,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Champion', 33755), +(@SM_Champion,0,2,'On your guard!',12,1,100,0,0,0,'Argent Champion', 33756), +(@SM_Champion,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Champion', 33758), +(@SM_Champion,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Champion', 33777), +(@SM_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Champion', 33764), +(@SM_Champion,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Champion', 33779), +(@SM_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Champion', 33778), +(@SM_Champion,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Champion', 33774), +(@SM_Champion,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Champion', 33776), +(@SM_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Champion', 33775), +(@SM_Champion,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Champion', 33760); +SET @GR_Champion := 33740; +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@GR_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GR_Champion; +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 +(@GR_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - On Reset - Remove auras from Defend'), +(@GR_Champion,0,1,2,62,0,100,0,10455,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'GR Champion - On gossip select - Close gossip'), +(@GR_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - store target'), +(@GR_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - Call timed actionlist'), +(@GR_Champion,0,4,0,52,0,100,0,0,@GR_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'GR Champion - On text over - Cast Charge'), +(@GR_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Champion - IC - Cast Thrust'), +(@GR_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@GR_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - IC - Move forward 12 yards'), +(@GR_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Champion - On 10-12 yard range - Cast Charge'), +(@GR_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - Cast Shield-Breaker'), +(@GR_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - On HP% between 1% and 6% - Change faction to 35'), +(@GR_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - Say text'), +(@GR_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'GR Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@GR_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64809,0,0,0,0,0,12,1,0,0,0,0,0,0,'GR Champion - Linked with previous event - Cast credit'), +(@GR_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - Evade'), +(@GR_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - On player killed - Say text'), +(@GR_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - Set unseen'), +(@GR_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'GR Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @GR_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@GR_Champion,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Champion', 33757), +(@GR_Champion,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Champion', 33755), +(@GR_Champion,0,2,'On your guard!',12,7,100,0,0,0,'Argent Champion', 33756), +(@GR_Champion,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Champion', 33758), +(@GR_Champion,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Champion', 33777), +(@GR_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Champion', 33764), +(@GR_Champion,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Champion', 33779), +(@GR_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Champion', 33778), +(@GR_Champion,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Champion', 33774), +(@GR_Champion,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Champion', 33776), +(@GR_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Champion', 33775), +(@GR_Champion,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Champion', 33760); +SET @IF_Champion := 33743; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@IF_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@IF_Champion; +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 +(@IF_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - On Reset - Remove auras from Defend'), +(@IF_Champion,0,1,2,62,0,100,0,10456,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'IF Champion - On gossip select - Close gossip'), +(@IF_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - store target'), +(@IF_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - Call timed actionlist'), +(@IF_Champion,0,4,0,52,0,100,0,0,@IF_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'IF Champion - On text over - Cast Charge'), +(@IF_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Champion - IC - Cast Thrust'), +(@IF_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@IF_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - IC - Move forward 12 yards'), +(@IF_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Champion - On 10-12 yard range - Cast Charge'), +(@IF_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - Cast Shield-Breaker'), +(@IF_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - On HP% between 1% and 6% - Change faction to 35'), +(@IF_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - Say text'), +(@IF_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'IF Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@IF_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64810,0,0,0,0,0,12,1,0,0,0,0,0,0,'IF Champion - Linked with previous event - Cast credit'), +(@IF_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - Evade'), +(@IF_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - On player killed - Say text'), +(@IF_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - Set unseen'), +(@IF_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'IF Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @IF_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@IF_Champion,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Champion', 33757), +(@IF_Champion,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Champion', 33755), +(@IF_Champion,0,2,'On your guard!',12,7,100,0,0,0,'Argent Champion', 33756), +(@IF_Champion,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Champion', 33758), +(@IF_Champion,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Champion', 33777), +(@IF_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Champion', 33764), +(@IF_Champion,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Champion', 33779), +(@IF_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Champion', 33778), +(@IF_Champion,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Champion', 33774), +(@IF_Champion,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Champion', 33776), +(@IF_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Champion', 33775), +(@IF_Champion,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Champion', 33760); +SET @SW_Champion := 33747; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@SW_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SW_Champion; +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 +(@SW_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - On Reset - Remove auras from Defend'), +(@SW_Champion,0,1,2,62,0,100,0,10460,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'SW Champion - On gossip select - Close gossip'), +(@SW_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - store target'), +(@SW_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - Call timed actionlist'), +(@SW_Champion,0,4,0,52,0,100,0,0,@SW_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'SW Champion - On text over - Cast Charge'), +(@SW_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Champion - IC - Cast Thrust'), +(@SW_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@SW_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - IC - Move forward 12 yards'), +(@SW_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Champion - On 10-12 yard range - Cast Charge'), +(@SW_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - Cast Shield-Breaker'), +(@SW_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - On HP% between 1% and 6% - Change faction to 35'), +(@SW_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - Say text'), +(@SW_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'SW Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@SW_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64814,0,0,0,0,0,12,1,0,0,0,0,0,0,'SW Champion - Linked with previous event - Cast credit'), +(@SW_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - Evade'), +(@SW_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - On player killed - Say text'), +(@SW_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - Set unseen'), +(@SW_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'SW Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @SW_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@SW_Champion,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Champion', 33757), +(@SW_Champion,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Champion', 33755), +(@SW_Champion,0,2,'On your guard!',12,7,100,0,0,0,'Argent Champion', 33756), +(@SW_Champion,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Champion', 33758), +(@SW_Champion,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Champion', 33777), +(@SW_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Champion', 33764), +(@SW_Champion,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Champion', 33779), +(@SW_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Champion', 33778), +(@SW_Champion,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Champion', 33774), +(@SW_Champion,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Champion', 33776), +(@SW_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Champion', 33775), +(@SW_Champion,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Champion', 33760); +SET @Darn_Champion := 33738; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Darn_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Darn_Champion; +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 +(@Darn_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - On Reset - Remove auras from Defend'), +(@Darn_Champion,0,1,2,62,0,100,0,10453,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Darn Champion - On gossip select - Close gossip'), +(@Darn_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - store target'), +(@Darn_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Call timed actionlist'), +(@Darn_Champion,0,4,0,52,0,100,0,0,@Darn_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Darn Champion - On text over - Cast Charge'), +(@Darn_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Champion - IC - Cast Thrust'), +(@Darn_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@Darn_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - IC - Move forward 12 yards'), +(@Darn_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Champion - On 10-12 yard range - Cast Charge'), +(@Darn_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Cast Shield-Breaker'), +(@Darn_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - On HP% between 1% and 6% - Change faction to 35'), +(@Darn_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Say text'), +(@Darn_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Darn_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64805,0,0,0,0,0,12,1,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Cast credit'), +(@Darn_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Evade'), +(@Darn_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - On player killed - Say text'), +(@Darn_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Set unseen'), +(@Darn_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Darn Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @Darn_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Darn_Champion,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Champion', 33757), +(@Darn_Champion,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Champion', 33755), +(@Darn_Champion,0,2,'On your guard!',12,7,100,0,0,0,'Argent Champion', 33756), +(@Darn_Champion,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Champion', 33758), +(@Darn_Champion,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Champion', 33777), +(@Darn_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Champion', 33764), +(@Darn_Champion,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Champion', 33779), +(@Darn_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Champion', 33778), +(@Darn_Champion,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Champion', 33774), +(@Darn_Champion,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Champion', 33776), +(@Darn_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Champion', 33775), +(@Darn_Champion,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Champion', 33760); +SET @Exo_Champion := 33739; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Exo_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Exo_Champion; +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 +(@Exo_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - On Reset - Remove auras from Defend'), +(@Exo_Champion,0,1,2,62,0,100,0,10454,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Exo Champion - On gossip select - Close gossip'), +(@Exo_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - store target'), +(@Exo_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Call timed actionlist'), +(@Exo_Champion,0,4,0,52,0,100,0,0,@Exo_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Exo Champion - On text over - Cast Charge'), +(@Exo_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Champion - IC - Cast Thrust'), +(@Exo_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@Exo_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - IC - Move forward 12 yards'), +(@Exo_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Champion - On 10-12 yard range - Cast Charge'), +(@Exo_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Cast Shield-Breaker'), +(@Exo_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - On HP% between 1% and 6% - Change faction to 35'), +(@Exo_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Say text'), +(@Exo_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@Exo_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64808,0,0,0,0,0,12,1,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Cast credit'), +(@Exo_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Evade'), +(@Exo_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - On player killed - Say text'), +(@Exo_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Set unseen'), +(@Exo_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Exo Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @Exo_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Exo_Champion,0,0,'Ready yourself!',12,7,100,0,0,0,'Argent Champion', 33757), +(@Exo_Champion,0,1,'Prepare yourself!',12,7,100,0,0,0,'Argent Champion', 33755), +(@Exo_Champion,0,2,'On your guard!',12,7,100,0,0,0,'Argent Champion', 33756), +(@Exo_Champion,0,3,'Let it begin!',12,7,100,0,0,0,'Argent Champion', 33758), +(@Exo_Champion,1,0,'Victory is mine!',12,7,100,0,0,0,'Argent Champion', 33777), +(@Exo_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,7,100,0,0,0,'Argent Champion', 33764), +(@Exo_Champion,1,2,'I have won. Better luck another time, friend.',12,7,100,0,0,0,'Argent Champion', 33779), +(@Exo_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,7,100,0,0,0,'Argent Champion', 33778), +(@Exo_Champion,2,0,'I yield to you.',12,7,100,0,0,0,'Argent Champion', 33774), +(@Exo_Champion,2,1,'That was a well fought battle. I yield to you.',12,7,100,0,0,0,'Argent Champion', 33776), +(@Exo_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,7,100,0,0,0,'Argent Champion', 33775), +(@Exo_Champion,2,3,'I have been defeated. Good fight!',12,7,100,0,0,0,'Argent Champion', 33760); +SET @UC_Champion := 33749; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@UC_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@UC_Champion; +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 +(@UC_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - On Reset - Remove auras from Defend'), +(@UC_Champion,0,1,2,62,0,100,0,10462,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'UC Champion - On gossip select - Close gossip'), +(@UC_Champion,0,2,3,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - store target'), +(@UC_Champion,0,3,0,61,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - Call timed actionlist'), +(@UC_Champion,0,4,0,52,0,100,0,0,@UC_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'UC Champion - On text over - Cast Charge'), +(@UC_Champion,0,5,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Champion - IC - Cast Thrust'), +(@UC_Champion,0,6,0,9,0,100,0,5,5,9000,10000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@UC_Champion,0,7,0,0,0,100,0,9000,11000,9000,10000,46,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - IC - Move forward 12 yards'), +(@UC_Champion,0,8,9,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Champion - On 10-12 yard range - Cast Charge'), +(@UC_Champion,0,9,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - Cast Shield-Breaker'), +(@UC_Champion,0,10,11,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - On HP% between 1% and 6% - Change faction to 35'), +(@UC_Champion,0,11,12,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - Say text'), +(@UC_Champion,0,12,13,61,0,100,0,0,0,0,0,85,63596,0,0,0,0,0,12,1,0,0,0,0,0,0,'UC Champion - Linked with previous event - Cast Mounted Melee Victory /item/'), +(@UC_Champion,0,13,14,61,0,100,0,0,0,0,0,85,64816,0,0,0,0,0,12,1,0,0,0,0,0,0,'UC Champion - Linked with previous event - Cast credit'), +(@UC_Champion,0,14,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - Evade'), +(@UC_Champion,0,15,16,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - On player killed - Say text'), +(@UC_Champion,0,16,17,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - Set unseen'), +(@UC_Champion,0,17,0,61,0,100,0,0,0,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'UC Champion - Linked with previous event - Despawn in 1 ms'); +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @UC_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@UC_Champion,0,0,'Ready yourself!',12,1,100,0,0,0,'Argent Champion', 33757), +(@UC_Champion,0,1,'Prepare yourself!',12,1,100,0,0,0,'Argent Champion', 33755), +(@UC_Champion,0,2,'On your guard!',12,1,100,0,0,0,'Argent Champion', 33756), +(@UC_Champion,0,3,'Let it begin!',12,1,100,0,0,0,'Argent Champion', 33758), +(@UC_Champion,1,0,'Victory is mine!',12,1,100,0,0,0,'Argent Champion', 33777), +(@UC_Champion,1,1,'It seems you still need more practice. Perhaps another time.',12,1,100,0,0,0,'Argent Champion', 33764), +(@UC_Champion,1,2,'I have won. Better luck another time, friend.',12,1,100,0,0,0,'Argent Champion', 33779), +(@UC_Champion,1,3,'I am afraid you will need more practice to defeat me.',12,1,100,0,0,0,'Argent Champion', 33778), +(@UC_Champion,2,0,'I yield to you.',12,1,100,0,0,0,'Argent Champion', 33774), +(@UC_Champion,2,1,'That was a well fought battle. I yield to you.',12,1,100,0,0,0,'Argent Champion', 33776), +(@UC_Champion,2,2,'It would seem I underestimated your skills. Well done.',12,1,100,0,0,0,'Argent Champion', 33775), +(@UC_Champion,2,3,'I have been defeated. Good fight!',12,1,100,0,0,0,'Argent Champion', 33760); + + +DELETE FROM `gossip_menu` WHERE `entry` IN (10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10453, 14421), +(10453, 14489), +(10454, 14421), +(10454, 14489), +(10455, 14421), +(10455, 14489), +(10456, 14421), +(10456, 14489), +(10457, 14421), +(10457, 14489), +(10458, 14421), +(10458, 14489), +(10459, 14421), +(10459, 14489), +(10460, 14421), +(10460, 14489), +(10461, 14421), +(10461, 14489), +(10462, 14421), +(10462, 14489); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup` IN (10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14,10453,14421,0,1,64805,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10453,14489,0,1,64805,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10454,14421,0,1,64808,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10454,14489,0,1,64808,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10455,14421,0,1,64809,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10455,14489,0,1,64809,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10456,14421,0,1,64810,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10456,14489,0,1,64810,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10457,14421,0,1,64811,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10457,14489,0,1,64811,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10458,14421,0,1,64812,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10458,14489,0,1,64812,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10459,14421,0,1,64813,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10459,14489,0,1,64813,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10460,14421,0,1,64814,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10460,14489,0,1,64814,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10461,14421,0,1,64815,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10461,14489,0,1,64815,0,0,0,'','Show gossip menu text if the player have the aura', 0), +(14,10462,14421,0,1,64816,0,0,0,'','Show gossip menu text if the player haven''t the aura', 1), +(14,10462,14489,0,1,64816,0,0,0,'','Show gossip menu text if the player have the aura', 0); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTarget`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`,`NegativeCondition`) VALUES +(15,10453,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10453,0,0,1,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10453,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10453,0,0,2,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10453,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10453,0,0,3,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10453,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10453,0,0,4,1,64805,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10453,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10453,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10454,0,0,1,1,64808,0,0,0,'','Show gossip menu only if don''t have the auran',1), +(15,10454,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10454,0,0,2,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10454,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10454,0,0,3,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10454,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10454,0,0,4,1,64808,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10454,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10454,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10455,0,0,1,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10455,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10455,0,0,2,1,64809,0,0,0,'','Show gossip menu only if don''t have the auran',1), +(15,10455,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,3,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10455,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10455,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,4,1,64809,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10455,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10455,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10455,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10456,0,0,1,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10456,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10456,0,0,2,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10456,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10456,0,0,3,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10456,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10456,0,0,4,1,64810,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10456,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10456,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10457,0,0,1,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10457,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10457,0,0,2,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10457,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10457,0,0,3,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10457,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10457,0,0,4,1,64811,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10457,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10457,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10458,0,0,1,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10458,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10458,0,0,2,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10458,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10458,0,0,3,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10458,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10458,0,0,4,1,64812,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10458,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10458,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10459,0,0,1,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10459,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10459,0,0,2,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10459,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10459,0,0,3,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10459,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10459,0,0,4,1,64813,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10459,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10459,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10460,0,0,1,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10460,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10460,0,0,2,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10460,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10460,0,0,3,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10460,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10460,0,0,4,1,64814,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10460,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10460,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10461,0,0,1,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10461,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10461,0,0,2,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10461,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10461,0,0,3,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10461,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10461,0,0,4,1,64815,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10461,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10461,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,1,9,13790,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10462,0,0,1,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10462,0,0,1,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,1,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,2,9,13793,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10462,0,0,2,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10462,0,0,2,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,2,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,3,9,13811,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10462,0,0,3,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10462,0,0,3,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,3,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,4,9,13814,0,0,0,'','Show gossip menu only if quest Among the Champions is taken',0), +(15,10462,0,0,4,1,64816,0,0,0,'','Show gossip menu only if don''t have the aura',1), +(15,10462,0,0,4,1,63034,0,0,0,'','Show gossip menu only if the player have the aura',0), +(15,10462,0,0,4,1,62853,0,0,0,'','Show gossip menu only if the player have the aura',0); diff --git a/sql/updates/world/2015_05_09_12_world.sql b/sql/updates/world/2015_05_09_12_world.sql new file mode 100644 index 00000000000..d2e488cc026 --- /dev/null +++ b/sql/updates/world/2015_05_09_12_world.sql @@ -0,0 +1,35 @@ +-- The Exorcism of Colonel Jules +UPDATE `creature_template` SET `ScriptName`= 'npc_barada' WHERE `entry`= 22431; +UPDATE `creature_template` SET `ScriptName`= 'npc_colonel_jules' WHERE `entry`= 22432; + +DELETE FROM `gossip_menu_option` WHERE `menu_id` = 8539; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`) VALUES +(8539, 1, 0, 'I am ready, Anchorite. Let us begin the exorcism.', 20396, 1, 3); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8539; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8539,0,0,9,10935,0,0,0,'','Show gossip menu if player accept Exorcism of Colonel Jules'); + +DELETE FROM `creature_text` WHERE `entry` IN(22431, 22432); +-- Barada +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(22431, 0, 0, 'It is time. The rite of exorcism will now commence...', 12, 0, 100, 0, 0, 0, 20400, 0, 'Barada'), +(22431, 1, 0, 'Prepare yourself. Do not allow the ritual to be interrupted or we may lose our patient...', 12, 0, 100, 0, 0, 0, 20401, 0, 'Barada'), +(22431, 2, 0, 'Back foul beings of darkness! You have no power here!', 12, 0, 100, 0, 0, 0, 20404, 0, 'Barada'), +(22431, 3, 0, 'I... must not... falter', 12, 0, 100, 0, 0, 0, 20407, 0, 'Barada'), +(22431, 4, 0, 'The Light is my guide... it is my sustenance!', 12, 0, 100, 0, 0, 0, 20408, 0, 'Barada'), +(22431, 5, 0, 'The power of light compells you! Back to your pit!', 12, 0, 100, 0, 0, 0, 20405, 0, 'Barada'), +(22431, 6, 0, 'Be cleansed with Light, human! Let not the demonic corruption overwhelm you.', 12, 0, 100, 0, 0, 0, 20403, 0, 'Barada'), +(22431, 7, 0, 'Back! I cast you back... corruptor of faith! Author of pain! Do not return, or suffer the same fate as you did here today!', 12, 0, 100, 0, 0, 0, 20419, 0, 'Barada'), + +-- Colonel Jules +(22432, 0, 0, 'Keep away. The fool is mine.', 12, 0, 100, 0, 0, 0, 20402, 0, 'Colonel Jules'), +(22432, 1, 0, 'Ah! Cease the incantations, Anchorite! Cease, or I will show you such pain that your pathetic people have never imagined!', 12, 0, 100, 0, 0, 0, 20414, 0, 'Colonel Jules'), +(22432, 2, 0, 'This is fruitless, draenei! You and your little helper cannot wrest control of this pathetic human. He is mine!', 12, 0, 100, 0, 0, 0, 20416, 0, 'Colonel Jules'), +(22432, 3, 0, 'I see your ancestors, Anchorite! They writhe and scream in the darkness... they are with us!', 12, 0, 100, 0, 0, 0, 20415, 0, 'Colonel Jules'), +(22432, 4, 0, 'I will tear your soul into morsels and slow roast them over demon fire.', 12, 0, 100, 0, 0, 0, 20417, 0, 'Colonel Jules'); + +-- Aura for the flying skulls +DELETE FROM `creature_template_addon` WHERE `entry` = 22507; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(22507, 0, 0, 0, 1, 0, '39303'); diff --git a/sql/updates/world/2015_05_11_00_world.sql b/sql/updates/world/2015_05_11_00_world.sql new file mode 100644 index 00000000000..5e8485202fa --- /dev/null +++ b/sql/updates/world/2015_05_11_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `conditions` SET `ConditionTypeOrReference`=9, `SourceEntry`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8539; diff --git a/sql/updates/world/2015_05_11_01_world.sql b/sql/updates/world/2015_05_11_01_world.sql new file mode 100644 index 00000000000..d90a5fef88d --- /dev/null +++ b/sql/updates/world/2015_05_11_01_world.sql @@ -0,0 +1,130 @@ +-- +-- Okla +DELETE FROM `creature_text` WHERE `entry` IN (14873, 5907); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextId`) VALUES +(14873, 0, 0, 'Can I go collect more rocks for my necklace, Papa?', 12, 1, 100, 1, 0, 0, 'Okla',10274), +(14873, 1, 0, 'Dabu! I will be careful Papa!', 12, 1, 100, 1, 0, 0, 'Okla', 10276), +(14873, 2, 0, 'Ooohh... This rock is nice and colorful. Let\'s see if I can find more like it...', 12, 1, 100, 1, 0, 0, 'Okla', 10277), +(14873, 3, 0, 'Hmm... That rock is nice, but too small.', 12, 1, 100, 1, 0, 0, 'Okla', 10278), +(14873, 4, 0, 'This is a shiney rock. I\'ll put it in my bucket. Ok, I just need a few more...', 12, 1, 100, 1, 0, 0, 'Okla', 10279), +(14873, 5, 0, 'I bet my friend Gruk would like this rock for the spear he is making! It\'s very sharp... I hope he likes it.', 12, 1, 100, 1, 0, 0, 'Okla', 10280), +(14873, 6, 0, 'There... That should be enough rocks to make a necklace. I should probably get home now anyway.', 12, 1, 100, 1, 0, 0, 'Okla', 10281), +(5907, 0, 0, 'Yes you may, Okla. But do not stray too far from home.', 12, 1, 100, 1, 0, 0, 'Kranal Fiss', 10275); + +-- Okla SAI +SET @ENTRY := 14873; +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,25,0,100,0,0,0,0,0,53,0,14873,1,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Reset - Start Waypoint"), +(@ENTRY,0,1,0,40,0,100,0,2,14873,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Waypoint 2 Reached - Run Script"), +(@ENTRY,0,2,0,40,0,100,0,13,14873,0,0,80,@ENTRY*100+01,0,0,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Waypoint 13 Reached - Run Script"), +(@ENTRY,0,3,0,40,0,100,0,18,14873,0,0,80,@ENTRY*100+02,0,0,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Waypoint 18 Reached - Run Script"), +(@ENTRY,0,4,0,40,0,100,0,24,14873,0,0,80,@ENTRY*100+03,0,0,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Waypoint 24 Reached - Run Script"), +(@ENTRY,0,5,0,40,0,100,0,29,14873,0,0,80,@ENTRY*100+04,0,0,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Waypoint 29 Reached - Run Script"), +(@ENTRY,0,6,0,40,0,100,0,35,14873,0,0,80,@ENTRY*100+05,0,0,0,0,0,1,0,0,0,0,0,0,0,"Okla - On Waypoint 35 Reached - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 1487300; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,21000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 0"), +(@ENTRY,9,2,0,0,0,100,0,8000,8000,0,0,1,0,0,0,0,0,0,19,5907,50,0,0,0,0,0,"On Script - Say Line 0"), +(@ENTRY,9,3,0,0,0,100,0,7000,7000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 1"); + +-- Actionlist SAI +SET @ENTRY := 1487301; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 2"); + +-- Actionlist SAI +SET @ENTRY := 1487302; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 3"); + +-- Actionlist SAI +SET @ENTRY := 1487303; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 4"); + +-- Actionlist SAI +SET @ENTRY := 1487304; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 5"); + +-- Actionlist SAI +SET @ENTRY := 1487305; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 6"); + +DELETE FROM `waypoints` WHERE `entry`=14873; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES +(14873, 1, 270.076, -3036.6, 97.6192), +(14873, 2, 262.171, -3043.45, 96.5053), +(14873, 3, 251.328, -3055.55, 96.1454), +(14873, 4, 246.888, -3070.92, 95.2793), +(14873, 5, 242.449, -3081.3, 91.82), +(14873, 6, 232.826, -3106.67, 93.3165), +(14873, 7, 226.41, -3120.76, 93.3475), +(14873, 8, 213.921, -3151.01, 91.2851), +(14873, 9, 221.681, -3147.9, 91.374), +(14873, 10, 214.549, -3134.64, 91.9876), +(14873, 11, 210.931, -3139.95, 91.6514), +(14873, 12, 214.059, -3139.64, 91.7), +(14873, 13, 213.426, -3131.78, 92.1297), +(14873, 14, 220.194, -3140.72, 91.7517), +(14873, 15, 225.395, -3139.1, 92.0847), +(14873, 16, 220.857, -3140.83, 91.7662), +(14873, 17, 218.769, -3132.79, 92.4983), +(14873, 18, 226.814, -3137.56, 92.169), +(14873, 19, 225.496, -3132.89, 92.7818), +(14873, 20, 213.603, -3148.39, 91.4489), +(14873, 21, 219.055, -3151.2, 91.2139), +(14873, 22, 220.469, -3141.93, 91.6344), +(14873, 23, 214.852, -3148.32, 91.4558), +(14873, 24, 218.373, -3144.99, 91.5714), +(14873, 25, 224.091, -3149.02, 91.2304), +(14873, 26, 224.591, -3145.02, 91.4801), +(14873, 27, 219.022, -3147.38, 91.4735), +(14873, 28, 220.167, -3139.75, 91.8958), +(14873, 29, 225.033, -3133.14, 92.8028), +(14873, 30, 222.021, -3128.32, 93.0422), +(14873, 31, 228.338, -3126.35, 92.9595), +(14873, 32, 229.495, -3129.22, 92.6818), +(14873, 33, 232.12, -3128.11, 92.5988), +(14873, 34, 227.003, -3137.58, 92.1461), +(14873, 35, 220.002, -3132.38, 92.659), +(14873, 36, 225.874, -3102.36, 93.6962), +(14873, 37, 233.086, -3085.54, 91.6788), +(14873, 38, 235.152, -3069.81, 91.8706), +(14873, 39, 239.821, -3061.03, 95.4022), +(14873, 40, 256.123, -3047.91, 96.2473), +(14873, 41, 267.05, -3039.04, 96.9212), +(14873, 42, 271.093, -3035.98, 97.6501), +(14873, 43, 278.975, -3029.68, 97.3919), +(14873, 44, 280.125, -3029.01, 97.3502); + +UPDATE `creature_addon` SET `path_id`=59070 WHERE `guid`=13174; +UPDATE `creature` SET `MovementType`=2 WHERE `guid`=13174; +DELETE FROM `waypoint_data` WHERE `id` IN (59070); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`action`,`action_chance`,`wpguid`) VALUES +(59070,0,265.967000,-3050.670000,96.921500,0,0,0,100,0), +(59070,1,263.671661,-3047.959961,96.665161,0,0,0,100,0), +(59070,2,260.557739,-3038.177002,96.740677,0,0,0,100,0), +(59070,3,262.354950,-3036.125732,96.990982,0,0,0,100,0), +(59070,4,261.470215,-3036.779541,96.961708,0,60000,0,100,0), +(59070,5,259.890106,-3038.696045,96.572845,0,0,0,100,0), +(59070,6,265.967468,-3050.672363,96.921516,0,0,0,100,0), +(59070,7,265.967000,-3050.670000,96.921500,0,30000,0,100,0); +UPDATE `creature` SET `position_x`=280.125, `position_y`=-3029.01, `position_z`=97.3502, `orientation`= 3.764 WHERE `guid`=14873; diff --git a/sql/updates/world/2015_05_11_02_world.sql b/sql/updates/world/2015_05_11_02_world.sql new file mode 100644 index 00000000000..7ec5f4870ce --- /dev/null +++ b/sql/updates/world/2015_05_11_02_world.sql @@ -0,0 +1,34 @@ +-- +DELETE FROM `waypoint_data` WHERE `id`=1207950; +DELETE FROM `creature_addon` WHERE `guid`=120795; +UPDATE `creature` SET `MovementType`=0 WHERE `guid`=120795; +DELETE FROM `waypoint_scripts` WHERE `guid`=120795; + +-- Refurbished Steam Tank SAI +SET @ENTRY := 29144; +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,25,0,100,0,0,0,0,0,53,0,29144,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Reset - Start Waypoint"), +(@ENTRY,0,1,0,40,0,100,0,1,29144,0,0,54,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 1 Reached - Pause Waypoint"), +(@ENTRY,0,2,0,40,0,100,0,2,29144,0,0,54,120000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 2 Reached - Pause Waypoint"), +(@ENTRY,0,3,0,40,0,100,0,3,29144,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 3 Reached - Pause Waypoint"), +(@ENTRY,0,4,0,40,0,100,0,6,29144,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 6 Reached - Pause Waypoint"), +(@ENTRY,0,5,0,40,0,100,0,10,29144,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 10 Reached - Pause Waypoint"), +(@ENTRY,0,6,7,40,0,100,0,11,29144,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 11 Reached - Pause Waypoint"), +(@ENTRY,0,7,0,61,0,100,0,11,29144,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Waypoint 11 Reached - Kill Self"), +(@ENTRY,0,8,0,6,0,100,0,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Refurbished Steam Tank - On Just Died - Despawn In 3000 ms"); + +DELETE FROM `waypoints` WHERE `entry`=@ENTRY; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@ENTRY, 1, -8463.9, 1109.41, 19.1352, 'Refurbished Steam Tank'), +(@ENTRY, 2, -8463.52, 1112.6, 19.0517, 'Refurbished Steam Tank'), +(@ENTRY, 3, -8463.23, 1108.18, 19.053, 'Refurbished Steam Tank'), +(@ENTRY, 4, -8473.35, 1096.63, 18.7345, 'Refurbished Steam Tank'), +(@ENTRY, 5, -8496.34, 1095.88, 17.9444, 'Refurbished Steam Tank'), +(@ENTRY, 6, -8499.86, 1132.84, 17.9763, 'Refurbished Steam Tank'), +(@ENTRY, 7, -8486, 1138.24, 17.9608, 'Refurbished Steam Tank'), +(@ENTRY, 8, -8462.43, 1136.04, 18.6577, 'Refurbished Steam Tank'), +(@ENTRY, 9, -8440.65, 1137.48, 18.8719, 'Refurbished Steam Tank'), +(@ENTRY, 10, -8412.35, 1137.49, 18.0685, 'Refurbished Steam Tank'), +(@ENTRY, 11, -8412.35, 1137.49, 18.0685, 'Refurbished Steam Tank'); diff --git a/sql/updates/world/2015_05_11_03_world.sql b/sql/updates/world/2015_05_11_03_world.sql new file mode 100644 index 00000000000..b0df32b2a92 --- /dev/null +++ b/sql/updates/world/2015_05_11_03_world.sql @@ -0,0 +1,234 @@ +-- DB/Quest: Assault by Air (H) +DELETE FROM `creature` WHERE `id`=32225; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(16398, 32225, 571, 1, 1, 0, 0, 7303.23, 1520.81, 323.2961, 1.53589, 300, 0, 0, 63000, 0, 0, 0, 0, 0); + +UPDATE `creature_template` SET `spell1`=59880 WHERE `entry`=32227; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=32225; +UPDATE `creature_template` SET `speed_run`=3 WHERE `entry`=32225; +UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry`=32225 AND `seat_id`=0; + +DELETE FROM `waypoints` WHERE `entry`=32225; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(32225, 1, 7224.952, 1493.076, 355.6927, 'Skybreaker Troop Transport'), +(32225, 2, 7158.104, 1468.994, 408.7451, 'Skybreaker Troop Transport'), +(32225, 3, 7091.476, 1447.724, 454.6882, 'Skybreaker Troop Transport'), +(32225, 4, 6959.782, 1423.015, 558.3835, 'Skybreaker Troop Transport'), +(32225, 5, 6779.104, 1463.505, 646.3554, 'Skybreaker Troop Transport'), +(32225, 6, 6655.649, 1608.774, 709.994, 'Skybreaker Troop Transport'), +(32225, 7, 6624.22, 1736.658, 728.0214, 'Skybreaker Troop Transport'), +(32225, 8, 6669.947, 1866.185, 709.688, 'Skybreaker Troop Transport'), +(32225, 9, 6718.041, 1885.129, 690.6326, 'Skybreaker Troop Transport'), +(32225, 10, 6795.828, 1838.745, 659.0216, 'Skybreaker Troop Transport'), +(32225, 11, 6829.202, 1723.054, 616.9384, 'Skybreaker Troop Transport'), +(32225, 12, 6938.554, 1702.879, 585.9383, 'Skybreaker Troop Transport'), +(32225, 13, 7024.898, 1752.804, 565.5496, 'Skybreaker Troop Transport'), +(32225, 14, 7113.707, 1734.315, 556.3559, 'Skybreaker Troop Transport'), +(32225, 15, 7265.8, 1765.196, 556.3559, 'Skybreaker Troop Transport'), +(32225, 16, 7302.899, 1853.759, 575.8558, 'Skybreaker Troop Transport'), +(32225, 17, 7312.44, 1944.328, 581.4116, 'Skybreaker Troop Transport'), +(32225, 18, 7307.329, 2014.243, 581.4116, 'Skybreaker Troop Transport'), +(32225, 19, 7253.363, 2115.422, 583.3, 'Skybreaker Troop Transport'), +(32225, 20, 7193.522, 2155.816, 607.7997, 'Skybreaker Troop Transport'), +(32225, 21, 7128.84, 2168.484, 642.6707, 'Skybreaker Troop Transport'), +(32225, 22, 7069.121, 2157.589, 689.7963, 'Skybreaker Troop Transport'), +(32225, 23, 7024.457, 2135.705, 708.6849, 'Skybreaker Troop Transport'), +(32225, 24, 6934.063, 2183.969, 750.9397, 'Skybreaker Troop Transport'), +(32225, 25, 6941.725, 2249.074, 754.6065, 'Skybreaker Troop Transport'), +(32225, 26, 7072.678, 2295.607, 714.44, 'Skybreaker Troop Transport'), +(32225, 27, 7260.946, 2257.761, 639.7736, 'Skybreaker Troop Transport'), +(32225, 28, 7419.038, 2123.693, 587.7736, 'Skybreaker Troop Transport'), +(32225, 29, 7471.735, 1962.737, 559.6346, 'Skybreaker Troop Transport'), +(32225, 30, 7436.465, 1818.688, 508.0233, 'Skybreaker Troop Transport'), +(32225, 31, 7366.372, 1694.51, 469.3012, 'Skybreaker Troop Transport'), +(32225, 32, 7329.872, 1609.157, 432.2737, 'Skybreaker Troop Transport'), +(32225, 33, 7296.424, 1556.42, 417.7181, 'Skybreaker Troop Transport'), +(32225, 34, 7272.382, 1525.835, 411.4405, 'Skybreaker Troop Transport'); + +-- Skybreaker Suppression Turret SAI +SET @ENTRY := 32227; +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,27,0,100,0,0,0,0,0,45,1,0,0,0,0,0,19,32225,10,0,0,0,0,0,"Skybreaker Suppression Turret - On Passenger Boarded - Set Data 1 0"); + +-- Skybreaker Troop Transport SAI +SET @ENTRY := 32225; +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,38,0,100,0,1,0,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Data Set 1 0 - Run Script"), +(@ENTRY,0,1,0,40,0,100,0,9,32225,0,0,11,64631,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Waypoint 11 Reached - Cast 'Eject Passenger 3'"), +(@ENTRY,0,2,0,40,0,100,0,13,32225,0,0,11,64614,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Waypoint 16 Reached - Cast 'Eject Passenger 4'"), +(@ENTRY,0,3,0,40,0,100,0,17,32225,0,0,11,64633,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Waypoint 19 Reached - Cast 'Eject Passenger 5'"), +(@ENTRY,0,4,0,40,0,100,0,22,32225,0,0,11,64634,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Waypoint 22 Reached - Cast 'Eject Passenger 6'"), +(@ENTRY,0,5,0,40,0,100,0,34,32225,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Waypoint 32 Reached - Despawn Instant"); + +-- Actionlist SAI +SET @ENTRY := 3222500; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,2000,2000,0,0,53,1,32225,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Script - Start Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Script - Set Reactstate Passive"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,18,131072,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Script - Set Flag Pacified"), +(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Troop Transport - On Script - Set Health Regeneration Off"); + +-- Skybreaker Infiltrator SAI +SET @ENTRY := 32222; +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,23,0,100,1,46598,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Infiltrator - On Has Aura 'Ride Vehicle Hardcoded' - Run Script (No Repeat)"); + +-- Actionlist SAI +SET @ENTRY := 3222200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,11,60208,0,0,0,0,0,21,20,0,0,0,0,0,0,"Skybreaker Infiltrator - On Script - Cast 'Ally Air Dropoff Kill Credit'"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Infiltrator - On Script - Say Line 0"), +(@ENTRY,9,2,0,0,0,100,0,100,100,0,0,11,45472,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Infiltrator - On Script - Cast 'Parachute'"), +(@ENTRY,9,3,0,0,0,100,0,4000,4000,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skybreaker Infiltrator - On Script - Despawn Instant"); + +DELETE FROM `creature_text` WHERE `entry`=32222; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(32222, 0, 0, 'I''ll kill one just for you.', 12, 0, 100, 0, 0, 0, 'Skybreaker Infiltrator',32532), +(32222, 0, 1, 'Dropping. Good luck, boys!', 12, 0, 100, 0, 0, 0, 'Skybreaker Infiltrator',32526), +(32222, 0, 2, 'Thanks for the cover!', 12, 0, 100, 0, 0, 0, 'Skybreaker Infiltrator',32527), +(32222, 0, 3, 'Destination reached - engaging in scouting mission.', 12, 0, 100, 0, 0, 0, 'Skybreaker Infiltrator',32528), +(32222, 0, 4, 'Infiltration commencing.', 12, 0, 100, 0, 0, 0, 'Skybreaker Infiltrator',32529); + +-- Ymirheim Spear Gun SAI +SET @ENTRY := 31280; +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,1,1,100,0,5000,5000,3000,4000,11,59894,0,0,0,0,0,19,32225,100,0,0,0,0,0,"Ymirheim Spear Gun - Out of Combat - Cast 'Launch Spear' (Phase 1)"), +(@ENTRY,0,1,0,1,1,100,0,5000,5000,3000,4000,11,59894,0,0,0,0,0,19,32225,100,0,0,0,0,0,"Ymirheim Spear Gun - Out of Combat - Cast 'Launch Spear' (Phase 1)"), +(@ENTRY,0,2,3,8,0,100,0,59880,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ymirheim Spear Gun - On Spellhit 'Suppression Charge' - Set Event Phase 2"), +(@ENTRY,0,3,0,61,0,100,0,59880,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ymirheim Spear Gun - On Spellhit 'Suppression Charge' - Run Script"), +(@ENTRY,0,4,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ymirheim Spear Gun - On Reset - Set Event Phase 1"); + +-- Actionlist SAI +SET @ENTRY := 3128000; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,15000,15000,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Event Phase 1"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceGroup`=32227 AND `SourceEntry`=46598; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(18, 32227, 46598, 0, 0, 9, 0, 13309, 0, 0, 0, 0, 0, '', 'Required quest ''Assault by Ait'' active for spellclick'); + + +-- DB/Quest: Assault by Air (A) +UPDATE `creature_template` SET `spell1`=59880 WHERE `entry`=31884; +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid`=125330; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=31881; +UPDATE `creature_template` SET `speed_run`=3 WHERE `entry`=31881; +UPDATE `vehicle_template_accessory` SET `minion`=1 WHERE `entry`=31881 AND `seat_id`=0; + +DELETE FROM `waypoints` WHERE `entry`=31881; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(31881, 1, 7513.354, 1781.131, 381.561, 'Kor\'kron Troop Transport'), +(31881, 2, 7508.576, 1843.856, 445.5052, 'Kor\'kron Troop Transport'), +(31881, 3, 7496.634, 1890.942, 496.6479, 'Kor\'kron Troop Transport'), +(31881, 4, 7451.161, 1990.051, 581.2389, 'Kor\'kron Troop Transport'), +(31881, 5, 7372.757, 2143.088, 590.3499, 'Kor\'kron Troop Transport'), +(31881, 6, 7293.971, 2233.48, 602.4611, 'Kor\'kron Troop Transport'), +(31881, 7, 7117.833, 2278.535, 605.0721, 'Kor\'kron Troop Transport'), +(31881, 8, 7017.111, 2263.003, 647.082, 'Kor\'kron Troop Transport'), +(31881, 9, 6996.222, 2205.772, 679.2115, 'Kor\'kron Troop Transport'), +(31881, 10, 7061.963, 2173.603, 675.7964, 'Kor\'kron Troop Transport'), +(31881, 11, 7121.235, 2156.643, 656.629, 'Kor\'kron Troop Transport'), +(31881, 12, 7217.851, 2134.94, 612.4905, 'Kor\'kron Troop Transport'), +(31881, 13, 7288.108, 2086.021, 596.8795, 'Kor\'kron Troop Transport'), +(31881, 14, 7327.417, 1958.794, 585.9348, 'Kor\'kron Troop Transport'), +(31881, 15, 7298.545, 1875.991, 585.4906, 'Kor\'kron Troop Transport'), +(31881, 16, 7249.319, 1800.969, 588.4902, 'Kor\'kron Troop Transport'), +(31881, 17, 7157.543, 1745.975, 588.4902, 'Kor\'kron Troop Transport'), +(31881, 18, 7067.531, 1718.656, 588.4902, 'Kor\'kron Troop Transport'), +(31881, 19, 6988.929, 1710.539, 589.5177, 'Kor\'kron Troop Transport'), +(31881, 20, 6858.088, 1715.7, 617.0735, 'Kor\'kron Troop Transport'), +(31881, 21, 6789.24, 1811.618, 658.2943, 'Kor\'kron Troop Transport'), +(31881, 22, 6741.477, 1881.004, 687.6509, 'Kor\'kron Troop Transport'), +(31881, 23, 6687.517, 1859.595, 701.3486, 'Kor\'kron Troop Transport'), +(31881, 24, 6683.648, 1766.575, 692.5154, 'Kor\'kron Troop Transport'), +(31881, 25, 6738.948, 1709.63, 686.7657, 'Kor\'kron Troop Transport'), +(31881, 26, 6906.804, 1642.973, 664.1547, 'Kor\'kron Troop Transport'), +(31881, 27, 7009.317, 1640.16, 631.8771, 'Kor\'kron Troop Transport'), +(31881, 28, 7174.014, 1608.189, 554.7385, 'Kor\'kron Troop Transport'), +(31881, 29, 7328.232, 1587.251, 465.3495, 'Kor\'kron Troop Transport'), +(31881, 30, 7449.845, 1582.211, 415.2385, 'Kor\'kron Troop Transport'), +(31881, 31, 7493.209, 1659.839, 383.9886, 'Kor\'kron Troop Transport'), +(31881, 32, 7508.813, 1745.664, 371.2109, 'Kor\'kron Troop Transport'); + +-- Kor'kron Suppression Turret SAI +SET @ENTRY := 31884; +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,27,0,100,0,0,0,0,0,45,1,0,0,0,0,0,19,31881,10,0,0,0,0,0,"Kor'kron Suppression Turret - On Passenger Boarded - Set Data 1 0"); + +-- Kor'kron Troop Transport SAI +SET @ENTRY := 31881; +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,38,0,100,0,1,0,0,0,80,3188100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Data Set 1 0 - Run Script"), +(@ENTRY,0,1,0,40,0,100,0,11,31881,0,0,11,64631,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Waypoint 2 Reached - Cast 'Dop Passenger3'"), +(@ENTRY,0,2,0,40,0,100,0,16,31881,0,0,11,64614,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Waypoint 2 Reached - Cast 'Dop Passenger4'"), +(@ENTRY,0,3,0,40,0,100,0,19,31881,0,0,11,64633,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Waypoint 2 Reached - Cast 'Dop Passenger5'"), +(@ENTRY,0,4,0,40,0,100,0,22,31881,0,0,11,64634,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Waypoint 2 Reached - Cast 'Dop Passenger6'"), +(@ENTRY,0,5,0,40,0,100,0,32,31881,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Waypoint 32 Reached - Despawn"); + +-- Actionlist SAI +SET @ENTRY := 3188100; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,2000,2000,0,0,53,1,31881,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Script - Start Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Script - Set Reactstate Passive"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,18,131072,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Script - Set Flag Pacified"), +(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Troop Transport - On Script - Set Health Regeneration Off"); + +-- Kor'kron Infiltrator SAI +SET @ENTRY := 31882; +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,23,0,100,1,46598,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Infiltrator - On Has Aura 'Ride Vehicle Hardcoded' - Run Script (No Repeat)"); + +-- Actionlist SAI +SET @ENTRY := 3188200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,11,59977,0,0,0,0,0,21,20,0,0,0,0,0,0,"Kor'kron Infiltrator - On Script - Cast 'Horde Air Dropoff Kill Credit'"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Infiltrator - On Script - Say Line 0"), +(@ENTRY,9,2,0,0,0,100,0,100,100,0,0,11,45472,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Infiltrator - On Script - Cast 'Parachute'"), +(@ENTRY,9,3,0,0,0,100,0,4000,4000,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kor'kron Infiltrator - On Script - Despawn Instant"); + +DELETE FROM `creature_text` WHERE `entry`=31882; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(31882, 0, 0, 'I''ll kill one just for you.', 12, 0, 100, 0, 0, 0, 'Kor''kron Infiltrator',32532), +(31882, 0, 1, 'Dropping. Good luck, boys!', 12, 0, 100, 0, 0, 0, 'Kor''kron Infiltrator',32526), +(31882, 0, 2, 'Thanks for the cover!', 12, 0, 100, 0, 0, 0, 'Kor''kron Infiltrator',32527), +(31882, 0, 3, 'Destination reached - engaging in scouting mission.', 12, 0, 100, 0, 0, 0, 'Kor''kron Infiltrator',32528), +(31882, 0, 4, 'Infiltration commencing.', 12, 0, 100, 0, 0, 0, 'Kor''kron Infiltrator',32529); + +-- Ymirheim Spear Gun SAI +SET @ENTRY := 31280; +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,1,1,100,0,5000,5000,3000,4000,11,59894,0,0,0,0,0,19,31881,100,0,0,0,0,0,"Ymirheim Spear Gun - Out of Combat - Cast 'Launch Spear' (Phase 1)"), +(@ENTRY,0,1,2,8,0,100,0,59880,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ymirheim Spear Gun - On Spellhit 'Suppression Charge' - Set Event Phase 2"), +(@ENTRY,0,2,0,61,0,100,0,59880,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ymirheim Spear Gun - On Spellhit 'Suppression Charge' - Run Script"), +(@ENTRY,0,3,0,25,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ymirheim Spear Gun - On Reset - Set Event Phase 1"); + +-- Actionlist SAI +SET @ENTRY := 3128000; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,15000,15000,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Event Phase 1"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceGroup`=31884 AND `SourceEntry`=46598; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(18, 31884, 46598, 0, 0, 9, 0, 13310, 0, 0, 0, 0, 0, '', 'Required quest ''Assault by Ait'' active for spellclick'); diff --git a/sql/updates/world/2015_05_11_04_world.sql b/sql/updates/world/2015_05_11_04_world.sql new file mode 100644 index 00000000000..df59976ae41 --- /dev/null +++ b/sql/updates/world/2015_05_11_04_world.sql @@ -0,0 +1,26 @@ +-- +-- ONLY UPDATE FOR WOTLK 3.X - no cherrypick to 4.x, 5.x, 6.x +SET @GUID := 6245; -- Set by TDB team (4) +SET @POOL := 202482; -- Set by TDB team (1) + +DELETE FROM `gameobject` WHERE `id`=202083 AND `guid` BETWEEN @GUID+0 AND @GUID+3; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +-- https://github.com/TrinityCore/TrinityCore/commit/205cb06df9c3535e186b2e7fae10c72ab5de9e3c +(@GUID+0,202083,0,1,1,-2944.48,-3277.68,62.27,3.32798,0,0,0.995661,-0.093059,18000,100,1), +-- https://www.youtube.com/watch?v=c1Dz_-ycIuU#t=124s +(@GUID+1,202083,0,1,1,-3000.93,-3329.01,64.9771,4.10851,0,0,0.885393,-0.464843,18000,100,1), +-- https://www.youtube.com/watch?v=yWSvwdNHspY#t=30s , https://www.youtube.com/watch?v=c1Dz_-ycIuU#t=95s +(@GUID+2,202083,0,1,1,-3020.76,-3245.81,58.8009,5.38478,0,0,0.434249,-0.900793,18000,100,1), +-- https://www.youtube.com/watch?v=f0rCteF0Ras#t=200s , https://www.youtube.com/watch?v=yWSvwdNHspY#t=30s +(@GUID+3,202083,0,1,1,-2992.36,-3188.19,55.1982,3.01524,0,0,0.998005,0.0631367,18000,100,1); + +DELETE FROM `pool_template` WHERE `entry`=@POOL; +INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES +(@POOL,1,"Razormaw Matriarch's Nest (202083)"); + +DELETE FROM `pool_gameobject` WHERE `guid` IN (14999, @GUID+0, @GUID+1, @GUID+2, @GUID+3); +INSERT INTO `pool_gameobject` (`guid`,`pool_entry`,`chance`,`description`) VALUES +(14999,@POOL,25,"Razormaw Matriarch's Nest (202083) P1"), +(@GUID+0,@POOL,25,"Razormaw Matriarch's Nest (202083) P2"), +(@GUID+1,@POOL,25,"Razormaw Matriarch's Nest (202083) P3"), +(@GUID+2,@POOL,25,"Razormaw Matriarch's Nest (202083) P4"); diff --git a/sql/updates/world/2015_05_11_05_world.sql b/sql/updates/world/2015_05_11_05_world.sql new file mode 100644 index 00000000000..82bff616123 --- /dev/null +++ b/sql/updates/world/2015_05_11_05_world.sql @@ -0,0 +1,200 @@ +-- +-- Melizza Brimbuzzle SAI +SET @ENTRY := 12277; +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,1,19,0,100,0,6132,0,0,0,53,0,@ENTRY*100+00,0,0,0,1,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Quest 'Get Me Out of Here!' Taken - Start Waypoint"), +(@ENTRY,0,1,12,61,0,100,0,6132,0,0,0,81,0,0,0,0,0,0,10,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Quest 'Get Me Out of Here!' Taken - Set Npc Flag "), +(@ENTRY,0,2,0,40,0,100,0,3,@ENTRY*100+00,0,0,1,0,0,0,0,0,0,21,20,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 3 Reached - Say Line 0"), +(@ENTRY,0,3,4,40,0,100,0,58,@ENTRY*100+00,0,0,15,6132,0,0,0,0,0,17,0,30,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 58 Reached - Quest Credit 'Get Me Out of Here!'"), +(@ENTRY,0,4,5,61,0,100,0,58,@ENTRY*100+00,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 58 Reached - Say Line 1"), +(@ENTRY,0,5,6,61,0,100,0,58,@ENTRY*100+00,0,0,53,1,@ENTRY*100+01,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 58 Reached - Start Waypoint"), +(@ENTRY,0,6,0,61,0,100,0,58,@ENTRY*100+00,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 58 Reached - Set Active On"), +(@ENTRY,0,7,8,40,0,100,0,69,@ENTRY*100+01,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 69 Reached - Pause Waypoint"), +(@ENTRY,0,8,0,61,0,100,0,69,@ENTRY*100+01,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 69 Reached - Run Script"), +(@ENTRY,0,9,0,40,0,100,0,93,@ENTRY*100+01,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 93 Reached - Despawn In 3000 ms"), +(@ENTRY,0,10,13,11,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Respawn - Set Npc Flag Questgiver"), +(@ENTRY,0,11,0,40,0,100,1,57,@ENTRY*100+00,0,0,80,@ENTRY*100+01,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Waypoint 57 Reached - Run Script (No Repeat)"), +(@ENTRY,0,12,0,61,0,100,0,6132,0,0,0,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Quest 'Get Me Out of Here!' Taken - Set Faction 250"), +(@ENTRY,0,13,0,61,0,100,0,0,0,0,0,2,474,0,0,0,0,0,1,0,0,0,0,0,0,0,"Melizza Brimbuzzle - On Respawn - Set Faction 474"); + +-- Actionlist SAI +SET @ENTRY := 1227700; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 2"), +(@ENTRY,9,1,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 3"), +(@ENTRY,9,2,0,0,0,100,0,3000,3000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Say Line 4"); + +-- Actionlist SAI +SET @ENTRY := 1227701; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,12,4655,7,0,0,0,0,8,0,0,0,-1382.56,2417.06,88.9714,2.46091,"Melizza Brimbuzzle - On Script - Summon Creature 'Maraudine Wrangler'"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,12,4655,7,0,0,0,0,8,0,0,0,-1406.39,2423.48,88.5732,0.20944,"Melizza Brimbuzzle - On Script - Summon Creature 'Maraudine Wrangler'"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,12,4655,7,0,0,0,0,8,0,0,0,-1394.38,2417.12,88.7675,0.959931,"Melizza Brimbuzzle - On Script - Summon Creature 'Maraudine Wrangler'"); + +DELETE FROM `creature_text` WHERE `entry`=12277; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(12277, 0, 0, 'Thanks $n. Now let''s get out of here!', 12, 0, 100, 0, 0, 0, 7540, 'Melizza Brimbuzzle'), +(12277, 1, 0, 'We made it! Thanks again! I''m going to run ahead!', 12, 0, 100, 0, 0, 0, 7544, 'Melizza Brimbuzzle'), +(12277, 2, 0, 'Hey Hornizz! I''m back! And there are some people behind me who helped me out of a jam.', 12, 0, 100, 0, 0, 0, 7550, 'Melizza Brimbuzzle'), +(12277, 3, 0, 'We''re going to have to scratch the Maraudines off our list. Too hard to work with...', 12, 0, 100, 0, 0, 0, 7551, 'Melizza Brimbuzzle'), +(12277, 4, 0, 'Well, I''m off to the Gelkis. They''re not as dumb as the Maraudines, but they''re more reasonable.', 12, 0, 100, 0, 0, 0, 7552, 'Melizza Brimbuzzle'); + +SET @PATH := 1227700; +SET @PATH_TWO := 1227701; +DELETE FROM `waypoints` WHERE `entry` IN (@PATH, @PATH_TWO); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@PATH,1,-1155.146,2709.409,111.2361,'Melizza Brimbuzzle'), +(@PATH,2,-1155.146,2709.409,111.2361,'Melizza Brimbuzzle'), +(@PATH,3,-1162.785,2712.464,111.5828,'Melizza Brimbuzzle'), +(@PATH,4,-1162.752,2712.397,111.6417,'Melizza Brimbuzzle'), +(@PATH,5,-1169.502,2711.397,112.3917,'Melizza Brimbuzzle'), +(@PATH,6,-1177.48,2710.258,112.1255,'Melizza Brimbuzzle'), +(@PATH,7,-1199.98,2702.508,111.6255,'Melizza Brimbuzzle'), +(@PATH,8,-1206.389,2700.128,111.496,'Melizza Brimbuzzle'), +(@PATH,9,-1248.919,2680.271,111.8919,'Melizza Brimbuzzle'), +(@PATH,10,-1272.489,2666.548,111.8956,'Melizza Brimbuzzle'), +(@PATH,11,-1288.82,2646.104,111.7111,'Melizza Brimbuzzle'), +(@PATH,12,-1290.413,2644.388,111.6542,'Melizza Brimbuzzle'), +(@PATH,13,-1290.413,2644.388,111.6542,'Melizza Brimbuzzle'), +(@PATH,14,-1290.413,2644.388,111.6542,'Melizza Brimbuzzle'), +(@PATH,15,-1309.874,2622.18,111.7776,'Melizza Brimbuzzle'), +(@PATH,16,-1309.908,2622.186,111.9743,'Melizza Brimbuzzle'), +(@PATH,17,-1323.898,2605.008,111.8986,'Melizza Brimbuzzle'), +(@PATH,18,-1336.769,2591.199,111.8607,'Melizza Brimbuzzle'), +(@PATH,19,-1349.322,2578.486,111.7647,'Melizza Brimbuzzle'), +(@PATH,20,-1359.602,2564.017,111.4906,'Melizza Brimbuzzle'), +(@PATH,21,-1361.852,2559.517,110.7406,'Melizza Brimbuzzle'), +(@PATH,22,-1362.352,2557.767,109.9906,'Melizza Brimbuzzle'), +(@PATH,23,-1363.102,2556.267,109.4906,'Melizza Brimbuzzle'), +(@PATH,24,-1364.602,2553.517,108.9906,'Melizza Brimbuzzle'), +(@PATH,25,-1365.352,2551.767,108.2406,'Melizza Brimbuzzle'), +(@PATH,26,-1366.102,2550.017,107.7406,'Melizza Brimbuzzle'), +(@PATH,27,-1366.477,2549.685,107.5719,'Melizza Brimbuzzle'), +(@PATH,28,-1366.727,2549.185,107.0719,'Melizza Brimbuzzle'), +(@PATH,29,-1367.227,2547.185,106.8219,'Melizza Brimbuzzle'), +(@PATH,30,-1367.727,2545.185,106.0719,'Melizza Brimbuzzle'), +(@PATH,31,-1368.477,2543.435,105.3219,'Melizza Brimbuzzle'), +(@PATH,32,-1368.977,2541.435,104.5719,'Melizza Brimbuzzle'), +(@PATH,33,-1369.477,2539.435,103.8219,'Melizza Brimbuzzle'), +(@PATH,34,-1370.227,2536.685,103.3219,'Melizza Brimbuzzle'), +(@PATH,35,-1370.977,2534.685,102.5719,'Melizza Brimbuzzle'), +(@PATH,36,-1371.227,2532.935,102.0719,'Melizza Brimbuzzle'), +(@PATH,37,-1371.727,2531.185,101.3219,'Melizza Brimbuzzle'), +(@PATH,38,-1372.227,2529.185,100.8219,'Melizza Brimbuzzle'), +(@PATH,39,-1372.977,2527.185,100.0719,'Melizza Brimbuzzle'), +(@PATH,40,-1373.727,2524.435,99.32188,'Melizza Brimbuzzle'), +(@PATH,41,-1374.227,2522.435,98.57188,'Melizza Brimbuzzle'), +(@PATH,42,-1374.727,2520.685,97.82188,'Melizza Brimbuzzle'), +(@PATH,43,-1375.477,2518.685,97.32188,'Melizza Brimbuzzle'), +(@PATH,44,-1375.639,2518.402,97.00177,'Melizza Brimbuzzle'), +(@PATH,45,-1375.889,2517.152,96.75177,'Melizza Brimbuzzle'), +(@PATH,46,-1376.389,2515.152,96.00177,'Melizza Brimbuzzle'), +(@PATH,47,-1376.889,2513.402,95.25177,'Melizza Brimbuzzle'), +(@PATH,48,-1378.139,2509.402,93.75177,'Melizza Brimbuzzle'), +(@PATH,49,-1378.389,2507.652,93.00177,'Melizza Brimbuzzle'), +(@PATH,50,-1379.139,2504.902,92.50177,'Melizza Brimbuzzle'), +(@PATH,51,-1379.889,2501.902,91.75177,'Melizza Brimbuzzle'), +(@PATH,52,-1380.389,2500.152,91.25177,'Melizza Brimbuzzle'), +(@PATH,53,-1381.389,2496.152,90.50177,'Melizza Brimbuzzle'), +(@PATH,54,-1381.559,2495.931,90.14986,'Melizza Brimbuzzle'), +(@PATH,55,-1381.809,2495.431,90.14986,'Melizza Brimbuzzle'), +(@PATH,56,-1382.309,2491.431,89.64986,'Melizza Brimbuzzle'), +(@PATH,57,-1385.493,2471.513,89.11208,'Melizza Brimbuzzle'), +(@PATH,58,-1386.618,2405.71,89.767,'Melizza Brimbuzzle'), +(@PATH_TWO,1,-1385.368,2401.21,90.267,'Melizza Brimbuzzle'), +(@PATH_TWO,2,-1383.618,2395.46,90.767,'Melizza Brimbuzzle'), +(@PATH_TWO,3,-1382.118,2390.71,91.517,'Melizza Brimbuzzle'), +(@PATH_TWO,4,-1377.252,2375.137,91.91622,'Melizza Brimbuzzle'), +(@PATH_TWO,5,-1373.759,2355.208,92.06256,'Melizza Brimbuzzle'), +(@PATH_TWO,6,-1366.36,2323.406,91.9967,'Melizza Brimbuzzle'), +(@PATH_TWO,7,-1362.618,2277.267,91.79288,'Melizza Brimbuzzle'), +(@PATH_TWO,8,-1358.118,2257.017,91.54288,'Melizza Brimbuzzle'), +(@PATH_TWO,9,-1354.14,2239.229,91.62033,'Melizza Brimbuzzle'), +(@PATH_TWO,10,-1352.89,2229.729,92.12033,'Melizza Brimbuzzle'), +(@PATH_TWO,11,-1350.869,2214.848,91.63843,'Melizza Brimbuzzle'), +(@PATH_TWO,12,-1351.869,2210.848,90.88843,'Melizza Brimbuzzle'), +(@PATH_TWO,13,-1352.119,2209.848,90.13843,'Melizza Brimbuzzle'), +(@PATH_TWO,14,-1352.619,2208.098,89.13843,'Melizza Brimbuzzle'), +(@PATH_TWO,15,-1352.869,2207.098,87.88843,'Melizza Brimbuzzle'), +(@PATH_TWO,16,-1353.119,2206.098,86.38843,'Melizza Brimbuzzle'), +(@PATH_TWO,17,-1353.369,2205.348,85.38843,'Melizza Brimbuzzle'), +(@PATH_TWO,18,-1353.619,2204.348,84.38843,'Melizza Brimbuzzle'), +(@PATH_TWO,19,-1354.119,2202.348,83.63843,'Melizza Brimbuzzle'), +(@PATH_TWO,20,-1354.369,2201.348,82.88843,'Melizza Brimbuzzle'), +(@PATH_TWO,21,-1354.619,2200.598,82.13843,'Melizza Brimbuzzle'), +(@PATH_TWO,22,-1354.869,2199.598,81.38843,'Melizza Brimbuzzle'), +(@PATH_TWO,23,-1355.119,2198.598,80.63843,'Melizza Brimbuzzle'), +(@PATH_TWO,24,-1355.119,2197.598,79.88843,'Melizza Brimbuzzle'), +(@PATH_TWO,25,-1355.619,2195.598,78.88843,'Melizza Brimbuzzle'), +(@PATH_TWO,26,-1356.119,2193.848,77.88843,'Melizza Brimbuzzle'), +(@PATH_TWO,27,-1356.619,2191.848,77.13843,'Melizza Brimbuzzle'), +(@PATH_TWO,28,-1357.619,2188.848,76.38843,'Melizza Brimbuzzle'), +(@PATH_TWO,29,-1355.239,2198.246,80.43513,'Melizza Brimbuzzle'), +(@PATH_TWO,30,-1355.489,2197.246,79.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,31,-1355.989,2195.496,78.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,32,-1356.489,2193.496,77.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,33,-1356.989,2191.496,76.93513,'Melizza Brimbuzzle'), +(@PATH_TWO,34,-1357.739,2188.746,76.18513,'Melizza Brimbuzzle'), +(@PATH_TWO,35,-1357.989,2187.496,75.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,36,-1358.739,2185.746,75.18513,'Melizza Brimbuzzle'), +(@PATH_TWO,37,-1359.239,2183.746,74.43513,'Melizza Brimbuzzle'), +(@PATH_TWO,38,-1359.989,2181.996,73.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,39,-1360.489,2179.996,72.93513,'Melizza Brimbuzzle'), +(@PATH_TWO,40,-1361.489,2177.246,72.18513,'Melizza Brimbuzzle'), +(@PATH_TWO,41,-1362.239,2175.246,71.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,42,-1362.739,2173.496,70.93513,'Melizza Brimbuzzle'), +(@PATH_TWO,43,-1363.239,2171.746,70.43513,'Melizza Brimbuzzle'), +(@PATH_TWO,44,-1363.739,2169.746,69.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,45,-1364.739,2166.996,68.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,46,-1365.489,2164.996,67.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,47,-1365.989,2163.246,66.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,48,-1366.739,2161.246,65.93513,'Melizza Brimbuzzle'), +(@PATH_TWO,49,-1367.489,2159.496,64.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,50,-1367.989,2157.496,63.93513,'Melizza Brimbuzzle'), +(@PATH_TWO,51,-1368.989,2154.746,63.18513,'Melizza Brimbuzzle'), +(@PATH_TWO,52,-1369.739,2152.746,62.43513,'Melizza Brimbuzzle'), +(@PATH_TWO,53,-1370.239,2150.996,61.68513,'Melizza Brimbuzzle'), +(@PATH_TWO,54,-1370.989,2148.996,60.93513,'Melizza Brimbuzzle'), +(@PATH_TWO,55,-1369.163,2154.362,62.88633,'Melizza Brimbuzzle'), +(@PATH_TWO,56,-1369.913,2152.612,62.63633,'Melizza Brimbuzzle'), +(@PATH_TWO,57,-1370.413,2150.612,61.63633,'Melizza Brimbuzzle'), +(@PATH_TWO,58,-1371.163,2148.862,61.13633,'Melizza Brimbuzzle'), +(@PATH_TWO,59,-1371.663,2147.612,60.63633,'Melizza Brimbuzzle'), +(@PATH_TWO,60,-1374.663,2142.362,60.13633,'Melizza Brimbuzzle'), +(@PATH_TWO,61,-1381.413,2131.612,60.88633,'Melizza Brimbuzzle'), +(@PATH_TWO,62,-1387.413,2121.362,61.38633,'Melizza Brimbuzzle'), +(@PATH_TWO,63,-1391.413,2114.362,62.13633,'Melizza Brimbuzzle'), +(@PATH_TWO,64,-1395.163,2108.362,62.63633,'Melizza Brimbuzzle'), +(@PATH_TWO,65,-1391.807,2114.246,61.76419,'Melizza Brimbuzzle'), +(@PATH_TWO,66,-1395.307,2108.246,62.26419,'Melizza Brimbuzzle'), +(@PATH_TWO,67,-1396.307,2106.496,62.51419,'Melizza Brimbuzzle'), +(@PATH_TWO,68,-1404.391,2088.967,62.0089,'Melizza Brimbuzzle'), +(@PATH_TWO,69,-1405.748,2087.39,62.09642,'Melizza Brimbuzzle'), +(@PATH_TWO,70,-1407.248,2086.89,62.09642,'Melizza Brimbuzzle'), +(@PATH_TWO,71,-1408.248,2086.89,62.34642,'Melizza Brimbuzzle'), +(@PATH_TWO,72,-1410.498,2086.39,62.34642,'Melizza Brimbuzzle'), +(@PATH_TWO,73,-1412.498,2086.39,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,74,-1413.998,2085.39,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,75,-1415.498,2083.39,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,76,-1416.498,2082.39,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,77,-1417.498,2079.39,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,78,-1417.998,2077.39,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,79,-1419.998,2075.14,62.59642,'Melizza Brimbuzzle'), +(@PATH_TWO,80,-1424.748,2073.14,62.34642,'Melizza Brimbuzzle'), +(@PATH_TWO,81,-1418.114,2077.1,62.59175,'Melizza Brimbuzzle'), +(@PATH_TWO,82,-1420.364,2075.35,62.59175,'Melizza Brimbuzzle'), +(@PATH_TWO,83,-1425.114,2073.1,62.34175,'Melizza Brimbuzzle'), +(@PATH_TWO,84,-1425.114,2075.1,62.34175,'Melizza Brimbuzzle'), +(@PATH_TWO,85,-1436.864,2074.35,62.84175,'Melizza Brimbuzzle'), +(@PATH_TWO,86,-1451.277,2073.542,62.70998,'Melizza Brimbuzzle'), +(@PATH_TWO,87,-1464.777,2075.542,62.95998,'Melizza Brimbuzzle'), +(@PATH_TWO,88,-1465.031,2075.661,62.89689,'Melizza Brimbuzzle'), +(@PATH_TWO,89,-1473.031,2077.161,63.14689,'Melizza Brimbuzzle'), +(@PATH_TWO,90,-1480.031,2086.411,62.39689,'Melizza Brimbuzzle'), +(@PATH_TWO,91,-1485.531,2093.411,61.89689,'Melizza Brimbuzzle'), +(@PATH_TWO,92,-1485.639,2093.875,61.82396,'Melizza Brimbuzzle'), +(@PATH_TWO,93,-1487.889,2096.375,61.82396,'Melizza Brimbuzzle'); diff --git a/sql/updates/world/2015_05_11_06_world.sql b/sql/updates/world/2015_05_11_06_world.sql new file mode 100644 index 00000000000..f4a5fe6dd0a --- /dev/null +++ b/sql/updates/world/2015_05_11_06_world.sql @@ -0,0 +1,17 @@ +SET @Oguid=5638; -- 2 free Gob guid set by TC +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (3746, 3766); +INSERT INTO `areatrigger_scripts` VALUES (3746,'SmartTrigger'), (3766,'SmartTrigger'); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (3746, 3766) AND `source_type`=2; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `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 +(3746, 2, 0, 0, 46, 0, 100, 0, 3746, 0, 0, 0, 70, 7200, 0, 0, 0, 0, 0, 14, @Oguid+1, 180024, 0, 0, 0, 0, 0, 'Area Trigger 3746 - On Trigger - Respawn Mysterious Deadmines Chest'), +(3766, 2, 0, 0, 46, 0, 100, 0, 3766, 0, 0, 0, 70, 7200, 0, 0, 0, 0, 0, 14, @Oguid, 180055, 0, 0, 0, 0, 0, 'Area Trigger 3746 - On Trigger - Respawn Mysterious Wailing Caverns'); +DELETE FROM `gameobject` WHERE `id` IN (180055, 180024); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@Oguid,180055,43,1,1,-97.6,173.8,-79,2.08,0,0,0.862404,0.50622,-1,100,1), +(@Oguid+1,180024,36,1,1,-32.1232,-374.64,59.06,3.0820,0,0,0.879275,-0.476315,-1,100,1); +DELETE FROM `gameobject_questender` WHERE `id`=180055 AND `quest`=7944; +INSERT INTO `gameobject_questender` (`id`,`quest`) VALUES (180055,7944); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (3766,3746) AND `SourceId`=2; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22,1,3746,2,0,28,0,7938,0,0,0,0,'','SAI areatrigger 3746 triggers only if player has the quest 7938'), +(22,1,3766,2,0,28,0,7944,0,0,0,0,'','SAI areatrigger 3766 triggers only if player has the quest 7944'); diff --git a/sql/updates/world/2015_05_11_07_world.sql b/sql/updates/world/2015_05_11_07_world.sql new file mode 100644 index 00000000000..e35aa8e454b --- /dev/null +++ b/sql/updates/world/2015_05_11_07_world.sql @@ -0,0 +1,7 @@ +-- +-- Pit-Fighting Spectator SAI +SET @ENTRY := 26869; +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,1,0,100,0,2000,6000,10000,20000,10,4,21,6,11,0,0,1,0,0,0,0,0,0,0,"Pit-Fighting Spectator - Out of Combat - Play Random Emote (4, 21, 6, 11)"); diff --git a/sql/updates/world/2015_05_11_08_world.sql b/sql/updates/world/2015_05_11_08_world.sql new file mode 100644 index 00000000000..d6bcc834780 --- /dev/null +++ b/sql/updates/world/2015_05_11_08_world.sql @@ -0,0 +1,99 @@ +-- Conquest Hold Legionnaire +SET @NPC := 116284; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3222.422,`position_y`=-2261.431,`position_z`=112.903 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3222.422,-2261.431,112.903,0,0,0,0,100,0), +(@PATH,2,3223.03,-2264.1,112.1124,0,0,0,0,100,0), +(@PATH,3,3223.781,-2267.022,111.1831,0,0,0,0,100,0), +(@PATH,4,3224.569,-2267.831,111.0135,0,0,0,0,100,0), +(@PATH,5,3226.668,-2270.648,110.3546,0,0,0,0,100,0), +(@PATH,6,3229.054,-2274.084,109.3319,0,0,0,0,100,0), +(@PATH,7,3230.216,-2275.468,109.1555,0,0,0,0,100,0), +(@PATH,8,3232.466,-2278.367,108.6153,0,0,0,0,100,0), +(@PATH,9,3234.924,-2280.143,108.2696,0,0,0,0,100,0), +(@PATH,10,3237.392,-2281.926,108.2696,0,0,0,0,100,0), +(@PATH,11,3239.848,-2283.7,108.2879,0,0,0,0,100,0), +(@PATH,12,3240.568,-2283.284,108.2696,0,0,0,0,100,0), +(@PATH,13,3243.724,-2282.795,108.3946,0,0,0,0,100,0), +(@PATH,14,3246.881,-2282.306,108.3946,0,0,0,0,100,0), +(@PATH,15,3250.019,-2281.82,108.5137,0,0,0,0,100,0), +(@PATH,16,3253.206,-2281.326,108.5008,0,0,0,0,100,0), +(@PATH,17,3255.859,-2280.714,108.5196,0,0,0,0,100,0), +(@PATH,18,3258.817,-2279.989,108.4834,0,0,0,0,100,0), +(@PATH,19,3261.763,-2279.267,108.3458,0,0,0,0,100,0), +(@PATH,20,3264.564,-2278.554,108.5305,0,0,0,0,100,0), +(@PATH,21,3267.448,-2277.735,108.8179,0,0,0,0,100,0), +(@PATH,22,3269.372,-2277.215,109.3157,0,0,0,0,100,0), +(@PATH,23,3273.088,-2276.127,109.8022,0,0,0,0,100,0), +(@PATH,24,3277.416,-2276.224,109.3619,0,0,0,0,100,0), +(@PATH,25,3280.093,-2277.505,108.8861,0,0,0,0,100,0), +(@PATH,26,3282.834,-2278.816,108.7433,0,0,0,0,100,0), +(@PATH,27,3285.509,-2280.093,109.0773,0,0,0,0,100,0), +(@PATH,28,3287.798,-2280.42,109.6238,0,0,0,0,100,0), +(@PATH,29,3289.805,-2280.55,110.2963,0,0,0,0,100,0), +(@PATH,30,3291.436,-2282.21,110.212,0,0,0,0,100,0), +(@PATH,31,3293.136,-2279.585,110.3022,0,0,0,0,100,0), +(@PATH,32,3294.828,-2276.973,110.6279,0,0,0,0,100,0), +(@PATH,33,3296.068,-2275.338,110.8585,0,0,0,0,100,0), +(@PATH,34,3296.431,-2272.337,111.0591,0,0,0,0,100,0), +(@PATH,35,3296.789,-2269.371,111.363,0,0,0,0,100,0), +(@PATH,36,3297.156,-2266.315,111.6388,0,0,0,0,100,0), +(@PATH,37,3297.624,-2263.012,111.854,0,0,0,0,100,0), +(@PATH,38,3298.611,-2260.142,111.9759,0,0,0,0,100,0), +(@PATH,39,3299.594,-2257.286,112.3186,0,0,0,0,100,0), +(@PATH,40,3300.581,-2254.429,112.6177,0,0,0,0,100,0), +(@PATH,41,3300.73,-2253.996,112.6697,0,0,0,0,100,0), +(@PATH,42,3300.506,-2254.651,112.5911,0,0,0,0,100,0), +(@PATH,43,3303.751,-2259.06,112.062,0,0,0,0,100,0), +(@PATH,44,3303.142,-2262.008,111.7082,0,0,0,0,100,0), +(@PATH,45,3302.529,-2264.978,111.4768,0,0,0,0,100,0), +(@PATH,46,3301.917,-2267.939,111.3507,0,0,0,0,100,0), +(@PATH,47,3301.307,-2270.89,110.9967,0,0,0,0,100,0), +(@PATH,48,3300.701,-2273.825,110.6447,0,0,0,0,100,0), +(@PATH,49,3300.092,-2276.787,110.3161,0,0,0,0,100,0), +(@PATH,50,3297.877,-2280.104,110.3195,0,0,0,0,100,0), +(@PATH,51,3295.698,-2282.238,110.1211,0,0,0,0,100,0), +(@PATH,52,3291.665,-2283.44,110.1146,0,0,0,0,100,0), +(@PATH,53,3288.628,-2283.25,109.6978,0,0,0,0,100,0), +(@PATH,54,3286.963,-2283.097,109.5514,0,0,0,0,100,0), +(@PATH,55,3284.762,-2282.979,108.7865,0,0,0,0,100,0), +(@PATH,56,3281.819,-2282.813,107.6871,0,0,0,0,100,0), +(@PATH,57,3279.023,-2282.41,106.843,0,0,0,0,100,0), +(@PATH,58,3273.752,-2281.361,107.249,0,0,0,0,100,0), +(@PATH,59,3272.823,-2281.124,107.9806,0,0,0,0,100,0), +(@PATH,60,3269.315,-2280.155,108.8164,0,0,0,0,100,0), +(@PATH,61,3266.359,-2279.441,108.5643,0,0,0,0,100,0), +(@PATH,62,3261.786,-2278.462,108.5415,0,0,0,0,100,0), +(@PATH,63,3260.874,-2277.872,108.6126,0,0,0,0,100,0), +(@PATH,64,3258.454,-2279.771,108.5095,0,0,0,0,100,0), +(@PATH,65,3256.032,-2281.672,108.5072,0,0,0,0,100,0), +(@PATH,66,3253.73,-2283.478,108.3147,0,0,0,0,100,0), +(@PATH,67,3249.822,-2284.479,108.1946,0,0,0,0,100,0), +(@PATH,68,3246.836,-2284.902,108.1438,0,0,0,0,100,0), +(@PATH,69,3243.795,-2285.332,108.0923,0,0,0,0,100,0), +(@PATH,70,3240.329,-2284.271,108.2195,0,0,0,0,100,0), +(@PATH,71,3237.559,-2282.833,108.1446,0,0,0,0,100,0), +(@PATH,72,3234.771,-2281.385,108.2696,0,0,0,0,100,0), +(@PATH,73,3231.993,-2279.943,108.3994,0,0,0,0,100,0), +(@PATH,74,3229.22,-2278.504,108.7801,0,0,0,0,100,0), +(@PATH,75,3226.602,-2277.155,108.8858,0,0,0,0,100,0), +(@PATH,76,3224.147,-2273.925,109.3004,0,0,0,0,100,0), +(@PATH,77,3223.178,-2271.634,109.9661,0,0,0,0,100,0), +(@PATH,78,3222.1,-2269.727,110.5905,0,0,0,0,100,0), +(@PATH,79,3220.919,-2266.938,111.1347,0,0,0,0,100,0), +(@PATH,80,3219.873,-2264.861,111.7715,0,0,0,0,100,0), +(@PATH,81,3219.09,-2262.018,113.0721,0,0,0,0,100,0), +(@PATH,82,3218.371,-2259.129,113.9729,0,0,0,0,100,0), +(@PATH,83,3217.72,-2256.449,114.2141,0,0,0,0,100,0), +(@PATH,84,3217.931,-2257.32,114.1792,0,0,0,0,100,0), +(@PATH,85,3221.369,-2258.965,113.6241,0,0,0,0,100,0), +(@PATH,86,3222.448,-2261.465,112.8751,0,0,0,0,100,0); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=116284; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(116284, 116284, 0, 0, 2, 0, 0), +(116284, 116285, 3, 90, 0, 0, 0); diff --git a/sql/updates/world/2015_05_12_01_world.sql b/sql/updates/world/2015_05_12_01_world.sql new file mode 100644 index 00000000000..4d9ce60f51c --- /dev/null +++ b/sql/updates/world/2015_05_12_01_world.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `flags`=34 WHERE `entry`=177192; +UPDATE `gameobject_template` SET `faction`=114 WHERE `entry` IN(179504,179505); diff --git a/sql/updates/world/2015_05_12_02_world.sql b/sql/updates/world/2015_05_12_02_world.sql new file mode 100644 index 00000000000..02f95b73494 --- /dev/null +++ b/sql/updates/world/2015_05_12_02_world.sql @@ -0,0 +1,522 @@ +-- Grizzlyhills Pathing/Events -1 +SET @NPC := 105919; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=2659.377,`position_y`=-2080.199,`position_z`=4.346071 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,2659.377,-2080.199,4.346071,0,0,0,0,100,0), +(@PATH,2,2666.377,-2073.199,4.346071,0,0,0,0,100,0), +(@PATH,3,2670.377,-2068.949,4.346071,0,0,0,0,100,0), +(@PATH,4,2672.989,-2066.296,4.340314,0,0,0,0,100,0), +(@PATH,5,2675.489,-2062.546,4.340314,0,0,0,0,100,0), +(@PATH,6,2677.239,-2060.296,4.340314,0,0,0,0,100,0), +(@PATH,7,2678.989,-2057.796,4.340314,0,0,0,0,100,0), +(@PATH,8,2677.343,-2060.426,4.340314,0,0,0,0,100,0), +(@PATH,9,2675.593,-2062.676,4.340314,0,0,0,0,100,0), +(@PATH,10,2672.564,-2066.647,4.346634,0,0,0,0,100,0), +(@PATH,11,2670.314,-2068.897,4.346634,0,0,0,0,100,0), +(@PATH,12,2666.814,-2072.397,4.346634,0,0,0,0,100,0), +(@PATH,13,2659.411,-2080.233,4.331409,0,0,0,0,100,0), +(@PATH,14,2654.911,-2084.233,4.331409,0,0,0,0,100,0), +(@PATH,15,2653.411,-2085.733,4.331409,0,0,0,0,100,0), +(@PATH,16,2648.899,-2089.858,4.311839,0,0,0,0,100,0), +(@PATH,17,2646.649,-2091.858,4.311839,0,0,0,0,100,0), +(@PATH,18,2643.899,-2094.108,4.311839,0,0,0,0,100,0), +(@PATH,19,2640.707,-2096.753,4.415871,0,0,0,0,100,0), +(@PATH,20,2638.457,-2098.503,4.415871,0,0,0,0,100,0), +(@PATH,21,2634.457,-2101.253,5.165871,0,0,0,0,100,0), +(@PATH,22,2634.269,-2101.723,5.301712,0,0,0,0,100,0), +(@PATH,23,2632.769,-2102.723,5.551712,0,0,0,0,100,0), +(@PATH,24,2629.269,-2105.473,6.301712,0,0,0,0,100,0), +(@PATH,25,2629.244,-2105.614,6.409963,0,0,0,0,100,0), +(@PATH,26,2633.158,-2102.466,5.38058,0,0,0,0,100,0), +(@PATH,27,2634.658,-2101.466,5.13058,0,0,0,0,100,0), +(@PATH,28,2638.408,-2098.466,4.38058,0,0,0,0,100,0); + +-- Pathing for Entry: 27501 'TDB FORMAT' +SET @NPC := 105928; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=2650.357,`position_y`=-2025.178,`position_z`=4.323929 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,2650.357,-2025.178,4.323929,0,0,0,0,100,0), +(@PATH,2,2653.107,-2027.178,4.323929,0,0,0,0,100,0), +(@PATH,3,2661.607,-2033.178,4.323929,0,0,0,0,100,0), +(@PATH,4,2664.357,-2035.323,4.346634,0,0,0,0,100,0), +(@PATH,5,2666.857,-2037.323,4.346634,0,0,0,0,100,0), +(@PATH,6,2666.913,-2037.288,4.346634,0,0,0,0,100,0), +(@PATH,7,2664.103,-2035.223,4.346634,0,0,0,0,100,0), +(@PATH,8,2661.603,-2033.223,4.346634,0,0,0,0,100,0), +(@PATH,9,2652.902,-2026.893,4.187136,0,0,0,0,100,0), +(@PATH,10,2650.152,-2024.893,4.187136,0,0,0,0,100,0), +(@PATH,11,2646.152,-2022.143,4.187136,0,0,0,0,100,0), +(@PATH,12,2644.652,-2021.143,3.937136,0,0,0,0,100,0), +(@PATH,13,2641.632,-2018.958,4.027632,0,0,0,0,100,0), +(@PATH,14,2641.649,-2019.105,3.777639,0,0,0,0,100,0), +(@PATH,15,2641.879,-2019.022,3.937136,0,0,0,0,100,0), +(@PATH,16,2644.629,-2021.022,3.937136,0,0,0,0,100,0), +(@PATH,17,2645.879,-2022.022,4.187136,0,0,0,0,100,0), +(@PATH,18,2650.129,-2025.022,4.187136,0,0,0,0,100,0); + +-- Pathing for Entry: 27501 'TDB FORMAT' +SET @NPC := 105904; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=2606.301,`position_y`=-2092.257,`position_z`=7.300018 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,2606.301,-2092.257,7.300018,0,0,0,0,100,0), +(@PATH,2,2614.706,-2104.54,7.32203,0,0,0,0,100,0), +(@PATH,3,2614.56,-2104.616,7.087479,0,0,0,0,100,0), +(@PATH,4,2614.464,-2104.489,7.307891,0,0,0,0,100,0), +(@PATH,5,2606.464,-2092.739,7.307891,0,0,0,0,100,0), +(@PATH,6,2606.129,-2092.514,7.232858,0,0,0,0,100,0), +(@PATH,7,2605.879,-2092.014,7.232858,0,0,0,0,100,0), +(@PATH,8,2603.379,-2088.014,6.982858,0,0,0,0,100,0), +(@PATH,9,2599.288,-2081.792,7.103763,0,0,0,0,100,0), +(@PATH,10,2596.038,-2076.792,7.103763,0,0,0,0,100,0), +(@PATH,11,2593.906,-2073.879,6.877389,0,0,0,0,100,0), +(@PATH,12,2592.156,-2070.879,6.877389,0,0,0,0,100,0), +(@PATH,13,2591.965,-2070.718,6.863516,0,0,0,0,100,0), +(@PATH,14,2594.261,-2073.978,6.842519,0,0,0,0,100,0), +(@PATH,15,2595.761,-2076.728,7.092519,0,0,0,0,100,0), +(@PATH,16,2599.636,-2081.92,7.189054,0,0,0,0,100,0), +(@PATH,17,2603.386,-2087.92,7.189054,0,0,0,0,100,0); + +-- Westfall Brigade Marine SAI +SET @ENTRY := 27501; +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,1,0,100,0,10000,10000,10000,10000,49,0,0,0,0,0,0,19,27500,10,0,0,0,0,0,"Westfall Brigade Marine - Out of Combat - Start Attacking"); + +-- Conquest Hold Berserker SAI +SET @ENTRY := 27500; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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,2,0,1,0,100,0,10000,10000,10000,10000,49,0,0,0,0,0,0,19,27501,10,0,0,0,0,0,"Conquest Hold Berserker - Out of Combat - Start Attacking"); + +UPDATE `creature_template` SET `AIName`="" WHERE `entry`=27131; +-- Grizzly Bear SAI +SET @ENTRY := 27131; +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,1,0,100,0,10000,15000,10000,15000,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Bear - Out of Combat - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 2713100; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Bear - On Script - Enable Combat Movement"), +(@ENTRY,9,1,0,0,0,100,0,1000,1000,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Bear - On Script - Play Emote 7"), +(@ENTRY,9,2,0,0,0,100,0,2000,2000,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Bear - On Script - Play Emote 7"), +(@ENTRY,9,3,0,0,0,100,0,2000,2000,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Bear - On Script - Disable Combat Movement"), +(@ENTRY,9,4,0,0,0,100,0,0,0,0,0,89,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Bear - On Script - Start Random Movement"); + +-- allow movement +UPDATE `smart_scripts` SET `action_param1`=1 WHERE `entryorguid` IN (27259, 26679) AND `source_type`=0 AND `id`=0 AND `link`=0; +-- Dragonflayer Flamebinder SAI +SET @ENTRY := 27259; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=14; +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,14,0,1,0,100,0,5000,8000,5000,8000,11,48213,0,0,0,0,0,19,26785,25,0,0,0,0,0,"Dragonflayer Flamebinder - Out of Combat - Cast 'Dragonflayer Crone Fire'"); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=48213; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48213, 0, 0, 31, 0, 3, 26785, 0, 0, 0, 0, '', 'Flame - only targets Bunny'); + +DELETE FROM `creature_addon` WHERE `guid` IN (103389, 103390, 107363, 110490, 107373, 110493, 11049, 110494, 110492, 116277, 116275, 116274, 116276, 116278, 110489); +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(116277,0,0,8,1,0, ''), +(116275,0,0,8,1,0, ''), +(116274,0,0,8,1,0, ''), +(116276,0,0,8,1,0, ''), +(116278,0,0,8,1,0, ''), +(110489,0,0,0,1,214, ''), +(110492,0,0,0,1,214, ''), +(110494,0,0,0,1,214, ''), +(110490,0,0,0,1,214, ''), +(110493,0,0,0,1,214, ''), +(107363,0,0,1,1,0, ''), +(103389,0,0,0,1,1, ''), +(103390,0,0,0,1,1, ''), +(107373,0,0,1,1,0, ''); + +-- Graymist Hunter SAI +SET @ENTRY := 26592; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=1; +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,1,0,1,0,100,0,15000,20000,15000,20000,5,53,0,0,0,0,0,1,0,0,0,0,0,0,0,"Graymist Hunter - Out of Combat - Play Emote 53"); + +-- Pathing for Entry: 26679 'TDB FORMAT' +SET @NPC := 100911; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4346.669,`position_y`=-2484.654,`position_z`=240.982 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4346.669,-2484.654,240.982,0,0,0,0,100,0), +(@PATH,2,4347.169,-2484.904,240.982,0,0,0,0,100,0), +(@PATH,3,4348.169,-2488.654,241.982,0,0,0,0,100,0), +(@PATH,4,4349.169,-2492.404,242.232,0,0,0,0,100,0), +(@PATH,5,4350.169,-2495.154,242.982,0,0,0,0,100,0), +(@PATH,6,4351.169,-2498.904,243.732,0,0,0,0,100,0), +(@PATH,7,4352.729,-2503.633,244.4913,0,0,0,0,100,0), +(@PATH,8,4352.479,-2508.633,244.7413,0,0,0,0,100,0), +(@PATH,9,4352.229,-2516.383,245.4913,0,0,0,0,100,0), +(@PATH,10,4352.513,-2516.505,245.5218,0,0,0,0,100,0), +(@PATH,11,4352.513,-2519.755,245.5218,0,0,0,0,100,0), +(@PATH,12,4353.422,-2530.827,245.4402,0,0,0,0,100,0), +(@PATH,13,4353.167,-2531.085,245.3185,0,0,0,0,100,0), +(@PATH,14,4353.443,-2530.941,245.3693,0,0,0,0,100,0), +(@PATH,15,4352.554,-2519.469,245.4435,0,0,0,0,100,0), +(@PATH,16,4352.554,-2508.719,244.9435,0,0,0,0,100,0), +(@PATH,17,4352.496,-2503.444,244.2976,0,0,0,0,100,0), +(@PATH,18,4351.496,-2499.694,243.5476,0,0,0,0,100,0), +(@PATH,19,4350.246,-2495.944,243.0476,0,0,0,0,100,0), +(@PATH,20,4349.746,-2493.194,242.5476,0,0,0,0,100,0), +(@PATH,21,4348.746,-2490.194,242.0476,0,0,0,0,100,0), +(@PATH,22,4347.996,-2487.444,241.2976,0,0,0,0,100,0), +(@PATH,23,4346.94,-2484.907,240.7707,0,0,0,0,100,0), +(@PATH,24,4343.19,-2483.907,240.2707,0,0,0,0,100,0), +(@PATH,25,4339.44,-2482.907,239.7707,0,0,0,0,100,0), +(@PATH,26,4339.217,-2482.614,239.4836,0,0,0,0,100,0), +(@PATH,27,4337.717,-2482.114,239.2336,0,0,0,0,100,0), +(@PATH,28,4325.967,-2481.114,238.9836,0,0,0,0,100,0), +(@PATH,29,4320.836,-2480.163,238.4939,0,0,0,0,100,0), +(@PATH,30,4327.4,-2469.229,238.7592,0,0,0,0,100,0), +(@PATH,31,4339.832,-2457.689,239.1528,0,0,0,0,100,0), +(@PATH,32,4339.467,-2457.954,239.0422,0,0,0,0,100,0), +(@PATH,33,4339.559,-2457.928,239.3148,0,0,0,0,100,0), +(@PATH,34,4327.204,-2469.653,238.7065,0,0,0,0,100,0), +(@PATH,35,4320.694,-2480.362,238.713,0,0,0,0,100,0), +(@PATH,36,4330.444,-2481.362,239.213,0,0,0,0,100,0), +(@PATH,37,4337.947,-2482.492,239.5395,0,0,0,0,100,0), +(@PATH,38,4342.447,-2483.492,240.0395,0,0,0,0,100,0), +(@PATH,39,4346.447,-2484.492,240.5395,0,0,0,0,100,0); + +SET @NPC := 100914; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4316.283,`position_y`=-2489.055,`position_z`=238.5876 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4316.283,-2489.055,238.5876,0,0,0,0,100,0), +(@PATH,2,4316.529,-2488.824,238.7166,0,0,0,0,100,0), +(@PATH,3,4320.335,-2479.741,238.3421,0,0,0,0,100,0), +(@PATH,4,4316.585,-2474.241,237.8421,0,0,0,0,100,0), +(@PATH,5,4313.78,-2470.097,237.5021,0,0,0,0,100,0), +(@PATH,6,4309.78,-2469.847,237.0021,0,0,0,0,100,0), +(@PATH,7,4306.03,-2469.347,236.5021,0,0,0,0,100,0), +(@PATH,8,4305.914,-2469.415,236.0416,0,0,0,0,100,0), +(@PATH,9,4303.414,-2469.165,235.5416,0,0,0,0,100,0), +(@PATH,10,4300.414,-2469.415,235.0416,0,0,0,0,100,0), +(@PATH,11,4297.414,-2469.915,234.2916,0,0,0,0,100,0), +(@PATH,12,4294.664,-2470.165,234.0416,0,0,0,0,100,0), +(@PATH,13,4290.664,-2470.415,233.2916,0,0,0,0,100,0), +(@PATH,14,4285.664,-2471.165,232.5416,0,0,0,0,100,0), +(@PATH,15,4285.473,-2471.28,232.3787,0,0,0,0,100,0), +(@PATH,16,4285.223,-2471.28,232.1287,0,0,0,0,100,0), +(@PATH,17,4277.473,-2472.28,231.8787,0,0,0,0,100,0), +(@PATH,18,4273.628,-2472.75,231.6418,0,0,0,0,100,0), +(@PATH,19,4267.374,-2468.811,231.65,0,0,0,0,100,0), +(@PATH,20,4263.313,-2458.705,231.5937,0,0,0,0,100,0), +(@PATH,21,4260.986,-2447.287,231.4928,0,0,0,0,100,0), +(@PATH,22,4258.986,-2445.537,231.4928,0,0,0,0,100,0), +(@PATH,23,4257.986,-2444.537,231.4928,0,0,0,0,100,0), +(@PATH,24,4257.986,-2443.787,231.4928,0,0,0,0,100,0), +(@PATH,25,4257.486,-2441.787,231.4928,0,0,0,0,100,0), +(@PATH,26,4257.564,-2441.543,231.4707,0,0,0,0,100,0), +(@PATH,27,4258.564,-2443.043,231.4707,0,0,0,0,100,0), +(@PATH,28,4258.814,-2444.543,231.4707,0,0,0,0,100,0), +(@PATH,29,4258.814,-2445.543,231.4707,0,0,0,0,100,0), +(@PATH,30,4259.061,-2445.944,231.3457,0,0,0,0,100,0), +(@PATH,31,4261.061,-2447.694,231.3457,0,0,0,0,100,0), +(@PATH,32,4263.474,-2458.961,231.6339,0,0,0,0,100,0), +(@PATH,33,4267.657,-2468.89,231.6431,0,0,0,0,100,0), +(@PATH,34,4273.792,-2472.652,231.7187,0,0,0,0,100,0), +(@PATH,35,4284.542,-2471.152,232.2187,0,0,0,0,100,0), +(@PATH,36,4284.735,-2471.201,232.4085,0,0,0,0,100,0), +(@PATH,37,4285.485,-2471.201,232.4085,0,0,0,0,100,0), +(@PATH,38,4289.235,-2470.701,233.1585,0,0,0,0,100,0), +(@PATH,39,4292.985,-2470.451,233.6585,0,0,0,0,100,0), +(@PATH,40,4296.985,-2469.951,234.4085,0,0,0,0,100,0), +(@PATH,41,4299.985,-2469.451,234.9085,0,0,0,0,100,0), +(@PATH,42,4303.572,-2469.107,235.8506,0,0,0,0,100,0), +(@PATH,43,4306.572,-2469.357,236.3506,0,0,0,0,100,0), +(@PATH,44,4311.322,-2469.857,237.1006,0,0,0,0,100,0), +(@PATH,45,4314.023,-2470.285,237.6709,0,0,0,0,100,0), +(@PATH,46,4318.273,-2476.535,238.1709,0,0,0,0,100,0), +(@PATH,47,4320.4,-2480.026,238.3305,0,0,0,0,100,0), +(@PATH,48,4316.393,-2488.953,238.7333,0,0,0,0,100,0), +(@PATH,49,4316.283,-2489.055,238.5876,0,0,0,0,100,0); + +SET @NPC := 100910; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4338.308,`position_y`=-2566.474,`position_z`=245.7152 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4338.308,-2566.474,245.7152,0,0,0,0,100,0), +(@PATH,2,4339.808,-2567.724,245.7152,0,0,0,0,100,0), +(@PATH,3,4341.308,-2568.724,245.7152,0,0,0,0,100,0), +(@PATH,4,4342.308,-2569.724,245.7152,0,0,0,0,100,0), +(@PATH,5,4342.308,-2570.724,245.7152,0,0,0,0,100,0), +(@PATH,6,4345.808,-2573.724,245.7152,0,0,0,0,100,0), +(@PATH,7,4346.808,-2574.724,245.7152,0,0,0,0,100,0), +(@PATH,8,4345.922,-2575.817,245.7339,0,0,0,0,100,0), +(@PATH,9,4344.672,-2574.817,245.7339,0,0,0,0,100,0), +(@PATH,10,4342.422,-2570.817,245.7339,0,0,0,0,100,0), +(@PATH,11,4342.422,-2569.817,245.7339,0,0,0,0,100,0), +(@PATH,12,4341.422,-2568.817,245.7339,0,0,0,0,100,0), +(@PATH,13,4340.922,-2566.567,245.7339,0,0,0,0,100,0), +(@PATH,14,4340.74,-2566.308,245.6353,0,0,0,0,100,0), +(@PATH,15,4337.99,-2566.308,245.6353,0,0,0,0,100,0), +(@PATH,16,4326.376,-2555.018,245.3248,0,0,0,0,100,0), +(@PATH,17,4317.626,-2555.518,244.8248,0,0,0,0,100,0), +(@PATH,18,4313.838,-2555.828,244.4903,0,0,0,0,100,0), +(@PATH,19,4310.838,-2556.578,243.9903,0,0,0,0,100,0), +(@PATH,20,4308.088,-2557.078,243.4903,0,0,0,0,100,0), +(@PATH,21,4305.229,-2558.031,242.7213,0,0,0,0,100,0), +(@PATH,22,4304.324,-2561.028,243.1423,0,0,0,0,100,0), +(@PATH,23,4306.574,-2564.278,243.6423,0,0,0,0,100,0), +(@PATH,24,4309.324,-2568.528,244.1423,0,0,0,0,100,0), +(@PATH,25,4311.824,-2572.278,244.6423,0,0,0,0,100,0), +(@PATH,26,4314.824,-2576.528,245.3923,0,0,0,0,100,0), +(@PATH,27,4319.487,-2583.055,246.6341,0,0,0,0,100,0), +(@PATH,28,4322.487,-2587.055,247.1341,0,0,0,0,100,0), +(@PATH,29,4324.737,-2590.055,247.6341,0,0,0,0,100,0), +(@PATH,30,4327.237,-2593.055,248.1341,0,0,0,0,100,0), +(@PATH,31,4328.737,-2595.055,248.6341,0,0,0,0,100,0), +(@PATH,32,4304.205,-2560.936,242.7079,0,0,0,0,100,0), +(@PATH,33,4305.315,-2557.807,243.0027,0,0,0,0,100,0), +(@PATH,34,4308.065,-2557.307,243.5027,0,0,0,0,100,0), +(@PATH,35,4310.815,-2556.557,244.0027,0,0,0,0,100,0), +(@PATH,36,4314.014,-2555.685,244.613,0,0,0,0,100,0), +(@PATH,37,4320.764,-2555.435,245.113,0,0,0,0,100,0), +(@PATH,38,4326.62,-2555.132,245.2907,0,0,0,0,100,0), +(@PATH,39,4338.271,-2566.441,245.7103,0,0,0,0,100,0); + +SET @NPC := 100930; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4243.639,`position_y`=-2493.448,`position_z`=231.605 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4243.639,-2493.448,231.605,0,0,0,0,100,0), +(@PATH,2,4245.705,-2503.654,231.4428,0,0,0,0,100,0), +(@PATH,3,4239.67,-2514.717,231.6307,0,0,0,0,100,0), +(@PATH,4,4239.557,-2514.651,231.5394,0,0,0,0,100,0), +(@PATH,5,4239.811,-2514.36,231.6327,0,0,0,0,100,0), +(@PATH,6,4245.605,-2503.552,231.3878,0,0,0,0,100,0), +(@PATH,7,4243.532,-2493.164,231.6278,0,0,0,0,100,0), +(@PATH,8,4237.666,-2485.062,231.6341,0,0,0,0,100,0); + +SET @NPC := 98081; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3677.196,`position_y`=-3262.262,`position_z`=271.4974 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3677.196,-3262.262,271.4974,0,0,0,0,100,0), +(@PATH,2,3675.946,-3263.512,270.4974,0,0,0,0,100,0), +(@PATH,3,3673.446,-3266.012,267.7474,0,0,0,0,100,0), +(@PATH,4,3672.196,-3267.262,266.4974,0,0,0,0,100,0), +(@PATH,5,3670.696,-3268.762,264.4974,0,0,0,0,100,0), +(@PATH,6,3669.344,-3269.899,262.9258,0,0,0,0,100,0), +(@PATH,7,3665.594,-3268.399,259.1758,0,0,0,0,100,0), +(@PATH,8,3664.594,-3267.899,258.1758,0,0,0,0,100,0), +(@PATH,9,3657.594,-3265.399,252.4258,0,0,0,0,100,0), +(@PATH,10,3656.094,-3264.742,251.3945,0,0,0,0,100,0), +(@PATH,11,3648.844,-3264.492,245.1445,0,0,0,0,100,0), +(@PATH,12,3647.094,-3264.242,243.6445,0,0,0,0,100,0), +(@PATH,13,3642.363,-3263.935,240.8384,0,0,0,0,100,0), +(@PATH,14,3642.113,-3265.185,239.8384,0,0,0,0,100,0), +(@PATH,15,3640.613,-3270.685,237.3384,0,0,0,0,100,0), +(@PATH,16,3638.873,-3276.277,236.2841,0,0,0,0,100,0), +(@PATH,17,3637.873,-3283.027,235.7841,0,0,0,0,100,0), +(@PATH,18,3637.623,-3284.527,235.5341,0,0,0,0,100,0), +(@PATH,19,3637.542,-3284.433,235.5938,0,0,0,0,100,0), +(@PATH,20,3637.792,-3282.933,235.5938,0,0,0,0,100,0), +(@PATH,21,3639.209,-3276.042,236.5234,0,0,0,0,100,0), +(@PATH,22,3640.459,-3271.292,237.2734,0,0,0,0,100,0), +(@PATH,23,3641.709,-3265.792,239.5234,0,0,0,0,100,0), +(@PATH,24,3642.543,-3264.088,240.9962,0,0,0,0,100,0), +(@PATH,25,3646.543,-3264.338,243.2462,0,0,0,0,100,0), +(@PATH,26,3649.043,-3264.588,245.2462,0,0,0,0,100,0), +(@PATH,27,3656.203,-3264.957,251.5793,0,0,0,0,100,0), +(@PATH,28,3657.703,-3265.457,252.5793,0,0,0,0,100,0), +(@PATH,29,3664.453,-3267.957,258.0793,0,0,0,0,100,0), +(@PATH,30,3665.453,-3268.457,259.0793,0,0,0,0,100,0), +(@PATH,31,3669.533,-3269.755,263.1148,0,0,0,0,100,0), +(@PATH,32,3670.783,-3268.755,264.6148,0,0,0,0,100,0), +(@PATH,33,3672.283,-3267.255,266.1148,0,0,0,0,100,0), +(@PATH,34,3673.033,-3266.005,267.8648,0,0,0,0,100,0), +(@PATH,35,3675.783,-3263.505,270.3648,0,0,0,0,100,0), +(@PATH,36,3676.181,-3263.232,270.6315,0,0,0,0,100,0), +(@PATH,37,3677.431,-3261.982,271.8815,0,0,0,0,100,0), +(@PATH,38,3679.931,-3259.982,274.1315,0,0,0,0,100,0), +(@PATH,39,3683.181,-3256.982,276.8815,0,0,0,0,100,0), +(@PATH,40,3683.275,-3257.129,276.9308,0,0,0,0,100,0), +(@PATH,41,3680.025,-3259.629,274.4308,0,0,0,0,100,0), +(@PATH,42,3677.151,-3262.089,271.6892,0,0,0,0,100,0); + +SET @NPC := 98083; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3608.663,`position_y`=-3311.686,`position_z`=224.8323 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3608.663,-3311.686,224.8323,0,0,0,0,100,0), +(@PATH,2,3610.913,-3313.436,224.5823,0,0,0,0,100,0), +(@PATH,3,3612.413,-3314.436,224.5823,0,0,0,0,100,0), +(@PATH,4,3621.448,-3320.278,226.055,0,0,0,0,100,0), +(@PATH,5,3624.948,-3320.278,226.555,0,0,0,0,100,0), +(@PATH,6,3630.948,-3320.278,227.055,0,0,0,0,100,0), +(@PATH,7,3632.198,-3320.278,227.555,0,0,0,0,100,0), +(@PATH,8,3631.236,-3320.25,227.2929,0,0,0,0,100,0), +(@PATH,9,3632.486,-3320.25,227.7929,0,0,0,0,100,0), +(@PATH,10,3633.486,-3320.25,228.2929,0,0,0,0,100,0), +(@PATH,11,3637.236,-3317,229.5429,0,0,0,0,100,0), +(@PATH,12,3637.84,-3316.242,229.9589,0,0,0,0,100,0), +(@PATH,13,3633.259,-3320.148,227.9277,0,0,0,0,100,0), +(@PATH,14,3632.259,-3320.148,227.4277,0,0,0,0,100,0), +(@PATH,15,3631.009,-3320.148,227.1777,0,0,0,0,100,0), +(@PATH,16,3624.759,-3320.398,226.4277,0,0,0,0,100,0), +(@PATH,17,3621.314,-3320.251,225.9905,0,0,0,0,100,0), +(@PATH,18,3613.064,-3315.001,224.7405,0,0,0,0,100,0), +(@PATH,19,3611.064,-3313.501,224.7405,0,0,0,0,100,0), +(@PATH,20,3608.404,-3311.755,224.6184,0,0,0,0,100,0), +(@PATH,21,3605.154,-3300.005,224.3684,0,0,0,0,100,0); + +-- drakkari event +DELETE FROM `creature` where `id` IN (26582, 26583) and `guid` NOT IN (116602); + +-- Horrified Drakkari Shaman SAI +SET @GUID := -116602; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=26583; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID 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 +(@GUID,0,0,0,1,0,100,0,1000,2000,1000,2000,88,11660200,11660201,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - Out of Combat - Run Random Script"), +(@GUID,0,1,2,63,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Reset - Set Active On"), +(@GUID,0,2,3,61,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Reset - Set Visibility On"), +(@GUID,0,3,0,61,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Reset - Set Reactstate Aggressive"); + +-- Actionlist SAI +SET @ENTRY := 11660200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,12,26583,3,120000,0,0,0,8,0,0,0,4690.051270,-2045.848755,194.348404,3.160445,"On Script - Summon Creature 'Horrified Drakkari Shaman'"); + +-- Actionlist SAI +SET @ENTRY := 11660201; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,12,26582,3,120000,0,0,0,8,0,0,0,4690.051270,-2045.848755,194.348404,3.160445,"On Script - Summon Creature 'Horrified Drakkari Warrior'"); + +-- Horrified Drakkari Shaman SAI +SET @ENTRY := 26582; +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,1,63,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Warrior - On Just Created - Set Active On"), +(@ENTRY,0,1,2,61,0,100,0,1,0,0,0,88,2658200,2658201,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Warrior - On Data Set 1 0 - Run Random Script"), +(@ENTRY,0,2,0,61,0,100,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Warrior - On Just Created - Say Line 0"), +(@ENTRY,0,3,0,40,0,100,0,20,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Warrior - On Waypoint 20 Reached - Despawn Instant"); + +-- Horrified Drakkari Shaman SAI +SET @ENTRY := 26583; +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,1,63,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Just Created - Set Active On"), +(@ENTRY,0,1,2,61,0,100,0,1,0,0,0,88,2658200,2658201,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Just Created - Run Random Script"), +(@ENTRY,0,2,0,61,0,100,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Just Created - Say Line 0"), +(@ENTRY,0,3,0,40,0,100,0,20,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Horrified Drakkari Shaman - On Waypoint 20 Reached - Despawn Instant"); + +-- Actionlist SAI +SET @ENTRY := 2658200; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,53,1,2658200,0,0,3000,0,0,0,0,0,0,0,0,0,"On Script - Start Waypoint"); + +-- Actionlist SAI +SET @ENTRY := 2658201; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,53,1,2658201,0,0,3000,0,0,0,0,0,0,0,0,0,"On Script - Start Waypoint"); + +DELETE FROM `waypoints` WHERE `entry`=2658200; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES +(2658200, 1, 4680.19, -2044.68, 189.441), +(2658200, 2, 4662.73, -2045.93, 184.189), +(2658200, 3, 4651.83, -2051.77, 184.368), +(2658200, 4, 4643.71, -2060.59, 184.18), +(2658200, 5, 4635.04, -2061.83, 184.1), +(2658200, 6, 4617.55, -2061.84, 184.182), +(2658200, 7, 4596.55, -2061.57, 184.186), +(2658200, 8, 4579.06, -2061.36, 184.186), +(2658200, 9, 4562.37, -2062.32, 184.167), +(2658200, 10, 4551.87, -2062.12, 178.315), +(2658200, 11, 4534.37, -2062.09, 168.354), +(2658200, 12, 4523.88, -2061.96, 162.377), +(2658200, 13, 4509.88, -2062.05, 160.823), +(2658200, 14, 4498.51, -2063.27, 160.823), +(2658200, 15, 4490.23, -2069.98, 160.823), +(2658200, 16, 4492.74, -2078.85, 160.823), +(2658200, 17, 4496.31, -2094.72, 160.8), +(2658200, 18, 4506.59, -2103.06, 160.831), +(2658200, 19, 4518.52, -2110.39, 160.833), +(2658200, 20, 4533.43, -2119.56, 160.845), +(2658200, 21, 4545.35, -2130.19, 160.842); + +DELETE FROM `waypoints` WHERE `entry`=2658201; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES +(2658201, 1, 4692.36, -2045.14, 195.516), +(2658201, 2, 4674.86, -2044.91, 186.46), +(2658201, 3, 4671.36, -2044.89, 185.043), +(2658201, 4, 4659.89, -2044.58, 184.318), +(2658201, 5, 4648.06, -2033.35, 184.184), +(2658201, 6, 4641.49, -2028.73, 183.862), +(2658201, 7, 4630.25, -2028.22, 184.182), +(2658201, 8, 4612.76, -2028.2, 184.185), +(2658201, 9, 4591.76, -2027.91, 184.189), +(2658201, 10, 4574.26, -2027.67, 184.185), +(2658201, 11, 4563.76, -2027.47, 184.166), +(2658201, 12, 4556.77, -2027.4, 180.928), +(2658201, 13, 4539.27, -2027.25, 170.966), +(2658201, 14, 4525.27, -2027.07, 162.997), +(2658201, 15, 4511.28, -2026.61, 160.823), +(2658201, 16, 4494.03, -2024.8, 160.824), +(2658201, 17, 4488.19, -2012.02, 161.055), +(2658201, 18, 4492.56, -1993.64, 160.824), +(2658201, 19, 4503.51, -1980.34, 160.824), +(2658201, 20, 4517.17, -1973.46, 160.824); + +DELETE FROM `creature_text` WHERE `entry` IN (26583, 26582); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(26583, 0, 0, 'Drak\'Tharon be lost, mon!', 12, 0, 100, 0, 0, 0, 25857, 0, 'Horrified Drakkari'), +(26583, 0, 1, 'Da Scourge be everywhere, mon!', 12, 0, 100, 0, 0, 0, 25853, 0, 'Horrified Drakkari'), +(26583, 0, 2, 'Every troll for himself, mon!', 12, 0, 100, 0, 0, 0, 25855, 0, 'Horrified Drakkari'), +(26583, 0, 3, 'Ruuun!', 12, 0, 100, 0, 0, 0, 25859, 0, 'Horrified Drakkari'), +-- +(26582, 0, 0, 'Drak\'Tharon be lost, mon!', 12, 0, 100, 0, 0, 0, 25857, 0, 'Horrified Drakkari'), +(26582, 0, 1, 'Da Scourge be everywhere, mon!', 12, 0, 100, 0, 0, 0, 25853, 0, 'Horrified Drakkari'), +(26582, 0, 2, 'Every troll for himself, mon!', 12, 0, 100, 0, 0, 0, 25855, 0, 'Horrified Drakkari'), +(26582, 0, 3, 'Ruuun!', 12, 0, 100, 0, 0, 0, 25859, 0, 'Horrified Drakkari'); diff --git a/sql/updates/world/2015_05_12_03_world.sql b/sql/updates/world/2015_05_12_03_world.sql new file mode 100644 index 00000000000..2bcfa9d091b --- /dev/null +++ b/sql/updates/world/2015_05_12_03_world.sql @@ -0,0 +1,507 @@ +-- DB/Creature: Grizzlyhills Pathing -2 +UPDATE `smart_scripts` SET `action_param6`=2 WHERE `entryorguid` IN (2658200, 2658201) AND `source_type`=9 AND `id`=0 AND `link`=0; + +SET @NPC := 99310; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4194.24,`position_y`=-1806.269,`position_z`=200.4735 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4194.24,-1806.269,200.4735,0,0,0,0,100,0), +(@PATH,2,4197.74,-1808.269,201.2235,0,0,0,0,100,0), +(@PATH,3,4199.49,-1809.269,201.7235,0,0,0,0,100,0), +(@PATH,4,4202.99,-1811.269,202.2235,0,0,0,0,100,0), +(@PATH,5,4209.49,-1815.269,202.9735,0,0,0,0,100,0), +(@PATH,6,4226.4,-1825.46,203.2541,0,0,0,0,100,0), +(@PATH,7,4227.65,-1833.96,202.7541,0,0,0,0,100,0), +(@PATH,8,4228.602,-1839.474,202.2388,0,0,0,0,100,0), +(@PATH,9,4242.543,-1857.213,202.6918,0,0,0,0,100,0), +(@PATH,10,4242.543,-1863.963,203.1918,0,0,0,0,100,0), +(@PATH,11,4242.595,-1859.661,202.7076,0,0,0,0,100,0), +(@PATH,12,4242.467,-1856.869,202.4443,0,0,0,0,100,0), +(@PATH,13,4238.217,-1851.369,201.9443,0,0,0,0,100,0), +(@PATH,14,4228.504,-1839.239,202.5002,0,0,0,0,100,0), +(@PATH,15,4227.504,-1832.739,203.0002,0,0,0,0,100,0), +(@PATH,16,4226.358,-1825.27,203.1885,0,0,0,0,100,0), +(@PATH,17,4208.108,-1814.52,202.6885,0,0,0,0,100,0), +(@PATH,18,4200.608,-1810.02,201.9385,0,0,0,0,100,0), +(@PATH,19,4198.108,-1808.52,201.1885,0,0,0,0,100,0), +(@PATH,20,4194.608,-1806.52,200.6885,0,0,0,0,100,0), +(@PATH,21,4190.358,-1803.77,199.9385,0,0,0,0,100,0); + +SET @NPC := 99309; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4163.295,`position_y`=-1958.695,`position_z`=208.3958 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4163.295,-1958.695,208.3958,0,0,0,0,100,0), +(@PATH,2,4167.545,-1960.945,208.8958,0,0,0,0,100,0), +(@PATH,3,4189.578,-1972.83,209.2269,0,0,0,0,100,0), +(@PATH,4,4193.578,-1973.83,208.7269,0,0,0,0,100,0), +(@PATH,5,4189.997,-1972.962,209.24,0,0,0,0,100,0), +(@PATH,6,4164.317,-1959.296,208.4842,0,0,0,0,100,0), +(@PATH,7,4163.099,-1958.743,208.3662,0,0,0,0,100,0), +(@PATH,8,4157.599,-1963.243,209.1162,0,0,0,0,100,0), +(@PATH,9,4154.599,-1965.743,209.8662,0,0,0,0,100,0), +(@PATH,10,4151.599,-1968.243,210.3662,0,0,0,0,100,0), +(@PATH,11,4148.349,-1970.743,210.8662,0,0,0,0,100,0), +(@PATH,12,4143.349,-1974.993,211.3662,0,0,0,0,100,0), +(@PATH,13,4136.349,-1980.993,212.1162,0,0,0,0,100,0), +(@PATH,14,4134.099,-1982.743,212.6162,0,0,0,0,100,0), +(@PATH,15,4133.807,-1983.081,212.7842,0,0,0,0,100,0), +(@PATH,16,4137.057,-1980.331,212.0342,0,0,0,0,100,0), +(@PATH,17,4143.807,-1974.581,211.2842,0,0,0,0,100,0), +(@PATH,18,4149.057,-1970.331,210.5342,0,0,0,0,100,0), +(@PATH,19,4152.807,-1967.081,210.0342,0,0,0,0,100,0), +(@PATH,20,4155.057,-1965.331,209.5342,0,0,0,0,100,0), +(@PATH,21,4159.057,-1962.081,209.0342,0,0,0,0,100,0); + +SET @NPC := 99308; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4257.948,`position_y`=-1914.651,`position_z`=201.9758 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4257.948,-1914.651,201.9758,0,0,0,0,100,0), +(@PATH,2,4257.902,-1914.741,202.4635,0,0,0,0,100,0), +(@PATH,3,4257.152,-1923.741,202.9635,0,0,0,0,100,0), +(@PATH,4,4256.652,-1929.491,203.4635,0,0,0,0,100,0), +(@PATH,5,4256.402,-1934.241,203.9635,0,0,0,0,100,0), +(@PATH,6,4255.238,-1946.397,204.331,0,0,0,0,100,0), +(@PATH,7,4252.988,-1961.897,204.831,0,0,0,0,100,0), +(@PATH,8,4252.238,-1966.897,205.331,0,0,0,0,100,0), +(@PATH,9,4252.688,-1964.002,204.8374,0,0,0,0,100,0), +(@PATH,10,4254.188,-1953.252,204.5874,0,0,0,0,100,0), +(@PATH,11,4255.508,-1946.051,204.2277,0,0,0,0,100,0), +(@PATH,12,4256.758,-1930.551,203.4777,0,0,0,0,100,0), +(@PATH,13,4257.008,-1925.551,202.9777,0,0,0,0,100,0), +(@PATH,14,4257.508,-1919.551,202.4777,0,0,0,0,100,0), +(@PATH,15,4257.833,-1914.49,202.1853,0,0,0,0,100,0); + +SET @NPC := 104074; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4245.058,`position_y`=-2021.197,`position_z`=237.4276 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4245.058,-2021.197,237.4276,0,0,0,0,100,0), +(@PATH,2,4245.791,-2017.078,233.2036,0,0,0,0,100,0), +(@PATH,3,4246.791,-2007.328,223.2036,0,0,0,0,100,0), +(@PATH,4,4247.152,-2007.004,222.8537,0,0,0,0,100,0), +(@PATH,5,4247.402,-2005.004,220.8537,0,0,0,0,100,0), +(@PATH,6,4248.152,-1999.504,215.8537,0,0,0,0,100,0), +(@PATH,7,4249.402,-1990.004,207.3537,0,0,0,0,100,0), +(@PATH,8,4249.673,-1989.776,207.2351,0,0,0,0,100,0), +(@PATH,9,4249.673,-1988.776,207.2351,0,0,0,0,100,0), +(@PATH,10,4250.423,-1976.026,206.7351,0,0,0,0,100,0), +(@PATH,11,4250.069,-1981.066,206.8915,0,0,0,0,100,0), +(@PATH,12,4248.495,-1989.926,206.7487,0,0,0,0,100,0), +(@PATH,13,4247.745,-1999.926,215.9987,0,0,0,0,100,0), +(@PATH,14,4247.169,-2005.335,221.2139,0,0,0,0,100,0), +(@PATH,15,4246.919,-2007.335,223.2139,0,0,0,0,100,0), +(@PATH,16,4245.507,-2017.251,233.4465,0,0,0,0,100,0); + +DELETE FROM `creature_addon` WHERE `guid`=110106; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(110106,0,0,0,1,69, ''); + +SET @NPC := 10299; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3333.925,`position_y`=-1773.206,`position_z`=88.87373 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3333.925,-1773.206,88.87373,0,0,0,0,100,0), +(@PATH,2,3334.675,-1774.456,88.37373,0,0,0,0,100,0), +(@PATH,3,3335.175,-1775.456,88.37373,0,0,0,0,100,0), +(@PATH,4,3337.425,-1775.956,88.62373,0,0,0,0,100,0), +(@PATH,5,3338.675,-1779.706,89.12373,0,0,0,0,100,0), +(@PATH,6,3339.705,-1778.929,89.08168,0,0,0,0,100,0), +(@PATH,7,3339.705,-1775.929,88.58168,0,0,0,0,100,0), +(@PATH,8,3339.705,-1774.679,88.33168,0,0,0,0,100,0), +(@PATH,9,3339.705,-1771.679,87.83168,0,0,0,0,100,0), +(@PATH,10,3339.705,-1770.929,87.58168,0,0,0,0,100,0), +(@PATH,11,3339.705,-1766.679,87.33168,0,0,0,0,100,0), +(@PATH,12,3341.205,-1761.679,88.08168,0,0,0,0,100,0), +(@PATH,13,3340.286,-1761.39,87.88223,0,0,0,0,100,0), +(@PATH,14,3357.286,-1763.39,89.13223,0,0,0,0,100,0), +(@PATH,15,3358.286,-1763.39,89.38223,0,0,0,0,100,0), +(@PATH,16,3358.156,-1762.816,89.31908,0,0,0,0,100,0), +(@PATH,17,3357.656,-1762.816,89.06908,0,0,0,0,100,0), +(@PATH,18,3357.156,-1762.816,89.31908,0,0,0,0,100,0), +(@PATH,19,3340.241,-1761.592,87.80875,0,0,0,0,100,0), +(@PATH,20,3339.741,-1764.592,87.55875,0,0,0,0,100,0), +(@PATH,21,3339.741,-1766.592,87.30875,0,0,0,0,100,0), +(@PATH,22,3339.741,-1770.842,87.55875,0,0,0,0,100,0), +(@PATH,23,3339.741,-1774.592,88.30875,0,0,0,0,100,0), +(@PATH,24,3339.741,-1778.842,89.05875,0,0,0,0,100,0), +(@PATH,25,3335.925,-1777.206,88.87373,0,0,0,0,100,0), +(@PATH,26,3334.675,-1775.206,88.37373,0,0,0,0,100,0); + +SET @NPC := 103003; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3392.038,`position_y`=-1786.48,`position_z`=99.89154 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3392.038,-1786.48,99.89154,0,0,0,0,100,0), +(@PATH,2,3393.788,-1785.98,99.64154,0,0,0,0,100,0), +(@PATH,3,3395.788,-1784.48,99.64154,0,0,0,0,100,0), +(@PATH,4,3398.038,-1784.48,99.64154,0,0,0,0,100,0), +(@PATH,5,3400.038,-1783.73,99.39154,0,0,0,0,100,0), +(@PATH,6,3408.288,-1780.23,99.14154,0,0,0,0,100,0), +(@PATH,7,3410.538,-1780.23,99.14154,0,0,0,0,100,0), +(@PATH,8,3412.538,-1780.23,99.39154,0,0,0,0,100,0), +(@PATH,9,3414.538,-1780.23,99.39154,0,0,0,0,100,0), +(@PATH,10,3416.788,-1780.23,99.64154,0,0,0,0,100,0), +(@PATH,11,3418.788,-1780.23,99.64154,0,0,0,0,100,0), +(@PATH,12,3418.788,-1782.48,100.8915,0,0,0,0,100,0), +(@PATH,13,3418.288,-1782.98,101.1415,0,0,0,0,100,0), +(@PATH,14,3418.538,-1786.48,102.1415,0,0,0,0,100,0), +(@PATH,15,3418.788,-1788.48,102.1415,0,0,0,0,100,0), +(@PATH,16,3418.788,-1790.23,102.6415,0,0,0,0,100,0), +(@PATH,17,3417.788,-1790.73,103.1415,0,0,0,0,100,0), +(@PATH,18,3412.288,-1793.98,103.1415,0,0,0,0,100,0), +(@PATH,19,3409.038,-1795.23,103.1415,0,0,0,0,100,0), +(@PATH,20,3402.038,-1798.23,103.1415,0,0,0,0,100,0), +(@PATH,21,3405.601,-1802.971,103.1744,0,0,0,0,100,0), +(@PATH,22,3412.601,-1804.221,103.1744,0,0,0,0,100,0), +(@PATH,23,3414.101,-1804.471,102.1744,0,0,0,0,100,0), +(@PATH,24,3414.601,-1803.471,102.1744,0,0,0,0,100,0), +(@PATH,25,3415.601,-1801.721,101.9244,0,0,0,0,100,0), +(@PATH,26,3415.601,-1799.721,101.9244,0,0,0,0,100,0), +(@PATH,27,3416.601,-1798.721,101.6744,0,0,0,0,100,0), +(@PATH,28,3420.351,-1795.471,101.4244,0,0,0,0,100,0), +(@PATH,29,3422.351,-1791.721,101.1744,0,0,0,0,100,0), +(@PATH,30,3423.851,-1789.471,101.1744,0,0,0,0,100,0), +(@PATH,31,3423.851,-1787.471,100.6744,0,0,0,0,100,0), +(@PATH,32,3423.851,-1785.471,100.4244,0,0,0,0,100,0), +(@PATH,33,3423.851,-1783.221,99.92442,0,0,0,0,100,0), +(@PATH,34,3422.851,-1781.721,99.42442,0,0,0,0,100,0), +(@PATH,35,3421.851,-1781.721,99.42442,0,0,0,0,100,0), +(@PATH,36,3420.851,-1781.721,99.67442,0,0,0,0,100,0), +(@PATH,37,3418.851,-1780.221,99.67442,0,0,0,0,100,0), +(@PATH,38,3416.601,-1780.221,99.67442,0,0,0,0,100,0), +(@PATH,39,3414.601,-1780.221,99.42442,0,0,0,0,100,0), +(@PATH,40,3412.601,-1780.221,99.42442,0,0,0,0,100,0), +(@PATH,41,3410.351,-1780.221,99.17442,0,0,0,0,100,0), +(@PATH,42,3408.351,-1780.221,99.17442,0,0,0,0,100,0), +(@PATH,43,3404.601,-1783.221,99.92442,0,0,0,0,100,0), +(@PATH,44,3403.101,-1783.971,99.67442,0,0,0,0,100,0), +(@PATH,45,3402.101,-1783.971,99.42442,0,0,0,0,100,0), +(@PATH,46,3401.101,-1783.971,99.42442,0,0,0,0,100,0), +(@PATH,47,3400.101,-1783.971,99.42442,0,0,0,0,100,0), +(@PATH,48,3397.851,-1784.471,99.67442,0,0,0,0,100,0), +(@PATH,49,3395.851,-1784.471,99.67442,0,0,0,0,100,0), +(@PATH,50,3393.851,-1784.471,99.42442,0,0,0,0,100,0); + +SET @NPC := 103000; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3389.137,`position_y`=-1830.333,`position_z`=103.4552 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3389.137,-1830.333,103.4552,0,0,0,0,100,0), +(@PATH,2,3389.637,-1832.583,102.9552,0,0,0,0,100,0), +(@PATH,3,3383.887,-1839.083,102.9552,0,0,0,0,100,0), +(@PATH,4,3382.887,-1840.083,102.4552,0,0,0,0,100,0), +(@PATH,5,3382.387,-1840.583,102.7052,0,0,0,0,100,0), +(@PATH,6,3382.387,-1841.583,102.7052,0,0,0,0,100,0), +(@PATH,7,3378.887,-1844.833,103.4552,0,0,0,0,100,0), +(@PATH,8,3376.137,-1847.833,103.9552,0,0,0,0,100,0), +(@PATH,9,3375.137,-1848.833,104.2052,0,0,0,0,100,0), +(@PATH,10,3374.137,-1849.833,104.2052,0,0,0,0,100,0), +(@PATH,11,3372.387,-1852.083,104.7052,0,0,0,0,100,0), +(@PATH,12,3372.262,-1852.324,105.0966,0,0,0,0,100,0), +(@PATH,13,3371.512,-1853.574,105.3466,0,0,0,0,100,0), +(@PATH,14,3393.262,-1859.574,105.8466,0,0,0,0,100,0), +(@PATH,15,3397.262,-1860.824,106.5966,0,0,0,0,100,0), +(@PATH,16,3399.262,-1861.324,106.8466,0,0,0,0,100,0), +(@PATH,17,3403.012,-1862.324,107.5966,0,0,0,0,100,0), +(@PATH,18,3406.762,-1863.574,108.5966,0,0,0,0,100,0), +(@PATH,19,3382.792,-1856.847,105.1871,0,0,0,0,100,0), +(@PATH,20,3392.687,-1859.487,105.7214,0,0,0,0,100,0), +(@PATH,21,3396.437,-1860.737,106.4714,0,0,0,0,100,0), +(@PATH,22,3399.187,-1861.237,107.2214,0,0,0,0,100,0), +(@PATH,23,3402.937,-1862.237,107.7214,0,0,0,0,100,0), +(@PATH,24,3406.937,-1863.487,108.7214,0,0,0,0,100,0), +(@PATH,25,3408.163,-1863.834,108.8378,0,0,0,0,100,0), +(@PATH,26,3406.163,-1863.334,108.0878,0,0,0,0,100,0), +(@PATH,27,3402.413,-1862.084,107.3378,0,0,0,0,100,0), +(@PATH,28,3398.663,-1861.084,106.8378,0,0,0,0,100,0), +(@PATH,29,3394.663,-1860.084,105.8378,0,0,0,0,100,0), +(@PATH,30,3388.163,-1858.334,105.0878,0,0,0,0,100,0), +(@PATH,31,3376.036,-1851.585,104.1596,0,0,0,0,100,0), +(@PATH,32,3377.786,-1847.835,103.6596,0,0,0,0,100,0), +(@PATH,33,3379.536,-1844.335,103.1596,0,0,0,0,100,0), +(@PATH,34,3381.036,-1841.085,102.6596,0,0,0,0,100,0), +(@PATH,35,3382.036,-1839.835,102.6596,0,0,0,0,100,0), +(@PATH,36,3383.036,-1839.085,102.9096,0,0,0,0,100,0), +(@PATH,37,3389.537,-1832.41,102.813,0,0,0,0,100,0), +(@PATH,38,3389.037,-1829.91,102.813,0,0,0,0,100,0), +(@PATH,39,3388.787,-1827.91,104.813,0,0,0,0,100,0), +(@PATH,40,3386.787,-1816.66,111.313,0,0,0,0,100,0), +(@PATH,41,3386.537,-1815.41,112.063,0,0,0,0,100,0), +(@PATH,42,3386.537,-1813.41,113.313,0,0,0,0,100,0), +(@PATH,43,3386.537,-1812.41,113.813,0,0,0,0,100,0), +(@PATH,44,3386.367,-1811.625,114.3062,0,0,0,0,100,0), +(@PATH,45,3386.617,-1813.375,113.3062,0,0,0,0,100,0), +(@PATH,46,3386.867,-1814.375,112.5562,0,0,0,0,100,0), +(@PATH,47,3387.117,-1816.875,111.3062,0,0,0,0,100,0), +(@PATH,48,3388.867,-1827.875,104.8062,0,0,0,0,100,0); + +UPDATE `smart_scripts` SET `action_param1`=1 WHERE `entryorguid`=26447 AND `source_type`=0 AND `id`=0 AND `link`=0; + +SET @NPC := 102007; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4364.09,`position_y`=-3079.468,`position_z`=339.3658 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4364.09,-3079.468,339.3658,0,0,0,0,100,0), +(@PATH,2,4367.34,-3080.468,339.6158,0,0,0,0,100,0), +(@PATH,3,4367.589,-3080.702,339.5166,0,0,0,0,100,0), +(@PATH,4,4363.933,-3079.255,339.4127,0,0,0,0,100,0), +(@PATH,5,4359.433,-3077.505,336.4127,0,0,0,0,100,0), +(@PATH,6,4355.786,-3075.964,334.2474,0,0,0,0,100,0), +(@PATH,7,4355.695,-3075.981,334.1053,0,0,0,0,100,0), +(@PATH,8,4356.195,-3076.231,334.3553,0,0,0,0,100,0), +(@PATH,9,4359.195,-3077.231,336.3553,0,0,0,0,100,0), +(@PATH,10,4364.154,-3079.562,339.3983,0,0,0,0,100,0), +(@PATH,11,4367.404,-3080.312,339.6483,0,0,0,0,100,0), +(@PATH,12,4367.589,-3080.702,339.5166,0,0,0,0,100,0), +(@PATH,13,4363.904,-3079.155,339.4361,0,0,0,0,100,0), +(@PATH,14,4359.404,-3077.405,336.4361,0,0,0,0,100,0); + +DELETE FROM `creature_addon` WHERE `guid` IN (111265,111249,111251,111254,111253,111287,111250,111252,111256, 111257, 111255, 111258); +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(111255,0,0,3,1,0, ''), +(111258,0,0,3,1,0, ''), +(111257,0,0,3,1,0, ''), +(111256,0,0,3,1,0, ''), +(111265,0,0,3,1,0, ''), +(111252,0,0,3,1,0, ''), +(111250,0,0,3,1,0, ''), +(111287,0,0,3,1,0, ''), +(111253,0,0,3,1,0, ''), +(111254,0,0,3,1,0, ''), +(111251,0,0,3,1,0, ''), +(111249,0,0,3,1,0, ''); + +SET @NPC := 111286; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4542.684,`position_y`=-3543.378,`position_z`=229.5949 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4542.684,-3543.378,229.5949,0,0,0,0,100,0), +(@PATH,2,4538.324,-3550.24,230.4706,0,0,0,0,100,0), +(@PATH,3,4538.574,-3554.24,230.9706,0,0,0,0,100,0), +(@PATH,4,4538.824,-3559.99,231.4706,0,0,0,0,100,0), +(@PATH,5,4538.906,-3559.937,231.3715,0,0,0,0,100,0), +(@PATH,6,4538.906,-3560.937,231.8715,0,0,0,0,100,0), +(@PATH,7,4558.198,-3552.972,231.0125,0,0,0,0,100,0), +(@PATH,8,4556.198,-3549.472,230.5125,0,0,0,0,100,0), +(@PATH,9,4553.948,-3546.472,229.7625,0,0,0,0,100,0), +(@PATH,10,4551.948,-3543.222,229.5125,0,0,0,0,100,0), +(@PATH,11,4542.659,-3543.267,229.5627,0,0,0,0,100,0); + +SET @NPC := 111288; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4520.46,`position_y`=-3406.525,`position_z`=227.3326 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4520.46,-3406.525,227.3326,0,0,0,0,100,0), +(@PATH,2,4521.017,-3406.375,227.0677,0,0,0,0,100,0), +(@PATH,3,4520.318,-3406.741,227.3123,0,0,0,0,100,0), +(@PATH,4,4517.467,-3403.935,227.3069,0,0,0,0,100,0), +(@PATH,5,4526.76,-3393.349,227.3997,0,0,0,0,100,0), +(@PATH,6,4531.26,-3395.099,227.8997,0,0,0,0,100,0), +(@PATH,7,4531.282,-3395.075,227.8239,0,0,0,0,100,0), +(@PATH,8,4533.532,-3395.825,228.3239,0,0,0,0,100,0), +(@PATH,9,4532.032,-3397.075,228.0739,0,0,0,0,100,0), +(@PATH,10,4527.532,-3400.825,227.3239,0,0,0,0,100,0), +(@PATH,11,4520.34,-3406.549,227.3216,0,0,0,0,100,0), +(@PATH,12,4517.471,-3403.86,227.3069,0,0,0,0,100,0), +(@PATH,13,4526.883,-3393.393,227.3997,0,0,0,0,100,0), +(@PATH,14,4531.383,-3394.893,227.8997,0,0,0,0,100,0), +(@PATH,15,4531.462,-3395.123,227.7483,0,0,0,0,100,0), +(@PATH,16,4533.462,-3395.873,228.4983,0,0,0,0,100,0), +(@PATH,17,4531.962,-3397.123,227.9983,0,0,0,0,100,0), +(@PATH,18,4527.462,-3400.623,227.2483,0,0,0,0,100,0), +(@PATH,19,4520.34,-3406.627,227.3305,0,0,0,0,100,0), +(@PATH,20,4517.294,-3403.789,227.3069,0,0,0,0,100,0), +(@PATH,21,4526.909,-3393.429,227.3997,0,0,0,0,100,0), +(@PATH,22,4531.409,-3394.929,227.8997,0,0,0,0,100,0); + +SET @NPC := 111289; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4484.351,`position_y`=-3478.285,`position_z`=227.3069 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4484.351,-3478.285,227.3069,0,0,0,0,100,0), +(@PATH,2,4480.057,-3487.22,227.2323,0,0,0,0,100,0), +(@PATH,3,4472.557,-3489.22,227.7323,0,0,0,0,100,0), +(@PATH,4,4472.306,-3489.237,227.8791,0,0,0,0,100,0), +(@PATH,5,4470.556,-3489.737,227.6291,0,0,0,0,100,0), +(@PATH,6,4462.207,-3481.591,227.8329,0,0,0,0,100,0), +(@PATH,7,4464.199,-3484.106,227.8086,0,0,0,0,100,0), +(@PATH,8,4476.075,-3486.219,227.4328,0,0,0,0,100,0), +(@PATH,9,4480.054,-3487.25,227.2926,0,0,0,0,100,0), +(@PATH,10,4472.554,-3489.25,227.7926,0,0,0,0,100,0), +(@PATH,11,4470.448,-3489.726,227.6761,0,0,0,0,100,0), +(@PATH,12,4461.976,-3481.571,227.8154,0,0,0,0,100,0), +(@PATH,13,4466.938,-3472.407,227.8242,0,0,0,0,100,0), +(@PATH,14,4479.269,-3468.501,227.1355,0,0,0,0,100,0), +(@PATH,15,4484.383,-3478.306,227.3069,0,0,0,0,100,0), +(@PATH,16,4479.968,-3487.13,227.2323,0,0,0,0,100,0), +(@PATH,17,4472.468,-3489.13,227.7323,0,0,0,0,100,0); + +SET @NPC := 103184; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4462.269,`position_y`=-3450.493,`position_z`=229.296 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4462.269,-3450.493,229.296,0,0,0,0,100,0), +(@PATH,2,4459.769,-3447.243,230.296,0,0,0,0,100,0), +(@PATH,3,4458.269,-3445.243,231.046,0,0,0,0,100,0), +(@PATH,4,4457.019,-3443.493,231.796,0,0,0,0,100,0), +(@PATH,5,4455.269,-3441.243,232.546,0,0,0,0,100,0), +(@PATH,6,4453.519,-3438.743,233.046,0,0,0,0,100,0), +(@PATH,7,4452.269,-3437.243,233.796,0,0,0,0,100,0), +(@PATH,8,4452.268,-3436.947,233.8038,0,0,0,0,100,0), +(@PATH,9,4451.268,-3435.697,234.0538,0,0,0,0,100,0), +(@PATH,10,4456.768,-3431.197,233.5538,0,0,0,0,100,0), +(@PATH,11,4463.518,-3425.947,232.8038,0,0,0,0,100,0), +(@PATH,12,4466.768,-3423.447,232.3038,0,0,0,0,100,0), +(@PATH,13,4471.518,-3419.947,232.0538,0,0,0,0,100,0), +(@PATH,14,4467.077,-3423.216,232.6244,0,0,0,0,100,0), +(@PATH,15,4463.827,-3425.716,232.8744,0,0,0,0,100,0), +(@PATH,16,4458.577,-3429.716,233.6244,0,0,0,0,100,0), +(@PATH,17,4452.327,-3434.716,234.1244,0,0,0,0,100,0), +(@PATH,18,4452.155,-3435.054,234.091,0,0,0,0,100,0), +(@PATH,19,4451.155,-3435.804,234.091,0,0,0,0,100,0), +(@PATH,20,4452.905,-3438.304,233.341,0,0,0,0,100,0), +(@PATH,21,4454.905,-3440.554,232.841,0,0,0,0,100,0), +(@PATH,22,4455.905,-3442.304,232.091,0,0,0,0,100,0), +(@PATH,23,4457.155,-3443.804,231.591,0,0,0,0,100,0), +(@PATH,24,4458.905,-3446.054,230.841,0,0,0,0,100,0), +(@PATH,25,4460.655,-3448.304,229.841,0,0,0,0,100,0), +(@PATH,26,4462.905,-3451.554,229.091,0,0,0,0,100,0); + +SET @NPC := 103186; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4494.403,`position_y`=-3398.471,`position_z`=228.9183 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4494.403,-3398.471,228.9183,0,0,0,0,100,0), +(@PATH,2,4497.653,-3396.221,229.6683,0,0,0,0,100,0), +(@PATH,3,4500.653,-3394.221,230.1683,0,0,0,0,100,0), +(@PATH,4,4509.161,-3388.243,230.0648,0,0,0,0,100,0), +(@PATH,5,4526.161,-3376.743,230.3148,0,0,0,0,100,0), +(@PATH,6,4529.797,-3374.429,230.5572,0,0,0,0,100,0), +(@PATH,7,4532.547,-3377.179,230.0572,0,0,0,0,100,0), +(@PATH,8,4531.893,-3376.673,230.1904,0,0,0,0,100,0), +(@PATH,9,4529.376,-3374.406,230.6659,0,0,0,0,100,0), +(@PATH,10,4525.376,-3377.156,230.1659,0,0,0,0,100,0), +(@PATH,11,4516.626,-3383.156,229.6659,0,0,0,0,100,0), +(@PATH,12,4508.783,-3388.445,229.8696,0,0,0,0,100,0), +(@PATH,13,4503.033,-3392.445,230.1196,0,0,0,0,100,0), +(@PATH,14,4497.533,-3396.195,229.6196,0,0,0,0,100,0), +(@PATH,15,4494.283,-3398.445,228.8696,0,0,0,0,100,0); + +SET @NPC := 102291; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3636.139,`position_y`=-4596.764,`position_z`=191.9429 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3636.139,-4596.764,191.9429,0,0,0,0,100,0), +(@PATH,2,3635.861,-4596.798,191.7083,0,0,0,0,100,0), +(@PATH,3,3635.853,-4596.449,191.8018,0,0,0,0,100,0), +(@PATH,4,3625.146,-4589.744,191.7298,0,0,0,0,100,0), +(@PATH,5,3624.396,-4588.744,191.7298,0,0,0,0,100,0), +(@PATH,6,3623.646,-4587.744,191.9798,0,0,0,0,100,0), +(@PATH,7,3623.146,-4586.994,192.7298,0,0,0,0,100,0), +(@PATH,8,3622.646,-4586.244,193.2298,0,0,0,0,100,0), +(@PATH,9,3619.531,-4582.521,193.1351,0,0,0,0,100,0), +(@PATH,10,3608.531,-4574.021,193.6351,0,0,0,0,100,0), +(@PATH,11,3607.281,-4573.271,192.6351,0,0,0,0,100,0), +(@PATH,12,3606.781,-4572.771,192.6351,0,0,0,0,100,0), +(@PATH,13,3606.531,-4572.521,192.3851,0,0,0,0,100,0), +(@PATH,14,3606.273,-4572.244,192.437,0,0,0,0,100,0), +(@PATH,15,3604.773,-4570.994,192.687,0,0,0,0,100,0), +(@PATH,16,3603.523,-4569.494,193.187,0,0,0,0,100,0), +(@PATH,17,3602.023,-4566.994,194.187,0,0,0,0,100,0), +(@PATH,18,3600.023,-4563.744,194.687,0,0,0,0,100,0), +(@PATH,19,3597.773,-4560.494,195.437,0,0,0,0,100,0), +(@PATH,20,3596.023,-4557.994,196.187,0,0,0,0,100,0), +(@PATH,21,3593.575,-4554.499,197.0962,0,0,0,0,100,0), +(@PATH,22,3591.325,-4550.999,197.8462,0,0,0,0,100,0), +(@PATH,23,3589.575,-4547.999,198.3462,0,0,0,0,100,0), +(@PATH,24,3587.575,-4544.499,199.0962,0,0,0,0,100,0), +(@PATH,25,3587.266,-4544.312,199.2521,0,0,0,0,100,0), +(@PATH,26,3586.766,-4543.312,199.2521,0,0,0,0,100,0), +(@PATH,27,3583.266,-4534.312,199.7521,0,0,0,0,100,0), +(@PATH,28,3581.901,-4530.598,199.9242,0,0,0,0,100,0), +(@PATH,29,3577.257,-4510.44,199.8448,0,0,0,0,100,0), +(@PATH,30,3576.757,-4505.69,199.3448,0,0,0,0,100,0), +(@PATH,31,3576.196,-4499.946,199.2152,0,0,0,0,100,0), +(@PATH,32,3580.946,-4493.946,199.7152,0,0,0,0,100,0), +(@PATH,33,3581.288,-4493.67,199.6084,0,0,0,0,100,0), +(@PATH,34,3581.538,-4493.42,199.6084,0,0,0,0,100,0), +(@PATH,35,3586.788,-4484.17,199.1084,0,0,0,0,100,0), +(@PATH,36,3588.606,-4481.567,199.091,0,0,0,0,100,0), +(@PATH,37,3594.356,-4476.567,198.341,0,0,0,0,100,0), +(@PATH,38,3596.606,-4474.567,197.841,0,0,0,0,100,0), +(@PATH,39,3596,-4475.001,198.0385,0,0,0,0,100,0), +(@PATH,40,3593,-4477.751,198.5385,0,0,0,0,100,0), +(@PATH,41,3588.387,-4481.783,199.0264,0,0,0,0,100,0), +(@PATH,42,3582.387,-4491.783,199.5264,0,0,0,0,100,0), +(@PATH,43,3582.222,-4492.081,199.736,0,0,0,0,100,0), +(@PATH,44,3581.222,-4493.581,199.486,0,0,0,0,100,0), +(@PATH,45,3576.117,-4500.31,199.3681,0,0,0,0,100,0), +(@PATH,46,3577.448,-4510.77,199.8773,0,0,0,0,100,0), +(@PATH,47,3582.276,-4530.902,199.8257,0,0,0,0,100,0), +(@PATH,48,3585.526,-4540.152,199.3257,0,0,0,0,100,0), +(@PATH,49,3587.005,-4543.549,199.229,0,0,0,0,100,0), +(@PATH,50,3589.755,-4548.549,198.229,0,0,0,0,100,0), +(@PATH,51,3592.005,-4551.799,197.729,0,0,0,0,100,0), +(@PATH,52,3593.605,-4554.598,197.1403,0,0,0,0,100,0), +(@PATH,53,3595.355,-4557.098,196.3903,0,0,0,0,100,0), +(@PATH,54,3596.855,-4559.598,195.6403,0,0,0,0,100,0), +(@PATH,55,3598.355,-4562.098,195.1403,0,0,0,0,100,0), +(@PATH,56,3600.355,-4565.348,194.6403,0,0,0,0,100,0), +(@PATH,57,3602.105,-4567.848,193.8903,0,0,0,0,100,0), +(@PATH,58,3603.605,-4570.348,193.1403,0,0,0,0,100,0), +(@PATH,59,3604.866,-4572.453,192.3813,0,0,0,0,100,0), +(@PATH,60,3606.116,-4573.453,192.3813,0,0,0,0,100,0), +(@PATH,61,3606.366,-4573.703,192.8813,0,0,0,0,100,0), +(@PATH,62,3607.866,-4574.703,193.6313,0,0,0,0,100,0), +(@PATH,63,3619.845,-4582.56,193.2473,0,0,0,0,100,0), +(@PATH,64,3622.345,-4585.81,192.9973,0,0,0,0,100,0), +(@PATH,65,3623.095,-4586.81,192.7473,0,0,0,0,100,0), +(@PATH,66,3623.845,-4587.56,191.9973,0,0,0,0,100,0), +(@PATH,67,3624.595,-4588.81,191.7473,0,0,0,0,100,0), +(@PATH,68,3624.654,-4589.03,191.5894,0,0,0,0,100,0), +(@PATH,69,3625.404,-4589.78,191.5894,0,0,0,0,100,0), +(@PATH,70,3636.153,-4596.696,191.9285,0,0,0,0,100,0); diff --git a/sql/updates/world/2015_05_16_00_world.sql b/sql/updates/world/2015_05_16_00_world.sql new file mode 100644 index 00000000000..4a77cdd90fe --- /dev/null +++ b/sql/updates/world/2015_05_16_00_world.sql @@ -0,0 +1,100 @@ +UPDATE `creature_text` SET `emote`=25 WHERE `entry`=21797 AND `groupid`=0 AND `id`=0; +UPDATE `creature_template` SET `InhabitType`=4, `flags_extra`=128 WHERE `entry`=21876; +UPDATE `creature_template` SET `flags_extra`=128 WHERE `entry`=21872; + +UPDATE `creature_template` SET `spell1`=37729, `spell2`=37727, `spell3`=39658, `spell4`=37728 WHERE `entry`=21867; + +DELETE FROM `creature_text` WHERE `entry`in(21877,21872,21867); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(21877, 0, 0, 'Your pathetic attempt to escape will be short lived, Gorefiend. Let the $g boy:girl, go and submit! Even with your armor and weapons, you cannot defeat the ancients!', 12, 0, 100, 1, 0, 0, 19504, 0, 'Karsius the Ancient Watcher to Player'), +(21877, 1, 0, 'What ... have you done...', 14, 0, 100, 0, 0, 0, 19506, 0, 'Karsius the Ancient Watcher to Player'), +(21867, 0, 0, 'We will meet again... Someday.', 12, 0, 100, 273, 0, 0, 19508, 0, 'Teron Gorefiend'), +(21867, 1, 0, 'Death incarnate has been released upon the world once more! Teron Gorefiend has returned...', 14, 0, 100, 22, 0, 0, 19509, 0, 'Teron Gorefiend'), +(21872, 0, 0, 'Waste no time, fool! Use our power to kill those that stand in our way! Destroy Karsius before you are subdued!', 15, 0, 100, 1, 0, 0, 19503, 0, 'The Voice of Gorefiend'); + +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(21797,21876,21877,21867); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN(21797,21876,21877,21867); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN(2179700,2179701); + +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 +(21797, 0, 0, 1, 19, 0, 100, 0, 10645, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Quest \'Teron Gorefiend, I am...\' Taken - Store Targetlist'), +(21797, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2179700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Quest \'Teron Gorefiend, I am...\' Taken - Run Script'), +(21797, 0, 2, 3, 19, 0, 100, 0, 10639, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Quest \'Teron Gorefiend, I am...\' Taken - Store Targetlist'), +(21797, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2179700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Quest \'Teron Gorefiend, I am...\' Taken - Run Script'), +(21797, 0, 4, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 2179701, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Data Set - Run Script 2'), +(21797, 0, 5, 0, 40, 0, 100, 0, 3, 21867, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Reached WP7 - Despawn'), +(21797, 0, 6, 7, 6, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 21877, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Death - Set Data 2 2 on Karsius the Ancient Watcher'), +(21797, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 28, 37782, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - Just Died - Remove Aura Disembodied Spirit'), +(21797, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 37748, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - Just Died - Remove Aura Teron Gorefiend'), + +(21876, 0, 0, 1, 11, 0, 100, 1, 0, 0, 0, 0, 11, 37761, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chain of Shadows - On Respawn - Cast \'Ancient Draenei Warden\''), +(21876, 0, 1, 0, 61, 0, 100, 1, 0, 0, 0, 0, 17, 333, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chain of Shadows - On Respawn - Set Emote State 333'), +(21876, 0, 2, 0, 1, 0, 33, 0, 8000, 21000, 8000, 21000, 11, 37784, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chain of Shadows - OOC - Cast Enforced Submission'), +(21876, 0, 3, 0, 1, 0,100, 1, 0, 0, 0, 0, 11, 37784, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chain of Shadows - OOC - Cast Enforced Submission (No Repeat)'), +(21877, 0, 1, 0, 11, 0, 100, 1, 0, 0, 0, 0, 17, 333, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - On Respawn - Set Emote State 333'), +(21877, 0, 2, 0, 1, 0, 100, 0, 3000, 3000, 3000, 3000, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - OOC - Set Unit Flags'), +(21877, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 9, 21876, 0, 200, 0, 0, 0, 0, 'Karsius the Ancient Watcher - On Death - Despawn Chain of Shadows'), +(21877, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 21867, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - On Death - Set Data'), +(21877, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - On Death - Despawn'), +(21877, 0, 6, 0, 1, 0, 100, 0, 3000, 3000, 3000, 3000, 19, 768, 0, 0, 0, 0, 0, 19, 21867, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - OOC - Set Unit Flags'), +(21877, 0, 7, 8, 7, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 9, 21876, 0, 200, 0, 0, 0, 0, 'Karsius the Ancient Watcher - On Evade Despawn'), +(21877, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 21797, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - Despawn Ancient Shadowmoon Spirit'), +(21877, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 21867, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - Despawn Ancient Shadowmoon Spirit'), +(21877, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - Despawn Ancient Shadowmoon Spirit'), +(21877, 0, 11, 12, 6, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - Just Died - Say Line 1'), +(21877, 0, 12, 13, 61, 0, 100, 0, 0, 0, 0, 0, 28, 37782, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - Just Died - Remove Aura Disembodied Spirit'), +(21877, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 37748, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - Just Died - Remove Aura Teron Gorefiend'), +(21877, 0, 14, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Karsius the Ancient Watcher - On Data Set 2 2 - Evade'), +(2179701, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script 2 - Evade'), +(2179701, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 43, 0, 10720, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script 2 - Mount'), +(2179701, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script 2 - Say Line 0'), -- 13:51:07.500 +(2179701, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script 2 - Say Line 1'), -- 13:51:10.750 +(2179701, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 53, 1, 21867, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script 2 - Start WP'), +(2179700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Say Line 0'), -- 13:49:05.750 +(2179700, 9, 1, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 36, 21867, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Change Entry'), -- 13:49:09.266 +(2179700, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Set Unit Flags'), -- 13:49:09.266 +(2179700, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Add Aura Disembodied Spirit'), -- 13:49:09.266 +(2179700, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 75, 37782, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Invoker Cast - Teron Gorefiend'), -- 13:49:10.235 +(2179700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 85, 37769, 2, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Invoker Cast - Teron Gorefiend'), -- 13:49:10.235 +(2179700, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 37728, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Cast - Haste'), -- 13:49:10.235 +(2179700, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4524.726, 1009.763, 21.32487, 2.024582, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4515.913, 1020.078, 23.67377, 2.722714, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4515.165, 1033.106, 20.71271, 3.176499, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4525, 1045.415, 19.89447, 4.153883, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4537.54, 1049.356, 18.74087, 4.415683, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4551.174, 1044.113, 16.52099, 5.218534, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4523.753, 1062.352, 24.30409, 4.433136, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 14, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4509.667, 1047.063, 26.45817, 3.787364, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 21876, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4504.674, 1020.563, 33.07281, 2.932153, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Chain of Shadows\''), -- 13:49:12.782 +(2179700, 9, 16, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 12, 21877, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4535.794, 1029.284, 8.836361, 3.787364, 'Ancient Shadowmoon Spirit - On Script - Summon Creature \'Karsius the Ancient Watcher\''), -- 13:49:12.782 +(2179700, 9, 17, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 21877, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Say Line 0 on \'Karsius the Ancient Watcher\''), -- 13:49:12.782 +(2179700, 9, 18, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 21872, 0, 0, 0, 0, 0, 0, 'Ancient Shadowmoon Spirit - On Script - Say Line 0 on The Voice of Gorefiend'); -- 13:49:21.016 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`IN(37748,37784); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 37748, 0, 0, 31, 0, 3, 21867, 0, 0, 0, 0, '', 'Teron Gorefiend (effects 1 & 2) target teron gorefiend'), +(13, 6, 37748, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Teron Gorefiend (effect 2 & 3) targets player'), +(13, 1, 37784, 0, 0, 31, 0, 3, 21867, 0, 0, 0, 0, '', 'Enforced Submission Targets Teron Gorefiend'), +(13, 1, 37784, 0, 1, 31, 0, 3, 21797, 0, 0, 0, 0, '', 'Enforced Submission Targets Ancient Shadowmoon Spirit'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=37748; +UPDATE `quest_template` SET `SourceSpellId`=0 WHERE `Id`in(10645,10639); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (21876,21877,21797,21867); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(21876, 0, 0x0, 0x1, '37761'), -- 21876 - 37761 +(21877, 0, 0x0, 0x1, '37497'), -- 21877 +(21797, 0, 0x0, 0x1, '37509'), -- 21797 - 37509 +(21867, 0, 0x0, 0x1, '37509'); -- 21867 - 37509 10720 + +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=21876; +UPDATE `creature_template` SET `faction`=1821, `unit_flags`=33536 WHERE `entry`=21877; +UPDATE `creature_template` SET `faction`=35, `unit_flags`=768 WHERE `entry`=21867; + +DELETE FROM `waypoints` WHERE `entry`=21867; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(21867, 1, -4519.978, 1004.27, 12.49499, 'Teron Gorefiend'), +(21867, 2, -4520.013, 995.0764, 11.57806, 'Teron Gorefiend'), +(21867, 3, -4518.75, 968.75, 12.04559, 'Teron Gorefiend'), +(21867, 4, -4512.086, 938.8976, 2.529049, 'Teron Gorefiend'); diff --git a/sql/updates/world/2015_05_17_00_world.sql b/sql/updates/world/2015_05_17_00_world.sql new file mode 100644 index 00000000000..67a5c7635ae --- /dev/null +++ b/sql/updates/world/2015_05_17_00_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `skill_fishing_base_level` WHERE `entry`=4722; +INSERT INTO `skill_fishing_base_level` (`entry`, `skill`) VALUES (4722,430); diff --git a/sql/updates/world/2015_05_17_01_world.sql b/sql/updates/world/2015_05_17_01_world.sql new file mode 100644 index 00000000000..88e0e0e4f0a --- /dev/null +++ b/sql/updates/world/2015_05_17_01_world.sql @@ -0,0 +1,10 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`="" WHERE `entry` IN (19991); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (19991) 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 +(19991, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Bloodmaul Brute - On Death - Say text 1'), +(19991, 0, 1, 0, 0, 0, 100, 0, 2000, 5000, 4000, 5000, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Bloodmaul Brute - IC - cast Cleave'), +(19991, 0, 2, 0, 0, 0, 100, 0, 5000, 10000, 8000, 12000, 11, 37577, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Bloodmaul Brute - IC - debilitating-strike'), +(19991, 0, 3, 0, 0, 0, 100, 1, 15000, 20000, 10000, 15000, 11, 34932, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Bloodmaul Brute - IC - Bloodmaul Buzz'), +(19991, 0, 4, 5, 2, 0, 100, 1, 0, 20, 1, 1, 11, 8599, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Bloodmaul Brute - Heath pct - cast Enrage'), +(19991, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Bloodmaul Brute - Heath pct - say text 3'); diff --git a/sql/updates/world/2015_05_19_00_world_2015_04_05_07.sql b/sql/updates/world/2015_05_19_00_world_2015_04_05_07.sql new file mode 100644 index 00000000000..2e603ee893b --- /dev/null +++ b/sql/updates/world/2015_05_19_00_world_2015_04_05_07.sql @@ -0,0 +1,7 @@ +DROP TABLE IF EXISTS `gameobject_addon`; +CREATE TABLE `gameobject_addon` ( + `guid` bigint(20) unsigned NOT NULL DEFAULT '0', + `invisibilityType` tinyint(3) unsigned NOT NULL DEFAULT '0', + `invisibilityValue` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/sql/updates/world/2015_05_19_01_world.sql b/sql/updates/world/2015_05_19_01_world.sql new file mode 100644 index 00000000000..83dfb06b6fd --- /dev/null +++ b/sql/updates/world/2015_05_19_01_world.sql @@ -0,0 +1,22 @@ +-- Gossip Menu Option for Squire David (33447) +SET @SourceGroup = 10340; +SET @SourceEntry = 0; +SET @ConditionTypeOrReference = 9; + +DELETE FROM conditions where SourceGroup=@SourceGroup and SourceEntry=@SourceEntry; +INSERT INTO conditions(SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, Comment) VALUES +(15, @SourceGroup, @SourceEntry, 0, 0, @ConditionTypeOrReference, 0, 13679, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest 13679'), +(15, @SourceGroup, @SourceEntry, 0, 1, @ConditionTypeOrReference, 0, 13680, 0, 0, 0, 0, 0, '', 'Show gossip option if player has quest 13680'); + +-- Squire David SAI +SET @ENTRY := 33447; +UPDATE creature_template SET ScriptName="" WHERE entry=33447; +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,1,62,0,100,0,10340,0,0,0,11,63028,0,0,0,0,0,7,0,0,0,0,0,0,0,"Squire David - On Gossip Option 0 Selected - Cast 'Force Cast'"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Squire David - On Gossip Option 0 Selected - Close Gossip"); + +DELETE FROM `spell_target_position` WHERE `id`=63026; +INSERT INTO `spell_target_position` (`id`, `effIndex`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(63026, 0, 571, 8575.38, 921.85, 547.554, 0.2718); diff --git a/sql/updates/world/2015_05_19_02_world.sql b/sql/updates/world/2015_05_19_02_world.sql new file mode 100644 index 00000000000..6194278061e --- /dev/null +++ b/sql/updates/world/2015_05_19_02_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_target_position` WHERE `id`=63171; +INSERT INTO `spell_target_position` (`id`, `effIndex`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(63171, 0, 571, 8533.11, 1069.66, 551.784, 0.5296); diff --git a/sql/updates/world/2015_05_20_00_world.sql b/sql/updates/world/2015_05_20_00_world.sql new file mode 100644 index 00000000000..da59eb2ed07 --- /dev/null +++ b/sql/updates/world/2015_05_20_00_world.sql @@ -0,0 +1,60 @@ +-- +-- Argent Champion SAI mechanic +SET @Arg_Champion := 33707; +SET @Script := 3370700; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN (@Arg_Champion, 33518); +UPDATE `creature_template_addon` SET `auras`='63501 62852 64723' WHERE `entry`= @Arg_Champion; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Arg_Champion, 33518) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +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 +(@Arg_Champion,0,0,0,25,0,100,0,0,0,0,0,28,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - On Reset - Remove auras from Defend'), +(@Arg_Champion,0,1,0,63,0,100,0,0,0,0,0,80,@Script,2,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Just created - Call timed actionlist'), +(@Arg_Champion,0,2,0,52,0,100,0,0,@Arg_Champion,0,0,11,63010,0,0,0,0,0,7,0,0,0,0,0,0,0,'Arg Champion - On text over - Cast Charge'), +(@Arg_Champion,0,3,0,0,0,100,0,0,0,1500,4000,11,62544,0,0,0,0,0,2,0,0,0,0,0,0,0,'Arg Champion - IC - Cast Thrust'), +(@Arg_Champion,0,4,0,9,0,100,0,5,5,4000,7000,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Arg Champion - On more than 5 yard range - Cast Shield-Breaker'), +(@Arg_Champion,0,5,0,0,0,100,0,9000,11000,9000,10000,46,20,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - IC - Move forward 20 yards'), +(@Arg_Champion,0,6,7,9,0,100,0,9,15,3000,3000,11,63010,0,0,0,0,0,2,0,0,0,0,0,0,0,'Arg Champion - On 10-12 yard range - Cast Charge'), +(@Arg_Champion,0,7,0,61,0,100,0,0,0,0,0,11,62575,0,0,0,0,0,2,0,0,0,0,0,0,0,'Arg Champion - Linked with previous event - Cast Shield-Breaker'), +(@Arg_Champion,0,8,9,2,0,100,1,1,6,60000,60000,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - On HP% between 1% and 6% - Change faction to 35'), +(@Arg_Champion,0,9,10,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,33518,100,0,0,0,0,0,'Arg Champion - On HP% between 1% and 6% - set data'), +(@Arg_Champion,0,10,11,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,21,50,0,0,0,0,0,0,'Arg Champion - Linked with previous event - Say text'), +(@Arg_Champion,0,11,0,61,0,100,0,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Linked with previous event - Despawn in 3 sec'), +(@Arg_Champion,0,12,13,5,0,100,0,60000,60000,1,0,1,1,0,0,0,0,0,21,50,0,0,0,0,0,0,'Arg Champion - On player killed - Say text'), +(@Arg_Champion,0,13,0,61,0,100,0,0,0,0,0,41,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Linked with previous event - Despawn in 1 ms'), +-- Timed actionlist 1 +(@Script,9,0,0,0,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Set run ON'), +(@Script,9,1,0,0,0,100,0,0,0,0,0,42,0,1,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Set INVINCIBILITY'), +(@Script,9,2,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Cast Defend on self/Layer 1/'), +(@Script,9,3,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Cast Defend on self/Layer 2/'), +(@Script,9,4,0,0,0,100,0,0,0,0,0,11,62719,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Cast Defend on self/Layer 3/'), +(@Script,9,5,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,8562.076172, 1115.047119, 556.787231, 2.587977,'Arg Champion - Script 1 - Move to pos'), +(@Script,9,6,0,0,0,100,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Set run Off'), +(@Script,9,7,0,0,0,100,0,0,0,0,0,11,64223,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Cast aura TriggerS for Defend /10 sec one/'), +(@Script,9,8,0,0,0,100,0,3500,3500,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Arg Champion - Script 1 - Change faction to 14'), +(@Script,9,9,0,0,0,100,0,0,0,0,0,1,0,1500,0,0,0,0,21,50,0,0,0,0,0,0,'Arg Champion - Script 1 - Say text'), +(33518, 0, 0, 1, 62, 0, 100, 0, 10343, 0, 0, 0, 11, 63171, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Squire Danny -On gossip select, summons Argent Champion" ), +(33518, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Squire Danny - On gossip select - Close gossip" ), +(33518, 0, 2, 0, 61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Squire Danny - Linked with previous event - store target'), +(33518, 0, 3, 0, 38,0,100,0,0,1,0,0,85,63516,0,0,0,0,0,12,1,0,0,0,0,0,0,'Squire Danny - On data set - cast quest credit'); + +-- Argent Champions texts +DELETE FROM `creature_text` WHERE `entry`= @Arg_Champion; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Arg_Champion,0,1,'Ready yourself!',12,0,100,1,1000,0,'Argent Champion',33753), +(@Arg_Champion,0,2,'Prepare yourself!',12,0,100,1,1000,0,'Argent Champion',33750), +(@Arg_Champion,0,3,'On your guard!',12,0,100,1,1000,0,'Argent Champion',33752), +(@Arg_Champion,0,4,'On your guard!',12,0,100,1,1000,0,'Argent Champion',33756), +(@Arg_Champion,0,5,'Let it begin!',12,0,100,1,1000,0,'Argent Champion',33758), +(@Arg_Champion,0,6,'Argent Champion is looking winded!',12,0,100,1,1000,0,'Argent Champion',0), +(@Arg_Champion,1,7,'Victory is mine!',12,0,100,1,1000,0,'Argent Champion',33771), +(@Arg_Champion,1,8,'It seems you still need more practice. Perhaps another time.',12,0,100,1,1000,0,'Argent Champion',33763), +(@Arg_Champion,1,9,'I have won. Better luck another time, friend.',12,0,100,1,1000,0,'Argent Champion',33773), +(@Arg_Champion,1,10,'I am afraid you will need more practice to defeat me.',12,0,100,1,1000,0,'Argent Champion',33772), +(@Arg_Champion,2,11,'I yield to you.',12,0,100,1,1000,0,'Argent Champion',33767), +(@Arg_Champion,2,12,'That was a well fought battle. I yield to you.',12,0,100,1,1000,0,'Argent Champion',33776), +(@Arg_Champion,2,13,'It would seem I underestimated your skills. Well done..',12,0,100,1,1000,0,'Argent Champion',33768), +(@Arg_Champion,2,14,'I have been defeated. Good fight!',12,0,100,1,1000,0,'Argent Champion',33868); + +DELETE FROM `spell_target_position` WHERE `id`=63137; +INSERT INTO `spell_target_position` (`id`, `effIndex`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(63137, 0, 571, 8542.52, 1083.690, 556.406, 1.3862); diff --git a/sql/updates/world/2015_05_20_01_world.sql b/sql/updates/world/2015_05_20_01_world.sql new file mode 100644 index 00000000000..332458a4afb --- /dev/null +++ b/sql/updates/world/2015_05_20_01_world.sql @@ -0,0 +1,10 @@ +-- +DELETE FROM `spell_group` WHERE `id`=1121; +INSERT INTO `spell_group` (`id`, `spell_id`) VALUES +(1121,3671), +(1121,3672), +(1121,3673); + +DELETE FROM `spell_group_stack_rules` WHERE `group_id`=1121; +INSERT INTO `spell_group_stack_rules` (`group_id`, `stack_rule`) VALUES +(1121,1); diff --git a/sql/updates/world/2015_05_20_02_world.sql b/sql/updates/world/2015_05_20_02_world.sql new file mode 100644 index 00000000000..0540f17eed6 --- /dev/null +++ b/sql/updates/world/2015_05_20_02_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `gossip_menu_option` SET `action_menu_id`=943 WHERE `menu_id`=942 AND `id`=0; +UPDATE `gossip_menu_option` SET `action_menu_id`=944 WHERE `menu_id`=942 AND `id`=1; +DELETE FROM `gossip_menu` WHERE `entry` IN (944,943); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (943,1521),(944,1646); diff --git a/sql/updates/world/2015_05_20_03_world.sql b/sql/updates/world/2015_05_20_03_world.sql new file mode 100644 index 00000000000..70abf4ee1af --- /dev/null +++ b/sql/updates/world/2015_05_20_03_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (12222); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (12222) 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 +(12222, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 7000, 10000, 11, 26419, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0,0,'Creeping Sludge - IC - Cast Acid Spray'), +(12222, 0, 1, 0, 25, 0, 100, 0, 0, 0, 0, 0, 75, 22638, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Creeping Sludge - On reset - Add Poison Shock'); diff --git a/sql/updates/world/2015_05_20_04_world.sql b/sql/updates/world/2015_05_20_04_world.sql new file mode 100644 index 00000000000..863f0b86d50 --- /dev/null +++ b/sql/updates/world/2015_05_20_04_world.sql @@ -0,0 +1,8 @@ +-- +UPDATE `smart_scripts` SET `event_type`=61, `event_param1`=0, `event_param2`=0, `event_param3`=0, `event_param4`=0, `action_param1`=10000 WHERE `entryorguid`=28156 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `link`=3 WHERE `entryorguid`=28156 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=28156 AND `source_type`=0 AND `id`=0; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=51276; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,51276,0,0,31,0,3,28156,0,0,0,0,'','Incinerate Corpse can be used only on Defeated Argent Footman.'); diff --git a/sql/updates/world/2015_05_20_05_world.sql b/sql/updates/world/2015_05_20_05_world.sql new file mode 100644 index 00000000000..0e678b593aa --- /dev/null +++ b/sql/updates/world/2015_05_20_05_world.sql @@ -0,0 +1,110 @@ +-- +UPDATE `npc_text` SET `BroadcastTextId0`= 33761 WHERE `id`=14391; +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4007; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4007,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(4007,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(4007,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762); +DELETE FROM `gossip_menu` WHERE `Entry`=4007 AND `text_id` IN (4999, 5000); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4007, 4999), (4007, 5000); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=4007; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 4007, 4999, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is a hunter', 0), +(14, 4007, 5000, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is not a hunter', 1), +(15, 4007, 0, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4007, 1, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4007, 2, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4534; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4534,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(4534,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(4534,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762); +DELETE FROM `gossip_menu` WHERE `Entry`=4534 AND `text_id` IN (563, 562); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4534, 563), (4534, 562); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=4534; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 4534, 562, 0, 15, 128, 0, 0, 0, '', 'Show gossip text if player is a Mage', 0), +(14, 4534, 563, 0, 15, 128, 0, 0, 0, '', 'Show gossip text if player is not a Mage', 1), +(15, 4534, 0, 0, 15, 128, 0, 0, 0, '', 'Show gossip option if player is a Mage', 0), +(15, 4534, 1, 0, 15, 128, 0, 0, 0, '', 'Show gossip option if player is a Mage', 0), +(15, 4534, 2, 0, 15, 128, 0, 0, 0, '', 'Show gossip option if player is a Mage', 0); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4092; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4092,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(4092,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(4092,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762); +DELETE FROM `gossip_menu` WHERE `Entry`=4092 AND `text_id` IN (4867, 4993); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4092, 4867), (4092, 4993); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4621; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4621,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(4621,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(4621,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762); +DELETE FROM `gossip_menu` WHERE `Entry`=4621 AND `text_id` IN (4994, 4993); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4621, 4994), (4621, 4993); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=4621; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 4621, 4994, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is a hunter', 0), +(14, 4621, 4993, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is not a hunter', 1), +(15, 4621, 0, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4621, 1, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4621, 2, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4694; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4694,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(4694,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(4694,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762); +DELETE FROM `gossip_menu` WHERE `Entry`=4694 AND `text_id` IN (6160, 4993); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4694, 6160), (4694, 4993); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=4694; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 4694, 6160, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is a hunter', 0), +(14, 4694, 4993, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is not a hunter', 1), +(15, 4694, 0, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4694, 1, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4694, 2, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4826; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4826,0,3,"I would like training.",5,16,0,0,0,0,'', 2603); +DELETE FROM `gossip_menu` WHERE `Entry`=4826 AND `text_id` IN (5884, 5883); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4826, 5884), (4826, 5883); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=4826; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 4826, 5884, 0, 15, 128, 0, 0, 0, '', 'Show gossip text if player is a Mage', 0), +(14, 4826, 5883, 0, 15, 128, 0, 0, 0, '', 'Show gossip text if player is not a Mage', 1), +(15, 4826, 0, 0, 15, 128, 0, 0, 0, '', 'Show gossip option if player is a Mage', 0); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=4674; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(4674,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(4674,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(4674,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762); +DELETE FROM `gossip_menu` WHERE `Entry`=4674 AND `text_id` IN (4999, 5000); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (4674, 4999), (4674, 5000); + +UPDATE `creature_template` SET `gossip_menu_id`= 4007 WHERE `entry`=1231; +UPDATE `creature_template` SET `gossip_menu_id`= 4534 WHERE `entry`=3047; +UPDATE `creature_template` SET `gossip_menu_id`= 4092 WHERE `entry`=3963; +UPDATE `creature_template` SET `gossip_menu_id`= 4621 WHERE `entry`=4138; +UPDATE `creature_template` SET `gossip_menu_id`= 4694 WHERE `entry`=5501; +UPDATE `creature_template` SET `gossip_menu_id`= 4826 WHERE `entry`=5958; +UPDATE `creature_template` SET `gossip_menu_id`= 4092 WHERE `entry`=8308; +UPDATE `creature_template` SET `gossip_menu_id`= 4674 WHERE `entry`=10930; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup` IN (4092, 4674); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 4092, 4867, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is a hunter', 0), +(14, 4092, 4993, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is not a hunter', 1), +(15, 4092, 0, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4092, 1, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4092, 2, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(14, 4674, 4999, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is a hunter', 0), +(14, 4674, 5000, 0, 15, 4, 0, 0, 0, '', 'Show gossip text if player is not a hunter', 1), +(15, 4674, 0, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4674, 1, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0), +(15, 4674, 2, 0, 15, 4, 0, 0, 0, '', 'Show gossip option if player is a hunter', 0); diff --git a/sql/updates/world/2015_05_20_06_world.sql b/sql/updates/world/2015_05_20_06_world.sql new file mode 100644 index 00000000000..257ab83e266 --- /dev/null +++ b/sql/updates/world/2015_05_20_06_world.sql @@ -0,0 +1,16 @@ +-- +DELETE FROM `gossip_menu_option` WHERE `menu_id`=21221; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`)VALUES +(21221,0,3,"I would like training.",5,16,0,0,0,0,'', 2603), +(21221,1,0,"I wish to unlearn my talents.",16,16,4461,0,0,0,'', 8271), +(21221,2,0,"I wish to know about Dual Talent Specialization.",1,1,10371,0,0,0,'',33762 ); +DELETE FROM `gossip_menu` WHERE `Entry`=21221 AND `text_id`=4793; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (21221, 4793); +UPDATE `npc_text` SET `BroadcastTextId0`=3275 WHERE `id`=1124; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=21221; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14, 21221, 1124, 0, 15, 8, 0, 0, 0, '', 'Show gossip text if player is a Rogue'), +(14, 21221, 4793, 0, 15, 1527, 0, 0, 0, '', 'Show gossip text if player is not a Rogue'), +(15, 21221, 0, 0, 15, 8, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 21221, 1, 0, 15, 8, 0, 0, 0, '', 'Show gossip option if player is a rogue'), +(15, 21221, 2, 0, 15, 8, 0, 0, 0, '', 'Show gossip option if player is a rogue'); diff --git a/sql/updates/world/2015_05_20_07_world.sql b/sql/updates/world/2015_05_20_07_world.sql new file mode 100644 index 00000000000..21c090c3103 --- /dev/null +++ b/sql/updates/world/2015_05_20_07_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `quest_template` SET `PrevQuestId`=9279 WHERE `id`=9369; +UPDATE `quest_template` SET `PrevQuestId`=9371 WHERE `id`=9409; +UPDATE `quest_template` SET `NextQuestId`=9409 WHERE `id` IN (9280, 9369); diff --git a/sql/updates/world/2015_05_20_08_world.sql b/sql/updates/world/2015_05_20_08_world.sql new file mode 100644 index 00000000000..42ea7da2159 --- /dev/null +++ b/sql/updates/world/2015_05_20_08_world.sql @@ -0,0 +1,18 @@ +-- +DELETE FROM `pool_template` WHERE `entry` IN (11635, 11636, 11637, 11638); +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(11635, 1, 'Defenders at Bloodmyst Isle 1'), +(11636, 1, 'Defenders at Bloodmyst Isle 2'), +(11637, 1, 'Defenders at Bloodmyst Isle 3'), +(11638, 1, 'Defenders at Bloodmyst Isle 4'); + +DELETE FROM `pool_creature` WHERE `pool_entry` IN (11635, 11636, 11637, 11638); +INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(63725, 11635, 0, 'Defenders at Bloodmyst Isle 1'), +(84397, 11635, 0, 'Defenders at Bloodmyst Isle 1'), +(63726, 11636, 0, 'Defenders at Bloodmyst Isle 2'), +(84395, 11636, 0, 'Defenders at Bloodmyst Isle 2'), +(63724, 11637, 0, 'Defenders at Bloodmyst Isle 3'), +(84396, 11637, 0, 'Defenders at Bloodmyst Isle 3'), +(63727, 11638, 0, 'Defenders at Bloodmyst Isle 4'), +(84428, 11638, 0, 'Defenders at Bloodmyst Isle 4'); diff --git a/sql/updates/world/2015_05_20_09_world.sql b/sql/updates/world/2015_05_20_09_world.sql new file mode 100644 index 00000000000..bef8f966737 --- /dev/null +++ b/sql/updates/world/2015_05_20_09_world.sql @@ -0,0 +1,29 @@ +-- +SET @ENTRY := 18636; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,25,0,100,6,0,0,0,0,11,30991,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Stealth on Reset'), +(@ENTRY,0,1,0,9,0,100,6,0,8,0,0,11,30986,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cheap Shot on Close'), +(@ENTRY,0,2,0,67,0,100,6,9000,12000,0,0,11,30992,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Backstab'), +(@ENTRY,0,3,0,0,0,100,6,2000,4500,12000,20000,11,30981,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Crippling Poison'), +(@ENTRY,0,4,0,0,0,100,6,8000,11000,22000,25000,11,36974,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wound Poison'); + +SET @ENTRY := 17695; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,25,0,100,6,0,0,0,0,11,30991,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Stealth on Reset'), +(@ENTRY,0,1,0,9,0,100,6,0,8,0,0,11,30986,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Cheap Shot on Close'), +(@ENTRY,0,2,0,67,0,100,6,9000,12000,0,0,11,30992,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Backstab'), +(@ENTRY,0,3,0,0,0,100,6,2000,4500,12000,20000,11,30981,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Crippling Poison'), +(@ENTRY,0,4,0,0,0,100,6,8000,11000,22000,25000,11,36974,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Wound Poison'); + +-- Void Traveler +SET @ENTRY := 19226; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,0,0,100,2,2000,4500,12000,20000,11,33783,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Empowering Shadows'), +(@ENTRY,0,1,0,0,0,100,4,2000,4500,12000,20000,11,39364,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Empowering Shadows'), +(@ENTRY,0,2,0,0,0,100,6,5000,9000,18000,25000,11,33846,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Shadow Nova'); diff --git a/sql/updates/world/2015_05_21_00_world.sql b/sql/updates/world/2015_05_21_00_world.sql new file mode 100644 index 00000000000..c076920bbba --- /dev/null +++ b/sql/updates/world/2015_05_21_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (37748) AND `SourceGroup`=6; diff --git a/sql/updates/world/2015_05_21_01_world.sql b/sql/updates/world/2015_05_21_01_world.sql new file mode 100644 index 00000000000..9468a3d8073 --- /dev/null +++ b/sql/updates/world/2015_05_21_01_world.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `flags`=48 WHERE `entry`=191306; diff --git a/sql/updates/world/2015_05_21_02_world.sql b/sql/updates/world/2015_05_21_02_world.sql new file mode 100644 index 00000000000..6dd265a1a3f --- /dev/null +++ b/sql/updates/world/2015_05_21_02_world.sql @@ -0,0 +1,55 @@ +-- +-- DB/Quest: The Earthbinder +-- Tola'thion SAI +SET @ENTRY := 19293; +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,19,0,100,0,10349,0,0,0,45,1,0,0,0,0,0,19,19294,50,0,0,0,0,0,"Tola'thion - On Quest 'The Earthbinder' Taken - Set Data 1 0"); + +-- Earthbinder Galandria Nightbreeze SAI +SET @ENTRY := 19294; +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,38,0,100,0,1,0,0,0,1,0,0,0,0,0,0,21,100,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Data Set 1 0 - Say Line 0"), +(@ENTRY,0,1,2,20,0,100,0,10349,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Quest 'The Earthbinder' Finished - Run Script"), +(@ENTRY,0,2,5,61,0,100,0,10349,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Quest 'The Earthbinder' Finished - Set Active On"), +(@ENTRY,0,3,0,38,0,100,0,2,0,0,0,80,@ENTRY*100+01,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Data Set 2 0 - Run Script"), +(@ENTRY,0,4,0,11,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Respawn - Set Npc Flags Gossip & Questgiver"), +(@ENTRY,0,5,0,61,0,100,0,10349,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Quest 'The Earthbinder' Finished - Set Run Off"); + +-- Actionlist SAI +SET @ENTRY := 1929400; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,3000,3000,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Script - Set Npc Flag "), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,21,50,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Script - Set Orientation Closest Player"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Script - Say Line 1"), +(@ENTRY,9,3,0,0,0,100,0,6000,6000,0,0,69,0,0,0,0,0,0,8,0,0,0,-286.7666,4729.429,18.4418,1.727876,"Earthbinder Galandria Nightbreeze - On Script - Move To Position"), +(@ENTRY,9,4,0,0,0,100,0,11000,11000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Script - Play Emote 16"), +(@ENTRY,9,5,0,0,0,100,0,3000,3000,0,0,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Script - Play Emote 0"), +(@ENTRY,9,6,0,0,0,100,0,0,0,0,0,50,184450,60,0,0,0,0,8,0,0,0,-287.0193,4731.628,18.21704,2.583081,"Earthbinder Galandria Nightbreeze - On Script - Summon Gameobject 'Crimson Crystal Shard'"), +(@ENTRY,9,7,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Earthbinder Galandria Nightbreeze - On Script - Say Line 2"), +(@ENTRY,9,8,0,0,0,100,0,0,0,0,0,12,20599,3,60000,1,0,0,8,0,0,0,-288.1897,4733.63,18.29823,5.044002,"Earthbinder Galandria Nightbreeze - On Script - Summon Creature 'Lured Colossus'"); + +-- Actionlist SAI +SET @ENTRY := 1929401; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-294.765991,4715.080078,28.186199,0.209440,"On Script - Move To Position"), +(@ENTRY,9,1,0,0,0,100,0,13000,13000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0.209440,"On Script - Set Orientation Home Position"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Npc Flags Gossip & Questgiver"); + +-- Lured Colossus SAI +SET @ENTRY := 20599; +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,6,0,100,0,0,0,0,0,45,2,0,0,0,0,0,19,19294,50,0,0,0,0,0,"Lured Colossus - On Just Died - Set Data 2 0"); + +DELETE FROM `creature_text` WHERE `entry`=19294; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(19294, 0, 0, 'Up here on the hill, $n.', 15, 0, 100, 0, 0, 0, 18293, 0, 'Earthbinder Galandria Nightbreeze'), +(19294, 1, 0, 'I have an idea. Let\'s plant this shard in the ground and see what happens', 12, 0, 100, 0, 0, 0, 18289, 0, 'Earthbinder Galandria Nightbreeze'), +(19294, 2, 0, 'The evil emanating from the crystal shard has lured one of the colossi. Put it down quick!', 12, 0, 100, 0, 0, 0, 18291, 0, 'Earthbinder Galandria Nightbreeze'); diff --git a/sql/updates/world/2015_05_21_03_world.sql b/sql/updates/world/2015_05_21_03_world.sql new file mode 100644 index 00000000000..70fb2687b8c --- /dev/null +++ b/sql/updates/world/2015_05_21_03_world.sql @@ -0,0 +1,16 @@ +-- +-- Hellscream's Champion +DELETE FROM `gossip_menu_option` WHERE `menu_id`=9212; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(9212, 0, 0, 'I am ready to leave, Durkot.', 25265, 1, 1, 0, 0, 0, 0, NULL, 25265); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9212 AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 9212, 0, 0, 0, 28, 0, 11916, 0, 0, 0, 0, 0, '', 'Gossip Option requires quest completed'); + +-- Durkot Wolfbrother SAI +SET @ENTRY := 26044; +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,62,0,100,0,9212,0,0,0,85,46621,0,0,0,0,0,7,0,0,0,0,0,0,0,"Durkot Wolfbrother - On Gossip Option 0 Selected - Invoker Cast 'Worg Taxi'"); diff --git a/sql/updates/world/2015_05_22_00_world.sql b/sql/updates/world/2015_05_22_00_world.sql new file mode 100644 index 00000000000..2949d0eca4a --- /dev/null +++ b/sql/updates/world/2015_05_22_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `spell_target_position` WHERE `id`=63171; diff --git a/sql/updates/world/2015_05_22_01_world.sql b/sql/updates/world/2015_05_22_01_world.sql new file mode 100644 index 00000000000..676fa999ebb --- /dev/null +++ b/sql/updates/world/2015_05_22_01_world.sql @@ -0,0 +1,65 @@ +-- +DELETE FROM `creature_formations` WHERE `leaderGUID`=15424; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`)VALUES +(15424,15424,0,0,2),(15424,15423,3,0,2); +UPDATE `creature` SET `position_x`=-36.31, `position_y`=-916.366, `position_z`=55.075, `orientation`= 1.062 WHERE `guid`=15424; +UPDATE `creature` SET `position_x`=-37.248, `position_y`=-914.605, `position_z`=55.343, `orientation`= 0.826 WHERE `guid`=15423; +UPDATE `creature` SET `MovementType`=2 WHERE `guid` IN (15424); +UPDATE `creature_addon` SET `path_id`=154240 WHERE `guid` IN (15424); +DELETE FROM `waypoint_data` WHERE `id` IN (154240); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(154240, 1, -36.31, -916.366, 55.075, 1.062, 180000, 0, 0, 100, 0), +(154240, 2, -28.532600, -902.440735, 55.908634, 0, 0, 0, 0, 100, 0), +(154240, 3, -26.338741, -896.902466, 56.039452, 0, 0, 0, 0, 100, 0), +(154240, 4, -51.500923, -836.734619, 56.524872, 0, 0, 0, 0, 100, 0), +(154240, 5, -17.165236, -802.633240, 58.751846, 0, 0, 0, 0, 100, 0), +(154240, 6, -20.983173, -719.063965, 69.290993, 0, 0, 0, 0, 100, 0), +(154240, 7, -149.228104, -712.801025, 64.445107, 0, 0, 0, 0, 100, 0), +(154240, 8, -226.017303, -722.711487, 60.861263, 0, 0, 0, 0, 100, 0), +(154240, 9, -325.539337, -754.267334, 54.089657, 0, 0, 0, 0, 100, 0), +(154240, 10, -377.870178, -776.472351, 54.472977, 0, 0, 0, 0, 100, 0), +(154240, 11, -403.164459, -680.892700, 54.499004, 0, 0, 0, 0, 100, 0), +(154240, 12, -331.617737, -671.147278, 54.918808, 0, 0, 0, 0, 100, 0), +(154240, 13, -341.247772, -713.172363, 57.733025, 0, 0, 0, 0, 100, 0), +(154240, 14, -340.614716, -711.776184, 57.733025, 0, 120000, 0, 0, 100, 0), +(154240, 15, -325.247681, -677.673950, 54.596302, 0, 0, 0, 0, 100, 0), +(154240, 16, -339.869904, -673.187561, 55.012871, 0, 0, 0, 0, 100, 0), +(154240, 17, -385.749298, -685.196350, 54.387272, 0, 0, 0, 0, 100, 0), +(154240, 18, -413.708405, -656.887817, 54.488979, 0, 0, 0, 0, 100, 0), +(154240, 19, -440.757660, -585.658386, 53.424225, 0, 0, 0, 0, 100, 0), +(154240, 20, -520.923462, -558.851501, 39.920975, 0, 0, 0, 0, 100, 0), +(154240, 21, -569.159912, -567.547302, 32.809437, 0, 0, 0, 0, 100, 0), +(154240, 22, -594.511536, -575.940979, 31.982075, 0, 0, 0, 0, 100, 0), +(154240, 23, -650.699402, -560.431763, 26.120964, 0, 0, 0, 0, 100, 0), +(154240, 24, -691.624939, -568.642334, 24.540937, 0, 0, 0, 0, 100, 0), +(154240, 25, -707.109802, -562.611023, 22.809536, 0, 0, 0, 0, 100, 0), +(154240, 26, -724.787048, -549.384033, 20.291832, 0, 0, 0, 0, 100, 0), +(154240, 27, -811.109985, -542.174927, 15.771987, 0, 0, 0, 0, 100, 0), +(154240, 28, -817.549683, -533.020020, 15.160646, 0, 180000, 0, 0, 100, 0), +(154240, 29, -811.109985, -542.174927, 15.771987, 0, 0, 0, 0, 100, 0), +(154240, 30, -724.787048, -549.384033, 20.291832, 0, 0, 0, 0, 100, 0), +(154240, 31, -707.109802, -562.611023, 22.809536, 0, 0, 0, 0, 100, 0), +(154240, 32, -691.624939, -568.642334, 24.540937, 0, 0, 0, 0, 100, 0), +(154240, 33, -650.699402, -560.431763, 26.120964, 0, 0, 0, 0, 100, 0), +(154240, 34, -594.511536, -575.940979, 31.982075, 0, 0, 0, 0, 100, 0), +(154240, 35, -569.159912, -567.547302, 32.809437, 0, 0, 0, 0, 100, 0), +(154240, 36, -520.923462, -558.851501, 39.920975, 0, 0, 0, 0, 100, 0), +(154240, 37, -440.757660, -585.658386, 53.424225, 0, 0, 0, 0, 100, 0), +(154240, 38, -413.708405, -656.887817, 54.488979, 0, 0, 0, 0, 100, 0), +(154240, 39, -385.749298, -685.196350, 54.387272, 0, 0, 0, 0, 100, 0), +(154240, 40, -339.869904, -673.187561, 55.012871, 0, 0, 0, 0, 100, 0), +(154240, 41, -325.247681, -677.673950, 54.596302, 0, 0, 0, 0, 100, 0), +(154240, 42, -340.614716, -711.776184, 57.733025, 0, 120000, 0, 0, 100, 0), +(154240, 43, -341.247772, -713.172363, 57.733025, 0, 0, 0, 0, 100, 0), +(154240, 44, -331.617737, -671.147278, 54.918808, 0, 0, 0, 0, 100, 0), +(154240, 45, -403.164459, -680.892700, 54.499004, 0, 0, 0, 0, 100, 0), +(154240, 46, -377.870178, -776.472351, 54.472977, 0, 0, 0, 0, 100, 0), +(154240, 47, -325.539337, -754.267334, 54.089657, 0, 0, 0, 0, 100, 0), +(154240, 48, -226.017303, -722.711487, 60.861263, 0, 0, 0, 0, 100, 0), +(154240, 49, -149.228104, -712.801025, 64.445107, 0, 0, 0, 0, 100, 0), +(154240, 50, -20.983173, -719.063965, 69.290993, 0, 0, 0, 0, 100, 0), +(154240, 51, -17.165236, -802.633240, 58.751846, 0, 0, 0, 0, 100, 0), +(154240, 52, -51.500923, -836.734619, 56.524872, 0, 0, 0, 0, 100, 0), +(154240, 53, -26.338741, -896.902466, 56.039452, 0, 0, 0, 0, 100, 0), +(154240, 54, -28.532600, -902.440735, 55.908634, 0, 0, 0, 0, 100, 0), +(154240, 55, -38.973717, -917.010193, 55.065174, 1.062, 0, 0, 0, 100, 0); diff --git a/sql/updates/world/2015_05_22_02_world.sql b/sql/updates/world/2015_05_22_02_world.sql new file mode 100644 index 00000000000..f4322c6c2ba --- /dev/null +++ b/sql/updates/world/2015_05_22_02_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_text` SET `text`='Sands consume you!', `BroadcastTextId`=6221, `sound`=5872 WHERE `entry`=7271 AND `GroupId`=1; +UPDATE `creature_text` SET `sound`=5872 WHERE `entry`=7271 AND `GroupId`=2 AND `id`=2; +UPDATE `creature_text` SET `sound`=5873 WHERE `entry`=7271 AND `GroupId`=2 AND `id`=3; +-- Fix faction for some Ethereum prisoners +UPDATE `creature_template` SET `faction`=1800 WHERE `entry`IN (20783, 20784, 20785, 20786, 20788, 20789, 20790); diff --git a/sql/updates/world/2015_05_22_03_world.sql b/sql/updates/world/2015_05_22_03_world.sql new file mode 100644 index 00000000000..31ba798f2da --- /dev/null +++ b/sql/updates/world/2015_05_22_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `MovementType`=1, `spawndist`=8, `position_x`=-93.361, `position_y`=1246.15, `position_z`=-123.506 WHERE `guid`=48268; diff --git a/sql/updates/world/2015_05_22_04_world.sql b/sql/updates/world/2015_05_22_04_world.sql new file mode 100644 index 00000000000..f99479a6042 --- /dev/null +++ b/sql/updates/world/2015_05_22_04_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature` SET `MovementType`=1, `spawndist`=10 WHERE `id`IN (10956); +UPDATE `creature_template` SET `InhabitType`=2 WHERE `entry`=10956; diff --git a/sql/updates/world/2015_05_22_05_world.sql b/sql/updates/world/2015_05_22_05_world.sql new file mode 100644 index 00000000000..076c8fe22de --- /dev/null +++ b/sql/updates/world/2015_05_22_05_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (2261); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2261) 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 +(2261, 0, 0, 0, 0, 0, 100, 0, 2000, 7000, 20000, 30000, 11, 3582, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Syndicate Watchman - IC - Cast Torch Burst'); diff --git a/sql/updates/world/2015_05_22_06_world.sql b/sql/updates/world/2015_05_22_06_world.sql new file mode 100644 index 00000000000..939ee2dbc7a --- /dev/null +++ b/sql/updates/world/2015_05_22_06_world.sql @@ -0,0 +1,35 @@ +-- +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=8276; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=20454; +UPDATE `creature` SET `position_x`=274.23, `position_y`=-2162.325, `position_z`=159.94, `orientation`= 3.227 WHERE `guid`=92880; +UPDATE `creature` SET `MovementType`=2 WHERE `guid` IN (92880, 92881); +DELETE FROM `creature_addon` WHERE `guid` IN (92881, 92880); +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (92880, 928800), (92881, 928810); + +DELETE FROM `waypoint_data` WHERE `id` IN (928810, 928800); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(928810, 1, 87.198, -2237.385, 161.785, 0, 0, 1, 0, 100, 0), +(928810, 2, -7.544, -2549.668, 181.017, 0, 0, 1, 0, 100, 0), +(928810, 3, -237.996, -2624.749, 189.896, 0, 0, 1, 0, 100, 0), +(928810, 4, -217.604, -3346.965, 189.025, 0, 0, 1, 0, 100, 0), +(928810, 5, 63.265, -3628.146, 172.660, 0, 0, 1, 0, 100, 0), +(928810, 6, 354.298, -3663.979, 170.469, 0, 0, 1, 0, 100, 0), +(928810, 7, 438.654, -3378.017, 166.627, 0, 0, 1, 0, 100, 0), +(928810, 8, 198.273, -3037.064, 169.242, 0, 0, 1, 0, 100, 0), +(928810, 9, 61.098, -2856.964, 158.961, 0, 0, 1, 0, 100, 0), +(928810, 10, -48.316, -2553.932, 190.939, 0, 0, 1, 0, 100, 0), +(928810, 11, 139.328, -2296.988, 155.313, 0, 0, 1, 0, 100, 0), +(928810, 12, 272.772, -2096.04, 160.766, 0, 0, 1, 0, 100, 0), +(928800, 1, 160.229, -2189.599, 134.889, 0, 0, 1, 0, 100, 0), +(928800, 2, 92.713, -2488.815, 171.090, 0, 0, 1, 0, 100, 0), +(928800, 3, 34.246, -2612.019, 151.869, 0, 0, 1, 0, 100, 0), +(928800, 4, 66.592, -2894.712, 151.56, 0, 0, 1, 0, 100, 0), +(928800, 5, 242.969, -3067.849, 147.831, 0, 0, 1, 0, 100, 0), +(928800, 6, 340.322, -3286.022, 160.143, 0, 0, 1, 0, 100, 0), +(928800, 7, 383.039, -3522.556, 154.207, 0, 0, 1, 0, 100, 0), +(928800, 8, 111.62, -3633.633, 166.753, 0, 0, 1, 0, 100, 0), +(928800, 9, -156.406, -3358.144, 162.886, 0, 0, 1, 0, 100, 0), +(928800, 10, -34.626, -3047.4, 160.192, 0, 0, 1, 0, 100, 0), +(928800, 11, 171.691, -2338.09, 152.636, 0, 0, 1, 0, 100, 0), +(928800, 12, 197.218, -2249.241, 147.71, 0, 0, 1, 0, 100, 0), +(928800, 13, 274.237, -2162.325, 147.09, 0, 0, 1, 0, 100, 0); diff --git a/sql/updates/world/2015_05_22_07_world.sql b/sql/updates/world/2015_05_22_07_world.sql new file mode 100644 index 00000000000..fbc99492240 --- /dev/null +++ b/sql/updates/world/2015_05_22_07_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `gossip_menu` WHERE `entry`=1483 AND `text_id`=2155; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (1483, 2155); +UPDATE `creature_template` SET `gossip_menu_id`=1483 WHERE `entry`=8767; diff --git a/sql/updates/world/2015_05_22_08_world_335.sql b/sql/updates/world/2015_05_22_08_world_335.sql new file mode 100644 index 00000000000..9cdb7edf295 --- /dev/null +++ b/sql/updates/world/2015_05_22_08_world_335.sql @@ -0,0 +1,32 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (14661) 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 +(14661, 0, 0, 0, 0, 0, 100, 0, 3000, 5000, 4000, 6000, 11, 5416, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Stinglasher - IC - cast Venom Sting'), +(14661, 0, 1, 0, 0, 0, 100, 0, 6000, 8000, 7000, 10000, 11, 6607, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Stinglasher - IC - cast Lash'); + +UPDATE `creature_template` SET `InhabitType`=4, `AIName`='SmartAI' WHERE `entry`=14661; +UPDATE `creature` SET `MovementType`=2 WHERE `guid` IN (50074); +UPDATE `creature_addon` SET `path_id`=500740 WHERE `guid` IN (50074); + +DELETE FROM `waypoint_data` WHERE (`id`=500740); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(500740, 1, -5219.040039, 90.906799, 31.608503, 0, 0, 0, 0, 100, 0), +(500740, 2, -5224.050293, 76.003220, 29.438269, 0, 0, 0, 0, 100, 0), +(500740, 3, -5239.147949, 63.874466, 25.338007, 0, 0, 0, 0, 100, 0), +(500740, 4, -5238.693848, 49.682274, 24.432926, 0, 0, 0, 0, 100, 0), +(500740, 5, -5246.642578, 32.150028, 19.696297, 0, 0, 0, 0, 100, 0), +(500740, 6, -5261.720703, 17.697470, 18.217318, 0, 0, 0, 0, 100, 0), +(500740, 7, -5275.494629, 20.200960, 19.163641, 0, 0, 0, 0, 100, 0), +(500740, 8, -5287.398438, 15.724384, 19.484865, 0, 0, 0, 0, 100, 0), +(500740, 9, -5285.921875, -4.451639, 19.543159, 0, 0, 0, 0, 100, 0), +(500740, 10, -5266.689453, -10.566733, 15.15608, 0, 0, 0, 0, 100, 0), +(500740, 11, -5260.603027, -1.987386, 14.133003, 0, 0, 0, 0, 100, 0), +(500740, 12, -5260.889160, 16.419760, 17.921291, 0, 0, 0, 0, 100, 0), +(500740, 13, -5244.723145, 31.915073, 19.788879, 0, 0, 0, 0, 100, 0), +(500740, 14, -5240.108887, 48.679680, 24.157497, 0, 0, 0, 0, 100, 0), +(500740, 15, -5240.560547, 62.042046, 25.325819, 0, 0, 0, 0, 100, 0), +(500740, 16, -5225.194336, 76.540390, 29.50018, 0, 0, 0, 0, 100, 0), +(500740, 17, -5221.191406, 84.720314, 31.15358, 0, 0, 0, 0, 100, 0), +(500740, 18, -5207.856934, 125.004700, 33.70418, 0, 0, 0, 0, 100, 0), +(500740, 19, -5189.811523, 162.779144, 49.10691, 0, 0, 0, 0, 100, 0), +(500740, 20, -5185.788086, 183.261688, 49.97140, 0, 0, 0, 0, 100, 0); diff --git a/sql/updates/world/2015_05_22_09_world.sql b/sql/updates/world/2015_05_22_09_world.sql new file mode 100644 index 00000000000..e24e207cd3c --- /dev/null +++ b/sql/updates/world/2015_05_22_09_world.sql @@ -0,0 +1,18 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (3946) AND `source_type`=0 AND `id` IN (4, 5) ; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(3946, 0, 4, 0, 1, 0, 100, 1, 4000, 4000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Velinde Starsong - Out of Combat - Say Line 3'), +(3946, 0, 5, 0, 1, 0, 100, 1, 11000, 11000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Velinde Starsong - Out of Combat - Say Line 4'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup` IN (1, 2, 3, 4, 5, 6) AND `SourceEntry`=3946; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`, `ConditionTarget`) VALUES +(22,2,3946,0,23,2161,0,0,0,'','event require AREA 2161', 1, 1), +(22,3,3946,0,23,2161,0,0,0,'','event require AREA 2161', 1, 1), +(22,4,3946,0,23,2161,0,0,0,'','event require AREA 2161', 1, 1), +(22,5,3946,0,23,2161,0,0,0,'','event require AREA 2161', 0, 1), +(22,6,3946,0,23,2161,0,0,0,'','event require AREA 2161', 0, 1); + +DELETE FROM `creature_text` WHERE `entry` IN (3946) AND `groupid` IN (3, 4); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(3946,3,0,'I have failed... I have failed in my duty... failed my people... The worgen run rampant, and the Scythe of my goddess is lost.',12,7,100,0,0,0,'Velinde Starsong', 1359), +(3946,4,0,'This evil I have unleashed... In whose hand does the power my goddess granted to me now lie... By whose hand is it directed?',12,7,100,0,0,0,'Velinde Starsong', 1360); diff --git a/sql/updates/world/2015_05_22_10_world.sql b/sql/updates/world/2015_05_22_10_world.sql new file mode 100644 index 00000000000..a87647f1cd7 --- /dev/null +++ b/sql/updates/world/2015_05_22_10_world.sql @@ -0,0 +1,26 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (3984) AND `source_type`=0 AND `id` IN (1, 2, 3) ; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (398400) 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 +(3984, 0, 1, 0, 1, 0, 100, 0, 20000, 20000, 180000, 180000, 80, 398400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - ooc - Action list'), +(398400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - Action list - talk 1'), +(398400, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 3985, 15, 0, 0, 0, 0,0,'Nancy Vishas - Action list - talk 1'), +(398400, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - Action list - talk 2'), +(398400, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 3985, 15, 0, 0, 0, 0,0,'Nancy Vishas - Action list - talk 2'), +(398400, 9, 4, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - Action list - talk 3'), +(398400, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 53, 0, 3984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - Action list - start wp'), +(3984, 0, 2, 0, 40, 0, 100, 0, 1, 3984, 0, 0, 54, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - on WP1 - pause wp'), +(3984, 0, 3, 0, 40, 0, 100, 0, 2, 3984, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Nancy Vishas - on wp2- set home orientation'); + +DELETE FROM `waypoints` WHERE `entry`=3984; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(3984, 1, 908.933, -90.985, 33.783, 'Nancy Vishas'), +(3984, 2, 888.142, -121.849, 38.388, 'Nancy Vishas'); + +DELETE FROM `creature_text` WHERE `entry` IN (3984, 3985); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(3984,0,0,'Sidney is late. I thought he would be home by now.',12,7,100,0,0,0,'Nancy Vishas', 1365), +(3985,0,0,'He''s your husband, woman. How am I to know where he is?',12,7,100,0,0,0,'Grandpa Vishas', 1366), +(3984,1,0,'He must be overwhelmed with work at the Monastery. But still, he should have returned by now.',12,7,100,0,0,0,'Nancy Vishas', 1367), +(3985,1,0,'Cleansing the world of impure scum isn''t an easy job, Nancy. Someone''s got to do it.',12,7,100,0,0,0,'Grandpa Vishas', 1368), +(3984,2,0,'Well, I''m going outside to check. Something is amiss.',12,7,100,0,0,0,'Nancy Vishas', 1369); diff --git a/sql/updates/world/2015_05_22_11_world.sql b/sql/updates/world/2015_05_22_11_world.sql new file mode 100644 index 00000000000..01122a6bc57 --- /dev/null +++ b/sql/updates/world/2015_05_22_11_world.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `gossip_menu` WHERE `entry`=6024 AND `text_id`=6935; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6024, 6935); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14) AND `SourceGroup`=6024; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(14, 6024, 7176, 0, 8, 7783, 0, 0, 0, '', 'Show gossip text if player get the quest The Lord of Blackrockreward', 0), +(14, 6024, 6935, 0, 8, 7783, 0, 0, 0, '', 'Show gossip text if te quest The Lord of Blackrock is not rewarded', 1); diff --git a/sql/updates/world/2015_05_22_12_world.sql b/sql/updates/world/2015_05_22_12_world.sql new file mode 100644 index 00000000000..84b5918e7f4 --- /dev/null +++ b/sql/updates/world/2015_05_22_12_world.sql @@ -0,0 +1,10 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=16522 AND `id`=12; +UPDATE `smart_scripts` SET `action_param1`=1 WHERE `entryorguid`=16522 AND `id`=0; +UPDATE `smart_scripts` SET `event_phase_mask`=1 WHERE entryorguid=16522 AND `id`=5; +UPDATE `smart_scripts` SET `event_phase_mask`=0, `event_flags`=0 WHERE `entryorguid`=16522 AND `id`=6; +UPDATE `smart_scripts` SET `event_phase_mask`=0 WHERE `entryorguid`=16522 AND `id`=7; +UPDATE `smart_scripts` SET `event_phase_mask`=2 WHERE `entryorguid`=16522 AND `id`=11; +UPDATE `smart_scripts` SET `event_phase_mask`=1, `action_param1`=1 WHERE entryorguid=16522 AND `id`=9; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=16522 AND `id`=2; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `Entry`=17947; diff --git a/sql/updates/world/2015_05_22_13_world.sql b/sql/updates/world/2015_05_22_13_world.sql new file mode 100644 index 00000000000..db90e99cf4d --- /dev/null +++ b/sql/updates/world/2015_05_22_13_world.sql @@ -0,0 +1,51 @@ +-- +UPDATE `creature` SET `position_x`=-4435.777, `position_y`=-13684.191, `position_z`=44.03, `orientation`= 5.189 WHERE `guid`=57310; +UPDATE `creature` SET `MovementType`=2, `spawndist`=0 WHERE `guid` IN (57310, 57313); +DELETE FROM `creature_addon` WHERE `guid` IN (57310, 57313); +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (57310, 573100), (57313, 573130); +DELETE FROM `waypoint_data` WHERE `id` IN (573100, 573130); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(573100, 1, -4443.440918, -13695.226563, 46.834724, 0, 0, 0, 0, 100, 0), +(573100, 2, -4451.548828, -13708.859375, 48.496380, 0, 0, 0, 0, 100, 0), +(573100, 3, -4431.984863, -13722.603516, 51.757404, 0, 0, 0, 0, 100, 0), +(573100, 4, -4385.404297, -13720.467773, 50.135044, 0, 0, 0, 0, 100, 0), +(573100, 5, -4380.465820, -13740.443359, 50.451973, 0, 0, 0, 0, 100, 0), +(573100, 6, -4392.348633, -13770.427734, 52.292049, 0, 0, 0, 0, 100, 0), +(573100, 7, -4391.951660, -13786.277344, 52.664742, 0, 0, 0, 0, 100, 0), +(573100, 8, -4396.321777, -13804.233398, 55.976879, 0, 0, 0, 0, 100, 0), +(573100, 9, -4404.731934, -13815.549805, 60.186996, 0, 0, 0, 0, 100, 0), +(573100, 10, -4409.673828, -13847.877930, 71.870178, 0, 0, 0, 0, 100, 0), +(573100, 11, -4419.165527, -13854.147461, 78.347191, 0, 0, 0, 0, 100, 0), +(573100, 12, -4432.236816, -13856.821289, 85.815552, 0, 0, 0, 0, 100, 0), +(573100, 13, -4453.323730, -13875.177734, 101.67051, 0, 0, 0, 0, 100, 0), +(573100, 14, -4432.236816, -13856.821289, 85.815552, 0, 0, 0, 0, 100, 0), +(573100, 15, -4419.165527, -13854.147461, 78.347191, 0, 0, 0, 0, 100, 0), +(573100, 16, -4409.673828, -13847.877930, 71.870178, 0, 0, 0, 0, 100, 0), +(573100, 17, -4404.731934, -13815.549805, 60.186996, 0, 0, 0, 0, 100, 0), +(573100, 18, -4396.321777, -13804.233398, 55.976879, 0, 0, 0, 0, 100, 0), +(573100, 19, -4391.951660, -13786.277344, 52.664742, 0, 0, 0, 0, 100, 0), +(573100, 20, -4392.348633, -13770.427734, 52.292049, 0, 0, 0, 0, 100, 0), +(573100, 21, -4380.465820, -13740.443359, 50.451973, 0, 0, 0, 0, 100, 0), +(573100, 22, -4385.404297, -13720.467773, 50.135044, 0, 0, 0, 0, 100, 0), +(573100, 23, -4431.984863, -13722.603516, 51.757404, 0, 0, 0, 0, 100, 0), +(573100, 24, -4451.548828, -13708.859375, 48.496380, 0, 0, 0, 0, 100, 0), +(573100, 25, -4443.440918, -13695.226563, 46.834724, 0, 0, 0, 0, 100, 0), +(573130, 1, -4393.079102, -13790.173828, 52.869942, 0, 0, 0, 0, 100, 0), +(573130, 2, -4392.134766, -13761.565430, 51.793087, 0, 0, 0, 0, 100, 0), +(573130, 3, -4412.633301, -13752.276367, 53.840073, 0, 0, 0, 0, 100, 0), +(573130, 4, -4429.812012, -13722.834961, 51.848553, 0, 0, 0, 0, 100, 0), +(573130, 5, -4389.571777, -13722.364258, 50.288551, 0, 0, 0, 0, 100, 0), +(573130, 6, -4380.811523, -13731.546875, 50.451256, 0, 0, 0, 0, 100, 0), +(573130, 7, -4385.900391, -13759.079102, 50.621365, 0, 0, 0, 0, 100, 0), +(573130, 8, -4391.487305, -13762.515625, 51.752522, 0, 0, 0, 0, 100, 0), +(573130, 9, -4403.406250, -13758.519531, 53.117504, 0, 0, 0, 0, 100, 0), +(573130, 10, -4432.480469, -13756.059570, 56.591385, 0, 0, 0, 0, 100, 0), +(573130, 11, -4403.406250, -13758.519531, 53.117504, 0, 0, 0, 0, 100, 0), +(573130, 12, -4391.487305, -13762.515625, 51.752522, 0, 0, 0, 0, 100, 0), +(573130, 13, -4385.900391, -13759.079102, 50.621365, 0, 0, 0, 0, 100, 0), +(573130, 14, -4380.811523, -13731.546875, 50.451256, 0, 0, 0, 0, 100, 0), +(573130, 15, -4389.571777, -13722.364258, 50.288551, 0, 0, 0, 0, 100, 0), +(573130, 16, -4429.812012, -13722.834961, 51.848553, 0, 0, 0, 0, 100, 0), +(573130, 17, -4412.633301, -13752.276367, 53.840073, 0, 0, 0, 0, 100, 0), +(573130, 18, -4392.134766, -13761.565430, 51.793087, 0, 0, 0, 0, 100, 0), +(573130, 19, -4393.079102, -13790.173828, 52.869942, 0, 0, 0, 0, 100, 0); diff --git a/sql/updates/world/2015_05_22_14_world.sql b/sql/updates/world/2015_05_22_14_world.sql new file mode 100644 index 00000000000..43bbacd2d1a --- /dev/null +++ b/sql/updates/world/2015_05_22_14_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceEntry`=6994; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`Scriptname`,`Comment`) VALUES +(1,641,6994,0,0,2,0,51315,1,1,1,0 ,'' , 'whitestone oak lumber drop only if the player doesn''t have it already'); diff --git a/sql/updates/world/2015_05_22_15_world.sql b/sql/updates/world/2015_05_22_15_world.sql new file mode 100644 index 00000000000..c2a90abf892 --- /dev/null +++ b/sql/updates/world/2015_05_22_15_world.sql @@ -0,0 +1,239 @@ +-- Quest 11343 "The Echo of Ymiron" + +SET @OGUID := 5603; -- One required +SET @CGUID := 48229; -- 16 required +SET @NPC := @CGUID+5; +SET @PATH := @NPC * 10; + +-- Object Spawn from sniff +DELETE FROM `gameobject` WHERE `id`=186664; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID,186664,571,1,2,1073.001,-5033.952,9.771218,1.518436,0,0,0.6883545,0.7253745,300,0,1); -- Baby in Crib + +-- Creature Spawns from sniff +DELETE FROM `creature` WHERE `id` IN (24314,24315,24248,24327,23935); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(@CGUID+0,24314,571,1,2,0,0,1073.562,-5029.705,9.805857,4.660029,300,0,0,5158,0,0,0,0,0), -- Ancient Male Vrykul +(@CGUID+1,24315,571,1,2,0,0,1074.889,-5033.892,9.711858,3.036873,300,0,0,5158,0,0,0,0,0), -- Ancient Female Vrykul +(@CGUID+2,24248,571,1,2,0,0,1054.514,-4918.391,10.14754,3.263766,300,0,0,1,0,0,0,0,0), -- The Lich King +(@CGUID+3,24327,571,1,2,0,0,1055.667,-4924.913,16.54569,3.281219,300,0,0,1,0,0,0,0,0), -- Val'kyr Soulclaimer +(@CGUID+4,24327,571,1,2,0,0,1054.277,-4909.997,16.50003,3.263766,300,0,0,1,0,0,0,0,0), -- Val'kyr Soulclaimer +(@CGUID+5,23935,571,1,2,0,0,927.0462,-4925.752,4.78267,0.1288379,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+6,23935,571,1,2,0,0,1036.007,-4926.114,12.45767,5.548763,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+7,23935,571,1,2,0,0,1026.868,-4944.088,12.0571,0.7522717,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+8,23935,571,1,2,0,0,1028.676,-5012.598,13.78496,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+9,23935,571,1,2,0,0,910.7372,-4961.667,33.09615,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+10,23935,571,1,2,0,0,934.7177,-4890.745,34.57682,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+11,23935,571,1,2,0,0,970.6052,-4993.673,29.27757,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+12,23935,571,1,2,0,0,1006.246,-4868.183,47.70948,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+13,23935,571,1,2,0,0,1046.627,-4824.385,47.09693,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+14,23935,571,1,2,0,0,1068.264,-4965.238,47.55685,0.2954222,300,0,0,1,0,2,0,0,0), -- Val'kyr Watcher +(@CGUID+15,23935,571,1,2,0,0,1037.688,-4934.398,31.88609,0.2954222,300,0,0,1,0,2,0,0,0); -- Val'kyr Watcher + +DELETE FROM `creature_template_addon` WHERE `entry` IN (24315,24248,24327); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(24315,0,0,1,0,0, ''), +(24248,0,0,0,1,0, '41408'), +(24327,0,0,33554432,0 ,0, ''); + +UPDATE `creature_template` SET `AIName`='SmartAI', `unit_flags`=768 WHERE `entry` IN (24314, 24315, 24327); +UPDATE `creature_template` SET `unit_flags`=164352, `AIName`='SmartAI' WHERE `entry`=24248; -- 131072 +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (24327, 23935); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (24314,24315, 24327, 24248); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (2431400,2431500,2431501, 2424800, 2424801); +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 +(24314,0,0,0,10,0,100,0,0,15,50000,50000,80,2431400,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Male Vrykul - OOC_LOS - Start Script'), +(2431400,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Anchient Male Speach 1'), +(2431400,9,1,0,0,0,100,0,2000,2000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Anchient Male Speach 2'), +(2431400,9,2,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,10,@CGUID+1,24315,0,0,0,0,0, 'Anchient Female Speach 1'), +(2431400,9,3,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Anchient Male Speach 2'), +(2431400,9,4,0,0,0,100,0,3000,3000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Anchient Male emote ONESHOT_POINT'), +(2431400,9,5,0,0,0,100,0,6000,6000,0,0,45,0,1,0,0,0,0,10,@CGUID+1,24315,0,0,0,0,0, 'Anchient Female start path'), +(2431400,9,6,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,10,@CGUID+1,24315,0,0,0,0,0, 'Anchient Female Speach 2'), -- check timing +(2431400,9,7,0,0,0,100,0,4000,4000,0,0,5,18,0,0,0,0,0,10,@CGUID+1,24315,0,0,0,0,0, 'Anchient Female emote ONESHOT_CRY'), +(2431400,9,8,0,0,0,100,0,4000,4000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Anchient Male Speach 3'), +(2431400,9,9,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,10,@CGUID+1,24315,0,0,0,0,0, 'Anchient Female Speach 2'), +(2431400,9,10,0,0,0,100,0,3000,3000,0,0,11,43458,2,0,0,0,0,7,0,0,0,0,0,0,0, 'Quest Credit'), +(2431400,9,11,0,0,0,100,0,3000,3000,0,0,45,0,2,0,0,0,0,10,@CGUID+1,24315,0,0,0,0,0, 'Anchient Female resume path'), +(24315,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - Set Passive'), +(24315,0,1,0,38,0,100,0,0,1,0,0,80,2431500,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - On data set 0 1 run script'), +(24315,0,2,0,38,0,100,0,0,2,0,0,80,2431501,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - On data set 0 2 run script'), +(24315,0,3,4,40,0,100,0,1,24315,0,0,54,40000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - Pause at wp talk'), +(24315,0,4,5,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,9,24315,0,15,0,0,0,0, 'Ancient Female Vrykul - turn to Ancient Male Vrykul'), +(24315,0,5,0,61,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - kneel'), +(24315,0,6,7,40,0,100,0,2,24315,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - Stop at wp home'), +(24315,0,7,8,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - turn to pos'), +(24315,0,8,0,61,0,100,0,0,0,0,0,90,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - kneel'), +(2431500,9,0,0,0,0,100,0,0,0,0,0,91,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - stand'), +(2431500,9,1,0,0,0,100,0,0,0,0,0,53,0,24315,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - wp start'), +(2431501,9,0,0,0,0,100,0,0,0,0,0,65,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - wp resume'), +(2431501,9,1,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Female Vrykul - stand'), +(24327,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Ancient Male Vrykul - Set Passive'), + +(24248,0,0,0,10,0,100,0,0,15,3000,3000,80,2424800,2,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - OOC_LOS - Start Script'), +(2424800,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk0'), +(2424800,9,1,0,0,0,100,0,0,0,0,0,11,29661,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - Cast Magnetic Pull'), +(2424800,9,2,0,0,0,100,0,1000,1000,0,0,11,43489,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - Cast Grasp of the Lich King'), +(2424800,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk1'), +(2424800,9,4,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk2'), +(2424800,9,5,0,0,0,100,0,15000,15000,0,0,1,0,0,0,0,0,0,19,24327,10,0,0,0,0,0, 'The Lich King - Action list - Talk0'), +(2424800,9,6,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk3'), +(2424800,9,7,0,0,0,100,0,7000,7000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk4'), +(2424800,9,8,0,0,0,100,0,19000,19000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk5'), +(2424800,9,9,0,0,0,100,0,20000,20000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk6'), +(2424800,9,10,0,0,0,100,0,17000,17000,0,0,11,43488,64,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - Cast'), +(2424800,9,11,0,0,0,100,0,500,500,0,0,51,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - kill'), + +(24248,0,1,0,10,0,100,0,0,15,3000,3000,80,2424801,2,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - OOC_LOS - Start Script'), +(2424801,9,0,0,0,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'The Lich King - Action list - Talk7'), +(2424801,9,1,0,0,0,100,0,0,0,0,0,11,29661,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - Cast Magnetic Pull'), +(2424801,9,2,0,0,0,100,0,1000,1000,0,0,11,43489,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - Cast Grasp of the Lich King'), +(2424801,9,3,0,0,0,100,0,8000,8000,0,0,11,50156,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - Cast'), +(2424801,9,4,0,0,0,100,0,500,500,0,0,51,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'The Lich King - Action list - kill'); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup` IN (1,2) AND `SourceEntry` IN (24248, 24314); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`, `NegativeCondition`) VALUES +(22,1,24248,0,8,12485,0,0,0,'','event require quest 12485 not rewarded', 1), +(22,2,24248,0,8,12485,0,0,0,'','event require quest 12485 rewarded', 0), +(22,1,24314,0,9,11343,0,0,0,'','event require quest 11344 Taken', 0); + +DELETE FROM `disables` WHERE `sourceType` = 1 AND `entry` = 12485; + +-- NPC Text from sniff +DELETE FROM `creature_text` WHERE `entry` IN (24314,24315, 24248, 24327); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(24314,0,0, 'So then we too are cursed?',12,0,100,1,0,0, 'Ancient Male Vrykul',23116), +(24314,1,0, '%s points to the infant.',16,0,100,0,0,0, 'Ancient Male Vrykul',23117), +(24315,0,0, '%s sobs.',16,0,100,0,0,0, 'Ancient Female Vrykul',23118), +(24314,2,0, 'The gods have forsaken us! We must dispose of it before Ymiron is notified!',12,0,100,53,0,0, 'Ancient Male Vrykul',23119), +(24315,1,0, 'NO! You cannot! I beg of you! It is our child!',12,0,100,0,0,0, 'Ancient Female Vrykul',23120), +(24314,3,0, 'Then what are we to do, wife? The others cannot find out. Should they learn of this aberration, we will all be executed.',12,0,100,1,0,0, 'Ancient Male Vrykul',23121), +(24315,2,0, 'I... I will hide it. I will hide it until I find it a home, far away from here...',12,0,100,0,0,0, 'Ancient Female Vrykul',23122), +(24248,0,0, '%s turns to face you.',16,0,100,0,0,0, 'The Lich King',23102), +(24248,1,0, '%s grins. ',16,0,100,11,0,14820, 'The Lich King',23146), +(24248,2,0, 'Shamanism has brought you here... Its scent permeates the air. *The Lich King laughs* I was once a shaman.',12,0,100,0,0,14742, 'The Lich King',23147), +(24327,0,0, 'Shall we prepare it for you, my lord?',12,0,100,0,0,0, 'Val''kyr Soulclaimer',23152), +(24248,3,0, 'No, minion. This one is not ready.',12,0,100,274,0,14743, 'The Lich King',23148), +(24248,4,0, 'Do you feel it, mortal? Death seeps through me, enveloping all that I touch. With just a snap of my finger your soul will languish in damnation for all eternity.',12,0,100,1,0,14744, 'The Lich King',23149), +(24248,5,0, 'But... It is not yet your time to serve the Lich King. Yes, a greater destiny awaits you. Power... You must become more powerful before you are to serve me.',12,0,100,1,0,14745, 'The Lich King',23150), +(24248,6,0, 'Now watch, val''kyr. Observe as I apply pressure. Can you see that it is not yet ripe? Watch as it pops and falls lifeless to the floor.',12,0,100,1,0,14746, 'The Lich King',23151), +(24248,7,0, 'Persistence or stupidity? It matters not. Let this be a lesson learned, mortal!',12,0,100,1,0,14747, 'The Lich King',27351); + +-- Waypoints for Ancient Female Vrykul from sniff +DELETE FROM `waypoints` WHERE `entry`=24315; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(24315,1,1074.016,-5031.822,9.726947,'talk point'), +(24315,2,1074.889,-5033.892,9.711858,'home point'); + +-- Pathing for Val'kyr Watcher Entry: 23935 +DELETE FROM `creature_addon` WHERE `guid` IN (@NPC,@NPC+1,@NPC+2,@NPC+3,@NPC+4,@NPC+5,@NPC+6,@NPC+7,@NPC+8,@NPC+9,@NPC+10); +INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES +(@NPC,@PATH), +(@NPC+1,@PATH+10), +(@NPC+2,@PATH+20), +(@NPC+3,@PATH+30), +(@NPC+4,@PATH+40), +(@NPC+5,@PATH+50), +(@NPC+6,@PATH+60), +(@NPC+7,@PATH+70), +(@NPC+8,@PATH+80), +(@NPC+9,@PATH+90), +(@NPC+10,@PATH+100); + +DELETE FROM `waypoint_data` WHERE `id` IN (@PATH,@PATH+10,@PATH+20,@PATH+30,@PATH+40,@PATH+50,@PATH+60,@PATH+70,@PATH+80,@PATH+90,@PATH+100); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,946.877,-4950.67,8.72458,0,0,0,100,0), +(@PATH,2,927.046,-4925.75,8.09321,0,0,0,100,0), +(@PATH,3,929.734,-4899.67,9.95518,0,0,0,100,0), +(@PATH,4,939.552,-4878.05,10.4938,0,0,0,100,0), +(@PATH,5,929.734,-4899.67,9.95518,0,0,0,100,0), +(@PATH,6,927.046,-4925.75,8.09321,0,0,0,100,0), +(@PATH+10,1,1036.835,-4931.16,12.83267,0,0,0,100,0), +(@PATH+10,2,1036.007,-4926.114,12.45767,0,0,0,100,0), +(@PATH+10,3,1023.932,-4912.754,10.5369,0,0,0,100,0), +(@PATH+10,4,1000.253,-4901.448,7.911896,0,0,0,100,0), +(@PATH+10,5,1023.932,-4912.754,10.5369,0,0,0,100,0), +(@PATH+10,6,1036.007,-4926.114,12.45767,0,0,0,100,0), +(@PATH+20,1,1026.697,-4942.586,11.8071,0,0,0,100,0), +(@PATH+20,2,1030.085,-4970.878,12.77823,0,0,0,100,0), +(@PATH+20,3,1034.023,-4972.842,13.0493,0,0,0,100,0), +(@PATH+20,4,1030.085,-4970.878,12.77823,0,0,0,100,0), +(@PATH+20,5,1026.868,-4944.088,12.0571,0,0,0,100,0), +(@PATH+30,1,1045.199,-5071.371,13.72586,0,0,0,100,0), +(@PATH+30,2,1069.113,-5069.303,13.34213,0,0,0,100,0), +(@PATH+30,3,1091.871,-5063.042,13.38427,0,0,0,100,0), +(@PATH+30,4,1103.122,-5055.239,13.92861,0,0,0,100,0), +(@PATH+30,5,1099.777,-5030.915,13.25463,0,0,0,100,0), +(@PATH+30,6,1088.535,-5001.179,13.00463,0,0,0,100,0), +(@PATH+30,7,1062.886,-4976.348,13.6743,0,0,0,100,0), +(@PATH+30,8,1044.221,-4979.022,13.7993,0,0,0,100,0), +(@PATH+30,9,1030.879,-4997.25,13.52823,0,0,0,100,0), +(@PATH+30,10,1028.676,-5012.598,13.78496,0,0,0,100,0), +(@PATH+30,11,1034.265,-5039.136,13.73875,0,0,0,100,0), +(@PATH+40,1,919.0841,-4946.079,33.09615,0,0,0,100,0), +(@PATH+40,2,937.5836,-4953.232,30.76281,0,0,0,100,0), +(@PATH+40,3,936.755,-4970.46,30.76281,0,0,0,100,0), +(@PATH+40,4,929.6907,-4992.461,30.76281,0,0,0,100,0), +(@PATH+40,5,919.143,-5002.606,30.76281,0,0,0,100,0), +(@PATH+40,6,899.7684,-4997.275,30.76281,0,0,0,100,0), +(@PATH+40,7,894.8842,-4973.352,31.20726,0,0,0,100,0), +(@PATH+40,8,910.7372,-4961.667,33.09615,0,0,0,100,0), +(@PATH+50,1,955.5239,-4883.864,28.91015,0,0,0,100,0), +(@PATH+50,2,975.0622,-4876.539,34.57682,0,0,0,100,0), +(@PATH+50,3,998.4828,-4882.556,34.57682,0,0,0,100,0), +(@PATH+50,4,1007.136,-4897.439,34.57682,0,0,0,100,0), +(@PATH+50,5,999.5431,-4915.003,34.57682,0,0,0,100,0), +(@PATH+50,6,977.8502,-4931.425,34.57682,0,0,0,100,0), +(@PATH+50,7,955.9329,-4951.924,34.57682,0,0,0,100,0), +(@PATH+50,8,932.5357,-4941.676,34.57682,0,0,0,100,0), +(@PATH+50,9,928.3145,-4926.969,35.49352,0,0,0,100,0), +(@PATH+50,10,934.7177,-4890.745,34.57682,0,0,0,100,0), +(@PATH+60,1,985.4891,-4985.466,29.27757,0,0,0,100,0), +(@PATH+60,2,1003.236,-5007.198,29.27757,0,0,0,100,0), +(@PATH+60,3,1001.194,-5018.937,29.27757,0,0,0,100,0), +(@PATH+60,4,983.9544,-5038.578,29.27757,0,0,0,100,0), +(@PATH+60,5,965.2218,-5035.844,29.27757,0,0,0,100,0), +(@PATH+60,6,955.2875,-5023.462,29.27757,0,0,0,100,0), +(@PATH+60,7,964.6006,-5006.362,29.27757,0,0,0,100,0), +(@PATH+60,8,970.6052,-4993.673,29.27757,0,0,0,100,0), +(@PATH+70,1,997.6531,-4837.691,50.98726,0,0,0,100,0), +(@PATH+70,2,978.2066,-4826.199,50.98726,0,0,0,100,0), +(@PATH+70,3,954.6121,-4846.288,50.98726,0,0,0,100,0), +(@PATH+70,4,915.1261,-4847.07,50.98726,0,0,0,100,0), +(@PATH+70,5,906.7595,-4877.092,50.98726,0,0,0,100,0), +(@PATH+70,6,911.5735,-4919.276,50.98726,0,0,0,100,0), +(@PATH+70,7,942.1261,-4946.08,42.51503,0,0,0,100,0), +(@PATH+70,8,978.0408,-4936.854,40.5428,0,0,0,100,0), +(@PATH+70,9,1002.55,-4900.139,38.45948,0,0,0,100,0), +(@PATH+70,10,1006.246,-4868.183,47.70948,0,0,0,100,0), +(@PATH+80,1,1022.976,-4810.128,38.31916,0,0,0,100,0), +(@PATH+80,2,996.8618,-4813.854,38.31916,0,0,0,100,0), +(@PATH+80,3,964.6756,-4838.639,38.31916,0,0,0,100,0), +(@PATH+80,4,940.3589,-4846.21,38.31916,0,0,0,100,0), +(@PATH+80,5,907.9418,-4846.479,34.20804,0,0,0,100,0), +(@PATH+80,6,887.7231,-4873.045,34.59694,0,0,0,100,0), +(@PATH+80,7,891.8184,-4898.238,30.04136,0,0,0,100,0), +(@PATH+80,8,912.4337,-4902.996,30.04136,0,0,0,100,0), +(@PATH+80,9,939.5068,-4887.826,30.04136,0,0,0,100,0), +(@PATH+80,10,961.7159,-4869.482,30.04136,0,0,0,100,0), +(@PATH+80,11,1005.307,-4881.67,30.04136,0,0,0,100,0), +(@PATH+80,12,1029.752,-4892.972,31.93025,0,0,0,100,0), +(@PATH+80,13,1067.775,-4894.65,39.06914,0,0,0,100,0), +(@PATH+80,14,1059.698,-4864.968,47.09693,0,0,0,100,0), +(@PATH+80,15,1060.522,-4845.491,47.09693,0,0,0,100,0), +(@PATH+80,16,1046.627,-4824.385,47.09693,0,0,0,100,0), +(@PATH+90,1,1044.91,-4980.383,47.55685,0,0,0,100,0), +(@PATH+90,2,1040.873,-5016.178,52.69574,0,0,0,100,0), +(@PATH+90,3,1054.767,-5042.476,52.69574,0,0,0,100,0), +(@PATH+90,4,1084.064,-5042.998,39.22352,0,0,0,100,0), +(@PATH+90,5,1106.236,-5031.327,39.22352,0,0,0,100,0), +(@PATH+90,6,1106.77,-4995.738,45.02908,0,0,0,100,0), +(@PATH+90,7,1086.711,-4972.376,47.55685,0,0,0,100,0), +(@PATH+90,8,1068.264,-4965.238,47.55685,0,0,0,100,0), +(@PATH+100,1,1066.911,-4940.557,48.88609,0,0,0,100,0), +(@PATH+100,2,1069.896,-4920.431,40.85831,0,0,0,100,0), +(@PATH+100,3,1057.342,-4903.877,40.85831,0,0,0,100,0), +(@PATH+100,4,1044.138,-4900.038,31.74721,0,0,0,100,0), +(@PATH+100,5,1023.748,-4899.741,28.21942,0,0,0,100,0), +(@PATH+100,6,1017.973,-4921.141,28.21942,0,0,0,100,0), +(@PATH+100,7,1037.688,-4934.398,31.88609,0,0,0,100,0); diff --git a/sql/updates/world/2015_05_23_00_world.sql b/sql/updates/world/2015_05_23_00_world.sql new file mode 100644 index 00000000000..914b721b2ed --- /dev/null +++ b/sql/updates/world/2015_05_23_00_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `creature_template` SET `npcflag`=3, `gossip_menu_id`=4047 WHERE `entry`=658; +DELETE FROM `gossip_menu` WHERE `entry`=4047; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (4047, 4937); diff --git a/sql/updates/world/2015_05_23_01_world.sql b/sql/updates/world/2015_05_23_01_world.sql new file mode 100644 index 00000000000..44c17b81f48 --- /dev/null +++ b/sql/updates/world/2015_05_23_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `gossip_menu_id`=21212 WHERE `entry`=13000; diff --git a/sql/updates/world/2015_05_23_02_world.sql b/sql/updates/world/2015_05_23_02_world.sql new file mode 100644 index 00000000000..b00fa1c2d86 --- /dev/null +++ b/sql/updates/world/2015_05_23_02_world.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `npcflag`=3, `gossip_menu_id`=694 WHERE `entry`=1343; +DELETE FROM `gossip_menu` WHERE `entry`=694; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (694, 1244); +DELETE FROM `npc_text` WHERE `ID`=1244; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `prob0`, `em0_0`, `em0_1`) VALUES +(1244, 'Well, if it isn''t a young, bristling $c, no doubt drawn here by talk of my exploits in fields of battle!$B$BNo time for stories now, for there are great, important deeds that need doing! So if you''re looking for glory, then luck shines on you today...', 'Well, if it isn''t a young, bristling $c, no doubt drawn here by talk of my exploits in fields of battle!$B$BNo time for stories now, for there are great, important deeds that need doing! So if you''re looking for glory, then luck shines on you today...', 0, 0, 1, 0, 0); diff --git a/sql/updates/world/2015_05_23_03_world.sql b/sql/updates/world/2015_05_23_03_world.sql new file mode 100644 index 00000000000..ace8253bbde --- /dev/null +++ b/sql/updates/world/2015_05_23_03_world.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `npcflag`=3, `gossip_menu_id`=6159 WHERE `entry`=240; +DELETE FROM `gossip_menu` WHERE `entry`=6159; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6159, 6157); +DELETE FROM `npc_text` WHERE `ID`=6157; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `prob0`, `em0_0`, `em0_1`) VALUES +(6157, 'Ach, it''s hard enough keeping order around here without all these new troubles popping up! I hope you have good news, $n...', 'Ach, it''s hard enough keeping order around here without all these new troubles popping up! I hope you have good news, $n...', 42172, 0, 1, 5, 5); diff --git a/sql/updates/world/2015_05_24_00_world.sql b/sql/updates/world/2015_05_24_00_world.sql new file mode 100644 index 00000000000..946c20339cb --- /dev/null +++ b/sql/updates/world/2015_05_24_00_world.sql @@ -0,0 +1,170 @@ +-- Gnomeregan Scripts +-- Irradiated Pillager SAI +SET @ENTRY := 6329; +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,25,0,100,0,0,0,0,0,75,9798,0,0,0,0,0,1,0,0,0,0,0,0,0,"Irradiated Pillager - On Reset - Add Aura 'Radiation'"), +(@ENTRY,0,1,0,0,0,100,0,3000,5000,10000,11000,11,9771,64,0,0,0,0,17,0,50,0,0,0,0,0,"Irradiated Pillager - In Combat CMC - Cast 'Radiation Bolt'"), +(@ENTRY,0,2,0,2,0,100,1,0,40,0,0,11,8269,2,0,0,0,0,1,0,0,0,0,0,0,0,"Irradiated Pillager - Between 0-40% Health - Cast 'Frenzy' (No Repeat)"); + +-- Caverndeep Ambusher SAI +SET @ENTRY := 6207; +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,0,0,100,0,3700,3700,3600,12400,11,2590,0,0,0,0,0,2,0,0,0,0,0,0,0,"Caverndeep Ambusher - In Combat - Cast 'Backstab'"); + +-- Caverndeep Burrower SAI +SET @ENTRY := 6206; +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,0,0,100,0,3000,5000,9000,13000,11,1604,0,0,0,0,0,2,0,0,0,0,0,0,0,"Caverndeep Burrower - In Combat - Cast 'Dazed'"), +(@ENTRY,0,1,0,0,0,100,0,2000,4000,4000,6000,11,9770,64,0,0,0,0,2,0,0,0,0,0,0,0,"Caverndeep Burrower - In Combat CMC - Cast 'Radiation'"), +(@ENTRY,0,2,0,0,0,100,0,6000,7000,4000,8000,11,16145,0,0,0,0,0,2,0,0,0,0,0,0,0,"Caverndeep Burrower - In Combat - Cast 'Sunder Armor'"), +(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Caverndeep Burrower - Between 0-15% Health - Flee For Assist (No Repeat)"); + +-- Irradiated Slime SAI +SET @ENTRY := 6218; +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,0,0,100,1,1000,2000,0,0,75,10341,0,0,0,0,0,1,0,0,0,0,0,0,0,"Irradiated Slime - In Combat - Add Aura 'Radiation Cloud'"), +(@ENTRY,0,1,0,0,0,100,0,2000,9000,11000,14000,11,9459,0,0,0,0,0,17,0,50,0,0,0,0,0,"Irradiated Slime - In Combat - Cast 'Corrosive Ooze'"), +(@ENTRY,0,2,0,0,0,100,0,4000,6000,8000,9000,11,1604,64,0,0,0,0,2,0,0,0,0,0,0,0,"Irradiated Slime - In Combat CMC - Cast 'Dazed'"); + +-- Irradiated Horror SAI +SET @ENTRY := 6220; +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,0,0,100,1,1000,2000,0,0,75,10341,0,0,0,0,0,1,0,0,0,0,0,0,0,"Irradiated Horror - In Combat - Add Aura 'Radiation Cloud' (No Repeat)"), +(@ENTRY,0,1,0,0,0,100,0,4000,5000,10000,12000,11,8211,0,0,0,0,0,2,0,0,0,0,0,0,0,"Irradiated Horror - In Combat - Cast 'Chain Burn'"), +(@ENTRY,0,2,0,0,0,100,0,2000,9000,11000,14000,11,9459,0,0,0,0,0,17,0,50,0,0,0,0,0,"Irradiated Horror - In Combat - Cast 'Corrosive Ooze'"), +(@ENTRY,0,3,0,0,0,100,0,4000,6000,8000,9000,11,1604,64,0,0,0,0,2,0,0,0,0,0,0,0,"Irradiated Horror - In Combat CMC - Cast 'Dazed'"); + +-- Corrosive Lurker SAI +SET @ENTRY := 6219; +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,0,0,100,1,1000,2000,0,0,75,10341,0,0,0,0,0,1,0,0,0,0,0,0,0,"Corrosive Lurker - In Combat - Add Aura 'Radiation Cloud' (No Repeat)"), +(@ENTRY,0,1,0,0,0,100,0,2000,9000,11000,14000,11,9459,0,0,0,0,0,17,0,50,0,0,0,0,0,"Corrosive Lurker - In Combat - Cast 'Corrosive Ooze'"), +(@ENTRY,0,2,0,0,0,100,0,4000,6000,8000,9000,11,1604,64,0,0,0,0,2,0,0,0,0,0,0,0,"Corrosive Lurker - In Combat CMC - Cast 'Dazed'"); + +UPDATE `creature` SET `spawndist`=20, `MovementType`=1 WHERE `guid`=30137; + +-- Viscous Fallout SAI +SET @ENTRY := 7079; +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,0,0,100,1,1000,2000,0,0,75,10341,2,0,0,0,0,1,0,0,0,0,0,0,0,"Viscous Fallout - In Combat - Add Aura 'Radiation Cloud'"), +(@ENTRY,0,1,0,0,0,100,0,2000,9000,11000,14000,11,9459,64,0,0,0,0,17,0,50,0,0,0,0,0,"Viscous Fallout - In Combat CMC - Cast 'Corrosive Ooze'"); + +-- Mechanized Sentry SAI +SET @ENTRY := 6233; +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,0,0,100,0,3000,5000,8000,9000,11,1604,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mechanized Sentry - In Combat - Cast 'Dazed'"); + +-- Leprous Defender SAI +SET @ENTRY := 6223; +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,0,0,100,0,1000,1500,2300,3900,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Leprous Defender - Combat CMC - Cast 'Shoot'"), +(@ENTRY,0,1,0,9,0,100,0,5,30,7000,9000,11,14443,0,0,0,0,0,2,0,0,0,0,0,0,0,"Leprous Defender - Within 5-30 Range - Cast 'Multi-Shot'"), +(@ENTRY,0,2,0,9,0,100,0,5,30,9000,11000,11,5116,0,0,0,0,0,2,0,0,0,0,0,0,0,"Leprous Defender - Within 5-30 Range - Cast 'Concussive Shot'"), +(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Leprous Defender - Between 0-15% Health - Flee For Assist (No Repeat)"); + +-- Leprous Technician SAI +SET @ENTRY := 6222; +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,4,0,100,0,0,0,0,0,11,12024,64,0,0,0,0,2,0,0,0,0,0,0,0,"Leprous Technician - On Aggro CMC - Cast 'Net'"), +(@ENTRY,0,1,0,0,0,100,0,2000,6000,8000,9000,11,1604,0,0,0,0,0,2,0,0,0,0,0,0,0,"Leprous Technician - In Combat - Cast 'Dazed'"), +(@ENTRY,0,2,0,0,0,100,0,2000,5000,6000,8000,11,13398,64,0,0,0,0,21,30,0,0,0,0,0,0,"Leprous Technician - In Combat CMC - Cast 'Throw Wrench'"); + +-- Mechano-Tank SAI +SET @ENTRY := 6225; +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,0,0,100,0,5,30,2300,3900,11,1604,64,0,0,0,0,2,0,0,0,0,0,0,0,"Mechano-Tank - Combat CMC - Cast 'Dazed'"), +(@ENTRY,0,1,0,9,0,100,0,5,30,7000,9000,11,10346,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mechano-Tank - Within 5-30 Range - Cast 'Multi-Shot'"), +(@ENTRY,0,2,0,9,0,100,0,5,30,9000,11000,11,5116,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mechano-Tank - Within 5-30 Range - Cast 'Concussive Shot'"), +(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mechano-Tank - Between 0-15% Health - Flee For Assist (No Repeat)"); + +-- Peacekeeper Security Suit SAI +SET @ENTRY := 6230; +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,0,0,100,0,5000,6000,6000,8000,11,6533,64,0,0,0,0,2,0,0,0,0,0,0,0,"Peacekeeper Security Suit - In Combat CMC - Cast 'Net'"), +(@ENTRY,0,1,0,0,0,50,0,5000,6000,14000,16000,11,10730,0,0,0,0,0,2,0,0,0,0,0,0,0,"Peacekeeper Security Suit - In Combat - Cast 'Pacify'"); + +-- Mechanized Guardian SAI +SET @ENTRY := 6234; +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,0,0,100,0,2000,5000,6000,7000,11,1604,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mechanized Guardian - In Combat - Cast 'Dazed'"), +(@ENTRY,0,1,0,0,0,100,0,3000,6000,6000,7000,11,11820,0,0,0,0,0,21,40,0,0,0,0,0,0,"Mechanized Guardian - In Combat - Cast 'Field'"); + +-- Mechano-Flamewalker SAI +SET @ENTRY := 6226; +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,0,0,100,0,2000,6000,6000,10000,11,11306,64,0,0,0,0,1,0,0,0,0,0,0,0,"Mechano-Flamewalker - In Combat CMC - Cast 'Fire Nova'"), +(@ENTRY,0,1,0,0,0,100,0,3000,6000,10000,12000,11,10733,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mechano-Flamewalker - In Combat - Cast 'Flame Spray'"); + +-- Mechano-Frostwalker SAI +SET @ENTRY := 6227; +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,2,0,100,1,0,40,0,0,11,22519,2,0,0,0,0,1,0,0,0,0,0,0,0,"Mechano-Frostwalker - Between 0-40% Health - Cast 'Ice Nova' (No Repeat)"), +(@ENTRY,0,1,0,0,0,100,0,2000,6000,8000,9000,11,11264,64,0,0,0,0,1,0,0,0,0,0,0,0,"Mechano-Frostwalker - In Combat CMC - Cast 'Ice Blast'"); + +-- Caverndeep Reaver SAI +SET @ENTRY := 6211; +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,4,0,100,1,0,0,0,0,11,7366,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caverndeep Reaver - On Aggro - Cast 'Berserker Stance' (No Repeat)"), +(@ENTRY,0,1,0,0,0,100,0,2000,6000,5000,8000,11,8374,2,0,0,0,0,2,0,0,0,0,0,0,0,"Caverndeep Reaver - In Combat - Cast 'Arcing Smash'"), +(@ENTRY,0,2,0,0,0,100,0,4000,4000,4000,4000,11,845,2,0,0,0,0,2,0,0,0,0,0,0,0,"Caverndeep Reaver - In Combat - Cast 'Cleave'"); + +-- Holdout Medic SAI +SET @ENTRY := 6392; +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,2,0,100,1,0,60,0,0,11,22167,0,0,0,0,0,1,0,0,0,0,0,0,0,"Holdout Medic - Between 0-60% Health - Cast 'Heal' (No Repeat)"), +(@ENTRY,0,1,0,4,0,100,1,0,0,0,0,11,22168,64,0,0,0,0,1,0,0,0,0,0,0,0,"Holdout Medic - On Aggro CMC - Cast 'Renew' (No Repeat)"), +(@ENTRY,0,2,0,1,0,100,0,5000,5000,8000,10000,11,22167,0,0,0,0,0,1,0,0,0,0,0,0,0,"Holdout Medic - Out of Combat - Cast 'Heal'"), +(@ENTRY,0,3,0,1,0,100,0,4000,10000,15000,20000,11,22168,0,0,0,0,0,1,0,0,0,0,0,0,0,"Holdout Medic - Out of Combat - Cast 'Renew'"); + +-- Walking Bomb SAI +SET @ENTRY := 7915; +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,0,0,100,3,0,0,15000,15000,11,11504,0,0,0,0,0,1,0,0,0,0,0,0,0,"Walking Bomb - In Combat - Cast 'Walking Bomb Effect' (No Repeat) (Normal Dungeon)"); + +UPDATE `creature` SET `spawndist`=20, `MovementType`=1 WHERE `guid`=30133; + +-- Leprous Machinesmith SAI +SET @ENTRY := 6224; +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,0,0,100,0,4000,5000,20000,25000,11,10732,0,0,0,0,0,19,6224,50,0,0,0,0,0,"Leprous Machinesmith - In Combat - Cast 'Supercharge'"), +(@ENTRY,0,1,0,0,0,100,0,2000,5000,4000,6000,11,13398,64,0,0,0,0,21,30,0,0,0,0,0,0,"Leprous Machinesmith - In Combat CMC - Cast 'Throw Wrench'"), +(@ENTRY,0,2,0,2,0,100,1,0,90,0,0,11,10348,0,0,0,0,0,1,0,0,0,0,0,0,0,"Leprous Machinesmith - Between 0-90% Health - Cast 'Tune Up' (No Repeat)"); + diff --git a/sql/updates/world/2015_05_24_01_world.sql b/sql/updates/world/2015_05_24_01_world.sql new file mode 100644 index 00000000000..b8e343d9840 --- /dev/null +++ b/sql/updates/world/2015_05_24_01_world.sql @@ -0,0 +1,365 @@ +-- Ammo for Rumbleshot +UPDATE `creature` SET position_x = -6070.349121, position_y = -285.940399, position_z = 428.220367, orientation = 1.496177 WHERE guid = 263; +UPDATE `creature` SET position_x = -6104.470703, position_y = -163.987122, position_z = 433.257080, orientation = 1.833880 WHERE guid = 1716; +UPDATE `creature` SET position_x = -5988.834473, position_y = -135.639069, position_z = 400.818604, orientation = 4.441411 WHERE guid = 290; +-- Mortar Combat - event +-- correct spawn possition for all involved in event +UPDATE `creature` SET position_x = -6009.25, position_y = -202.649994, position_z = 406.982605, orientation = 1.58825 WHERE guid = 269; -- angus +UPDATE `creature` SET orientation = 0.03490658 WHERE guid = 265 ; -- hegnar +UPDATE `creature` SET position_x = -6007.301758, position_y = -200.348206, position_z = 406.777496, orientation = 3.282219 WHERE guid = 272; -- klemmy +UPDATE `creature` SET position_x = -6007.458984, position_y = -202.157593, position_z = 407.447937, orientation = 2.478368 WHERE guid = 267; -- shorty +UPDATE `creature` SET position_x = -6010.668151495, position_y = -199.434006, position_z = 406.792480, orientation = 5.532694 WHERE guid = 268; -- middlecamp +UPDATE `creature` SET position_x = -6008.527832, position_y = -199.145203, position_z = 406.687225, orientation = 4.372177 WHERE guid = 266; -- wheeler + +DELETE FROM `waypoints` WHERE `entry`=10610; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(10610, 1, -6009.25,-202.649994,406.982605, 'Angus'), +(10610, 2, -6009.25,-202.649994,406.982605, 'Angus'), +(10610, 3, -6009.25,-202.649994,406.982605, 'Angus'), +(10610, 4, -6031.16,-230.264,414.361, 'Angus'); + +DELETE FROM `spell_target_position` WHERE id IN (18634,16572,16767,16768,16772,16775,16776,16777,16778,16779,16780,16786,18634); +INSERT INTO `spell_target_position` (id, target_map, target_position_x, target_position_y, target_position_z, target_orientation) VALUES +(16572,0,-6046.85,-207.329,418.304,0), +(16767,0,-6046.73,-207.159,417.267,0), +(16768,0,-6051.39,-206.749,418.159,0), +(16772,0,-6046.84,-204.535,416.897,0), +(16775,0,-6044.47,-205.783,417.267,0), +(16776,0,-6044.54,-205.562,417.663,0), +(16777,0,-6044.53,-202.912,416.756,0), +(16778,0,-6042.18,-204.949,416.336,0), +(16779,0,-6042.02,-204.134,416.894,0), +(16780,0,-6044.79,-196.959,419.19,0), +(16786,0,-6078.3,-211.89,424.197,0), +(18634,0,-6076,-215,424,0); + +-- Hegnar Rumbleshot SAI +SET @ENTRY := 1243; +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,1,20,0,100,0,5541,0,0,0,45,1,0,0,0,0,0,19,10610,20,0,0,0,0,0,"Hegnar Rumbleshot - On Quest 'Ammo for Rumbleshot' Finished - Set Data 1 0"), +(@ENTRY,0,1,2,61,0,100,0,5541,0,0,0,45,1,0,0,0,0,0,19,10611,20,0,0,0,0,0,"Hegnar Rumbleshot - On Quest 'Ammo for Rumbleshot' Finished - Set Data 1 0"), +(@ENTRY,0,2,3,61,0,100,0,5541,0,0,0,45,1,0,0,0,0,0,19,10804,20,0,0,0,0,0,"Hegnar Rumbleshot - On Quest 'Ammo for Rumbleshot' Finished - Set Data 1 0"), +(@ENTRY,0,3,4,61,0,100,0,5541,0,0,0,45,1,0,0,0,0,0,19,10805,20,0,0,0,0,0,"Hegnar Rumbleshot - On Quest 'Ammo for Rumbleshot' Finished - Set Data 1 0"), +(@ENTRY,0,4,0,61,0,100,0,5541,0,0,0,45,1,0,0,0,0,0,19,10803,20,0,0,0,0,0,"Hegnar Rumbleshot - On Quest 'Ammo for Rumbleshot' Finished - Set Data 1 0"), +(@ENTRY,0,5,0,38,0,100,0,2,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.68522,"Hegnar Rumbleshot - On Data Set 2 0 - Set Orientation 3,68522"), +(@ENTRY,0,6,0,38,0,100,0,3,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.03490658,"Hegnar Rumbleshot - On Data Set 3 0 - Set Orientation 0.03490658"); + +-- Angus SAI +SET @ENTRY := 10610; +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,1,38,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Data Set 1 0 - Set Active On"), +(@ENTRY,0,1,2,61,0,100,0,1,0,0,0,53,0,10610,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Data Set 1 0 - Start Waypoint"), +(@ENTRY,0,2,0,61,0,100,0,1,0,0,0,4,6598,0,0,0,0,0,21,50,0,0,0,0,0,0,"Angus - On Data Set 1 0 - Play Sound 6598"), +(@ENTRY,0,3,4,40,0,100,0,4,10610,0,0,54,250000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Waypoint 4 Reached - Pause Waypoint"), +(@ENTRY,0,4,0,61,0,100,0,4,10610,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Waypoint 4 Reached - Run Script"), +(@ENTRY,0,5,0,38,0,100,0,2,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6009.25,-202.649994,406.982605,2,"Shorty - On Data Set 2 0 - Move To Position"), +(@ENTRY,0,6,0,38,0,100,0,3,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.58825,"Shorty - On Data Set 3 0 - Set Orientation 1.58825"); + +-- Mortar Team Target Dummy SAI +SET @ENTRY := 11875; +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,1,0,100,1,100,100,0,0,75,42716,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mortar Team Target Dummy - Out of Combat - Add Aura 'Self Root Forever (No Visual)' (No Repeat)"); + +-- move to eventplace +-- Shorty SAI +SET @ENTRY := 10611; +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,1,38,0,100,0,1,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6031.589,-228.182,414.4035,2,"Shorty - On Data Set 1 0 - Move To Position"), +(@ENTRY,0,1,0,61,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shorty - On Data Set 1 0 - Set Active On"), +(@ENTRY,0,2,0,38,0,100,0,2,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.18492,"Shorty - On Data Set 2 0 - Set Orientation 2,18492"), +(@ENTRY,0,3,0,38,0,100,0,3,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.844887,"Shorty - On Data Set 3 0 - Set Orientation 2.844887"), +(@ENTRY,0,4,0,38,0,100,0,4,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.54215,"Shorty - On Data Set 4 0 - Set Orientation 4.54215"), +(@ENTRY,0,5,0,38,0,100,0,5,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.844887,"Shorty - On Data Set 4 0 - Set Orientation 2.844887"), +(@ENTRY,0,6,0,38,0,100,0,6,0,0,0,11,18655,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shorty - On Data Set 6 0 - Cast 'Mortar Animate'"), +(@ENTRY,0,7,0,38,0,100,0,7,0,0,0,11,16786,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shorty - On Data Set 7 0 - Cast 'Mortar Shot'"), +(@ENTRY,0,8,0,38,0,100,0,8,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.54215,"Shorty - On Data Set 8 0 - Set Orientation 4.54215"), +(@ENTRY,0,9,0,38,0,100,0,9,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.54215,"Shorty - On Data Set 9 0 - Set Orientation 4.54215"), +(@ENTRY,0,10,0,38,0,100,0,10,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.844887,"Shorty - On Data Set 10 0 - Set Orientation 2.844887"), +(@ENTRY,0,11,0,38,0,100,0,11,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6007.458984,-202.157593,407.447937,2,"Shorty - On Data Set 11 0 - Move To Position"), +(@ENTRY,0,12,0,38,0,100,0,12,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.478368,"Shorty - On Data Set 12 0 - Set Orientation 2.478368"); + +-- Klemmy SAI +SET @ENTRY := 10805; +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,1,38,0,100,0,1,0,0,0,53,0,10805,0,0,0,0,1,0,0,0,0,0,0,0,"Klemmy - On Data Set 1 0 - Start Waypoint"), +(@ENTRY,0,1,0,61,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Klemmy - On Data Set 1 0 - Set Active On"), +(@ENTRY,0,2,0,38,0,100,0,2,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.59936,"Spotter Klemmy - On Data Set 2 0 - Set Orientation 5,59936"), +(@ENTRY,0,3,0,38,0,100,0,3,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6077.43,-213.2565,424.0502,5.59936,"Spotter Klemmy - On Data Set 3 0 - Move To Position"), +(@ENTRY,0,4,0,38,0,100,0,4,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6065.903,-202.2976,424.3693,5,"Spotter Klemmy - On Data Set 4 0 - Move To Position"), +(@ENTRY,0,5,0,38,0,100,0,5,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.59936,"Spotter Klemmy - On Data Set 5 0 - Set Orientation 5.59936"), +(@ENTRY,0,6,0,38,0,100,0,6,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.0985,"Spotter Klemmy - On Data Set 6 0 - Set Orientation 4.0985"), +(@ENTRY,0,7,0,38,0,100,0,7,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.0985,"Spotter Klemmy - On Data Set 7 0 - Set Orientation 4.0985"), +(@ENTRY,0,8,0,38,0,100,0,8,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6077.43,-213.2565,424.0502,5.59936,"Spotter Klemmy - On Data Set 8 0 - Move To Position"), +(@ENTRY,0,9,0,38,0,100,0,9,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.844887,"Spotter Klemmy - On Data Set 9 0 - Set Orientation 2.844887"), +(@ENTRY,0,10,0,38,0,100,0,10,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6071.88,-212.831,422.929,5,"Spotter Klemmy - On Data Set 10 0 - Move To Position"), +(@ENTRY,0,11,0,38,0,100,0,11,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,6.04228,"Spotter Klemmy - On Data Set 11 0 - Set Orientation 6.04228"), +(@ENTRY,0,12,0,38,0,100,0,12,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6065.903,-202.2976,424.3693,5,"Spotter Klemmy - On Data Set 12 0 - Move To Position"), +(@ENTRY,0,13,0,38,0,100,0,13,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.0985,"Spotter Klemmy - On Data Set 13 0 - Set Orientation 4.0985"), +(@ENTRY,0,14,0,38,0,100,0,14,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6064.07,-209.851,421.98,6.10275,"Spotter Klemmy - On Data Set 14 0 - Move To Position"), +(@ENTRY,0,15,0,38,0,100,0,15,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6061.97,-218.956,421.085,5.92054,"Spotter Klemmy - On Data Set 15 0 - Move To Position"), +(@ENTRY,0,16,0,38,0,100,0,16,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6040.96,-221.929,414.921,5.92054,"Spotter Klemmy - On Data Set 16 0 - Move To Position"), +(@ENTRY,0,17,0,38,0,100,0,17,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6007.301758,-200.348206,406.777496,3.282219,"Spotter Klemmy - On Data Set 17 0 - Move To Position"), +(@ENTRY,0,18,0,38,0,100,0,18,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.282219,"Spotter Klemmy - On Data Set 18 0 - Set Orientation 3.282219"); + +-- Wheeler SAI +SET @ENTRY := 10803; +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,1,38,0,100,0,1,0,0,0,53,0,10803,0,0,0,0,1,0,0,0,0,0,0,0,"Wheeler - On Data Set 1 0 - Start Waypoint"), +(@ENTRY,0,1,0,61,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wheeler - On Data Set 1 0 - Set Active On"), +(@ENTRY,0,2,0,38,0,100,0,2,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.443461,"Wheeler - On Data Set 2 0 - Set Orientation 2,443461"), +(@ENTRY,0,3,0,38,0,100,0,3,0,0,0,11,16767,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wheeler - On Data Set 3 0 - Cast 'Shoot'"), +(@ENTRY,0,4,0,38,0,100,0,4,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.00565,"Wheeler - On Data Set 4 0 - Set Orientation 4.00565"), +(@ENTRY,0,5,0,38,0,100,0,5,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.443461,"Wheeler - On Data Set 5 0 - Set Orientation 2.443461"), +(@ENTRY,0,6,0,38,0,100,0,6,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.00565,"Wheeler - On Data Set 6 0 - Set Orientation 4.00565"), +(@ENTRY,0,7,0,38,0,100,0,7,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.443461,"Wheeler - On Data Set 7 0 - Set Orientation 2.443461"), +(@ENTRY,0,8,0,38,0,100,0,8,0,0,0,11,16775,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wheeler - On Data Set 8 0 - Cast 'Shoot'"), +(@ENTRY,0,9,0,38,0,100,0,9,0,0,0,11,16778,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wheeler - On Data Set 9 0 - Cast 'Shoot'"), +(@ENTRY,0,10,0,38,0,100,0,10,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.00565,"Wheeler - On Data Set 10 0 - Set Orientation 4.00565"), +(@ENTRY,0,11,0,38,0,100,0,11,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.443461,"Wheeler - On Data Set 11 0 - Set Orientation 4.00565"), +(@ENTRY,0,12,0,38,0,100,0,12,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.00565,"Wheeler - On Data Set 12 0 - Set Orientation 4.00565"), +(@ENTRY,0,13,0,38,0,100,0,13,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.77803,"Wheeler - On Data Set 13 0 - Set Orientation 4.77803"), +(@ENTRY,0,14,0,38,0,100,0,14,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.01942,"Wheeler - On Data Set 14 0 - Set Orientation 3.01942"), +(@ENTRY,0,15,0,38,0,100,0,15,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6008.527832,-199.145203,406.687225,4.372177,"Wheeler - On Data Set 15 0 - Move To Position"), +(@ENTRY,0,16,0,38,0,100,0,16,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.372177,"Wheeler - On Data Set 16 0 - Set Orientation 4.372177"); + +-- Rifleman Middlecamp SAI +SET @ENTRY := 10804; +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,1,38,0,100,0,1,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6034.14,-223.333,413.4,1,"Rifleman Middlecamp - On Data Set 1 0 - Move To Position"), +(@ENTRY,0,1,0,61,0,100,0,1,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 1 0 - Set Active On"), +(@ENTRY,0,2,0,38,0,100,0,2,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.884956,"Rifleman Middlecamp - On Data Set 2 0 - Set Orientation 1,884956"), +(@ENTRY,0,3,0,38,0,100,0,3,0,0,0,11,16768,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 3 0 - Cast 'Shoot'"), +(@ENTRY,0,4,0,38,0,100,0,4,0,0,0,11,16772,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 4 0 - Cast 'Shoot'"), +(@ENTRY,0,5,0,38,0,100,0,5,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.810652,"Rifleman Middlecamp - On Data Set 5 0 - Set Orientation 0.810652"), +(@ENTRY,0,6,0,38,0,100,0,6,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.884956,"Rifleman Middlecamp - On Data Set 6 0 - Set Orientation 1.884956"), +(@ENTRY,0,7,0,38,0,100,0,7,0,0,0,11,16777,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 7 0 - Cast 'Shoot'"), +(@ENTRY,0,8,0,38,0,100,0,8,0,0,0,11,16780,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 8 0 - Cast 'Shoot'"), +(@ENTRY,0,9,0,38,0,100,0,9,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.810652,"Rifleman Middlecamp - On Data Set 9 0 - Set Orientation 0.810652"), +(@ENTRY,0,10,0,38,0,100,0,10,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.884956,"Rifleman Middlecamp - On Data Set 10 0 - Set Orientation 1.884956"), +(@ENTRY,0,11,0,38,0,100,0,11,0,0,0,11,16572,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 11 0 - Cast 'Shoot'"), +(@ENTRY,0,12,0,38,0,100,0,12,0,0,0,11,16776,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 12 0 - Cast 'Shoot'"), +(@ENTRY,0,13,0,38,0,100,0,13,0,0,0,11,16779,0,0,0,0,0,1,0,0,0,0,0,0,0,"Rifleman Middlecamp - On Data Set 13 0 - Cast 'Shoot'"), +(@ENTRY,0,14,0,38,0,100,0,14,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0.810652,"Rifleman Middlecamp - On Data Set 14 0 - Set Orientation 0.810652"), +(@ENTRY,0,15,0,38,0,100,0,15,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.13852,"Rifleman Middlecamp - On Data Set 15 0 - Set Orientation 5.13852"), +(@ENTRY,0,16,0,38,0,100,0,16,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.9147,"Rifleman Middlecamp - On Data Set 16 0 - Set Orientation 2.9147"), +(@ENTRY,0,17,1,38,0,100,0,17,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6010.668151495,-199.434006,406.792480,5.532694,"Rifleman Middlecamp - On Data Set 17 0 - Move To Position"), +(@ENTRY,0,18,0,38,0,100,0,18,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.532694,"Rifleman Middlecamp - On Data Set 18 0 - Set Orientation 5.532694"); + +DELETE FROM `waypoints` WHERE `entry`=10805; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(10805, 1, -6011.17,-197.021,406.765, 'Klemmy'), +(10805, 2, -6015.51,-184.362,407.712, 'Klemmy'), +(10805, 3, -6042.365723,-191.418701,421.045868, 'Klemmy'), +(10805, 4, -6065.18,-201.938,424.419, 'Klemmy'); + +DELETE FROM `waypoints` WHERE `entry`=10803; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(10803, 1, -6011.87,-199.241,406.834, 'Wheeler'), +(10803, 2, -6031.929,-221.0882,413.1531, 'Wheeler'); + +DELETE FROM `creature_text` WHERE `entry` IN (10804, 10803); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(10804, 0, 0, '%s picks the orc target...', 16, 0, 100, 25, 0, 0, 'Middlecamp', 6107), +(10804, 1, 0, '%s misses...', 16, 0, 100, 6, 0, 0, 'Middlecamp', 6140), +(10804, 2, 0, '%s takes a more careful aim...', 16, 0, 100, 6, 0, 6247, 'Middlecamp', 6106), +(10804, 3, 0, '%s misses again...', 16, 0, 100, 6, 0, 0, 'Middlecamp', 6141), +(10804, 4, 0, '%s takes aim at the bottles...', 16, 0, 100, 0, 0, 0, 'Middlecamp', 6120), +(10804, 5, 0, '%s misses...', 16, 0, 100, 15, 0, 0, 'Middlecamp', 6140), +(10804, 6, 0, '%s takes aim at the bottles again...', 16, 0, 100, 0, 0, 0, 'Middlecamp', 6121), +(10804, 7, 0, '%s misses again...', 16, 0, 100, 18, 0, 0, 'Middlecamp', 6141), +(10804, 8, 0, '%s quickly shoots the orc dummy...', 16, 0, 100, 0, 0, 0, 'Middlecamp', 6137), +(10804, 9, 0, '%s turns to the paper target...', 16, 0, 100, 0, 0, 0, 'Middlecamp', 6136), +(10804, 10, 0, '%s shoots from the hip at the bottles...', 16, 0, 100, 0, 0, 0, 'Middlecamp', 6138), +-- +(10803, 0, 0, '%s casually points at the orc target...', 16, 0, 100, 25, 0, 0, 'Wheeler', 6118), +(10803, 1, 0, '%s hits!', 16, 0, 100, 0, 0, 0, 'Wheeler', 6142), +(10803, 2, 0, '%s quickly shoots the middle target dead center...', 16, 0, 100, 0, 0, 0, 'Wheeler', 6124), +(10803, 3, 0, '%s then takes aim at the bottles...', 16, 0, 100, 0, 0, 0, 'Wheeler', 6122), +(10803, 4, 0, '%s only hits the side of the box!', 16, 0, 100, 0, 0, 0, 'Wheeler', 6123); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=18655; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 18655, 0, 0, 31, 0, 5, 176557, 0, 0, 0, 0, '', 'Mörser - Mörser'); + +-- Actionlist SAI +SET @ENTRY := 1061000; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,45,2,0,0,0,0,0,19,10805,100,0,0,0,0,0,"On Script - Set Data 2 0"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,45,2,0,0,0,0,0,19,10611,100,0,0,0,0,0,"On Script - Set Data 2 0"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,45,2,0,0,0,0,0,19,10803,100,0,0,0,0,0,"On Script - Set Data 2 0"), +(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,45,2,0,0,0,0,0,19,10804,100,0,0,0,0,0,"On Script - Set Data 2 0"), +(@ENTRY,9,4,0,0,0,100,0,0,0,0,0,45,2,0,0,0,0,0,19,1243,100,0,0,0,0,0,"On Script - Set Data 2 0"), +(@ENTRY,9,5,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 0"), +(@ENTRY,9,6,0,0,0,100,0,3000,3000,0,0,45,3,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 3 0"), +(@ENTRY,9,7,0,0,0,100,0,2000,2000,0,0,1,1,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 1"), +(@ENTRY,9,8,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 2"), +(@ENTRY,9,9,0,0,0,100,0,2000,2000,0,0,45,4,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 4 0"), +(@ENTRY,9,10,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 3"), +(@ENTRY,9,11,0,0,0,100,0,2000,2000,0,0,45,5,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 5 0"), +(@ENTRY,9,12,0,0,0,100,0,1000,1000,0,0,5,5,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 5"), +(@ENTRY,9,13,0,0,0,100,0,1000,1000,0,0,5,11,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 11"), +(@ENTRY,9,14,0,0,0,100,0,1000,1000,0,0,5,274,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 11"), +(@ENTRY,9,15,0,0,0,100,0,0,0,0,0,5,274,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 11"), +(@ENTRY,9,16,0,0,0,100,0,1000,1000,0,0,45,6,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0"), +(@ENTRY,9,17,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Say Line 0"), +(@ENTRY,9,18,0,0,0,100,0,4000,4000,0,0,45,3,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 3 0"), +(@ENTRY,9,19,0,0,0,100,0,2000,2000,0,0,1,1,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Say Line 1"), +(@ENTRY,9,20,0,0,0,100,0,2000,2000,0,0,45,4,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 4 0"), +(@ENTRY,9,21,0,0,0,100,0,1000,1000,0,0,5,25,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Play Emote 25"), +(@ENTRY,9,22,0,0,0,100,0,0,0,0,0,4,6249,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6249"), +(@ENTRY,9,23,0,0,0,100,0,2000,2000,0,0,5,21,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 21"), +(@ENTRY,9,24,0,0,0,100,0,1000,1000,0,0,5,21,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 21"), +(@ENTRY,9,25,0,0,0,100,0,0,0,0,0,5,23,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 23"), +(@ENTRY,9,26,0,0,0,100,0,2000,2000,0,0,45,5,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 5 0 Wheeler"), +(@ENTRY,9,27,0,0,0,100,0,3000,3000,0,0,1,4,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 4"), +(@ENTRY,9,28,0,0,0,100,0,2000,2000,0,0,45,7,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 5 0 Middlecamp"), +(@ENTRY,9,29,0,0,0,100,0,2000,2000,0,0,1,5,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 5 Middlecamp"), +(@ENTRY,9,30,0,0,0,100,0,2000,2000,0,0,5,20,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 20 Middlecamp"), +(@ENTRY,9,31,0,0,0,100,0,0,0,0,0,45,6,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Wheeler"), +(@ENTRY,9,32,0,0,0,100,0,1000,1000,0,0,5,6,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 6 Wheeler"), +(@ENTRY,9,33,0,0,0,100,0,0,0,0,0,4,6248,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6248"), +(@ENTRY,9,34,0,0,0,100,0,3000,3000,0,0,45,7,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Wheeler"), +(@ENTRY,9,35,0,0,0,100,0,0,0,0,0,1,6,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 6 Middlecamp"), +(@ENTRY,9,36,0,0,0,100,0,1000,1000,0,0,45,8,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 8 0 Middlecamp"), +(@ENTRY,9,38,0,0,0,100,0,0,0,0,0,1,7,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 7 Middlecamp"), +(@ENTRY,9,40,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Say Line 2 Wheeler"), +(@ENTRY,9,41,0,0,0,100,0,2000,2000,0,0,45,8,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 8 0 Wheeler"), +(@ENTRY,9,42,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Say Line 3 Wheeler"), +(@ENTRY,9,43,0,0,0,100,0,2000,2000,0,0,45,9,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 9 0 Wheeler"), +(@ENTRY,9,44,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Say Line 4 Wheeler"), +(@ENTRY,9,45,0,0,0,100,0,1000,1000,0,0,45,10,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 10 0 Wheeler"), +(@ENTRY,9,46,0,0,0,100,0,1000,1000,0,0,5,5,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 5 Wheeler"), +(@ENTRY,9,47,0,0,0,100,0,0,0,0,0,45,9,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 9 0 Middlecamp"), +(@ENTRY,9,48,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 25 Middlecamp"), +(@ENTRY,9,59,0,0,0,100,0,2000,2000,0,0,5,11,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Middlecamp"), +(@ENTRY,9,60,0,0,0,100,0,3000,3000,0,0,45,10,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 10 0 Middlecamp"), +(@ENTRY,9,61,0,0,0,100,0,0,0,0,0,45,11,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 11 0 Wheeler"), +(@ENTRY,9,62,0,0,0,100,0,2000,2000,0,0,1,8,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 8 Middlecamp"), +(@ENTRY,9,63,0,0,0,100,0,0,0,0,0,4,6250,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6250"), +(@ENTRY,9,64,0,0,0,100,0,0,0,0,0,45,11,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 11 0 Middlecamp"), +(@ENTRY,9,65,0,0,0,100,0,3000,3000,0,0,1,9,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 9 Middlecamp"), +(@ENTRY,9,66,0,0,0,100,0,0,0,0,0,4,6250,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6250"), +(@ENTRY,9,67,0,0,0,100,0,0,0,0,0,45,12,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 12 0 Middlecamp"), +(@ENTRY,9,68,0,0,0,100,0,3000,3000,0,0,1,10,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Say Line 10 Middlecamp"), +(@ENTRY,9,69,0,0,0,100,0,0,0,0,0,4,6250,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6250"), +(@ENTRY,9,70,0,0,0,100,0,0,0,0,0,45,13,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 13 0 Middlecamp"), +(@ENTRY,9,71,0,0,0,100,0,0,0,0,0,5,71,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 71 Middlecamp"), +(@ENTRY,9,72,0,0,0,100,0,0,0,0,0,4,6246,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6246"), +(@ENTRY,9,73,0,0,0,100,0,3000,3000,0,0,45,14,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 14 0 Middlecamp"), +(@ENTRY,9,74,0,0,0,100,0,1000,1000,0,0,45,12,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 12 0 Wheeler"), +(@ENTRY,9,75,0,0,0,100,0,1000,1000,0,0,5,2,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 2 Middlecamp"), +(@ENTRY,9,76,0,0,0,100,0,0,0,0,0,5,21,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 21 Wheeler"), +(@ENTRY,9,77,0,0,0,100,0,4000,4000,0,0,45,15,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 15 0 Middlecamp"), +(@ENTRY,9,78,0,0,0,100,0,0,0,0,0,45,13,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 13 0 Wheeler"), +(@ENTRY,9,79,0,0,0,100,0,0,0,0,0,45,3,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 3 0 Shorty"), +(@ENTRY,9,80,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.844887,"Angus - On Script - Set Orientation 2,844887"), +(@ENTRY,9,81,0,0,0,100,0,2000,2000,0,0,5,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 4 Wheeler"), +(@ENTRY,9,82,0,0,0,100,0,0,0,0,0,5,4,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 4 Shorty"), +(@ENTRY,9,83,0,0,0,100,0,0,0,0,0,4,6256,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6256"), +(@ENTRY,9,84,0,0,0,100,0,0,0,0,0,45,3,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 3 0 Klemmy"), +(@ENTRY,9,85,0,0,0,100,0,10000,10000,0,0,11,18634,2,0,0,0,0,8,0,0,0,0,0,0,0,"Angus - On Script - Summon Creature 'Mortar Team Target Dummy'"), +(@ENTRY,9,86,0,0,0,100,0,3000,3000,0,0,45,4,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 4 0 Klemmy"), +(@ENTRY,9,87,0,0,0,100,0,3000,3000,0,0,45,5,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 5 0 Klemmy"), +(@ENTRY,9,88,0,0,0,100,0,2000,2000,0,0,5,3,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Play Emote 3 Klemmy"), +(@ENTRY,9,89,0,0,0,100,0,0,0,0,0,45,4,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 4 0 Shorty"), +(@ENTRY,9,90,0,0,0,100,0,1000,1000,0,0,45,6,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Klemmy"), +(@ENTRY,9,91,0,0,0,100,0,1000,1000,0,0,5,16,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 16 Shorty"), +(@ENTRY,9,92,0,0,0,100,0,1000,1000,0,0,5,69,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 69 Shorty"), +(@ENTRY,9,93,0,0,0,100,0,1000,1000,0,0,5,0,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 0 Shorty"), +(@ENTRY,9,94,0,0,0,100,0,2000,2000,0,0,45,5,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 5 0 Shorty"), +(@ENTRY,9,95,0,0,0,100,0,1000,1000,0,0,45,16,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 16 0 Middlecamp"), +(@ENTRY,9,96,0,0,0,100,0,0,0,0,0,45,14,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 14 0 Wheeler"), +(@ENTRY,9,97,0,0,0,100,0,0,0,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 25"), +(@ENTRY,9,98,0,0,0,100,0,1000,1000,0,0,45,6,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Shorty"), +(@ENTRY,9,99,0,0,0,100,0,2000,2000,0,0,4,7316,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 7316"), +(@ENTRY,9,100,0,0,0,100,0,2000,2000,0,0,45,7,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 7 0 Shorty"), +(@ENTRY,9,101,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,19,11875,200,0,0,0,0,0,"On Script - Kill Target"), +(@ENTRY,9,102,0,0,0,100,0,3000,3000,0,0,5,17,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 17 Shorty"), +(@ENTRY,9,103,0,0,0,100,0,3000,3000,0,0,45,8,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 8 0 Shorty"), +(@ENTRY,9,104,0,0,0,100,0,0,0,0,0,45,8,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 8 0 Klemmy"), +(@ENTRY,9,105,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 1"), +(@ENTRY,9,106,0,0,0,100,0,0,0,0,0,4,6252,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6252"), +(@ENTRY,9,107,0,0,0,100,0,1000,1000,0,0,5,4,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 4 Shorty"), +(@ENTRY,9,108,0,0,0,100,0,3000,3000,0,0,45,9,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Set Data 8 0 Shorty"), +(@ENTRY,9,109,0,0,0,100,0,5000,5000,0,0,11,18634,2,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Summon Creature 'Mortar Team Target Dummy'"), +(@ENTRY,9,110,0,0,0,100,0,2000,2000,0,0,45,10,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 10 0 Klemmy"), +(@ENTRY,9,111,0,0,0,100,0,2000,2000,0,0,45,11,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 11 0 Klemmy"), +(@ENTRY,9,112,0,0,0,100,0,2000,2000,0,0,5,66,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Play Emote 66 Klemmy"), +(@ENTRY,9,113,0,0,0,100,0,3000,3000,0,0,45,9,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Set Data 9 0 Shorty"), +(@ENTRY,9,114,0,0,0,100,0,2000,2000,0,0,45,12,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 12 0 Klemmy"), +(@ENTRY,9,115,0,0,0,100,0,0,0,0,0,5,25,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 8 Shorty"), +(@ENTRY,9,116,0,0,0,100,0,2000,2000,0,0,4,6254,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6254"), +(@ENTRY,9,117,0,0,0,100,0,1000,1000,0,0,45,13,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 13 0 Klemmy"), +(@ENTRY,9,118,0,0,0,100,0,3000,3000,0,0,17,0,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 0 Shorty"), +(@ENTRY,9,119,0,0,0,100,0,1000,1000,0,0,45,10,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Set Data 10 0 Shorty"), +(@ENTRY,9,120,0,0,0,100,0,1000,1000,0,0,5,25,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 25 Shorty"), +(@ENTRY,9,121,0,0,0,100,0,0,0,0,0,4,6255,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6255"), +(@ENTRY,9,122,0,0,0,100,0,1000,1000,0,0,45,6,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Shorty"), +(@ENTRY,9,123,0,0,0,100,0,1000,1000,0,0,4,7316,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 7316"), +(@ENTRY,9,124,0,0,0,100,0,1000,1000,0,0,45,7,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 7 0 Shorty"), +(@ENTRY,9,125,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,19,11875,200,0,0,0,0,0,"On Script - Kill Target"), +(@ENTRY,9,126,0,0,0,100,0,1000,1000,0,0,45,9,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 9 0 Shorty"), +(@ENTRY,9,127,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 25 Shorty"), +(@ENTRY,9,128,0,0,0,100,0,0,0,0,0,4,6251,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6251"), +(@ENTRY,9,129,0,0,0,100,0,1000,1000,0,0,45,15,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 15 0 Middlecamp"), +(@ENTRY,9,130,0,0,0,100,0,0,0,0,0,45,8,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 8 0 Klemmy"), +(@ENTRY,9,131,0,0,0,100,0,1000,1000,0,0,45,13,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Set Data 13 0 Wheeler"), +(@ENTRY,9,132,0,0,0,100,0,1000,1000,0,0,45,10,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Set Data 10 0 Shorty"), +(@ENTRY,9,133,0,0,0,100,0,0,0,0,0,5,4,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 4 Wheeler"), +(@ENTRY,9,134,0,0,0,100,0,7000,7000,0,0,11,18634,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Summon Creature 'Mortar Team Target Dummy'"), +(@ENTRY,9,135,0,0,0,100,0,1000,1000,0,0,45,10,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 10 0 Klemmy"), +(@ENTRY,9,136,0,0,0,100,0,1000,1000,0,0,45,11,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 11 0 Klemmy"), +(@ENTRY,9,137,0,0,0,100,0,2000,2000,0,0,45,6,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Shorty"), +(@ENTRY,9,138,0,0,0,100,0,0,0,0,0,5,25,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Play Emote 25 Klemmy"), +(@ENTRY,9,139,0,0,0,100,0,1000,1000,0,0,5,11,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Klemmy"), +(@ENTRY,9,140,0,0,0,100,0,0,0,0,0,5,15,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 15 Shorty"), +(@ENTRY,9,141,0,0,0,100,0,0,0,0,0,5,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 5"), +(@ENTRY,9,142,0,0,0,100,0,0,0,0,0,4,6258,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 6258"), +(@ENTRY,9,143,0,0,0,100,0,2000,2000,0,0,4,7316,0,0,0,0,0,21,100,0,0,0,0,0,0,"Angus - On Script - Play Sound 7316"), +(@ENTRY,9,144,0,0,0,100,0,1000,1000,0,0,45,16,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 16 0 Middlecamp"), +(@ENTRY,9,145,0,0,0,100,0,1000,1000,0,0,45,14,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Set Data 14 0 Wheeler"), +(@ENTRY,9,146,0,0,0,100,0,0,0,0,0,45,14,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 14 0 Klemmy"), +(@ENTRY,9,147,0,0,0,100,0,1000,1000,0,0,45,7,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 6 0 Shorty"), +(@ENTRY,9,148,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,19,11875,200,0,0,0,0,0,"On Script - Kill Target"), +(@ENTRY,9,149,0,0,0,100,0,1000,1000,0,0,5,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 10"), +(@ENTRY,9,150,0,0,0,100,0,0,0,0,0,5,10,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 10 Shorty"), +(@ENTRY,9,151,0,0,0,100,0,2000,2000,0,0,45,15,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 15 0 Klemmy"), +(@ENTRY,9,152,0,0,0,100,0,3000,3000,0,0,45,16,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 16 0 Klemmy"), +(@ENTRY,9,153,0,0,0,100,0,6000,6000,0,0,5,14,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Play Emote 14 Klemmy"), +(@ENTRY,9,154,0,0,0,100,0,0,0,0,0,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 0"), +(@ENTRY,9,155,0,0,0,100,0,0,0,0,0,5,0,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 0 Shorty"), +(@ENTRY,9,156,0,0,0,100,0,0,0,0,0,5,11,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 11"), +(@ENTRY,9,157,0,0,0,100,0,0,0,0,0,5,11,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Shorty"), +(@ENTRY,9,158,0,0,0,100,0,1000,1000,0,0,5,11,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Middlecamp"), +(@ENTRY,9,159,0,0,0,100,0,0,0,0,0,5,11,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Wheeler"), +(@ENTRY,9,160,0,0,0,100,0,0,0,0,0,5,11,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Klemmy"), +(@ENTRY,9,161,0,0,0,100,0,1000,1000,0,0,5,11,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Play Emote 11"), +(@ENTRY,9,162,0,0,0,100,0,0,0,0,0,5,11,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Shorty"), +(@ENTRY,9,163,0,0,0,100,0,1000,1000,0,0,5,11,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Middlecamp"), +(@ENTRY,9,164,0,0,0,100,0,0,0,0,0,5,11,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Play Emote 11 Wheeler"), +(@ENTRY,9,165,0,0,0,100,0,1000,1000,0,0,45,17,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 17 0 Klemmy"), +(@ENTRY,9,166,0,0,0,100,0,0,0,0,0,45,11,0,0,0,0,0,19,10611,50,0,0,0,0,0,"Angus - On Script - Set Data 11 0 Shorty"), +(@ENTRY,9,167,0,0,0,100,0,0,0,0,0,45,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Set Data 2 0 Angus"), +(@ENTRY,9,168,0,0,0,100,0,0,0,0,0,45,17,0,0,0,0,0,19,10804,50,0,0,0,0,0,"Angus - On Script - Set Data 17 0 Middlecamp"), +(@ENTRY,9,169,0,0,0,100,0,0,0,0,0,45,15,0,0,0,0,0,19,10803,50,0,0,0,0,0,"Angus - On Script - Set Data 15 0 Wheeler"), +(@ENTRY,9,170,0,0,0,100,0,12000,12000,0,0,45,18,0,0,0,0,0,19,10805,100,0,0,0,0,0,"Angus - On Script - Set Data 18 0 Klemmy"), +(@ENTRY,9,171,0,0,0,100,0,4000,4000,0,0,45,16,0,0,0,0,0,19,10803,100,0,0,0,0,0,"Angus - On Script - Set Data 16 0 Wheeler"), +(@ENTRY,9,172,0,0,0,100,0,2000,2000,0,0,45,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Angus - On Script - Set Data 3 0 Angus"), +(@ENTRY,9,173,0,0,0,100,0,1000,1000,0,0,45,18,0,0,0,0,0,19,10804,100,0,0,0,0,0,"Angus - On Script - Set Data 18 0 Middlecamp"), +(@ENTRY,9,174,0,0,0,100,0,1000,1000,0,0,45,3,0,0,0,0,0,19,1243,100,0,0,0,0,0,"Angus - On Script - Set Data 3 0 Hegnar"), +(@ENTRY,9,175,0,0,0,100,0,0,0,0,0,45,12,0,0,0,0,0,19,10611,100,0,0,0,0,0,"Angus - On Script - Set Data 12 0 Shorty"); diff --git a/sql/updates/world/2015_05_24_02_world.sql b/sql/updates/world/2015_05_24_02_world.sql new file mode 100644 index 00000000000..7f8cd3a457f --- /dev/null +++ b/sql/updates/world/2015_05_24_02_world.sql @@ -0,0 +1,16 @@ +-- The Farstrider Lodge flavor texts +DELETE FROM `gossip_menu` WHERE `text_id` IN (3522, 3525, 3495); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(2831, 3522), +(2831, 3525), +(2801, 3495); + +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceEntry` IN (3522, 3525, 3495, 3523) AND `ConditionTypeOrReference` IN (8); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 2831, 3523, 0, 0, 8, 0, 258, 0, 0, 1, 0, 0, '', 'Show gossip text if player has quest 258 not completed'), +(14, 2831, 3522, 0, 0, 8, 0, 258, 0, 0, 0, 0, 0, '', 'Show gossip text if player has quest 258 completed'), +(14, 2831, 3525, 0, 0, 8, 0, 271, 0, 0, 0, 0, 0, '', 'Show gossip text if player has quest 271 completed'), +(14, 2801, 3495, 0, 0, 8, 0, 385, 0, 0, 0, 0, 0, '', 'Show gossip text if player has quest 385 completed'); + +UPDATE `npc_text` SET `BroadcastTextID0`=5854 WHERE `id`=3522; diff --git a/sql/updates/world/2015_05_24_03_world.sql b/sql/updates/world/2015_05_24_03_world.sql new file mode 100644 index 00000000000..e4283fae295 --- /dev/null +++ b/sql/updates/world/2015_05_24_03_world.sql @@ -0,0 +1,13 @@ +-- +-- Grizzly Hills Giant SAI +SET @ENTRY := 26261; +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,1,8,0,100,0,47394,0,0,0,80,26261,0,0,0,0,0,1,0,0,0,0,0,0,0,"Grizzly Hills Giant - On Spellhit 'Kurun's Blessing' - Run Script"), +(@ENTRY,0,1,0,61,0,100,0,47394,0,0,0,33,26261,0,0,0,0,0,7,0,0,0,0,0,0,0,"Grizzly Hills Giant - On Spellhit 'Kurun's Blessing' - Quest Credit 'Rallying the Troops'"), +(@ENTRY,0,2,0,1,0,100,0,2000,5000,4000,6000,11,46815,0,0,0,0,0,19,26264,500,0,0,0,0,0,"Grizzly Hills Giant - Out of Combat - Cast 'Toss Boulder'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=46815; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 46815, 0, 0, 31, 0, 3, 26264, 0, 0, 0, 0, '', 'Toss Boulder - only targets Dummy'); diff --git a/sql/updates/world/2015_05_24_04_world.sql b/sql/updates/world/2015_05_24_04_world.sql new file mode 100644 index 00000000000..70cc65fb490 --- /dev/null +++ b/sql/updates/world/2015_05_24_04_world.sql @@ -0,0 +1,902 @@ +-- Complete Grizzlyhills Movement +DELETE FROM `creature_addon` WHERE `guid` IN (109382, 109390,109409,110794, 110792,110787,110793, 110791,110797,110796,110795,110799,110798, 110801,98066, 98056, 98060, 118835, 98047, 98059, 98053); +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(118835,0,0,1,1,0, ''), +(98047,0,0,1,1,0, ''), +(98059,0,0,0,1,69, ''), +(98060,0,0,0,1,234, ''), +(98053,0,0,0,1,1, ''), +(98056,0,0,0,1,234, ''), +(98066,0,0,0,1,234, ''), +(110801,0,0,0,1,234, ''), +(110798,0,0,0,1,234, ''), +(110799,0,0,0,1,234, ''), +(110795,0,0,0,1,234, ''), +(110796,0,0,0,1,234, ''), +(110797,0,0,0,1,234, ''), +(110791,0,0,0,1,234, ''), +(110793,0,0,0,1,234, ''), +(110787,0,0,0,1,234, ''), +(110792,0,0,0,1,234, ''), +(110794,0,0,0,1,234, ''), +(109409,0,0,8,1,0, ''), +(109390,0,0,8,1,0, ''), +(109382,0,0,8,1,0, ''); + +SET @NPC := 109402; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4642.88,`position_y`=-5573.969,`position_z`=43.38401 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4642.88,-5573.969,43.38401,0,0,0,0,100,0), +(@PATH,2,4642.38,-5575.719,43.63401,0,0,0,0,100,0), +(@PATH,3,4639.13,-5580.469,42.88401,0,0,0,0,100,0), +(@PATH,4,4637.13,-5583.719,41.63401,0,0,0,0,100,0), +(@PATH,5,4635.38,-5586.219,40.38401,0,0,0,0,100,0), +(@PATH,6,4635.204,-5586.526,40.13166,0,0,0,0,100,0), +(@PATH,7,4634.204,-5587.776,39.63166,0,0,0,0,100,0), +(@PATH,8,4633.204,-5587.776,38.88166,0,0,0,0,100,0), +(@PATH,9,4632.204,-5588.026,38.13166,0,0,0,0,100,0), +(@PATH,10,4631.204,-5588.026,37.63166,0,0,0,0,100,0), +(@PATH,11,4630.204,-5588.026,36.88166,0,0,0,0,100,0), +(@PATH,12,4629.204,-5588.026,36.38166,0,0,0,0,100,0), +(@PATH,13,4628.204,-5588.026,35.63166,0,0,0,0,100,0), +(@PATH,14,4626.204,-5588.026,35.13166,0,0,0,0,100,0), +(@PATH,15,4625.204,-5588.026,34.38166,0,0,0,0,100,0), +(@PATH,16,4624.204,-5588.026,33.88166,0,0,0,0,100,0), +(@PATH,17,4623.454,-5588.026,33.38166,0,0,0,0,100,0), +(@PATH,18,4622.454,-5588.276,32.88166,0,0,0,0,100,0), +(@PATH,19,4621.454,-5588.276,32.13166,0,0,0,0,100,0), +(@PATH,20,4620.454,-5588.276,31.63166,0,0,0,0,100,0), +(@PATH,21,4618.454,-5588.276,30.38166,0,0,0,0,100,0), +(@PATH,22,4616.454,-5588.276,29.63166,0,0,0,0,100,0), +(@PATH,23,4615.454,-5588.276,28.88166,0,0,0,0,100,0), +(@PATH,24,4613.454,-5588.276,27.88166,0,0,0,0,100,0), +(@PATH,25,4615.112,-5588.271,28.6151,0,0,0,0,100,0), +(@PATH,26,4613.112,-5588.271,27.6151,0,0,0,0,100,0), +(@PATH,27,4612.612,-5588.271,27.3651,0,0,0,0,100,0), +(@PATH,28,4609.862,-5587.021,25.8651,0,0,0,0,100,0), +(@PATH,29,4608.112,-5586.021,24.8651,0,0,0,0,100,0), +(@PATH,30,4606.362,-5585.021,24.1151,0,0,0,0,100,0), +(@PATH,31,4604.612,-5584.021,22.8651,0,0,0,0,100,0), +(@PATH,32,4602.862,-5583.021,21.6151,0,0,0,0,100,0), +(@PATH,33,4601.112,-5582.021,20.8651,0,0,0,0,100,0), +(@PATH,34,4599.362,-5581.021,19.3651,0,0,0,0,100,0), +(@PATH,35,4597.612,-5580.021,18.3651,0,0,0,0,100,0), +(@PATH,36,4595.362,-5578.521,16.8651,0,0,0,0,100,0), +(@PATH,37,4593.612,-5577.771,15.6151,0,0,0,0,100,0), +(@PATH,38,4591.862,-5576.771,14.6151,0,0,0,0,100,0), +(@PATH,39,4590.112,-5575.771,13.8651,0,0,0,0,100,0), +(@PATH,40,4588.362,-5574.771,13.1151,0,0,0,0,100,0), +(@PATH,41,4586.612,-5573.771,12.1151,0,0,0,0,100,0), +(@PATH,42,4584.862,-5572.771,11.6151,0,0,0,0,100,0), +(@PATH,43,4583.112,-5571.771,10.8651,0,0,0,0,100,0), +(@PATH,44,4580.612,-5570.271,10.1151,0,0,0,0,100,0), +(@PATH,45,4578.862,-5569.271,9.365101,0,0,0,0,100,0), +(@PATH,46,4578.588,-5569.066,9.268532,0,0,0,0,100,0), +(@PATH,47,4577.088,-5568.316,8.768532,0,0,0,0,100,0), +(@PATH,48,4575.838,-5565.566,7.768532,0,0,0,0,100,0), +(@PATH,49,4575.338,-5563.816,7.018532,0,0,0,0,100,0), +(@PATH,50,4574.588,-5562.066,6.518532,0,0,0,0,100,0), +(@PATH,51,4573.588,-5560.316,5.768532,0,0,0,0,100,0), +(@PATH,52,4572.338,-5557.566,5.018532,0,0,0,0,100,0), +(@PATH,53,4572.302,-5557.273,4.829211,0,0,0,0,100,0), +(@PATH,54,4571.052,-5554.523,4.079211,0,0,0,0,100,0), +(@PATH,55,4570.302,-5551.523,3.579211,0,0,0,0,100,0), +(@PATH,56,4569.302,-5544.773,3.079211,0,0,0,0,100,0), +(@PATH,57,4565.425,-5523.652,2.546694,0,0,0,0,100,0), +(@PATH,58,4558.431,-5505.637,2.508454,0,0,0,0,100,0), +(@PATH,59,4558.492,-5505.963,2.279056,0,0,0,0,100,0), +(@PATH,60,4558.656,-5505.855,2.526844,0,0,0,0,100,0), +(@PATH,61,4565.748,-5523.84,2.603909,0,0,0,0,100,0), +(@PATH,62,4569.748,-5548.34,3.103909,0,0,0,0,100,0), +(@PATH,63,4570.498,-5552.09,3.603909,0,0,0,0,100,0), +(@PATH,64,4571.125,-5554.945,4.307666,0,0,0,0,100,0), +(@PATH,65,4572.375,-5557.695,5.057666,0,0,0,0,100,0), +(@PATH,66,4573.375,-5559.445,5.807666,0,0,0,0,100,0), +(@PATH,67,4574.375,-5561.945,6.307666,0,0,0,0,100,0), +(@PATH,68,4575.125,-5563.695,7.057666,0,0,0,0,100,0), +(@PATH,69,4575.875,-5565.445,7.807666,0,0,0,0,100,0), +(@PATH,70,4577.315,-5568.442,8.979671,0,0,0,0,100,0), +(@PATH,71,4580.065,-5569.942,9.979671,0,0,0,0,100,0), +(@PATH,72,4581.815,-5570.942,10.72967,0,0,0,0,100,0), +(@PATH,73,4584.315,-5572.442,11.47967,0,0,0,0,100,0), +(@PATH,74,4586.065,-5573.442,12.22967,0,0,0,0,100,0), +(@PATH,75,4587.815,-5574.442,12.97967,0,0,0,0,100,0), +(@PATH,76,4589.565,-5575.442,13.72967,0,0,0,0,100,0), +(@PATH,77,4591.315,-5576.442,14.72967,0,0,0,0,100,0), +(@PATH,78,4593.065,-5577.442,15.72967,0,0,0,0,100,0), +(@PATH,79,4594.565,-5578.192,16.47967,0,0,0,0,100,0), +(@PATH,80,4596.315,-5579.192,17.47967,0,0,0,0,100,0), +(@PATH,81,4598.065,-5580.192,18.72967,0,0,0,0,100,0), +(@PATH,82,4599.815,-5581.192,19.72967,0,0,0,0,100,0), +(@PATH,83,4601.565,-5582.192,20.97967,0,0,0,0,100,0), +(@PATH,84,4603.315,-5583.192,21.97967,0,0,0,0,100,0), +(@PATH,85,4605.065,-5583.942,22.72967,0,0,0,0,100,0), +(@PATH,86,4606.815,-5584.942,24.22967,0,0,0,0,100,0), +(@PATH,87,4609.315,-5586.442,25.47967,0,0,0,0,100,0), +(@PATH,88,4611.065,-5587.442,26.72967,0,0,0,0,100,0), +(@PATH,89,4611.174,-5587.652,26.94344,0,0,0,0,100,0), +(@PATH,90,4612.674,-5588.402,27.69344,0,0,0,0,100,0), +(@PATH,91,4615.674,-5588.402,28.94344,0,0,0,0,100,0), +(@PATH,92,4616.674,-5588.402,29.69344,0,0,0,0,100,0), +(@PATH,93,4618.674,-5588.152,30.44344,0,0,0,0,100,0), +(@PATH,94,4619.674,-5588.152,31.19344,0,0,0,0,100,0), +(@PATH,95,4621.674,-5588.152,32.19344,0,0,0,0,100,0), +(@PATH,96,4622.424,-5588.152,32.94344,0,0,0,0,100,0), +(@PATH,97,4623.424,-5588.152,33.19344,0,0,0,0,100,0), +(@PATH,98,4624.424,-5588.152,33.94344,0,0,0,0,100,0), +(@PATH,99,4625.424,-5588.152,34.44344,0,0,0,0,100,0), +(@PATH,100,4626.424,-5588.152,35.19344,0,0,0,0,100,0), +(@PATH,101,4627.424,-5588.152,35.69344,0,0,0,0,100,0), +(@PATH,102,4628.424,-5588.152,36.44344,0,0,0,0,100,0), +(@PATH,103,4629.424,-5587.902,36.94344,0,0,0,0,100,0), +(@PATH,104,4630.424,-5587.902,37.69344,0,0,0,0,100,0), +(@PATH,105,4631.424,-5587.902,38.19344,0,0,0,0,100,0), +(@PATH,106,4632.424,-5587.902,38.94344,0,0,0,0,100,0), +(@PATH,107,4633.424,-5587.902,39.44344,0,0,0,0,100,0), +(@PATH,108,4632.743,-5587.937,39.25474,0,0,0,0,100,0), +(@PATH,109,4633.743,-5587.937,39.75474,0,0,0,0,100,0), +(@PATH,110,4634.243,-5587.937,40.00474,0,0,0,0,100,0), +(@PATH,111,4635.993,-5585.437,40.75474,0,0,0,0,100,0), +(@PATH,112,4636.993,-5583.687,41.50474,0,0,0,0,100,0), +(@PATH,113,4638.493,-5581.437,42.25474,0,0,0,0,100,0), +(@PATH,114,4640.743,-5578.187,43.50474,0,0,0,0,100,0), +(@PATH,115,4641.032,-5577.918,43.48087,0,0,0,0,100,0), +(@PATH,116,4642.532,-5575.418,43.48087,0,0,0,0,100,0), +(@PATH,117,4643.532,-5572.418,42.98087,0,0,0,0,100,0), +(@PATH,118,4644.032,-5570.668,42.23087,0,0,0,0,100,0), +(@PATH,119,4644.532,-5567.668,41.23087,0,0,0,0,100,0), +(@PATH,120,4645.032,-5565.668,40.23087,0,0,0,0,100,0), +(@PATH,121,4645.532,-5564.168,38.98087,0,0,0,0,100,0), +(@PATH,122,4646.032,-5562.168,37.98087,0,0,0,0,100,0), +(@PATH,123,4646.532,-5560.168,36.98087,0,0,0,0,100,0), +(@PATH,124,4647.032,-5558.168,35.98087,0,0,0,0,100,0), +(@PATH,125,4647.782,-5555.418,35.23087,0,0,0,0,100,0), +(@PATH,126,4648.282,-5553.418,34.48087,0,0,0,0,100,0), +(@PATH,127,4648.611,-5553.267,34.28629,0,0,0,0,100,0), +(@PATH,128,4648.861,-5552.517,33.78629,0,0,0,0,100,0), +(@PATH,129,4649.361,-5550.767,33.03629,0,0,0,0,100,0), +(@PATH,130,4650.361,-5547.767,32.28629,0,0,0,0,100,0), +(@PATH,131,4651.111,-5546.017,31.78629,0,0,0,0,100,0), +(@PATH,132,4651.611,-5544.267,31.28629,0,0,0,0,100,0), +(@PATH,133,4652.111,-5542.517,30.78629,0,0,0,0,100,0), +(@PATH,134,4653.611,-5538.767,30.03629,0,0,0,0,100,0), +(@PATH,135,4654.861,-5534.767,29.53629,0,0,0,0,100,0), +(@PATH,136,4655.176,-5534.61,29.14608,0,0,0,0,100,0), +(@PATH,137,4655.426,-5533.86,29.14608,0,0,0,0,100,0), +(@PATH,138,4658.176,-5528.61,28.39608,0,0,0,0,100,0), +(@PATH,139,4661.176,-5522.61,28.14608,0,0,0,0,100,0), +(@PATH,140,4663.296,-5518.52,27.41638,0,0,0,0,100,0), +(@PATH,141,4666.796,-5515.52,26.66638,0,0,0,0,100,0), +(@PATH,142,4667.602,-5514.735,26.7351,0,0,0,0,100,0), +(@PATH,143,4664.102,-5517.985,27.2351,0,0,0,0,100,0), +(@PATH,144,4663.71,-5518.2,27.46549,0,0,0,0,100,0), +(@PATH,145,4663.21,-5518.7,27.71549,0,0,0,0,100,0), +(@PATH,146,4660.71,-5523.2,27.96549,0,0,0,0,100,0), +(@PATH,147,4657.71,-5529.2,28.71549,0,0,0,0,100,0), +(@PATH,148,4655.082,-5533.99,29.53152,0,0,0,0,100,0), +(@PATH,149,4653.332,-5538.74,30.03152,0,0,0,0,100,0), +(@PATH,150,4652.332,-5542.49,30.78152,0,0,0,0,100,0), +(@PATH,151,4651.832,-5544.24,31.28152,0,0,0,0,100,0), +(@PATH,152,4651.082,-5546.24,31.78152,0,0,0,0,100,0), +(@PATH,153,4650.332,-5547.99,32.28152,0,0,0,0,100,0), +(@PATH,154,4649.832,-5549.99,33.03152,0,0,0,0,100,0), +(@PATH,155,4648.461,-5552.834,34.08023,0,0,0,0,100,0), +(@PATH,156,4647.961,-5554.834,34.83023,0,0,0,0,100,0), +(@PATH,157,4647.461,-5556.584,35.58023,0,0,0,0,100,0), +(@PATH,158,4646.961,-5558.584,36.58023,0,0,0,0,100,0), +(@PATH,159,4646.461,-5560.584,37.58023,0,0,0,0,100,0), +(@PATH,160,4645.711,-5563.334,38.33023,0,0,0,0,100,0), +(@PATH,161,4645.461,-5565.084,39.58023,0,0,0,0,100,0), +(@PATH,162,4644.961,-5567.084,40.83023,0,0,0,0,100,0), +(@PATH,163,4644.461,-5569.084,41.83023,0,0,0,0,100,0), +(@PATH,164,4643.961,-5570.834,42.58023,0,0,0,0,100,0), +(@PATH,165,4642.961,-5573.834,43.33023,0,0,0,0,100,0), +(@PATH,166,4642.868,-5574.016,43.39613,0,0,0,0,100,0), +(@PATH,167,4642.368,-5575.766,43.64613,0,0,0,0,100,0), +(@PATH,168,4639.118,-5580.516,42.89613,0,0,0,0,100,0), +(@PATH,169,4637.118,-5583.766,41.64613,0,0,0,0,100,0), +(@PATH,170,4635.368,-5586.266,40.39613,0,0,0,0,100,0); + +SET @NPC := 110474; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4974.067,`position_y`=-4702.151,`position_z`=211.6858 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4974.067,-4702.151,211.6858,0,0,0,0,100,0), +(@PATH,2,4973.567,-4694.401,211.6858,0,0,0,0,100,0), +(@PATH,3,4972.317,-4684.151,211.6858,0,0,0,0,100,0), +(@PATH,4,4972.449,-4684.032,211.6815,0,0,0,0,100,0), +(@PATH,5,4972.199,-4683.032,211.6815,0,0,0,0,100,0), +(@PATH,6,4972.073,-4683.314,211.4305,0,0,0,0,100,0), +(@PATH,7,4972.434,-4683.377,211.6818,0,0,0,0,100,0), +(@PATH,8,4973.184,-4694.377,211.6818,0,0,0,0,100,0), +(@PATH,9,4974.222,-4702.475,211.6772,0,0,0,0,100,0), +(@PATH,10,4976.222,-4706.975,211.6772,0,0,0,0,100,0), +(@PATH,11,4979.872,-4716.739,211.652,0,0,0,0,100,0), +(@PATH,12,4979.707,-4716.649,211.4221,0,0,0,0,100,0), +(@PATH,13,4979.64,-4716.295,211.6743,0,0,0,0,100,0), +(@PATH,14,4976.14,-4707.045,211.6743,0,0,0,0,100,0); + +SET @NPC := 110473; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4971.524,`position_y`=-4651.398,`position_z`=211.6646 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4971.524,-4651.398,211.6646,0,0,0,0,100,0), +(@PATH,2,4971.524,-4650.148,211.6646,0,0,0,0,100,0), +(@PATH,3,4971.274,-4642.898,211.6646,0,0,0,0,100,0), +(@PATH,4,4971.195,-4642.912,211.4312,0,0,0,0,100,0), +(@PATH,5,4971.593,-4650.481,211.6812,0,0,0,0,100,0), +(@PATH,6,4971.843,-4651.481,211.6812,0,0,0,0,100,0), +(@PATH,7,4972.093,-4657.231,211.6812,0,0,0,0,100,0), +(@PATH,8,4972.093,-4659.231,211.6812,0,0,0,0,100,0), +(@PATH,9,4972.093,-4660.231,211.6812,0,0,0,0,100,0), +(@PATH,10,4972.593,-4665.231,211.6812,0,0,0,0,100,0), +(@PATH,11,4972.628,-4665.171,211.6984,0,0,0,0,100,0), +(@PATH,12,4972.378,-4661.171,211.6984,0,0,0,0,100,0), +(@PATH,13,4972.128,-4659.421,211.6984,0,0,0,0,100,0), +(@PATH,14,4972.128,-4657.421,211.6984,0,0,0,0,100,0), +(@PATH,15,4971.628,-4651.671,211.6984,0,0,0,0,100,0); + +SET @NPC := 110472; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=5006.468,`position_y`=-4761.551,`position_z`=211.3855 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,5006.468,-4761.551,211.3855,0,0,0,0,100,0), +(@PATH,2,5005.218,-4760.301,211.3855,0,0,0,0,100,0), +(@PATH,3,5003.468,-4759.551,211.3855,0,0,0,0,100,0), +(@PATH,4,5001.968,-4758.551,211.6355,0,0,0,0,100,0), +(@PATH,5,4999.169,-4756.928,211.6723,0,0,0,0,100,0), +(@PATH,6,4999.078,-4756.74,211.6491,0,0,0,0,100,0), +(@PATH,7,4995.578,-4756.99,211.6491,0,0,0,0,100,0), +(@PATH,8,4994.328,-4755.24,211.6491,0,0,0,0,100,0), +(@PATH,9,4994.02,-4755.05,211.6453,0,0,0,0,100,0), +(@PATH,10,4994.472,-4755.252,211.6491,0,0,0,0,100,0), +(@PATH,11,4995.472,-4757.002,211.6491,0,0,0,0,100,0), +(@PATH,12,4999.36,-4757.021,211.6276,0,0,0,0,100,0), +(@PATH,13,5001.86,-4758.521,211.6276,0,0,0,0,100,0), +(@PATH,14,5003.61,-4759.271,211.3776,0,0,0,0,100,0), +(@PATH,15,5003.792,-4759.599,211.3631,0,0,0,0,100,0), +(@PATH,16,5005.542,-4760.349,211.6131,0,0,0,0,100,0), +(@PATH,17,5006.792,-4761.849,211.6131,0,0,0,0,100,0), +(@PATH,18,5011.292,-4766.849,211.6131,0,0,0,0,100,0), +(@PATH,19,5014.042,-4769.599,211.6131,0,0,0,0,100,0), +(@PATH,20,5014.364,-4769.94,211.6148,0,0,0,0,100,0), +(@PATH,21,5014.864,-4770.44,211.6148,0,0,0,0,100,0), +(@PATH,22,5018.389,-4774.991,211.6234,0,0,0,0,100,0), +(@PATH,23,5020.639,-4778.491,211.6234,0,0,0,0,100,0), +(@PATH,24,5021.389,-4779.741,211.3734,0,0,0,0,100,0), +(@PATH,25,5021.803,-4779.973,211.3778,0,0,0,0,100,0), +(@PATH,26,5023.303,-4782.723,211.6278,0,0,0,0,100,0), +(@PATH,27,5031.042,-4794.147,211.6393,0,0,0,0,100,0), +(@PATH,28,5032.792,-4795.897,211.6393,0,0,0,0,100,0), +(@PATH,29,5037.042,-4799.647,211.6393,0,0,0,0,100,0), +(@PATH,30,5023.104,-4782.475,211.6226,0,0,0,0,100,0), +(@PATH,31,5021.354,-4779.975,211.6226,0,0,0,0,100,0), +(@PATH,32,5020.854,-4778.725,211.6226,0,0,0,0,100,0), +(@PATH,33,5018.14,-4774.706,211.6087,0,0,0,0,100,0), +(@PATH,34,5014.669,-4770.225,211.5951,0,0,0,0,100,0), +(@PATH,35,5011.419,-4766.725,211.5951,0,0,0,0,100,0); + +DELETE FROM `creature_template_addon` WHERE `entry`=26268; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(26268,0,0,0,1,27, ''); + +SET @NPC := 110556; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4970.492,`position_y`=-4715.575,`position_z`=219.7441 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4970.492,-4715.575,219.7441,0,0,0,0,100,0), +(@PATH,2,4971.992,-4715.325,220.4941,0,0,0,0,100,0), +(@PATH,3,4973.492,-4714.825,221.2441,0,0,0,0,100,0), +(@PATH,4,4975.742,-4714.325,221.7441,0,0,0,0,100,0), +(@PATH,5,4978.742,-4713.825,222.2441,0,0,0,0,100,0), +(@PATH,6,4980.742,-4713.575,221.9941,0,0,0,0,100,0), +(@PATH,7,4981.992,-4713.325,221.7441,0,0,0,0,100,0), +(@PATH,8,4983.742,-4712.825,221.2441,0,0,0,0,100,0), +(@PATH,9,4985.242,-4712.575,220.4941,0,0,0,0,100,0), +(@PATH,10,4986.242,-4712.325,219.7441,0,0,0,0,100,0), +(@PATH,11,4968.5,-4716.197,219.4686,0,0,0,0,100,0), +(@PATH,12,4968.5,-4716.197,219.4686,0.2173836,0,0,0,100,0), +(@PATH,13,4970.5,-4714.933,219.7303,0,0,0,0,100,0), +(@PATH,14,4971.75,-4714.433,220.4803,0,0,0,0,100,0), +(@PATH,15,4973,-4713.683,221.2303,0,0,0,0,100,0), +(@PATH,16,4975,-4712.683,221.7303,0,0,0,0,100,0), +(@PATH,17,4976,-4712.183,221.9803,0,0,0,0,100,0), +(@PATH,18,4978,-4711.183,222.2303,0,0,0,0,100,0), +(@PATH,19,4979.75,-4710.183,222.2303,0,0,0,0,100,0), +(@PATH,20,4982.5,-4708.683,221.4803,0,0,0,0,100,0), +(@PATH,21,4984,-4707.933,220.7303,0,0,0,0,100,0), +(@PATH,22,4985,-4707.433,219.7303,0,0,0,0,100,0), +(@PATH,23,4985.5,-4707.183,219.7303,0,0,0,0,100,0), +(@PATH,24,4987.75,-4704.183,219.7303,0,0,0,0,100,0), +(@PATH,25,4985.311,-4707.438,219.4958,0,0,0,0,100,0), +(@PATH,26,4985.311,-4707.438,219.4958,0.6189525,0,0,0,100,0), +(@PATH,27,4987.121,-4708.128,219.7317,0,0,0,0,100,0), +(@PATH,28,4996.999,-4712.775,219.6996,0,0,0,0,100,0), +(@PATH,29,4997.249,-4716.525,219.6996,0,0,0,0,100,0), +(@PATH,30,4996.261,-4712.509,219.4735,0,0,0,0,100,0), +(@PATH,31,4996.261,-4712.509,219.4735,5.849536,0,0,0,100,0), +(@PATH,32,4997.006,-4716.74,219.7261,0,0,0,0,100,0), +(@PATH,33,4997.506,-4720.74,219.4761,0,0,0,0,100,0), +(@PATH,34,4998.006,-4723.49,219.7261,0,0,0,0,100,0), +(@PATH,35,4998.103,-4723.636,219.7025,0,0,0,0,100,0), +(@PATH,36,4997.853,-4720.886,219.7025,0,0,0,0,100,0), +(@PATH,37,4997.595,-4720.635,219.7042,0,0,0,0,100,0), +(@PATH,38,4997.345,-4720.135,219.7042,0,0,0,0,100,0), +(@PATH,39,4997.345,-4716.885,219.4542,0,0,0,0,100,0), +(@PATH,40,4997.056,-4712.651,219.6972,0,0,0,0,100,0), +(@PATH,41,4991.556,-4700.401,219.6972,0,0,0,0,100,0), +(@PATH,42,4988.556,-4693.901,219.6972,0,0,0,0,100,0), +(@PATH,43,4986.112,-4688.446,219.7411,0,0,0,0,100,0), +(@PATH,44,4988.362,-4693.696,219.7411,0,0,0,0,100,0), +(@PATH,45,4989.805,-4696.215,219.7516,0,0,0,0,100,0), +(@PATH,46,4991.805,-4699.465,219.7516,0,0,0,0,100,0), +(@PATH,47,4988.768,-4694.563,219.4946,0,0,0,0,100,0), +(@PATH,48,4988.768,-4694.563,219.4946,5.140615,0,0,0,100,0), +(@PATH,49,4987.719,-4703.979,219.9336,0,0,0,0,100,0), +(@PATH,50,4985.469,-4706.229,219.9336,0,0,0,0,100,0), +(@PATH,51,4984.969,-4707.479,220.4336,0,0,0,0,100,0), +(@PATH,52,4984.469,-4708.479,220.4336,0,0,0,0,100,0), +(@PATH,53,4983.469,-4710.229,221.1836,0,0,0,0,100,0), +(@PATH,54,4982.217,-4712.462,221.5245,0,0,0,0,100,0), +(@PATH,55,4980.967,-4712.462,221.7745,0,0,0,0,100,0), +(@PATH,56,4978.467,-4712.962,222.0245,0,0,0,0,100,0), +(@PATH,57,4976.467,-4713.462,221.7745,0,0,0,0,100,0), +(@PATH,58,4976.035,-4713.909,221.9419,0,0,0,0,100,0), +(@PATH,59,4974.785,-4714.159,221.6919,0,0,0,0,100,0), +(@PATH,60,4973.035,-4714.659,221.1919,0,0,0,0,100,0), +(@PATH,61,4972.035,-4714.909,220.6919,0,0,0,0,100,0), +(@PATH,62,4970.535,-4715.409,219.9419,0,0,0,0,100,0), +(@PATH,63,4978.076,-4713.338,221.915,0,0,0,0,100,0), +(@PATH,64,4978.076,-4713.338,221.915,3.368376,0,0,0,100,0), +(@PATH,65,4976.91,-4713.574,221.9563,0,0,0,0,100,0), +(@PATH,66,4975.91,-4713.574,221.9563,0,0,0,0,100,0), +(@PATH,67,4972.91,-4713.824,221.2063,0,0,0,0,100,0), +(@PATH,68,4971.41,-4714.074,220.7063,0,0,0,0,100,0), +(@PATH,69,4970.16,-4714.324,219.9563,0,0,0,0,100,0), +(@PATH,70,4967.606,-4714.529,219.4961,0,0,0,0,100,0), +(@PATH,71,4967.606,-4714.529,219.4961,3.254826,0,0,0,100,0), +(@PATH,72,4965.34,-4710.163,219.7599,0,0,0,0,100,0), +(@PATH,73,4963.59,-4707.163,219.7599,0,0,0,0,100,0), +(@PATH,74,4959.034,-4705.619,219.5352,0,0,0,0,100,0), +(@PATH,75,4959.39,-4705.551,219.7635,0,0,0,0,100,0), +(@PATH,76,4959.64,-4707.801,219.7635,0,0,0,0,100,0), +(@PATH,77,4960.14,-4711.551,219.7635,0,0,0,0,100,0), +(@PATH,78,4960.938,-4715.122,219.7473,0,0,0,0,100,0), +(@PATH,79,4968.219,-4716.248,219.9708,0,0,0,0,100,0), +(@PATH,80,4970.219,-4715.498,219.9708,0,0,0,0,100,0), +(@PATH,81,4971.719,-4714.998,220.4708,0,0,0,0,100,0), +(@PATH,82,4972.969,-4714.748,221.2208,0,0,0,0,100,0), +(@PATH,83,4975.053,-4713.824,221.6586,0,0,0,0,100,0), +(@PATH,84,4976.303,-4713.574,221.9086,0,0,0,0,100,0), +(@PATH,85,4978.303,-4713.324,222.1586,0,0,0,0,100,0), +(@PATH,86,4980.553,-4712.824,221.9086,0,0,0,0,100,0), +(@PATH,87,4975.714,-4713.883,221.6543,0,0,0,0,100,0), +(@PATH,88,4975.714,-4713.883,221.6543,0.2268625,0,0,0,100,0), +(@PATH,89,4978.577,-4713.063,222.0859,0,0,0,0,100,0), +(@PATH,90,4980.827,-4712.813,221.8359,0,0,0,0,100,0), +(@PATH,91,4983.827,-4712.563,221.0859,0,0,0,0,100,0), +(@PATH,92,4985.077,-4712.313,220.5859,0,0,0,0,100,0), +(@PATH,93,4986.077,-4712.063,219.8359,0,0,0,0,100,0); + +SET @NPC := 118822; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3494.382,`position_y`=-4552.813,`position_z`=224.2461 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,3494.382,-4552.813,224.2461,0,0,0,0,100,0), +(@PATH,2,3495.632,-4551.813,223.9961,0,0,0,0,100,0), +(@PATH,3,3497.382,-4550.813,222.9961,0,0,0,0,100,0), +(@PATH,4,3499.882,-4549.313,222.4961,0,0,0,0,100,0), +(@PATH,5,3501.382,-4548.313,221.9961,0,0,0,0,100,0), +(@PATH,6,3503.882,-4546.813,221.2461,0,0,0,0,100,0), +(@PATH,7,3506.382,-4545.313,220.4961,0,0,0,0,100,0), +(@PATH,8,3506.673,-4544.896,220.2739,0,0,0,0,100,0), +(@PATH,9,3507.423,-4544.646,220.2739,0,0,0,0,100,0), +(@PATH,10,3508.673,-4543.396,219.7739,0,0,0,0,100,0), +(@PATH,11,3511.423,-4540.896,219.2739,0,0,0,0,100,0), +(@PATH,12,3514.411,-4538.24,218.5021,0,0,0,0,100,0), +(@PATH,13,3515.411,-4534.24,217.7521,0,0,0,0,100,0), +(@PATH,14,3516.161,-4531.74,217.2521,0,0,0,0,100,0), +(@PATH,15,3517.161,-4528.74,216.7521,0,0,0,0,100,0), +(@PATH,16,3518.161,-4524.99,216.2521,0,0,0,0,100,0), +(@PATH,17,3518.383,-4524.767,216.0448,0,0,0,0,100,0), +(@PATH,18,3518.883,-4523.517,215.7948,0,0,0,0,100,0), +(@PATH,19,3521.883,-4521.517,215.2948,0,0,0,0,100,0), +(@PATH,20,3523.383,-4520.267,214.7948,0,0,0,0,100,0), +(@PATH,21,3524.552,-4519.662,214.4079,0,0,0,0,100,0), +(@PATH,22,3526.552,-4519.912,213.4079,0,0,0,0,100,0), +(@PATH,23,3528.552,-4519.912,212.6579,0,0,0,0,100,0), +(@PATH,24,3530.552,-4519.912,211.9079,0,0,0,0,100,0), +(@PATH,25,3533.302,-4520.162,211.4079,0,0,0,0,100,0), +(@PATH,26,3535.302,-4520.162,210.6579,0,0,0,0,100,0), +(@PATH,27,3537.302,-4520.412,209.9079,0,0,0,0,100,0), +(@PATH,28,3537.519,-4520.006,209.603,0,0,0,0,100,0), +(@PATH,29,3539.019,-4520.256,209.103,0,0,0,0,100,0), +(@PATH,30,3542.519,-4518.756,208.353,0,0,0,0,100,0), +(@PATH,31,3541.411,-4519.309,208.4283,0,0,0,0,100,0), +(@PATH,32,3538.654,-4520.119,209.2209,0,0,0,0,100,0), +(@PATH,33,3536.654,-4520.119,209.7209,0,0,0,0,100,0), +(@PATH,34,3534.654,-4519.869,210.4709,0,0,0,0,100,0), +(@PATH,35,3532.654,-4519.869,211.2209,0,0,0,0,100,0), +(@PATH,36,3530.904,-4519.869,211.9709,0,0,0,0,100,0), +(@PATH,37,3528.904,-4519.619,212.7209,0,0,0,0,100,0), +(@PATH,38,3526.904,-4519.619,213.4709,0,0,0,0,100,0), +(@PATH,39,3524.904,-4519.619,214.2209,0,0,0,0,100,0), +(@PATH,40,3524.787,-4519.809,214.4233,0,0,0,0,100,0), +(@PATH,41,3524.287,-4519.809,214.6733,0,0,0,0,100,0), +(@PATH,42,3522.537,-4520.809,214.9233,0,0,0,0,100,0), +(@PATH,43,3520.537,-4522.309,215.6733,0,0,0,0,100,0), +(@PATH,44,3520.155,-4522.621,215.7749,0,0,0,0,100,0), +(@PATH,45,3518.655,-4523.871,216.2749,0,0,0,0,100,0), +(@PATH,46,3517.655,-4527.621,216.7749,0,0,0,0,100,0), +(@PATH,47,3516.905,-4530.121,217.0249,0,0,0,0,100,0), +(@PATH,48,3515.655,-4534.121,217.7749,0,0,0,0,100,0), +(@PATH,49,3514.23,-4538.046,218.7422,0,0,0,0,100,0), +(@PATH,50,3511.48,-4540.546,219.2422,0,0,0,0,100,0), +(@PATH,51,3507.98,-4544.046,219.9922,0,0,0,0,100,0), +(@PATH,52,3507.672,-4544.28,220.189,0,0,0,0,100,0), +(@PATH,53,3507.172,-4544.78,220.439,0,0,0,0,100,0), +(@PATH,54,3503.672,-4547.03,221.439,0,0,0,0,100,0), +(@PATH,55,3501.922,-4547.78,221.939,0,0,0,0,100,0), +(@PATH,56,3499.672,-4549.28,222.439,0,0,0,0,100,0), +(@PATH,57,3497.922,-4550.28,223.189,0,0,0,0,100,0), +(@PATH,58,3495.37,-4551.927,224.1924,0,0,0,0,100,0), +(@PATH,59,3493.12,-4553.927,224.9424,0,0,0,0,100,0), +(@PATH,60,3491.37,-4555.177,225.4424,0,0,0,0,100,0), +(@PATH,61,3489.37,-4556.927,226.1924,0,0,0,0,100,0), +(@PATH,62,3487.12,-4558.677,226.9424,0,0,0,0,100,0), +(@PATH,63,3488.252,-4557.707,226.4908,0,0,0,0,100,0), +(@PATH,64,3490.502,-4555.957,225.7408,0,0,0,0,100,0), +(@PATH,65,3492.002,-4554.957,225.2408,0,0,0,0,100,0), +(@PATH,66,3494.252,-4552.957,224.4908,0,0,0,0,100,0), +(@PATH,67,3494.369,-4552.621,224.1573,0,0,0,0,100,0), +(@PATH,68,3495.619,-4551.871,223.9073,0,0,0,0,100,0), +(@PATH,69,3497.369,-4550.621,223.1573,0,0,0,0,100,0), +(@PATH,70,3499.869,-4549.121,222.4073,0,0,0,0,100,0), +(@PATH,71,3501.369,-4548.371,222.1573,0,0,0,0,100,0), +(@PATH,72,3503.869,-4546.871,221.4073,0,0,0,0,100,0), +(@PATH,73,3506.369,-4545.371,220.6573,0,0,0,0,100,0); +UPDATE `smart_scripts` SET `action_param1`=1 WHERE `entryorguid`=26356 AND `source_type`=0 AND `id`=0 AND `link`=1; + +SET @NPC := 98061; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4037.801,`position_y`=-4305.377,`position_z`=252.4434 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4037.801,-4305.377,252.4434,0,0,0,0,100,0), +(@PATH,2,4029.266,-4311.001,252.5234,0,0,0,0,100,0), +(@PATH,3,4029.175,-4310.955,252.2501,0,0,0,0,100,0), +(@PATH,4,4029.509,-4310.642,252.4412,0,0,0,0,100,0), +(@PATH,5,4037.943,-4305.163,252.2845,0,0,0,0,100,0), +(@PATH,6,4054.193,-4300.913,251.7845,0,0,0,0,100,0), +(@PATH,7,4062.19,-4298.607,251.5605,0,0,0,0,100,0), +(@PATH,8,4086.898,-4293.291,251.9268,0,0,0,0,100,0), +(@PATH,9,4086.576,-4293.453,251.7249,0,0,0,0,100,0), +(@PATH,10,4086.678,-4293.366,251.7816,0,0,0,0,100,0), +(@PATH,11,4062,-4298.887,251.8086,0,0,0,0,100,0), +(@PATH,12,4046.75,-4302.637,252.0586,0,0,0,0,100,0), +(@PATH,13,4037.769,-4305.386,252.4443,0,0,0,0,100,0), +(@PATH,14,4029.219,-4311.032,252.5237,0,0,0,0,100,0), +(@PATH,15,4029.175,-4310.955,252.2501,0,0,0,0,100,0); + +UPDATE `smart_scripts` SET `action_param1`=1 WHERE `entryorguid`=26389 AND `source_type`=0 AND `id`=0 AND `link`=1; +SET @NPC := 98054; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4043.963,`position_y`=-4430.786,`position_z`=261.5165 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4043.963,-4430.786,261.5165,0,0,0,0,100,0), +(@PATH,2,4044.963,-4432.786,262.0165,0,0,0,0,100,0), +(@PATH,3,4044.713,-4435.286,262.7665,0,0,0,0,100,0), +(@PATH,4,4045.213,-4436.286,263.0165,0,0,0,0,100,0), +(@PATH,5,4045.463,-4436.786,263.0165,0,0,0,0,100,0), +(@PATH,6,4047.463,-4438.786,262.7665,0,0,0,0,100,0), +(@PATH,7,4047.963,-4439.786,263.5165,0,0,0,0,100,0), +(@PATH,8,4047.949,-4440.013,263.7135,0,0,0,0,100,0), +(@PATH,9,4049.949,-4440.513,264.2135,0,0,0,0,100,0), +(@PATH,10,4048.949,-4441.763,264.7135,0,0,0,0,100,0), +(@PATH,11,4048.949,-4443.763,265.2135,0,0,0,0,100,0), +(@PATH,12,4047.699,-4445.763,266.2135,0,0,0,0,100,0), +(@PATH,13,4046.199,-4447.263,266.7135,0,0,0,0,100,0), +(@PATH,14,4043.449,-4446.763,267.4635,0,0,0,0,100,0), +(@PATH,15,4042.699,-4448.013,267.9635,0,0,0,0,100,0), +(@PATH,16,4041.949,-4448.513,267.9635,0,0,0,0,100,0), +(@PATH,17,4041.449,-4453.513,267.4635,0,0,0,0,100,0), +(@PATH,18,4041.242,-4453.717,267.8022,0,0,0,0,100,0), +(@PATH,19,4040.242,-4454.467,268.3022,0,0,0,0,100,0), +(@PATH,20,4040.242,-4456.467,268.8022,0,0,0,0,100,0), +(@PATH,21,4040.242,-4460.217,269.5522,0,0,0,0,100,0), +(@PATH,22,4040.489,-4464.713,269.6811,0,0,0,0,100,0), +(@PATH,23,4046.239,-4480.213,269.1811,0,0,0,0,100,0), +(@PATH,24,4046.276,-4479.878,269.3551,0,0,0,0,100,0), +(@PATH,25,4044.026,-4474.378,270.1051,0,0,0,0,100,0), +(@PATH,26,4040.298,-4464.532,269.725,0,0,0,0,100,0), +(@PATH,27,4040.298,-4459.782,269.225,0,0,0,0,100,0), +(@PATH,28,4040.298,-4455.782,268.475,0,0,0,0,100,0), +(@PATH,29,4040.299,-4455.474,268.2261,0,0,0,0,100,0), +(@PATH,30,4040.299,-4454.224,267.9761,0,0,0,0,100,0), +(@PATH,31,4042.799,-4453.224,267.7261,0,0,0,0,100,0), +(@PATH,32,4046.049,-4454.224,267.7261,0,0,0,0,100,0), +(@PATH,33,4047.799,-4452.974,267.2261,0,0,0,0,100,0), +(@PATH,34,4048.549,-4450.474,266.7261,0,0,0,0,100,0), +(@PATH,35,4049.049,-4444.724,265.7261,0,0,0,0,100,0), +(@PATH,36,4050.049,-4444.724,265.7261,0,0,0,0,100,0), +(@PATH,37,4050.549,-4442.974,264.9761,0,0,0,0,100,0), +(@PATH,38,4049.437,-4441.189,263.9388,0,0,0,0,100,0), +(@PATH,39,4047.937,-4438.439,262.9388,0,0,0,0,100,0), +(@PATH,40,4045.687,-4436.939,262.9388,0,0,0,0,100,0), +(@PATH,41,4044.687,-4436.189,262.9388,0,0,0,0,100,0), +(@PATH,42,4043.937,-4433.189,261.9388,0,0,0,0,100,0), +(@PATH,43,4043.437,-4430.439,261.4388,0,0,0,0,100,0), +(@PATH,44,4043.437,-4428.939,261.4388,0,0,0,0,100,0), +(@PATH,45,4038.512,-4412.942,261.4726,0,0,0,0,100,0), +(@PATH,46,4045.009,-4403.787,261.2599,0,0,0,0,100,0), +(@PATH,47,4050.509,-4398.787,260.7599,0,0,0,0,100,0), +(@PATH,48,4054.184,-4395.831,260.5081,0,0,0,0,100,0), +(@PATH,49,4060.914,-4401.005,260.7264,0,0,0,0,100,0), +(@PATH,50,4060.763,-4401.35,260.5203,0,0,0,0,100,0), +(@PATH,51,4060.835,-4401.013,260.7022,0,0,0,0,100,0); + +-- Earthen Warrior SAI +SET @ENTRY := 26282; +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,1,0,100,0,5000,5000,10000,10000,49,0,0,0,0,0,0,19,26284,10,0,0,0,0,0,"Earthen Warrior - Out of Combat - Start Attacking"); + +SET @NPC := 112260; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4626.77,`position_y`=-4468.18,`position_z`=188.7218 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4626.77,-4468.18,188.7218,0,0,0,0,100,0), +(@PATH,2,4628.02,-4468.43,188.7218,0,0,0,0,100,0), +(@PATH,3,4633.77,-4469.43,189.2218,0,0,0,0,100,0), +(@PATH,4,4638.52,-4470.18,189.7218,0,0,0,0,100,0), +(@PATH,5,4642.52,-4470.93,190.4718,0,0,0,0,100,0), +(@PATH,6,4644.66,-4471.42,191.0322,0,0,0,0,100,0), +(@PATH,7,4647.66,-4471.42,191.5322,0,0,0,0,100,0), +(@PATH,8,4651.41,-4471.42,191.7822,0,0,0,0,100,0), +(@PATH,9,4655.41,-4471.42,192.5322,0,0,0,0,100,0), +(@PATH,10,4659.563,-4471.758,193.4037,0,0,0,0,100,0), +(@PATH,11,4667.063,-4474.758,193.9037,0,0,0,0,100,0), +(@PATH,12,4667.158,-4472.282,193.5602,0,0,0,0,100,0), +(@PATH,13,4659.328,-4471.715,193.0153,0,0,0,0,100,0), +(@PATH,14,4655.328,-4471.715,192.5153,0,0,0,0,100,0), +(@PATH,15,4651.578,-4471.465,191.7653,0,0,0,0,100,0), +(@PATH,16,4647.578,-4471.465,191.5153,0,0,0,0,100,0), +(@PATH,17,4644.492,-4471.189,190.7167,0,0,0,0,100,0), +(@PATH,18,4640.492,-4470.439,189.9667,0,0,0,0,100,0), +(@PATH,19,4635.742,-4469.689,189.7167,0,0,0,0,100,0), +(@PATH,20,4630.992,-4468.939,188.9667,0,0,0,0,100,0), +(@PATH,21,4627.861,-4468.194,188.4529,0,0,0,0,100,0), +(@PATH,22,4625.361,-4467.944,188.7029,0,0,0,0,100,0), +(@PATH,23,4619.689,-4466.896,187.1016,0,0,0,0,100,0), +(@PATH,24,4609.689,-4465.646,184.6016,0,0,0,0,100,0), +(@PATH,25,4608.689,-4465.646,184.6016,0,0,0,0,100,0), +(@PATH,26,4608.402,-4465.411,184.3824,0,0,0,0,100,0), +(@PATH,27,4605.652,-4465.161,184.3824,0,0,0,0,100,0), +(@PATH,28,4595.808,-4461.938,184.4014,0,0,0,0,100,0), +(@PATH,29,4595.772,-4462.198,184.1551,0,0,0,0,100,0), +(@PATH,30,4595.927,-4462.176,184.3824,0,0,0,0,100,0), +(@PATH,31,4605.99,-4465.424,184.4906,0,0,0,0,100,0), +(@PATH,32,4609.24,-4465.924,183.9906,0,0,0,0,100,0), +(@PATH,33,4619.987,-4467.194,187.3334,0,0,0,0,100,0), +(@PATH,34,4626.487,-4467.944,188.5834,0,0,0,0,100,0), +(@PATH,35,4626.743,-4468.349,188.8552,0,0,0,0,100,0), +(@PATH,36,4627.993,-4468.349,188.8552,0,0,0,0,100,0), +(@PATH,37,4633.993,-4469.349,189.1052,0,0,0,0,100,0), +(@PATH,38,4638.493,-4470.099,189.8552,0,0,0,0,100,0), +(@PATH,39,4642.493,-4470.849,190.3552,0,0,0,0,100,0); + +SET @NPC := 112265; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4740.915,`position_y`=-4506.604,`position_z`=199.756 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4740.915,-4506.604,199.756,0,0,0,0,100,0), +(@PATH,2,4739.165,-4508.604,200.256,0,0,0,0,100,0), +(@PATH,3,4736.571,-4511.472,200.7764,0,0,0,0,100,0), +(@PATH,4,4732.571,-4516.722,201.2764,0,0,0,0,100,0), +(@PATH,5,4729.089,-4521.665,201.4696,0,0,0,0,100,0), +(@PATH,6,4729.089,-4524.915,202.2196,0,0,0,0,100,0), +(@PATH,7,4727.339,-4528.165,202.7196,0,0,0,0,100,0), +(@PATH,8,4725.089,-4532.415,203.2196,0,0,0,0,100,0), +(@PATH,9,4720.262,-4531.4,203.6031,0,0,0,0,100,0), +(@PATH,10,4719.762,-4532.4,203.8531,0,0,0,0,100,0), +(@PATH,11,4719.762,-4533.4,204.1031,0,0,0,0,100,0), +(@PATH,12,4718.512,-4536.15,204.6031,0,0,0,0,100,0), +(@PATH,13,4715.762,-4538.4,205.1031,0,0,0,0,100,0), +(@PATH,14,4714.762,-4539.65,205.6031,0,0,0,0,100,0), +(@PATH,15,4715.869,-4538.347,205.2154,0,0,0,0,100,0), +(@PATH,16,4717.119,-4536.597,204.7154,0,0,0,0,100,0), +(@PATH,17,4718.119,-4535.847,204.4654,0,0,0,0,100,0), +(@PATH,18,4717.619,-4533.347,204.4654,0,0,0,0,100,0), +(@PATH,19,4719.119,-4530.597,203.4654,0,0,0,0,100,0), +(@PATH,20,4719.277,-4530.432,203.2003,0,0,0,0,100,0), +(@PATH,21,4720.527,-4531.182,203.4503,0,0,0,0,100,0), +(@PATH,22,4721.527,-4529.432,202.9503,0,0,0,0,100,0), +(@PATH,23,4723.027,-4525.432,202.4503,0,0,0,0,100,0), +(@PATH,24,4726.277,-4523.432,201.7003,0,0,0,0,100,0), +(@PATH,25,4729.367,-4521.513,201.2202,0,0,0,0,100,0), +(@PATH,26,4736.9,-4511.23,200.8284,0,0,0,0,100,0), +(@PATH,27,4739.9,-4507.73,199.8284,0,0,0,0,100,0), +(@PATH,28,4742.65,-4504.73,199.5784,0,0,0,0,100,0); + +SET @NPC := 112263; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4763.436,`position_y`=-4489.991,`position_z`=196.598 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4763.436,-4489.991,196.598,0,0,0,0,100,0), +(@PATH,2,4777.686,-4503.491,197.098,0,0,0,0,100,0), +(@PATH,3,4777.988,-4503.717,197.3403,0,0,0,0,100,0), +(@PATH,4,4779.238,-4504.967,197.3403,0,0,0,0,100,0), +(@PATH,5,4787.988,-4509.217,197.5903,0,0,0,0,100,0), +(@PATH,6,4797.488,-4514.217,198.3403,0,0,0,0,100,0), +(@PATH,7,4791.602,-4511.282,197.6792,0,0,0,0,100,0), +(@PATH,8,4781.352,-4506.032,197.4292,0,0,0,0,100,0), +(@PATH,9,4779.015,-4504.664,197.1621,0,0,0,0,100,0), +(@PATH,10,4764.765,-4491.164,196.6621,0,0,0,0,100,0), +(@PATH,11,4764.466,-4490.788,196.5181,0,0,0,0,100,0), +(@PATH,12,4763.216,-4489.788,196.5181,0,0,0,0,100,0), +(@PATH,13,4757.216,-4483.288,195.7681,0,0,0,0,100,0), +(@PATH,14,4751.675,-4477.44,195.3216,0,0,0,0,100,0), +(@PATH,15,4740.917,-4467.688,195.4378,0,0,0,0,100,0), +(@PATH,16,4733.417,-4458.938,194.9378,0,0,0,0,100,0), +(@PATH,17,4730.063,-4454.976,194.4022,0,0,0,0,100,0), +(@PATH,18,4726.313,-4450.476,193.9022,0,0,0,0,100,0), +(@PATH,19,4721.563,-4444.476,193.4022,0,0,0,0,100,0), +(@PATH,20,4721.331,-4444.313,193.3035,0,0,0,0,100,0), +(@PATH,21,4719.581,-4442.063,193.0535,0,0,0,0,100,0), +(@PATH,22,4712.081,-4433.313,192.5535,0,0,0,0,100,0), +(@PATH,23,4706.962,-4427.567,192.1902,0,0,0,0,100,0), +(@PATH,24,4700.712,-4420.317,191.6902,0,0,0,0,100,0), +(@PATH,25,4704.823,-4424.94,191.8282,0,0,0,0,100,0), +(@PATH,26,4705.068,-4425.129,192.0756,0,0,0,0,100,0), +(@PATH,27,4707.318,-4427.629,192.3256,0,0,0,0,100,0), +(@PATH,28,4714.318,-4435.879,192.8256,0,0,0,0,100,0), +(@PATH,29,4719.729,-4442.429,193.2542,0,0,0,0,100,0), +(@PATH,30,4725.229,-4449.179,193.7542,0,0,0,0,100,0), +(@PATH,31,4729.479,-4454.679,194.2542,0,0,0,0,100,0), +(@PATH,32,4729.81,-4454.901,194.5507,0,0,0,0,100,0), +(@PATH,33,4730.31,-4455.401,194.5507,0,0,0,0,100,0), +(@PATH,34,4734.56,-4460.401,195.0507,0,0,0,0,100,0), +(@PATH,35,4741.313,-4467.867,195.4152,0,0,0,0,100,0); + +-- correction +-- Grizzly Hills Giant SAI +SET @ENTRY := 26261; +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,8,0,100,0,47394,0,0,0,33,26261,0,0,0,0,0,7,0,0,0,0,0,0,0,"Grizzly Hills Giant - On Spellhit 'Kurun's Blessing' - Quest Credit 'Rallying the Troops'"), +(@ENTRY,0,1,0,1,0,100,0,2000,5000,4000,6000,11,46815,0,0,0,0,0,19,26264,100,0,0,0,0,0,"Grizzly Hills Giant - Out of Combat - Cast 'Toss Boulder'"); + +SET @NPC := 110559; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4974.938,`position_y`=-4745.822,`position_z`=219.5011 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4974.938,-4745.822,219.5011,0,0,0,0,100,0), +(@PATH,2,4974.938,-4745.822,219.5011,2.057687,0,0,0,100,0), +(@PATH,3,4974.938,-4745.822,219.5011,0,0,0,0,100,0), +(@PATH,4,4974.938,-4745.822,219.5011,2.057687,0,0,0,100,0), +(@PATH,5,4970.268,-4736.388,219.75,0,0,0,0,100,0), +(@PATH,6,4969.018,-4734.138,219.75,0,0,0,0,100,0), +(@PATH,7,4968.648,-4734.162,219.7481,0,0,0,0,100,0), +(@PATH,8,4969.148,-4736.162,219.7481,0,0,0,0,100,0), +(@PATH,9,4970.325,-4738.761,219.7499,0,0,0,0,100,0), +(@PATH,10,4974.973,-4749.851,219.75,0,0,0,0,100,0), +(@PATH,11,4977.148,-4754.923,219.7599,0,0,0,0,100,0), +(@PATH,12,4977.898,-4756.173,219.7599,0,0,0,0,100,0), +(@PATH,13,4976.332,-4753.346,219.5004,0,0,0,0,100,0), +(@PATH,14,4976.332,-4753.346,219.5004,5.131248,0,0,0,100,0), +(@PATH,15,4978.357,-4755.924,219.7322,0,0,0,0,100,0), +(@PATH,16,4985.357,-4766.174,219.7322,0,0,0,0,100,0), +(@PATH,17,4988.607,-4770.424,219.7322,0,0,0,0,100,0), +(@PATH,18,4990.607,-4773.424,219.7322,0,0,0,0,100,0), +(@PATH,19,4978.615,-4756.599,219.5061,0,0,0,0,100,0), +(@PATH,20,4978.615,-4756.599,219.5061,5.324385,0,0,0,100,0), +(@PATH,21,4989.826,-4764.923,219.9392,0,0,0,0,100,0), +(@PATH,22,4992.076,-4766.923,220.9392,0,0,0,0,100,0), +(@PATH,23,4994.826,-4767.173,219.9392,0,0,0,0,100,0), +(@PATH,24,4997.076,-4766.923,220.9392,0,0,0,0,100,0), +(@PATH,25,4998.326,-4766.423,221.4392,0,0,0,0,100,0), +(@PATH,26,5002.076,-4765.673,221.9392,0,0,0,0,100,0), +(@PATH,27,5004.826,-4765.173,222.1892,0,0,0,0,100,0), +(@PATH,28,5005.213,-4765.373,222.2207,0,0,0,0,100,0), +(@PATH,29,5006.713,-4764.873,221.9707,0,0,0,0,100,0), +(@PATH,30,5008.463,-4763.873,221.7207,0,0,0,0,100,0), +(@PATH,31,5010.463,-4762.623,221.2207,0,0,0,0,100,0), +(@PATH,32,5011.713,-4762.123,220.7207,0,0,0,0,100,0), +(@PATH,33,5012.463,-4761.623,219.9707,0,0,0,0,100,0), +(@PATH,34,5014.963,-4760.373,219.9707,0,0,0,0,100,0), +(@PATH,35,5013.416,-4761.159,219.5162,0,0,0,0,100,0), +(@PATH,36,5013.416,-4761.159,219.5162,0.5364561,0,0,0,100,0), +(@PATH,37,5012.949,-4758.56,219.7025,0,0,0,0,100,0), +(@PATH,38,5011.449,-4752.56,219.7025,0,0,0,0,100,0), +(@PATH,39,5011.199,-4749.81,219.7025,0,0,0,0,100,0), +(@PATH,40,5010.699,-4747.81,219.7025,0,0,0,0,100,0), +(@PATH,41,5011.182,-4745.968,219.433,0,0,0,0,100,0), +(@PATH,42,5013.682,-4748.968,219.683,0,0,0,0,100,0), +(@PATH,43,5014.682,-4750.218,219.683,0,0,0,0,100,0), +(@PATH,44,5013.822,-4749.14,219.4679,0,0,0,0,100,0), +(@PATH,45,5015.072,-4750.64,219.7179,0,0,0,0,100,0), +(@PATH,46,5015.822,-4751.89,219.7179,0,0,0,0,100,0), +(@PATH,47,5016.797,-4758.994,219.9411,0,0,0,0,100,0), +(@PATH,48,5014.797,-4760.244,219.9411,0,0,0,0,100,0), +(@PATH,49,5013.047,-4760.994,219.9411,0,0,0,0,100,0), +(@PATH,50,5011.547,-4761.994,220.6911,0,0,0,0,100,0), +(@PATH,51,5010.547,-4762.744,221.1911,0,0,0,0,100,0), +(@PATH,52,5008.547,-4763.994,221.6911,0,0,0,0,100,0), +(@PATH,53,5007.547,-4764.494,221.9411,0,0,0,0,100,0), +(@PATH,54,5016.685,-4757.653,219.5163,0,0,0,0,100,0), +(@PATH,55,5016.685,-4757.653,219.5163,4.85295,0,0,0,100,0), +(@PATH,56,5014.053,-4759.563,219.7658,0,0,0,0,100,0), +(@PATH,57,5012.553,-4760.563,219.7658,0,0,0,0,100,0), +(@PATH,58,5011.053,-4761.563,220.5158,0,0,0,0,100,0), +(@PATH,59,5010.053,-4762.563,221.2658,0,0,0,0,100,0), +(@PATH,60,5007.553,-4764.063,221.7658,0,0,0,0,100,0), +(@PATH,61,5005.303,-4765.813,222.0158,0,0,0,0,100,0), +(@PATH,62,5003.553,-4767.063,222.0158,0,0,0,0,100,0), +(@PATH,63,5000.803,-4769.063,221.2658,0,0,0,0,100,0), +(@PATH,64,4999.553,-4769.813,220.5158,0,0,0,0,100,0), +(@PATH,65,4998.303,-4770.813,219.7658,0,0,0,0,100,0), +(@PATH,66,5015.091,-4758.8,219.5454,0,0,0,0,100,0), +(@PATH,67,5015.091,-4758.8,219.5454,3.765347,0,0,0,100,0), +(@PATH,68,5013.777,-4759.399,219.7824,0,0,0,0,100,0), +(@PATH,69,5012.027,-4760.149,219.5324,0,0,0,0,100,0), +(@PATH,70,5010.527,-4760.399,220.5324,0,0,0,0,100,0), +(@PATH,71,5009.027,-4761.149,221.2824,0,0,0,0,100,0), +(@PATH,72,5007.277,-4761.899,221.5324,0,0,0,0,100,0), +(@PATH,73,5005.277,-4761.899,222.0324,0,0,0,0,100,0), +(@PATH,74,5003.527,-4763.399,222.2824,0,0,0,0,100,0), +(@PATH,75,5001.527,-4764.899,222.2824,0,0,0,0,100,0), +(@PATH,76,4998.527,-4766.399,221.2824,0,0,0,0,100,0), +(@PATH,77,4997.527,-4767.149,220.7824,0,0,0,0,100,0), +(@PATH,78,4996.527,-4767.399,219.7824,0,0,0,0,100,0), +(@PATH,79,4995.777,-4767.649,219.7824,0,0,0,0,100,0), +(@PATH,80,4991.527,-4767.899,219.7824,0,0,0,0,100,0), +(@PATH,81,4987.777,-4765.649,219.7824,0,0,0,0,100,0), +(@PATH,82,4981.399,-4761.659,219.763,0,0,0,0,100,0), +(@PATH,83,4977.899,-4756.159,219.763,0,0,0,0,100,0), +(@PATH,84,4977.707,-4755.765,219.7526,0,0,0,0,100,0), +(@PATH,85,4976.957,-4754.515,219.7526,0,0,0,0,100,0), +(@PATH,86,4974.813,-4749.59,219.7486,0,0,0,0,100,0), +(@PATH,87,4975.045,-4750.456,219.4998,0,0,0,0,100,0), +(@PATH,88,4975.045,-4750.456,219.4998,1.989743,0,0,0,100,0), +(@PATH,89,4969.571,-4736.454,219.7493,0,0,0,0,100,0), +(@PATH,90,4968.821,-4734.204,219.7493,0,0,0,0,100,0), +(@PATH,91,4972.802,-4744.884,219.4986,0,0,0,0,100,0), +(@PATH,92,4972.802,-4744.884,219.4986,1.953552,0,0,0,100,0), +(@PATH,93,4969.699,-4736.418,219.7488,0,0,0,0,100,0), +(@PATH,94,4968.699,-4734.168,219.7488,0,0,0,0,100,0); + +-- Runed Giant SAI +SET @ENTRY := 26417; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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,2,0,1,0,100,0,5000,5000,10000,10000,49,0,0,0,0,0,0,19,26261,15,0,0,0,0,0,"Runed Giant - Out of Combat - Start Attacking"); + +SET @NPC := 86438; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4795.183,`position_y`=-4858.25,`position_z`=25.82121 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4795.183,-4858.25,25.82121,0,0,0,0,100,0), +(@PATH,2,4793.933,-4857.25,25.82121,0,0,0,0,100,0), +(@PATH,3,4786.933,-4851,25.82121,0,0,0,0,100,0), +(@PATH,4,4783.933,-4848.5,25.57121,0,0,0,0,100,0), +(@PATH,5,4775.606,-4841.151,25.45528,0,0,0,0,100,0), +(@PATH,6,4775.606,-4841.151,25.45528,2.513274,0,0,0,100,0), +(@PATH,7,4783.6,-4848.556,25.60373,0,0,0,0,100,0), +(@PATH,8,4786.35,-4851.306,25.85373,0,0,0,0,100,0), +(@PATH,9,4793.35,-4858.056,25.85373,0,0,0,0,100,0), +(@PATH,10,4793.512,-4857.986,25.97804,0,0,0,0,100,0), +(@PATH,11,4794.762,-4859.236,25.97804,0,0,0,0,100,0), +(@PATH,12,4798.762,-4857.986,25.72804,0,0,0,0,100,0), +(@PATH,13,4800.262,-4857.736,25.72804,0,0,0,0,100,0), +(@PATH,14,4802.262,-4856.986,25.72804,0,0,0,0,100,0), +(@PATH,15,4810.12,-4854.692,25.79934,0,0,0,0,100,0), +(@PATH,16,4816.12,-4851.192,25.79934,0,0,0,0,100,0), +(@PATH,17,4818.37,-4850.192,25.54934,0,0,0,0,100,0), +(@PATH,18,4819.37,-4849.692,25.54934,0,0,0,0,100,0), +(@PATH,19,4821.12,-4848.942,25.79934,0,0,0,0,100,0), +(@PATH,20,4823.87,-4847.192,25.54934,0,0,0,0,100,0), +(@PATH,21,4825.23,-4846.544,25.45987,5.550147,0,0,0,100,0), +(@PATH,22,4823.903,-4847.049,25.59635,0,0,0,0,100,0), +(@PATH,23,4821.653,-4848.049,25.59635,0,0,0,0,100,0), +(@PATH,24,4820.403,-4848.549,25.59635,0,0,0,0,100,0), +(@PATH,25,4816.653,-4850.049,25.59635,0,0,0,0,100,0), +(@PATH,26,4814.903,-4850.549,25.59635,0,0,0,0,100,0), +(@PATH,27,4803.903,-4854.799,25.84635,0,0,0,0,100,0), +(@PATH,28,4800.153,-4856.299,25.84635,0,0,0,0,100,0), +(@PATH,29,4799.153,-4856.799,25.84635,0,0,0,0,100,0), +(@PATH,30,4795.174,-4858.254,25.82136,0,0,0,0,100,0), +(@PATH,31,4793.924,-4857.254,25.82136,0,0,0,0,100,0), +(@PATH,32,4786.924,-4851.004,25.82136,0,0,0,0,100,0), +(@PATH,33,4783.924,-4848.504,25.57136,0,0,0,0,100,0), +(@PATH,34,4775.606,-4841.151,25.45528,0,0,0,0,100,0), +(@PATH,35,4775.606,-4841.151,25.45528,2.513274,0,0,0,100,0); + +SET @NPC := 86437; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4766.285,`position_y`=-4851.221,`position_z`=25.88538 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,4766.285,-4851.221,25.88538,0,0,0,0,100,0), +(@PATH,2,4764.035,-4852.971,25.63538,0,0,0,0,100,0), +(@PATH,3,4762.535,-4853.971,25.38538,0,0,0,0,100,0), +(@PATH,4,4761.535,-4853.971,25.38538,0,0,0,0,100,0), +(@PATH,5,4760.035,-4853.971,25.63538,0,0,0,0,100,0), +(@PATH,6,4758.785,-4853.971,26.13538,0,0,0,0,100,0), +(@PATH,7,4758.035,-4854.221,26.38538,0,0,0,0,100,0), +(@PATH,8,4756.035,-4854.471,26.38538,0,0,0,0,100,0), +(@PATH,9,4753.785,-4854.971,26.38538,0,0,0,0,100,0), +(@PATH,10,4752.035,-4855.221,26.38538,0,0,0,0,100,0), +(@PATH,11,4748.035,-4856.471,26.38538,0,0,0,0,100,0), +(@PATH,12,4745.785,-4856.721,26.38538,0,0,0,0,100,0), +(@PATH,13,4739.535,-4857.221,26.38538,0,0,0,0,100,0), +(@PATH,14,4733.245,-4857.637,26.4931,0,0,0,0,100,0), +(@PATH,15,4733.245,-4857.637,26.4931,2.617994,0,0,0,100,0), +(@PATH,16,4737.667,-4857.782,26.4303,0,0,0,0,100,0), +(@PATH,17,4739.417,-4857.782,26.4303,0,0,0,0,100,0), +(@PATH,18,4745.917,-4857.782,26.4303,0,0,0,0,100,0), +(@PATH,19,4747.667,-4857.782,26.1803,0,0,0,0,100,0), +(@PATH,20,4750.917,-4857.782,26.1803,0,0,0,0,100,0), +(@PATH,21,4752.667,-4857.782,26.1803,0,0,0,0,100,0), +(@PATH,22,4755.667,-4857.782,26.1803,0,0,0,0,100,0), +(@PATH,23,4755.755,-4857.606,26.16596,0,0,0,0,100,0), +(@PATH,24,4758.755,-4857.606,25.91596,0,0,0,0,100,0), +(@PATH,25,4761.005,-4855.856,25.66596,0,0,0,0,100,0), +(@PATH,26,4762.505,-4854.356,25.41596,0,0,0,0,100,0), +(@PATH,27,4764.255,-4853.106,25.66596,0,0,0,0,100,0), +(@PATH,28,4766.005,-4851.606,25.66596,0,0,0,0,100,0); + +-- Shade of Arugal SAI +SET @ENTRY := 27018; +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,1,0,100,0,1000,1000,20000,20000,11,48185,0,0,0,0,0,19,27024,20,0,0,0,0,0,"Shade of Arugal - Out of Combat - Cast 'Arugal Channel'"), +(@ENTRY,0,1,0,0,0,100,0,2000,3000,2000,3000,11,53086,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shade of Arugal - In Combat - Cast 'Shadow Bolt'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=48185; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48185, 0, 0, 31, 0, 3, 27024, 0, 0, 0, 0, '', 'Arugal Channel only target Cultists'); diff --git a/sql/updates/world/2015_05_24_05_world.sql b/sql/updates/world/2015_05_24_05_world.sql new file mode 100644 index 00000000000..2b3641b257c --- /dev/null +++ b/sql/updates/world/2015_05_24_05_world.sql @@ -0,0 +1,10 @@ +-- Scarlet Hound +DELETE FROM `creature` WHERE `id` IN (10979); +DELETE FROM `creature_addon` WHERE `guid` IN (52633, 52634, 52635, 52637, 52641, 52662, 52664, 52665, 52666, 52667, 52668); +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=10979; +DELETE FROM `smart_scripts` WHERE `entryorguid`=10979 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=1831 AND `source_type`=0 AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`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 +(1831, 0, 2, 0, 25, 0, 100, 0, 0, 0, 0, 0, 11, 17164, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Scarlet Hunter - On Reset - Cast to summon Scarlet Hound'), +(10979, 0, 0, 0, 0, 0, 100, 0, 3000, 7000, 6000, 9000, 11, 17260, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Scarlet Hound - IC - Cast Bite'), +(10979, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 22000, 25000, 11, 59274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Scarlet Hound - IC - Furious Howl'); diff --git a/sql/updates/world/2015_05_24_06_world.sql b/sql/updates/world/2015_05_24_06_world.sql new file mode 100644 index 00000000000..756b2d569cf --- /dev/null +++ b/sql/updates/world/2015_05_24_06_world.sql @@ -0,0 +1,45 @@ +-- DB/Quest: Escape from the Staging Grounds +DELETE FROM `waypoints` WHERE `entry`=20763; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES +(20763, 1, 4081.3, 2296.6, 110.75), +(20763, 2, 4095.3, 2296.37, 108.392), +(20763, 3, 4123.42, 2297.51, 104.368), +(20763, 4, 4146.48, 2298.85, 102.475), +(20763, 5, 4169.75, 2301.11, 104.503), +(20763, 6, 4181.37, 2301.19, 108.692), +(20763, 7, 4195.51, 2301.28, 113.981), +(20763, 8, 4215.69, 2295.79, 122.162), +(20763, 9, 4229.79, 2295.09, 127.068), +(20763, 10, 4250.86, 2293.49, 128.848), +(20763, 11, 4271.72, 2290, 125.243), +(20763, 12, 4277.21, 2276.97, 125.337), +(20763, 13, 4269.13, 2262.97, 127.868), +(20763, 14, 4262.07, 2250.73, 131.257), +(20763, 15, 4253.95, 2236.66, 134.959), +(20763, 16, 4249.61, 2220.86, 137.445), +(20763, 17, 4251.74, 2186.12, 137.08), +(20763, 18, 4252, 2172.27, 137.678); + +-- Captured Protectorate Vanguard SAI +SET @ENTRY := 20763; +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,1,19,0,100,0,10425,0,0,0,1,0,0,0,0,0,0,21,10,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Quest 'Escape from the Staging Grounds' Taken - Say Line 0"), +(@ENTRY,0,1,2,61,0,100,0,10425,0,0,0,53,0,20763,0,0,0,2,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Quest 'Escape from the Staging Grounds' Taken - Start Waypoint"), +(@ENTRY,0,2,14,61,0,100,0,10425,0,0,0,64,1,0,0,0,0,0,21,10,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Quest 'Escape from the Staging Grounds' Taken - Store Targetlist"), +(@ENTRY,0,7,0,40,0,100,0,16,20763,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Waypoint 16 Reached - Pause Waypoint"), +(@ENTRY,0,8,10,40,0,100,0,17,20763,0,0,15,10425,0,0,0,0,0,12,1,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Waypoint 17 Reached - Quest Credit 'Escape from the Staging Grounds'"), +(@ENTRY,0,9,0,6,0,100,0,0,0,0,0,6,10425,0,0,0,0,0,12,1,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Just Died - Fail Quest 'Escape from the Staging Grounds'"), +(@ENTRY,0,10,0,61,0,100,0,17,20763,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Waypoint 17 Reached - Say Line 1"), +(@ENTRY,0,11,12,40,0,100,0,18,20763,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Waypoint 18 Reached - Say Line 2"), +(@ENTRY,0,12,13,61,0,100,0,18,20763,0,0,11,35517,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Waypoint 18 Reached - Cast 'Teleport'"), +(@ENTRY,0,13,0,61,0,100,0,18,20763,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Waypoint 18 Reached - Despawn In 3000 ms"), +(@ENTRY,0,14,0,61,0,100,0,10425,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Quest 'Escape from the Staging Grounds' Taken - Set Npc Flag "), +(@ENTRY,0,15,0,11,0,100,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Captured Protectorate Vanguard - On Respawn - Set Npc Flag Questgiver"); + +DELETE FROM `creature_text` WHERE `entry`=20763; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(20763, 0, 0, 'We''re not too far from the Protectorate Watch Post, $n. This way!', 12, 0, 100, 0, 0, 0, 18566, 'Captured Protectorate Vanguard to Player'), +(20763, 1, 0, 'Commander! This fleshling rescued me!', 12, 0, 100, 0, 0, 0, 18567, 'Captured Protectorate Vanguard to Player'), +(20763, 2, 0, '%s salutes Commander Ameer.', 16, 0, 100, 0, 0, 0, 18568, 'Captured Protectorate Vanguard to Player'); diff --git a/sql/updates/world/2015_05_24_07_world.sql b/sql/updates/world/2015_05_24_07_world.sql new file mode 100644 index 00000000000..af7e82b8087 --- /dev/null +++ b/sql/updates/world/2015_05_24_07_world.sql @@ -0,0 +1,30 @@ +-- Dragonflayer Fanatic +DELETE FROM `waypoints` WHERE `entry`=26553; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`) VALUES +(26553,1,467.5089,-325.5417,104.0859), +(26553,2,483.179,-325.046,104.0471); + +-- Dragonflayer Fanatic SAI +SET @GUID := -126160; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=26553; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID 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 +(@GUID,0,0,0,25,0,100,0,0,0,0,0,53,0,26553,1,0,0,0,1,0,0,0,0,0,0,0,"Dragonflayer Fanatic - On Reset - Start Waypoint"), +(@GUID,0,1,0,40,0,100,0,1,26553,0,0,80,12616000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dragonflayer Fanatic - On Waypoint 1 Reached - Run Script"), +(@GUID,0,2,0,40,0,100,0,2,26553,0,0,80,12616001,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dragonflayer Fanatic - On Waypoint 2 Reached - Run Script"), +(@GUID,0,3,0,1,1,100,0,2000,2000,2000,2000,10,274,25,5,22,0,0,1,0,0,0,0,0,0,0,"Dragonflayer Fanatic - Out of Combat - Play Random Emote (274, 25, 5, 22)"); + +-- Actionlist SAI +SET @ENTRY := 12616000; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,35000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Event Phase 1"), +(@ENTRY,9,2,0,0,0,100,0,35000,35000,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Set Event Phase 2"); + +-- Actionlist SAI +SET @ENTRY := 12616001; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,15000,0,0,0,0,0,1,0,0,0,0,0,0,0,"On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.986479,"On Script - Set Orientation 5,986479"); diff --git a/sql/updates/world/2015_05_24_08_world.sql b/sql/updates/world/2015_05_24_08_world.sql new file mode 100644 index 00000000000..d8bc19aaffb --- /dev/null +++ b/sql/updates/world/2015_05_24_08_world.sql @@ -0,0 +1,94 @@ +-- Complete UP Movement +SET @NPC := 126159; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=408.6479,`position_y`=-247.8646,`position_z`=105.1593 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,408.6479,-247.8646,105.1593,0,0,0,0,100,0), +(@PATH,2,413.1479,-247.3646,105.4093,0,0,0,0,100,0), +(@PATH,3,417.3979,-247.1146,105.4093,0,0,0,0,100,0), +(@PATH,4,421.3979,-246.8646,105.1593,0,0,0,0,100,0), +(@PATH,5,424.6479,-246.8646,105.4093,0,0,0,0,100,0), +(@PATH,6,431.6479,-246.3646,105.1593,0,0,0,0,100,0), +(@PATH,7,437.3979,-245.8646,105.1593,0,0,0,0,100,0), +(@PATH,8,439.8979,-245.6146,105.1593,0,6000,0,0,100,0), +(@PATH,9,439.8979,-245.6146,105.1593,0,0,0,0,100,0), +(@PATH,10,437.3979,-245.8646,105.1593,0,0,0,0,100,0), +(@PATH,11,431.6479,-246.3646,105.1593,0,0,0,0,100,0), +(@PATH,12,424.6479,-246.8646,105.4093,0,0,0,0,100,0), +(@PATH,13,421.3979,-246.8646,105.1593,0,0,0,0,100,0), +(@PATH,14,417.3979,-247.1146,105.4093,0,0,0,0,100,0), +(@PATH,15,413.1479,-247.3646,105.4093,0,0,0,0,100,0), +(@PATH,16,408.6479,-247.8646,105.1593,0,6000,0,0,100,0); + +SET @NPC := 126083; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=281.2139,`position_y`=-383.5794,`position_z`=90.28523 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH, 10, 273.909, -398.059, 90.1069, 0, 10, 0, 0, 100, 0), +(@PATH, 9, 262.177, -400.701, 83.5446, 0, 10, 0, 0, 100, 0), +(@PATH, 8, 248.65, -398.957, 75.1077, 0, 10, 0, 0, 100, 0), +(@PATH, 7, 262.177, -400.701, 83.5446, 0, 10, 0, 0, 100, 0), +(@PATH, 6, 273.909, -398.059, 90.1069, 0, 10, 0, 0, 100, 0), +(@PATH, 5, 281.51, -396.934, 89.9561, 0, 10, 0, 0, 100, 0), +(@PATH, 4, 281.066, -384.517, 90.0477, 0, 10, 0, 0, 100, 0), +(@PATH, 3, 263.144, -381.767, 96.7176, 0, 10, 0, 0, 100, 0), +(@PATH, 2, 248.789, -383.987, 104.753, 0, 10, 0, 0, 100, 0), +(@PATH, 1, 263.144, -381.767, 96.7176, 0, 10, 0, 0, 100, 0); + +UPDATE `smart_scripts` SET `action_param1`=1 WHERE `entryorguid`=26670 AND `source_type`=0 AND `id`=0 AND `link`=1; + +DELETE FROM `creature_formations` WHERE `leaderGUID`=126083; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(126083, 126087, 3, 270, 2, 0, 0), +(126083, 126088, 3, 90, 2, 0, 0), +(126083, 126083, 0, 0, 2, 0, 0); + + +SET @NPC := 126086; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH, 8, 238.128, -450.66, 104.736, 0, 10, 0, 0, 100, 0), +(@PATH, 7, 236.583, -435.635, 104.736, 0, 10, 0, 0, 100, 0), +(@PATH, 6, 236.444, -449.692, 104.736, 0, 10, 0, 0, 100, 0), +(@PATH, 5, 238.128, -450.66, 104.736, 0, 10, 0, 0, 100, 0), +(@PATH, 4, 309.006, -451.589, 104.718, 0, 10, 0, 0, 100, 0), +(@PATH, 3, 310.79, -451.589, 104.718, 0, 10, 0, 0, 100, 0), +(@PATH, 2, 310.682, -467.433, 104.718, 0, 10, 0, 0, 100, 0), +(@PATH, 1, 310.79, -451.589, 104.718, 0, 10, 0, 0, 100, 0); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=126086; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(126086, 126078, 5, 180, 2, 0, 0), +(126086, 126081, 5, 90, 2, 0, 0), +(126086, 126082, 5, 270, 2, 0, 0), +(126086, 126086, 0, 0, 2, 0, 0); + +SET @NPC := 126111; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH, 7, 368.053, -432.959, 75.1209, 0, 10, 0, 0, 100, 0), +(@PATH, 6, 402.875, -428.319, 75.1263, 0, 10, 0, 0, 100, 0), +(@PATH, 5, 407.49, -441.521, 75.0988, 0, 10, 0, 0, 100, 0), +(@PATH, 4, 429.311, -447.42, 75.1166, 0, 10, 0, 0, 100, 0), +(@PATH, 3, 428.506, -467.335, 75.1153, 0, 10, 0, 0, 100, 0), +(@PATH, 2, 400.957, -455.234, 75.1132, 0, 10, 0, 0, 100, 0), +(@PATH, 1, 372.02, -450.569, 75.1308, 0, 10, 0, 0, 100, 0); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=126111; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(126111, 126110, 3, 280, 2, 0, 0), +(126111, 126111, 0, 0, 2, 0, 0); diff --git a/sql/updates/world/2015_05_25_00_world.sql b/sql/updates/world/2015_05_25_00_world.sql new file mode 100644 index 00000000000..4b1cc48da5a --- /dev/null +++ b/sql/updates/world/2015_05_25_00_world.sql @@ -0,0 +1,6 @@ +-- +-- Forsaken Crossbowman SAI +SET @ENTRY := 23883; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0 AND `id`=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,1,0,100,0,0,2000,2000,3000,11,61512,0,0,0,0,0,19,23803,200,0,0,0,0,0,"Forsaken Crossbowman - Out of Combat - Cast 'Shoot'"); diff --git a/sql/updates/world/2015_05_26_00_world.sql b/sql/updates/world/2015_05_26_00_world.sql new file mode 100644 index 00000000000..cc1a6810764 --- /dev/null +++ b/sql/updates/world/2015_05_26_00_world.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `npcflag`=3, `gossip_menu_id`=5032 WHERE `entry`=241; +DELETE FROM `gossip_menu` WHERE `entry`=5032; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (5032, 6158); +DELETE FROM `npc_text` WHERE `ID`=6158; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `prob0`, `em0_0`, `em0_1`) VALUES +(6158, 'Hey there, friend. My name''s Remy. I''m from Redridge to the east, and came here looking for business, looking for business. You got any...got any??', 'Hey there, friend. My name''s Remy. I''m from Redridge to the east, and came here looking for business, looking for business. You got any...got any??', 0, 0, 1, 0, 0); diff --git a/sql/updates/world/2015_05_26_01_world.sql b/sql/updates/world/2015_05_26_01_world.sql new file mode 100644 index 00000000000..b1dd41196a6 --- /dev/null +++ b/sql/updates/world/2015_05_26_01_world.sql @@ -0,0 +1,40 @@ +-- +DELETE FROM `creature_formations` WHERE `leaderGUID`=26233; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`)VALUES +(26233,26233,0,0,2),(26233,26192,15,0,2),(26233,26194,15,90,2),(26233,26193,9,0,2),(26233,26195,9,90,2); +UPDATE `creature` SET `MovementType`=2 WHERE `guid` IN (26233); +UPDATE `creature_addon` SET `path_id`=262330 WHERE `guid` IN (26233); +DELETE FROM `creature_addon` WHERE `guid` IN (26233); +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (26233, 262330); +DELETE FROM `waypoint_data` WHERE `id` IN (262330); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(262330, 1,-1317.949951, -926.414978, 1.9346, 0, 0, 0, 0, 100, 0), +(262330, 2,-1244.693726, -980.329773, -4.920392, 0, 0, 0, 0, 100, 0), +(262330, 3,-1193.669312, -948.340393, -3.643325, 0, 0, 0, 0, 100, 0), +(262330, 4,-1182.622681, -859.417419, -11.058956, 0, 0, 0, 0, 100, 0), +(262330, 5,-1183.541138, -796.475952, -36.551662, 0, 0, 0, 0, 100, 0), +(262330, 6,-1182.812988, -740.116638, -52.754967, 0, 0, 0, 0, 100, 0), +(262330, 7,-1200.200806, -605.367249, -57.754887, 0, 0, 0, 0, 100, 0), +(262330, 8,-1242.377563, -494.067078, -57.610630, 0, 0, 0, 0, 100, 0), +(262330, 9,-1468.878052, -522.602173, -55.496475, 0, 0, 0, 0, 100, 0), +(262330, 10,-1551.133789, -656.098145, -50.817574, 0, 0, 0, 0, 100, 0), +(262330, 11,-1394.677490, -802.561279, -21.880009, 0, 0, 0, 0, 100, 0), +(262330, 12,-1317.949951, -926.414978, 1.9346, 0, 0, 0, 0, 100, 0); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=26213; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`)VALUES +(26213,26213,0,0,2),(26213,26185,15,0,2),(26213,26207,15,90,2),(26213,26186,9,0,2),(26213,26187,9,90,2); +UPDATE `creature` SET `MovementType`=2 WHERE `guid` IN (26213); +UPDATE `creature_addon` SET `path_id`=262130 WHERE `guid` IN (26213); +DELETE FROM `creature_addon` WHERE `guid` IN (26213); +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (26213, 262130); +DELETE FROM `waypoint_data` WHERE `id` IN (262130); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +(262130, 1,-2545.065918, 21.190157, 11.805480, 0, 0, 0, 0, 100, 0), +(262130, 2,-2487.883789, 100.192146, 33.786736, 0, 0, 0, 0, 100, 0), +(262130, 3,-2420.558350, 88.399445, 38.040539, 0, 0, 0, 0, 100, 0), +(262130, 4,-2318.995361, 115.247169, 50.718586, 0, 0, 0, 0, 100, 0), +(262130, 5,-2284.748779, 27.045509, 22.492968, 0, 0, 0, 0, 100, 0), +(262130, 6,-2349.130615, -61.506725, -8.763674, 0, 0, 0, 0, 100, 0); + +UPDATE `creature` SET `MovementType`=1, `spawndist`=15 WHERE `guid` IN (26214, 26231, 26189, 26188, 26196, 26184, 26210, 26209, 26211, 26232, 26190, 26191, 26212); diff --git a/sql/updates/world/2015_05_26_02_world.sql b/sql/updates/world/2015_05_26_02_world.sql new file mode 100644 index 00000000000..d56e45a1514 --- /dev/null +++ b/sql/updates/world/2015_05_26_02_world.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (12479, 12480, -12480) AND `spell_effect` IN (12480, 530, -530); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(12479, 12480, 0, 'Hex of Jammal''an'), +(12480, 530, 0, 'Hex of Jammal''an'), +(-12480, -530, 0, 'Hex of Jammal''an'); + +UPDATE `smart_scripts` SET `event_type`=0, `Comment`= "Jammal'an the Prophet - In combat - Cast 'Hex of Jammal'an' (Phase 1)" WHERE `entryorguid`=5710 AND `source_Type`=0 AND `id`=5; diff --git a/sql/updates/world/2015_05_26_03_world.sql b/sql/updates/world/2015_05_26_03_world.sql new file mode 100644 index 00000000000..30b5103caa8 --- /dev/null +++ b/sql/updates/world/2015_05_26_03_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `spell_group` WHERE `id`=1001 AND `spell_id` IN (45694, 20875, 25804, 25722, 25037); +INSERT INTO `spell_group` (`id`, `spell_id`) VALUES (1001, 45694), (1001, 20875), (1001, 25804), (1001, 25722), (1001, 25037); diff --git a/sql/updates/world/2015_05_26_04_world.sql b/sql/updates/world/2015_05_26_04_world.sql new file mode 100644 index 00000000000..39728f515ee --- /dev/null +++ b/sql/updates/world/2015_05_26_04_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (20748); +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 +(20748,0,0,0,25,0,100,0,0,0,0,0,11,37691,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Thunderlord Dire Wolf - On Reset - Cast Stealth Detection'), +(20748,0,1,0,0,0,100,0,4000,6000,10000,11000,11,5781,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Thunderlord Dire Wolf - IC - Cast Threatening Growl'), +(20748,0,2,0,8,0,100,0,32578,0,120000,120000,33,21142,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Thunderlord Dire Wolf - on spell hit - Credit quest'); diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index abb6126ca2c..2522c97de25 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -22,6 +22,7 @@ #include "Player.h" #include "Spell.h" #include "ObjectAccessor.h" +#include "SpellHistory.h" #include "SpellMgr.h" #include "Creature.h" #include "Util.h" @@ -146,15 +147,15 @@ void PetAI::UpdateAI(uint32 diff) if (!spellInfo) continue; - if (me->GetCharmInfo() && me->GetCharmInfo()->GetGlobalCooldownMgr().HasGlobalCooldown(spellInfo)) + if (me->GetCharmInfo() && me->GetSpellHistory()->HasGlobalCooldown(spellInfo)) continue; if (spellInfo->IsPositive()) { if (spellInfo->CanBeUsedInCombat()) { - // check spell cooldown - if (me->HasSpellCooldown(spellInfo->Id)) + // check spell cooldown & school lock + if (!me->GetSpellHistory()->IsReady(spellInfo)) continue; // Check if we're in combat or commanded to attack diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index e14e9fadafc..f267bf7c6c6 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -99,7 +99,7 @@ bool BattlegroundSA::ResetObjs() for (uint8 i = BG_SA_MAXNPC; i < BG_SA_MAXNPC + BG_SA_MAX_GY; i++) DelCreature(i); - for (uint8 i = 0; i < 6; i++) + for (uint8 i = 0; i < MAX_GATES; ++i) GateStatus[i] = BG_SA_GATE_OK; if (!AddCreature(BG_SA_NpcEntries[BG_SA_NPC_KANRETHAD], BG_SA_NPC_KANRETHAD, BG_SA_NpcSpawnlocs[BG_SA_NPC_KANRETHAD])) @@ -179,9 +179,6 @@ bool BattlegroundSA::ResetObjs() GetBGObject(BG_SA_TITAN_RELIC)->SetFaction(atF); GetBGObject(BG_SA_TITAN_RELIC)->Refresh(); - for (uint8 i = 0; i <= 5; i++) - GateStatus[i] = BG_SA_GATE_OK; - TotalTime = 0; ShipsStarted = false; @@ -221,6 +218,8 @@ bool BattlegroundSA::ResetObjs() GetBGObject(i)->SetFaction(atF); } + UpdateObjectInteractionFlags(); + for (uint8 i = BG_SA_BOMB; i < BG_SA_MAXOBJ; i++) { if (!AddObject(i, BG_SA_ObjEntries[BG_SA_BOMB], BG_SA_ObjSpawnlocs[i], 0, 0, 0, 0, RESPAWN_ONE_DAY)) @@ -481,28 +480,7 @@ void BattlegroundSA::AddPlayer(Player* player) SendTransportInit(player); - if (!ShipsStarted) - { - if (player->GetTeamId() == Attackers) - { - player->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - - if (urand(0, 1)) - player->TeleportTo(607, 2682.936f, -830.368f, 15.0f, 2.895f, 0); - else - player->TeleportTo(607, 2577.003f, 980.261f, 15.0f, 0.807f, 0); - - } - else - player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0); - } - else - { - if (player->GetTeamId() == Attackers) - player->TeleportTo(607, 1600.381f, -106.263f, 8.8745f, 3.78f, 0); - else - player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0); - } + TeleportToEntrancePosition(player); } void BattlegroundSA::RemovePlayer(Player* /*player*/, ObjectGuid /*guid*/, uint32 /*team*/) { } @@ -533,23 +511,31 @@ void BattlegroundSA::TeleportPlayers() player->ResetAllPowers(); player->CombatStopWithPets(true); - for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) - if (Player* p = ObjectAccessor::FindPlayer(itr->first)) - p->CastSpell(p, SPELL_PREPARATION, true); + player->CastSpell(player, SPELL_PREPARATION, true); - if (player->GetTeamId() == Attackers) - { - player->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + TeleportToEntrancePosition(player); + } + } +} - if (urand(0, 1)) - player->TeleportTo(607, 2682.936f, -830.368f, 15.0f, 2.895f, 0); - else - player->TeleportTo(607, 2577.003f, 980.261f, 15.0f, 0.807f, 0); - } +void BattlegroundSA::TeleportToEntrancePosition(Player* player) +{ + if (player->GetTeamId() == Attackers) + { + if (!ShipsStarted) + { + player->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + + if (urand(0, 1)) + player->TeleportTo(607, 2682.936f, -830.368f, 15.0f, 2.895f, 0); else - player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0); + player->TeleportTo(607, 2577.003f, 980.261f, 15.0f, 0.807f, 0); } + else + player->TeleportTo(607, 1600.381f, -106.263f, 8.8745f, 3.78f, 0); } + else + player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0); } void BattlegroundSA::ProcessEvent(WorldObject* obj, uint32 eventId, WorldObject* invoker /*= NULL*/) @@ -628,6 +614,8 @@ void BattlegroundSA::ProcessEvent(WorldObject* obj, uint32 eventId, WorldObject* } } } + + UpdateObjectInteractionFlags(); } else break; @@ -711,7 +699,7 @@ WorldSafeLocsEntry const* BattlegroundSA::GetClosestGraveYard(Player* player) safeloc = BG_SA_GYEntries[BG_SA_DEFENDER_LAST_GY]; closest = sWorldSafeLocsStore.LookupEntry(safeloc); - nearest = std::sqrt((closest->x - x)*(closest->x - x) + (closest->y - y)*(closest->y - y) + (closest->z - z)*(closest->z - z)); + nearest = player->GetExactDistSq(closest->x, closest->y, closest->z); for (uint8 i = BG_SA_RIGHT_CAPTURABLE_GY; i < BG_SA_MAX_GY; i++) { @@ -719,7 +707,7 @@ WorldSafeLocsEntry const* BattlegroundSA::GetClosestGraveYard(Player* player) continue; ret = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]); - dist = std::sqrt((ret->x - x)*(ret->x - x) + (ret->y - y)*(ret->y - y) + (ret->z - z)*(ret->z - z)); + dist = player->GetExactDistSq(ret->x, ret->y, ret->z); if (dist < nearest) { closest = ret; @@ -738,23 +726,66 @@ void BattlegroundSA::SendTime() UpdateWorldState(BG_SA_TIMER_SEC_DECS, ((end_of_round%60000)%10000)/1000); } +bool BattlegroundSA::CanInteractWithObject(uint32 objectId) +{ + switch (objectId) + { + case BG_SA_TITAN_RELIC: + if (GateStatus[BG_SA_ANCIENT_GATE] != BG_SA_GATE_DESTROYED || GateStatus[BG_SA_YELLOW_GATE] != BG_SA_GATE_DESTROYED) + return false; + // no break + case BG_SA_CENTRAL_FLAG: + if (GateStatus[BG_SA_RED_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_PURPLE_GATE] != BG_SA_GATE_DESTROYED) + return false; + // no break + case BG_SA_LEFT_FLAG: + case BG_SA_RIGHT_FLAG: + if (GateStatus[BG_SA_GREEN_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_BLUE_GATE] != BG_SA_GATE_DESTROYED) + return false; + break; + default: + ASSERT(false); + break; + } + + return true; +} + +void BattlegroundSA::UpdateObjectInteractionFlags(uint32 objectId) +{ + if (GameObject* go = GetBGObject(objectId)) + { + if (CanInteractWithObject(objectId)) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + else + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + } +} + +void BattlegroundSA::UpdateObjectInteractionFlags() +{ + for (uint8 i = BG_SA_CENTRAL_FLAG; i <= BG_SA_LEFT_FLAG; ++i) + UpdateObjectInteractionFlags(i); + UpdateObjectInteractionFlags(BG_SA_TITAN_RELIC); +} + void BattlegroundSA::EventPlayerClickedOnFlag(Player* source, GameObject* go) { switch (go->GetEntry()) { case 191307: case 191308: - if (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) + if (CanInteractWithObject(BG_SA_LEFT_FLAG)) CaptureGraveyard(BG_SA_LEFT_CAPTURABLE_GY, source); break; case 191305: case 191306: - if (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) + if (CanInteractWithObject(BG_SA_RIGHT_FLAG)) CaptureGraveyard(BG_SA_RIGHT_CAPTURABLE_GY, source); break; case 191310: case 191309: - if ((GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED) && (GateStatus[BG_SA_RED_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_PURPLE_GATE] == BG_SA_GATE_DESTROYED)) + if (CanInteractWithObject(BG_SA_CENTRAL_FLAG)) CaptureGraveyard(BG_SA_CENTRAL_CAPTURABLE_GY, source); break; default: @@ -856,10 +887,7 @@ void BattlegroundSA::TitanRelicActivated(Player* clicker) if (!clicker) return; - if (GateStatus[BG_SA_ANCIENT_GATE] == BG_SA_GATE_DESTROYED && - GateStatus[BG_SA_YELLOW_GATE] == BG_SA_GATE_DESTROYED && - (GateStatus[BG_SA_PURPLE_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_RED_GATE] == BG_SA_GATE_DESTROYED) && - (GateStatus[BG_SA_GREEN_GATE] == BG_SA_GATE_DESTROYED || GateStatus[BG_SA_BLUE_GATE] == BG_SA_GATE_DESTROYED)) + if (CanInteractWithObject(BG_SA_TITAN_RELIC)) { if (clicker->GetTeamId() == Attackers) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index 7f9a656c979..118cea41a7b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -620,6 +620,7 @@ class BattlegroundSA : public Battleground * -Teleport all players to good location */ void TeleportPlayers(); + void TeleportToEntrancePosition(Player* player); /** * \brief Called on start and between the two round * -Update faction of all vehicle @@ -627,6 +628,11 @@ class BattlegroundSA : public Battleground void OverrideGunFaction(); /// Set selectable or not demolisher, called on battle start, when boats arrive to dock void DemolisherStartState(bool start); + /// Checks if a player can interact with the given object + bool CanInteractWithObject(uint32 objectId); + /// Updates interaction flags of specific objects + void UpdateObjectInteractionFlags(uint32 objectId); + void UpdateObjectInteractionFlags(); /** * \brief Called when a gate is destroy * -Give honor to player witch destroy it diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 6586c5035ec..5cd9b363ae0 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -560,8 +560,8 @@ void LoadDBCStores(const std::string& dataPath) for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i) if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i)) { - if (pathLength[entry->path] < entry->index + 1) - pathLength[entry->path] = entry->index + 1; + if (pathLength[entry->PathID] < entry->NodeIndex + 1) + pathLength[entry->PathID] = entry->NodeIndex + 1; } // Set path length sTaxiPathNodesByPath.resize(pathCount); // 0 and some other indexes not used @@ -570,7 +570,7 @@ void LoadDBCStores(const std::string& dataPath) // fill data for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i) if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i)) - sTaxiPathNodesByPath[entry->path].set(entry->index, entry); + sTaxiPathNodesByPath[entry->PathID].set(entry->NodeIndex, entry); // Initialize global taxinodes mask // include existed nodes that have at least single not spell base (scripted) path diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 5c784f3fe69..5ccd5d2b7e5 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -30,13 +30,7 @@ #include <vector> // Structures using to access raw DBC data and required packing to portability - -// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct AchievementEntry { @@ -1939,17 +1933,17 @@ struct TaxiPathEntry struct TaxiPathNodeEntry { - // 0 m_ID - uint32 path; // 1 m_PathID - uint32 index; // 2 m_NodeIndex - uint32 mapid; // 3 m_ContinentID - float x; // 4 m_LocX - float y; // 5 m_LocY - float z; // 6 m_LocZ - uint32 actionFlag; // 7 m_flags - uint32 delay; // 8 m_delay - uint32 arrivalEventID; // 9 m_arrivalEventID - uint32 departureEventID; // 10 m_departureEventID + // 0 ID + uint32 PathID; // 1 + uint32 NodeIndex; // 2 + uint32 MapID; // 3 + float LocX; // 4 + float LocY; // 5 + float LocZ; // 6 + uint32 Flags; // 7 + uint32 Delay; // 8 + uint32 ArrivalEventID; // 9 + uint32 DepartureEventID; // 10 }; struct TeamContributionPointsEntry @@ -2177,12 +2171,7 @@ struct WorldStateUI }; */ -// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif // Structures not used for casting to loaded DBC data and not required then packing struct MapDifficulty diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 05de671830e..7f00fc7f9d8 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -150,8 +150,6 @@ m_originalEntry(0), m_homePosition(), m_transportHomePosition(), m_creatureInfo( for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i) m_spells[i] = 0; - m_CreatureSpellCooldowns.clear(); - m_CreatureCategoryCooldowns.clear(); DisableReputationGain = false; m_SightDistance = sWorld->getFloatConfig(CONFIG_SIGHT_MONSTER); @@ -2156,83 +2154,6 @@ uint32 Creature::GetShieldBlockValue() const //dunno mob block return (getLevel()/2 + uint32(GetStat(STAT_STRENGTH)/20)); } -void Creature::_AddCreatureSpellCooldown(uint32 spell_id, time_t end_time) -{ - m_CreatureSpellCooldowns[spell_id] = end_time; -} - -void Creature::_AddCreatureCategoryCooldown(uint32 category, time_t apply_time) -{ - m_CreatureCategoryCooldowns[category] = apply_time; -} - -void Creature::AddCreatureSpellCooldown(uint32 spellid) -{ - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); - if (!spellInfo) - return; - - uint32 cooldown = spellInfo->GetRecoveryTime(); - if (Player* modOwner = GetSpellModOwner()) - modOwner->ApplySpellMod(spellid, SPELLMOD_COOLDOWN, cooldown); - - if (cooldown) - _AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILLISECONDS); - - if (spellInfo->GetCategory()) - _AddCreatureCategoryCooldown(spellInfo->GetCategory(), time(NULL)); -} - -bool Creature::HasCategoryCooldown(uint32 spell_id) const -{ - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id); - if (!spellInfo) - return false; - - CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); - return(itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILLISECONDS)) > time(NULL)); -} - -uint32 Creature::GetCreatureSpellCooldownDelay(uint32 spellId) const -{ - CreatureSpellCooldowns::const_iterator itr = m_CreatureSpellCooldowns.find(spellId); - time_t t = time(NULL); - return uint32(itr != m_CreatureSpellCooldowns.end() && itr->second > t ? itr->second - t : 0); -} - -bool Creature::HasSpellCooldown(uint32 spell_id) const -{ - CreatureSpellCooldowns::const_iterator itr = m_CreatureSpellCooldowns.find(spell_id); - return (itr != m_CreatureSpellCooldowns.end() && itr->second > time(NULL)) || HasCategoryCooldown(spell_id); -} - -void Creature::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) -{ - time_t curTime = time(NULL); - for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i) - { - if (m_spells[i] == 0) - continue; - - uint32 unSpellId = m_spells[i]; - SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(unSpellId); - - // Not send cooldown for this spells - if (spellInfo->IsCooldownStartedOnEvent()) - continue; - - if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) - continue; - - if ((idSchoolMask & spellInfo->GetSchoolMask()) && GetCreatureSpellCooldownDelay(unSpellId) < unTimeMs) - { - _AddCreatureSpellCooldown(unSpellId, curTime + unTimeMs/IN_MILLISECONDS); - if (UnitAI* ai = GetAI()) - ai->SpellInterrupted(unSpellId, unTimeMs); - } - } -} - bool Creature::HasSpell(uint32 spellID) const { uint8 i; diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index ec06bf90595..6f82d5dda4a 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -170,12 +170,7 @@ struct CreatureTemplate // Benchmarked: Faster than std::map (insert/find) typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer; -// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif // Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage). struct CreatureBaseStats @@ -307,12 +302,7 @@ enum ChatType CHAT_TYPE_END = 255 }; -// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif // `creature_addon` table struct CreatureAddon @@ -414,8 +404,6 @@ struct TrainerSpellData TrainerSpell const* Find(uint32 spell_id) const; }; -typedef std::map<uint32, time_t> CreatureSpellCooldowns; - // max different by z coordinate for creature aggro reaction #define CREATURE_Z_ATTACK_RANGE 3 @@ -494,14 +482,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject SpellSchoolMask GetMeleeDamageSchoolMask() const override { return m_meleeDamageSchoolMask; } void SetMeleeDamageSchool(SpellSchools school) { m_meleeDamageSchoolMask = SpellSchoolMask(1 << school); } - void _AddCreatureSpellCooldown(uint32 spell_id, time_t end_time); - void _AddCreatureCategoryCooldown(uint32 category, time_t apply_time); - void AddCreatureSpellCooldown(uint32 spellid); - bool HasSpellCooldown(uint32 spell_id) const; - bool HasCategoryCooldown(uint32 spell_id) const; - uint32 GetCreatureSpellCooldownDelay(uint32 spellId) const; - virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override; - bool HasSpell(uint32 spellID) const override; bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr); @@ -575,8 +555,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject SpellInfo const* reachWithSpellCure(Unit* victim); uint32 m_spells[CREATURE_MAX_SPELLS]; - CreatureSpellCooldowns m_CreatureSpellCooldowns; - CreatureSpellCooldowns m_CreatureCategoryCooldowns; bool CanStartAttack(Unit const* u, bool force) const; float GetAttackDistance(Unit const* player) const; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 1290b5f0019..a4b140b9878 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -271,6 +271,16 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa SetGoAnimProgress(animprogress); break; } + + if (GameObjectAddon const* addon = sObjectMgr->GetGameObjectAddon(guidlow)) + { + if (addon->InvisibilityValue) + { + m_invisibility.AddFlag(addon->invisibilityType); + m_invisibility.AddValue(addon->invisibilityType, addon->InvisibilityValue); + } + } + LastUsedScriptID = GetGOInfo()->ScriptId; AIM_Initialize(); diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index b3e8510e2fb..5f1d2c793e6 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -576,6 +576,15 @@ struct GameObjectLocale StringVector CastBarCaption; }; +// `gameobject_addon` table +struct GameObjectAddon +{ + InvisibilityType invisibilityType; + uint32 InvisibilityValue; +}; + +typedef std::unordered_map<ObjectGuid::LowType, GameObjectAddon> GameObjectAddonContainer; + // client side GO show states enum GOState { diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index c82ae723f4c..b832aeb5614 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -201,8 +201,6 @@ enum ItemUpdateState ITEM_REMOVED = 3 }; -#define MAX_ITEM_SPELLS 5 - bool ItemCanGoIntoBag(ItemTemplate const* proto, ItemTemplate const* pBagProto); class Item : public Object diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 4be3a03040d..6392c3ee51b 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1008,61 +1008,6 @@ bool Object::PrintIndexError(uint32 index, bool set) const return false; } -bool Position::operator==(Position const &a) -{ - return (G3D::fuzzyEq(a.m_positionX, m_positionX) && - G3D::fuzzyEq(a.m_positionY, m_positionY) && - G3D::fuzzyEq(a.m_positionZ, m_positionZ) && - G3D::fuzzyEq(a.m_orientation, m_orientation)); -} - -bool Position::HasInLine(WorldObject const* target, float width) const -{ - if (!HasInArc(float(M_PI), target)) - return false; - width += target->GetObjectSize(); - float angle = GetRelativeAngle(target); - return std::fabs(std::sin(angle)) * GetExactDist2d(target->GetPositionX(), target->GetPositionY()) < width; -} - -std::string Position::ToString() const -{ - std::stringstream sstr; - sstr << "X: " << m_positionX << " Y: " << m_positionY << " Z: " << m_positionZ << " O: " << m_orientation; - return sstr.str(); -} - -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer) -{ - float x, y, z, o; - buf >> x >> y >> z >> o; - streamer.m_pos->Relocate(x, y, z, o); - return buf; -} -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer) -{ - float x, y, z; - streamer.m_pos->GetPosition(x, y, z); - buf << x << y << z; - return buf; -} - -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer) -{ - float x, y, z; - buf >> x >> y >> z; - streamer.m_pos->Relocate(x, y, z); - return buf; -} - -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer) -{ - float x, y, z, o; - streamer.m_pos->GetPosition(x, y, z, o); - buf << x << y << z << o; - return buf; -} - void MovementInfo::OutDebug() { TC_LOG_DEBUG("misc", "MOVEMENT INFO"); @@ -1423,92 +1368,6 @@ bool WorldObject::IsInRange3d(float x, float y, float z, float minRange, float m return distsq < maxdist * maxdist; } -void Position::RelocateOffset(const Position & offset) -{ - m_positionX = GetPositionX() + (offset.GetPositionX() * std::cos(GetOrientation()) + offset.GetPositionY() * std::sin(GetOrientation() + float(M_PI))); - m_positionY = GetPositionY() + (offset.GetPositionY() * std::cos(GetOrientation()) + offset.GetPositionX() * std::sin(GetOrientation())); - m_positionZ = GetPositionZ() + offset.GetPositionZ(); - SetOrientation(GetOrientation() + offset.GetOrientation()); -} - -void Position::GetPositionOffsetTo(const Position & endPos, Position & retOffset) const -{ - float dx = endPos.GetPositionX() - GetPositionX(); - float dy = endPos.GetPositionY() - GetPositionY(); - - retOffset.m_positionX = dx * std::cos(GetOrientation()) + dy * std::sin(GetOrientation()); - retOffset.m_positionY = dy * std::cos(GetOrientation()) - dx * std::sin(GetOrientation()); - retOffset.m_positionZ = endPos.GetPositionZ() - GetPositionZ(); - retOffset.SetOrientation(endPos.GetOrientation() - GetOrientation()); -} - -Position Position::GetPositionWithOffset(Position const& offset) const -{ - Position ret(*this); - ret.RelocateOffset(offset); - return ret; -} - -float Position::GetAngle(const Position* obj) const -{ - if (!obj) - return 0; - - return GetAngle(obj->GetPositionX(), obj->GetPositionY()); -} - -// Return angle in range 0..2*pi -float Position::GetAngle(const float x, const float y) const -{ - float dx = x - GetPositionX(); - float dy = y - GetPositionY(); - - float ang = std::atan2(dy, dx); - ang = (ang >= 0) ? ang : 2 * float(M_PI) + ang; - return ang; -} - -void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos) const -{ - float dx = GetPositionX() - x; - float dy = GetPositionY() - y; - - if (std::fabs(dx) < 0.001f && std::fabs(dy) < 0.001f) - { - float angle = (float)rand_norm()*static_cast<float>(2*M_PI); - vcos = std::cos(angle); - vsin = std::sin(angle); - } - else - { - float dist = std::sqrt((dx*dx) + (dy*dy)); - vcos = dx / dist; - vsin = dy / dist; - } -} - -bool Position::HasInArc(float arc, const Position* obj, float border) const -{ - // always have self in arc - if (obj == this) - return true; - - // move arc to range 0.. 2*pi - arc = NormalizeOrientation(arc); - - float angle = GetAngle(obj); - angle -= m_orientation; - - // move angle to range -pi ... +pi - angle = NormalizeOrientation(angle); - if (angle > float(M_PI)) - angle -= 2.0f * float(M_PI); - - float lborder = -1 * (arc/border); // in range -pi..0 - float rborder = (arc/border); // in range 0..pi - return ((angle >= lborder) && (angle <= rborder)); -} - bool WorldObject::IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size) const { if (!obj1 || !obj2) @@ -1642,11 +1501,6 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const } } -bool Position::IsPositionValid() const -{ - return Trinity::IsValidMapCoord(m_positionX, m_positionY, m_positionZ, m_orientation); -} - float WorldObject::GetGridActivationRange() const { if (ToPlayer()) diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index c48d8ff4d18..a560afa7f1b 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -20,6 +20,7 @@ #define _OBJECT_H #include "Common.h" +#include "Position.h" #include "UpdateMask.h" #include "GridReference.h" #include "ObjectDefines.h" @@ -246,141 +247,6 @@ class Object Object& operator=(Object const& right) = delete; }; -struct Position -{ - Position(float x = 0, float y = 0, float z = 0, float o = 0) - : m_positionX(x), m_positionY(y), m_positionZ(z), m_orientation(NormalizeOrientation(o)) { } - - Position(const Position &loc) { Relocate(loc); } - - struct PositionXYZStreamer - { - explicit PositionXYZStreamer(Position& pos) : m_pos(&pos) { } - Position* m_pos; - }; - - struct PositionXYZOStreamer - { - explicit PositionXYZOStreamer(Position& pos) : m_pos(&pos) { } - Position* m_pos; - }; - - float m_positionX; - float m_positionY; - float m_positionZ; -// Better to limit access to m_orientation field, but this will be hard to achieve with many scripts using array initialization for this structure -//private: - float m_orientation; -//public: - - bool operator==(Position const &a); - - inline bool operator!=(Position const &a) - { - return !(operator==(a)); - } - - void Relocate(float x, float y) - { m_positionX = x; m_positionY = y;} - void Relocate(float x, float y, float z) - { m_positionX = x; m_positionY = y; m_positionZ = z; } - void Relocate(float x, float y, float z, float orientation) - { m_positionX = x; m_positionY = y; m_positionZ = z; SetOrientation(orientation); } - void Relocate(Position const &pos) - { m_positionX = pos.m_positionX; m_positionY = pos.m_positionY; m_positionZ = pos.m_positionZ; SetOrientation(pos.m_orientation); } - void Relocate(Position const* pos) - { m_positionX = pos->m_positionX; m_positionY = pos->m_positionY; m_positionZ = pos->m_positionZ; SetOrientation(pos->m_orientation); } - void RelocateOffset(Position const &offset); - void SetOrientation(float orientation) - { m_orientation = NormalizeOrientation(orientation); } - - float GetPositionX() const { return m_positionX; } - float GetPositionY() const { return m_positionY; } - float GetPositionZ() const { return m_positionZ; } - float GetOrientation() const { return m_orientation; } - - void GetPosition(float &x, float &y) const - { x = m_positionX; y = m_positionY; } - void GetPosition(float &x, float &y, float &z) const - { x = m_positionX; y = m_positionY; z = m_positionZ; } - void GetPosition(float &x, float &y, float &z, float &o) const - { x = m_positionX; y = m_positionY; z = m_positionZ; o = m_orientation; } - - Position GetPosition() const - { - return *this; - } - - Position::PositionXYZStreamer PositionXYZStream() - { - return PositionXYZStreamer(*this); - } - Position::PositionXYZOStreamer PositionXYZOStream() - { - return PositionXYZOStreamer(*this); - } - - bool IsPositionValid() const; - - float GetExactDist2dSq(float x, float y) const - { float dx = m_positionX - x; float dy = m_positionY - y; return dx*dx + dy*dy; } - float GetExactDist2d(const float x, const float y) const - { return std::sqrt(GetExactDist2dSq(x, y)); } - float GetExactDist2dSq(Position const* pos) const - { float dx = m_positionX - pos->m_positionX; float dy = m_positionY - pos->m_positionY; return dx*dx + dy*dy; } - float GetExactDist2d(Position const* pos) const - { return std::sqrt(GetExactDist2dSq(pos)); } - float GetExactDistSq(float x, float y, float z) const - { float dz = m_positionZ - z; return GetExactDist2dSq(x, y) + dz*dz; } - float GetExactDist(float x, float y, float z) const - { return std::sqrt(GetExactDistSq(x, y, z)); } - float GetExactDistSq(Position const* pos) const - { float dx = m_positionX - pos->m_positionX; float dy = m_positionY - pos->m_positionY; float dz = m_positionZ - pos->m_positionZ; return dx*dx + dy*dy + dz*dz; } - float GetExactDist(Position const* pos) const - { return std::sqrt(GetExactDistSq(pos)); } - - void GetPositionOffsetTo(Position const & endPos, Position & retOffset) const; - Position GetPositionWithOffset(Position const& offset) const; - - float GetAngle(Position const* pos) const; - float GetAngle(float x, float y) const; - float GetRelativeAngle(Position const* pos) const - { return GetAngle(pos) - m_orientation; } - float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; } - void GetSinCos(float x, float y, float &vsin, float &vcos) const; - - bool IsInDist2d(float x, float y, float dist) const - { return GetExactDist2dSq(x, y) < dist * dist; } - bool IsInDist2d(Position const* pos, float dist) const - { return GetExactDist2dSq(pos) < dist * dist; } - bool IsInDist(float x, float y, float z, float dist) const - { return GetExactDistSq(x, y, z) < dist * dist; } - bool IsInDist(Position const* pos, float dist) const - { return GetExactDistSq(pos) < dist * dist; } - bool HasInArc(float arcangle, Position const* pos, float border = 2.0f) const; - bool HasInLine(WorldObject const* target, float width) const; - std::string ToString() const; - - // modulos a radian orientation to the range of 0..2PI - static float NormalizeOrientation(float o) - { - // fmod only supports positive numbers. Thus we have - // to emulate negative numbers - if (o < 0) - { - float mod = o *-1; - mod = std::fmod(mod, 2.0f * static_cast<float>(M_PI)); - mod = -mod + 2.0f * static_cast<float>(M_PI); - return mod; - } - return std::fmod(o, 2.0f * static_cast<float>(M_PI)); - } -}; -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); -ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); -ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); - struct MovementInfo { // common diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h index 36dbdd72069..45881ddab6d 100644 --- a/src/server/game/Entities/Object/ObjectGuid.h +++ b/src/server/game/Entities/Object/ObjectGuid.h @@ -83,10 +83,12 @@ class ObjectGuid public: static ObjectGuid const Empty; + typedef uint32 LowType; + ObjectGuid() : _guid(0) { } explicit ObjectGuid(uint64 guid) : _guid(guid) { } - ObjectGuid(HighGuid hi, uint32 entry, uint32 counter) : _guid(counter ? uint64(counter) | (uint64(entry) << 24) | (uint64(hi) << 48) : 0) { } - ObjectGuid(HighGuid hi, uint32 counter) : _guid(counter ? uint64(counter) | (uint64(hi) << 48) : 0) { } + ObjectGuid(HighGuid hi, uint32 entry, LowType counter) : _guid(counter ? uint64(counter) | (uint64(entry) << 24) | (uint64(hi) << 48) : 0) { } + ObjectGuid(HighGuid hi, LowType counter) : _guid(counter ? uint64(counter) | (uint64(hi) << 48) : 0) { } operator uint64() const { return _guid; } PackedGuidReader ReadAsPacked() { return PackedGuidReader(*this); } @@ -99,11 +101,11 @@ class ObjectGuid uint64 GetRawValue() const { return _guid; } HighGuid GetHigh() const { return HighGuid((_guid >> 48) & 0x0000FFFF); } uint32 GetEntry() const { return HasEntry() ? uint32((_guid >> 24) & UI64LIT(0x0000000000FFFFFF)) : 0; } - uint32 GetCounter() const + LowType GetCounter() const { return HasEntry() - ? uint32(_guid & UI64LIT(0x0000000000FFFFFF)) - : uint32(_guid & UI64LIT(0x00000000FFFFFFFF)); + ? LowType(_guid & UI64LIT(0x0000000000FFFFFF)) + : LowType(_guid & UI64LIT(0x00000000FFFFFFFF)); } static uint32 GetMaxCounter(HighGuid high) diff --git a/src/server/game/Entities/Object/Position.cpp b/src/server/game/Entities/Object/Position.cpp new file mode 100644 index 00000000000..530e51cd8f5 --- /dev/null +++ b/src/server/game/Entities/Object/Position.cpp @@ -0,0 +1,184 @@ +/* + * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * + * 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 + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "Position.h" +#include "ByteBuffer.h" +#include "G3D/g3dmath.h" +#include "GridDefines.h" + +bool Position::operator==(Position const &a) +{ + return (G3D::fuzzyEq(a.m_positionX, m_positionX) && + G3D::fuzzyEq(a.m_positionY, m_positionY) && + G3D::fuzzyEq(a.m_positionZ, m_positionZ) && + G3D::fuzzyEq(a.m_orientation, m_orientation)); +} + +void Position::RelocateOffset(const Position & offset) +{ + m_positionX = GetPositionX() + (offset.GetPositionX() * std::cos(GetOrientation()) + offset.GetPositionY() * std::sin(GetOrientation() + float(M_PI))); + m_positionY = GetPositionY() + (offset.GetPositionY() * std::cos(GetOrientation()) + offset.GetPositionX() * std::sin(GetOrientation())); + m_positionZ = GetPositionZ() + offset.GetPositionZ(); + SetOrientation(GetOrientation() + offset.GetOrientation()); +} + +bool Position::IsPositionValid() const +{ + return Trinity::IsValidMapCoord(m_positionX, m_positionY, m_positionZ, m_orientation); +} + +void Position::GetPositionOffsetTo(const Position & endPos, Position & retOffset) const +{ + float dx = endPos.GetPositionX() - GetPositionX(); + float dy = endPos.GetPositionY() - GetPositionY(); + + retOffset.m_positionX = dx * std::cos(GetOrientation()) + dy * std::sin(GetOrientation()); + retOffset.m_positionY = dy * std::cos(GetOrientation()) - dx * std::sin(GetOrientation()); + retOffset.m_positionZ = endPos.GetPositionZ() - GetPositionZ(); + retOffset.SetOrientation(endPos.GetOrientation() - GetOrientation()); +} + +Position Position::GetPositionWithOffset(Position const& offset) const +{ + Position ret(*this); + ret.RelocateOffset(offset); + return ret; +} + +float Position::GetAngle(const Position* obj) const +{ + if (!obj) + return 0; + + return GetAngle(obj->GetPositionX(), obj->GetPositionY()); +} + +// Return angle in range 0..2*pi +float Position::GetAngle(float x, float y) const +{ + float dx = x - GetPositionX(); + float dy = y - GetPositionY(); + + float ang = std::atan2(dy, dx); + ang = (ang >= 0) ? ang : 2 * float(M_PI) + ang; + return ang; +} + +void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos) const +{ + float dx = GetPositionX() - x; + float dy = GetPositionY() - y; + + if (std::fabs(dx) < 0.001f && std::fabs(dy) < 0.001f) + { + float angle = (float)rand_norm()*static_cast<float>(2 * M_PI); + vcos = std::cos(angle); + vsin = std::sin(angle); + } + else + { + float dist = std::sqrt((dx*dx) + (dy*dy)); + vcos = dx / dist; + vsin = dy / dist; + } +} + +bool Position::HasInArc(float arc, const Position* obj, float border) const +{ + // always have self in arc + if (obj == this) + return true; + + // move arc to range 0.. 2*pi + arc = NormalizeOrientation(arc); + + float angle = GetAngle(obj); + angle -= m_orientation; + + // move angle to range -pi ... +pi + angle = NormalizeOrientation(angle); + if (angle > float(M_PI)) + angle -= 2.0f * float(M_PI); + + float lborder = -1 * (arc / border); // in range -pi..0 + float rborder = (arc / border); // in range 0..pi + return ((angle >= lborder) && (angle <= rborder)); +} + +bool Position::HasInLine(Position const* pos, float width) const +{ + if (!HasInArc(float(M_PI), pos)) + return false; + + float angle = GetRelativeAngle(pos); + return std::fabs(std::sin(angle)) * GetExactDist2d(pos->GetPositionX(), pos->GetPositionY()) < width; +} + +std::string Position::ToString() const +{ + std::stringstream sstr; + sstr << "X: " << m_positionX << " Y: " << m_positionY << " Z: " << m_positionZ << " O: " << m_orientation; + return sstr.str(); +} + +ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYStreamer const& streamer) +{ + buf << streamer.Pos->GetPositionX(); + buf << streamer.Pos->GetPositionY(); + return buf; +} + +ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYStreamer const& streamer) +{ + float x, y; + buf >> x >> y; + streamer.Pos->Relocate(x, y); + return buf; +} + +ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer) +{ + buf << streamer.Pos->GetPositionX(); + buf << streamer.Pos->GetPositionY(); + buf << streamer.Pos->GetPositionZ(); + return buf; +} + +ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer) +{ + float x, y, z; + buf >> x >> y >> z; + streamer.Pos->Relocate(x, y, z); + return buf; +} + +ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer) +{ + buf << streamer.Pos->GetPositionX(); + buf << streamer.Pos->GetPositionY(); + buf << streamer.Pos->GetPositionZ(); + buf << streamer.Pos->GetOrientation(); + return buf; +} + +ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer) +{ + float x, y, z, o; + buf >> x >> y >> z >> o; + streamer.Pos->Relocate(x, y, z, o); + return buf; +} diff --git a/src/server/game/Entities/Object/Position.h b/src/server/game/Entities/Object/Position.h new file mode 100644 index 00000000000..5bd37567811 --- /dev/null +++ b/src/server/game/Entities/Object/Position.h @@ -0,0 +1,225 @@ +/* + * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * + * 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 + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef Trinity_game_Position_h__ +#define Trinity_game_Position_h__ + +#include "Common.h" + +class ByteBuffer; + +struct Position +{ + Position(float x = 0, float y = 0, float z = 0, float o = 0) + : m_positionX(x), m_positionY(y), m_positionZ(z), m_orientation(NormalizeOrientation(o)) { } + + Position(Position const& loc) { Relocate(loc); } + + struct PositionXYStreamer + { + explicit PositionXYStreamer(Position& pos) : Pos(&pos) { } + Position* Pos; + }; + + struct PositionXYZStreamer + { + explicit PositionXYZStreamer(Position& pos) : Pos(&pos) { } + Position* Pos; + }; + + struct PositionXYZOStreamer + { + explicit PositionXYZOStreamer(Position& pos) : Pos(&pos) { } + Position* Pos; + }; + + float m_positionX; + float m_positionY; + float m_positionZ; + // Better to limit access to _orientation field, to guarantee the value is normalized +private: + float m_orientation; + +public: + bool operator==(Position const &a); + + inline bool operator!=(Position const &a) + { + return !(operator==(a)); + } + + void Relocate(float x, float y) + { + m_positionX = x; m_positionY = y; + } + + void Relocate(float x, float y, float z) + { + m_positionX = x; m_positionY = y; m_positionZ = z; + } + + void Relocate(float x, float y, float z, float orientation) + { + m_positionX = x; m_positionY = y; m_positionZ = z; SetOrientation(orientation); + } + + void Relocate(Position const &pos) + { + m_positionX = pos.m_positionX; m_positionY = pos.m_positionY; m_positionZ = pos.m_positionZ; SetOrientation(pos.m_orientation); + } + + void Relocate(Position const* pos) + { + m_positionX = pos->m_positionX; m_positionY = pos->m_positionY; m_positionZ = pos->m_positionZ; SetOrientation(pos->m_orientation); + } + + void RelocateOffset(Position const &offset); + + void SetOrientation(float orientation) + { + m_orientation = NormalizeOrientation(orientation); + } + + float GetPositionX() const { return m_positionX; } + float GetPositionY() const { return m_positionY; } + float GetPositionZ() const { return m_positionZ; } + float GetOrientation() const { return m_orientation; } + + void GetPosition(float &x, float &y) const + { + x = m_positionX; y = m_positionY; + } + + void GetPosition(float &x, float &y, float &z) const + { + x = m_positionX; y = m_positionY; z = m_positionZ; + } + + void GetPosition(float &x, float &y, float &z, float &o) const + { + x = m_positionX; y = m_positionY; z = m_positionZ; o = m_orientation; + } + + Position GetPosition() const { return *this; } + + Position::PositionXYStreamer PositionXYStream() { return PositionXYStreamer(*this); } + Position::PositionXYZStreamer PositionXYZStream() { return PositionXYZStreamer(*this); } + Position::PositionXYZOStreamer PositionXYZOStream() { return PositionXYZOStreamer(*this); } + + bool IsPositionValid() const; + + float GetExactDist2dSq(float x, float y) const + { + float dx = m_positionX - x; float dy = m_positionY - y; return dx*dx + dy*dy; + } + + float GetExactDist2d(const float x, const float y) const + { + return std::sqrt(GetExactDist2dSq(x, y)); + } + + float GetExactDist2dSq(Position const* pos) const + { + float dx = m_positionX - pos->m_positionX; float dy = m_positionY - pos->m_positionY; return dx*dx + dy*dy; + } + + float GetExactDist2d(Position const* pos) const + { + return std::sqrt(GetExactDist2dSq(pos)); + } + + float GetExactDistSq(float x, float y, float z) const + { + float dz = m_positionZ - z; return GetExactDist2dSq(x, y) + dz*dz; + } + + float GetExactDist(float x, float y, float z) const + { + return std::sqrt(GetExactDistSq(x, y, z)); + } + + float GetExactDistSq(Position const* pos) const + { + float dx = m_positionX - pos->m_positionX; float dy = m_positionY - pos->m_positionY; float dz = m_positionZ - pos->m_positionZ; return dx*dx + dy*dy + dz*dz; + } + + float GetExactDist(Position const* pos) const + { + return std::sqrt(GetExactDistSq(pos)); + } + + void GetPositionOffsetTo(Position const & endPos, Position & retOffset) const; + Position GetPositionWithOffset(Position const& offset) const; + + float GetAngle(Position const* pos) const; + float GetAngle(float x, float y) const; + float GetRelativeAngle(Position const* pos) const + { + return GetAngle(pos) - m_orientation; + } + + float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; } + void GetSinCos(float x, float y, float &vsin, float &vcos) const; + + bool IsInDist2d(float x, float y, float dist) const + { + return GetExactDist2dSq(x, y) < dist * dist; + } + + bool IsInDist2d(Position const* pos, float dist) const + { + return GetExactDist2dSq(pos) < dist * dist; + } + + bool IsInDist(float x, float y, float z, float dist) const + { + return GetExactDistSq(x, y, z) < dist * dist; + } + + bool IsInDist(Position const* pos, float dist) const + { + return GetExactDistSq(pos) < dist * dist; + } + + bool HasInArc(float arcangle, Position const* pos, float border = 2.0f) const; + bool HasInLine(Position const* pos, float width) const; + std::string ToString() const; + + // modulos a radian orientation to the range of 0..2PI + static float NormalizeOrientation(float o) + { + // fmod only supports positive numbers. Thus we have + // to emulate negative numbers + if (o < 0) + { + float mod = o *-1; + mod = std::fmod(mod, 2.0f * static_cast<float>(M_PI)); + mod = -mod + 2.0f * static_cast<float>(M_PI); + return mod; + } + return std::fmod(o, 2.0f * static_cast<float>(M_PI)); + } +}; + +ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); +ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYStreamer const& streamer); +ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); +ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZStreamer const& streamer); +ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); +ByteBuffer& operator>>(ByteBuffer& buf, Position::PositionXYZOStreamer const& streamer); + +#endif // Trinity_game_Position_h__ diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index d5d6bdf9831..97cdb0cf1df 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -24,6 +24,7 @@ #include "SpellMgr.h" #include "Pet.h" #include "Formulas.h" +#include "SpellHistory.h" #include "SpellAuras.h" #include "SpellAuraEffects.h" #include "Unit.h" @@ -407,7 +408,7 @@ void Pet::SavePetToDB(PetSaveMode mode) RemoveAllAuras(); _SaveSpells(trans); - _SaveSpellCooldowns(trans); + GetSpellHistory()->SaveToDB<Pet>(trans); CharacterDatabase.CommitTransaction(trans); // current/stable/not_in_slot @@ -1106,77 +1107,11 @@ uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel) const void Pet::_LoadSpellCooldowns() { - m_CreatureSpellCooldowns.clear(); - m_CreatureCategoryCooldowns.clear(); - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SPELL_COOLDOWN); stmt->setUInt32(0, m_charmInfo->GetPetNumber()); - PreparedQueryResult result = CharacterDatabase.Query(stmt); - - if (result) - { - time_t curTime = time(NULL); - - PacketCooldowns cooldowns; - WorldPacket data; - - do - { - Field* fields = result->Fetch(); - - uint32 spell_id = fields[0].GetUInt32(); - time_t db_time = time_t(fields[1].GetUInt32()); - - if (!sSpellMgr->GetSpellInfo(spell_id)) - { - TC_LOG_ERROR("entities.pet", "Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id); - continue; - } + PreparedQueryResult cooldownsResult = CharacterDatabase.Query(stmt); - // skip outdated cooldown - if (db_time <= curTime) - continue; - - cooldowns[spell_id] = uint32(db_time - curTime)*IN_MILLISECONDS; - - _AddCreatureSpellCooldown(spell_id, db_time); - - TC_LOG_DEBUG("entities.pet", "Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime)); - } - while (result->NextRow()); - - if (!cooldowns.empty()) - { - BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns); - GetOwner()->GetSession()->SendPacket(&data); - } - } -} - -void Pet::_SaveSpellCooldowns(SQLTransaction& trans) -{ - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PET_SPELL_COOLDOWNS); - stmt->setUInt32(0, m_charmInfo->GetPetNumber()); - trans->Append(stmt); - - time_t curTime = time(NULL); - - // remove oudated and save active - for (CreatureSpellCooldowns::iterator itr = m_CreatureSpellCooldowns.begin(); itr != m_CreatureSpellCooldowns.end();) - { - if (itr->second <= curTime) - m_CreatureSpellCooldowns.erase(itr++); - else - { - stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PET_SPELL_COOLDOWN); - stmt->setUInt32(0, m_charmInfo->GetPetNumber()); - stmt->setUInt32(1, itr->first); - stmt->setUInt32(2, uint32(itr->second)); - trans->Append(stmt); - - ++itr; - } - } + GetSpellHistory()->LoadFromDB<Pet>(cooldownsResult); } void Pet::_LoadSpells() @@ -2025,40 +1960,6 @@ void Pet::SynchronizeLevelWithOwner() } } -void Pet::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) -{ - PacketCooldowns cooldowns; - WorldPacket data; - time_t curTime = time(NULL); - for (PetSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) - { - if (itr->second.state == PETSPELL_REMOVED) - continue; - - uint32 unSpellId = itr->first; - SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(unSpellId); - - // Not send cooldown for this spells - if (spellInfo->IsCooldownStartedOnEvent()) - continue; - - if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) - continue; - - if ((idSchoolMask & spellInfo->GetSchoolMask()) && GetCreatureSpellCooldownDelay(unSpellId) < unTimeMs) - { - cooldowns[unSpellId] = unTimeMs; - _AddCreatureSpellCooldown(unSpellId, curTime + unTimeMs/IN_MILLISECONDS); - } - } - - if (!cooldowns.empty()) - { - BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns); - GetOwner()->GetSession()->SendPacket(&data); - } -} - Player* Pet::GetOwner() const { return Minion::GetOwner()->ToPlayer(); diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h index 62d82aaab1b..1cc86ea2a20 100644 --- a/src/server/game/Entities/Pet/Pet.h +++ b/src/server/game/Entities/Pet/Pet.h @@ -108,7 +108,6 @@ class Pet : public Guardian bool IsPetAura(Aura const* aura); void _LoadSpellCooldowns(); - void _SaveSpellCooldowns(SQLTransaction& trans); void _LoadAuras(uint32 timediff); void _SaveAuras(SQLTransaction& trans); void _LoadSpells(); @@ -121,7 +120,6 @@ class Pet : public Guardian bool unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true); bool removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true); void CleanupActionBar(); - virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override; PetSpellMap m_spells; AutoSpellList m_autospells; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 32fd5c53803..030c2a25110 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -67,6 +67,7 @@ #include "SpellAuraEffects.h" #include "SpellAuras.h" #include "SpellMgr.h" +#include "SpellHistory.h" #include "Transport.h" #include "UpdateData.h" #include "UpdateFieldFlags.h" @@ -3345,12 +3346,10 @@ void Player::InitStatsForLevel(bool reapplyMods) void Player::SendInitialSpells() { - time_t curTime = time(NULL); - time_t infTime = curTime + infinityCooldownDelayCheck; - + uint16 spellCooldowns = GetSpellHistory()->GetCooldownsSizeForPacket(); uint16 spellCount = 0; - WorldPacket data(SMSG_INITIAL_SPELLS, (1+2+4*m_spells.size()+2+m_spellCooldowns.size()*(2+2+2+4+4))); + WorldPacket data(SMSG_INITIAL_SPELLS, (1 + 2 + 4 * m_spells.size() + 2 + spellCooldowns * (2 + 2 + 2 + 4 + 4))); data << uint8(0); size_t countPos = data.wpos(); @@ -3372,40 +3371,7 @@ void Player::SendInitialSpells() data.put<uint16>(countPos, spellCount); // write real count value - uint16 spellCooldowns = m_spellCooldowns.size(); - data << uint16(spellCooldowns); - for (SpellCooldowns::const_iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); ++itr) - { - SpellInfo const* sEntry = sSpellMgr->GetSpellInfo(itr->first); - if (!sEntry) - continue; - - data << uint32(itr->first); - - data << uint16(itr->second.itemid); // cast item id - data << uint16(sEntry->GetCategory()); // spell category - - // send infinity cooldown in special format - if (itr->second.end >= infTime) - { - data << uint32(1); // cooldown - data << uint32(0x80000000); // category cooldown - continue; - } - - time_t cooldown = itr->second.end > curTime ? (itr->second.end-curTime)*IN_MILLISECONDS : 0; - - if (sEntry->GetCategory()) // may be wrong, but anyway better than nothing... - { - data << uint32(0); // cooldown - data << uint32(cooldown); // category cooldown - } - else - { - data << uint32(cooldown); // cooldown - data << uint32(0); // category cooldown - } - } + GetSpellHistory()->WritePacket<Player>(data); GetSession()->SendPacket(&data); @@ -4202,154 +4168,19 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId) return false; } -void Player::RemoveSpellCooldown(uint32 spell_id, bool update /* = false */) -{ - m_spellCooldowns.erase(spell_id); - - if (update) - SendClearCooldown(spell_id, this); -} - -// I am not sure which one is more efficient -void Player::RemoveCategoryCooldown(uint32 cat) -{ - SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(cat); - if (i_scstore != sSpellsByCategoryStore.end()) - for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset) - RemoveSpellCooldown(*i_scset, true); -} - -void Player::RemoveSpellCategoryCooldown(uint32 cat, bool update /* = false */) -{ - SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat); - if (ct == sSpellsByCategoryStore.end()) - return; - - const SpellCategorySet& ct_set = ct->second; - for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end();) - { - if (ct_set.find(i->first) != ct_set.end()) - RemoveSpellCooldown((i++)->first, update); - else - ++i; - } -} - void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns) { // remove cooldowns on spells that have < 10 min CD - - SpellCooldowns::iterator itr, next; - for (itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); itr = next) + GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool { - next = itr; - ++next; - SpellInfo const* entry = sSpellMgr->GetSpellInfo(itr->first); - // check if spellentry is present and if the cooldown is less than 10 min - if (entry && - entry->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && - entry->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS) - { - // remove & notify - RemoveSpellCooldown(itr->first, true); - } - } + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); + return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS; + }, true); // pet cooldowns if (removeActivePetCooldowns) if (Pet* pet = GetPet()) - { - // notify player - for (CreatureSpellCooldowns::const_iterator itr2 = pet->m_CreatureSpellCooldowns.begin(); itr2 != pet->m_CreatureSpellCooldowns.end(); ++itr2) - SendClearCooldown(itr2->first, pet); - - // actually clear cooldowns - pet->m_CreatureSpellCooldowns.clear(); - } -} - -void Player::RemoveAllSpellCooldown() -{ - if (!m_spellCooldowns.empty()) - { - for (SpellCooldowns::const_iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); ++itr) - SendClearCooldown(itr->first, this); - - m_spellCooldowns.clear(); - } -} - -void Player::_LoadSpellCooldowns(PreparedQueryResult result) -{ - // some cooldowns can be already set at aura loading... - - //QueryResult* result = CharacterDatabase.PQuery("SELECT spell, item, time FROM character_spell_cooldown WHERE guid = '%u'", GetGUIDLow()); - - if (result) - { - time_t curTime = time(NULL); - - do - { - Field* fields = result->Fetch(); - uint32 spell_id = fields[0].GetUInt32(); - uint32 item_id = fields[1].GetUInt32(); - time_t db_time = time_t(fields[2].GetUInt32()); - - if (!sSpellMgr->GetSpellInfo(spell_id)) - { - TC_LOG_ERROR("entities.player.loading", "Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id); - continue; - } - - // skip outdated cooldown - if (db_time <= curTime) - continue; - - AddSpellCooldown(spell_id, item_id, db_time); - - TC_LOG_DEBUG("entities.player.loading", "Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime)); - } - while (result->NextRow()); - } -} - -void Player::_SaveSpellCooldowns(SQLTransaction& trans) -{ - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_COOLDOWN); - stmt->setUInt32(0, GetGUIDLow()); - trans->Append(stmt); - - time_t curTime = time(NULL); - time_t infTime = curTime + infinityCooldownDelayCheck; - - bool first_round = true; - std::ostringstream ss; - - // remove outdated and save active - for (SpellCooldowns::iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end();) - { - if (itr->second.end <= curTime) - m_spellCooldowns.erase(itr++); - else if (itr->second.end <= infTime) // not save locked cooldowns, it will be reset or set at reload - { - if (first_round) - { - ss << "INSERT INTO character_spell_cooldown (guid, spell, item, time) VALUES "; - first_round = false; - } - // next new/changed record prefix - else - ss << ','; - ss << '(' << GetGUIDLow() << ',' << itr->first << ',' << itr->second.itemid << ',' << uint64(itr->second.end) << ')'; - ++itr; - } - else - ++itr; - } - // if something changed execute - if (!first_round) - trans->Append(ss.str().c_str()); + pet->GetSpellHistory()->ResetAllCooldowns(); } uint32 Player::ResetTalentsCost() const @@ -4897,7 +4728,7 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe stmt->setUInt32(0, guid); trans->Append(stmt); - stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_COOLDOWN); + stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_COOLDOWNS); stmt->setUInt32(0, guid); trans->Append(stmt); @@ -8382,7 +8213,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 if (procVictim & PROC_FLAG_TAKEN_DAMAGE) //if (damageInfo->procVictim & PROC_FLAG_TAKEN_ANY_DAMAGE) { - for (uint8 i = 0; i < MAX_ITEM_SPELLS; ++i) + for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) { _Spell const& spellData = proto->Spells[i]; @@ -12425,10 +12256,9 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update) { m_weaponChangeTimer = spellProto->StartRecoveryTime; - GetGlobalCooldownMgr().AddGlobalCooldown(spellProto, m_weaponChangeTimer); - + GetSpellHistory()->AddGlobalCooldown(spellProto, m_weaponChangeTimer); WorldPacket data; - BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, cooldownSpell, 0); + GetSpellHistory()->BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, cooldownSpell, 0); GetSession()->SendPacket(&data); } } @@ -17811,7 +17641,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) // has to be called after last Relocate() in Player::LoadFromDB SetFallInformation(0, GetPositionZ()); - _LoadSpellCooldowns(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS)); + GetSpellHistory()->LoadFromDB<Player>(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS)); // Spell code allow apply any auras to dead character in load time in aura/spell/item loading // Do now before stats re-calculation cleanup for ghost state unexpected auras @@ -19517,7 +19347,7 @@ void Player::SaveToDB(bool create /*=false*/) _SaveMonthlyQuestStatus(trans); _SaveTalents(trans); _SaveSpells(trans); - _SaveSpellCooldowns(trans); + GetSpellHistory()->SaveToDB<Player>(trans); _SaveActions(trans); _SaveAuras(trans); _SaveSkills(trans); @@ -20754,41 +20584,8 @@ void Player::PetSpellInitialize() data.put<uint8>(spellsCountPos, addlist); - uint8 cooldownsCount = pet->m_CreatureSpellCooldowns.size() + pet->m_CreatureCategoryCooldowns.size(); - data << uint8(cooldownsCount); - - time_t curTime = time(NULL); - - for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr) - { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); - if (!spellInfo) - { - data << uint32(0); - data << uint16(0); - data << uint32(0); - data << uint32(0); - continue; - } - - time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0; - data << uint32(itr->first); // spell ID - - CreatureSpellCooldowns::const_iterator categoryitr = pet->m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); - if (categoryitr != pet->m_CreatureCategoryCooldowns.end()) - { - time_t categoryCooldown = (categoryitr->second > curTime) ? (categoryitr->second - curTime) * IN_MILLISECONDS : 0; - data << uint16(spellInfo->GetCategory()); // spell category - data << uint32(cooldown); // spell cooldown - data << uint32(categoryCooldown); // category cooldown - } - else - { - data << uint16(0); - data << uint32(cooldown); - data << uint32(0); - } - } + //Cooldowns + pet->GetSpellHistory()->WritePacket<Pet>(data); GetSession()->SendPacket(&data); } @@ -20827,7 +20624,7 @@ void Player::VehicleSpellInitialize() if (!vehicle) return; - uint8 cooldownCount = vehicle->m_CreatureSpellCooldowns.size(); + uint8 cooldownCount = vehicle->GetSpellHistory()->GetCooldownsSizeForPacket(); WorldPacket data(SMSG_PET_SPELLS, 8 + 2 + 4 + 4 + 4 * 10 + 1 + 1 + cooldownCount * (4 + 2 + 4 + 4)); data << uint64(vehicle->GetGUID()); // Guid @@ -20868,41 +20665,7 @@ void Player::VehicleSpellInitialize() data << uint8(0); // Auras? // Cooldowns - data << uint8(cooldownCount); - - time_t now = sWorld->GetGameTime(); - - for (CreatureSpellCooldowns::const_iterator itr = vehicle->m_CreatureSpellCooldowns.begin(); itr != vehicle->m_CreatureSpellCooldowns.end(); ++itr) - { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); - if (!spellInfo) - { - data << uint32(0); - data << uint16(0); - data << uint32(0); - data << uint32(0); - continue; - } - - time_t cooldown = (itr->second > now) ? (itr->second - now) * IN_MILLISECONDS : 0; - data << uint32(itr->first); // spell ID - - CreatureSpellCooldowns::const_iterator categoryitr = vehicle->m_CreatureCategoryCooldowns.find(spellInfo->GetCategory()); - if (categoryitr != vehicle->m_CreatureCategoryCooldowns.end()) - { - time_t categoryCooldown = (categoryitr->second > now) ? (categoryitr->second - now) * IN_MILLISECONDS : 0; - data << uint16(spellInfo->GetCategory()); // spell category - data << uint32(cooldown); // spell cooldown - data << uint32(categoryCooldown); // category cooldown - } - else - { - data << uint16(0); - data << uint32(cooldown); - data << uint32(0); - } - } - + vehicle->GetSpellHistory()->WritePacket<Pet>(data); GetSession()->SendPacket(&data); } @@ -21522,9 +21285,9 @@ void Player::ContinueTaxiFlight() float distPrev = MAP_SIZE*MAP_SIZE; float distNext = - (nodeList[0].x-GetPositionX())*(nodeList[0].x-GetPositionX())+ - (nodeList[0].y-GetPositionY())*(nodeList[0].y-GetPositionY())+ - (nodeList[0].z-GetPositionZ())*(nodeList[0].z-GetPositionZ()); + (nodeList[0].LocX-GetPositionX())*(nodeList[0].LocX-GetPositionX())+ + (nodeList[0].LocY-GetPositionY())*(nodeList[0].LocY-GetPositionY())+ + (nodeList[0].LocZ-GetPositionZ())*(nodeList[0].LocZ-GetPositionZ()); for (uint32 i = 1; i < nodeList.size(); ++i) { @@ -21532,20 +21295,20 @@ void Player::ContinueTaxiFlight() TaxiPathNodeEntry const& prevNode = nodeList[i-1]; // skip nodes at another map - if (node.mapid != GetMapId()) + if (node.MapID != GetMapId()) continue; distPrev = distNext; distNext = - (node.x-GetPositionX())*(node.x-GetPositionX())+ - (node.y-GetPositionY())*(node.y-GetPositionY())+ - (node.z-GetPositionZ())*(node.z-GetPositionZ()); + (node.LocX-GetPositionX())*(node.LocX-GetPositionX())+ + (node.LocY-GetPositionY())*(node.LocY-GetPositionY())+ + (node.LocZ-GetPositionZ())*(node.LocZ-GetPositionZ()); float distNodes = - (node.x-prevNode.x)*(node.x-prevNode.x)+ - (node.y-prevNode.y)*(node.y-prevNode.y)+ - (node.z-prevNode.z)*(node.z-prevNode.z); + (node.LocX-prevNode.LocX)*(node.LocX-prevNode.LocX)+ + (node.LocY-prevNode.LocY)*(node.LocY-prevNode.LocY)+ + (node.LocZ-prevNode.LocZ)*(node.LocZ-prevNode.LocZ); if (distNext + distPrev < distNodes) { @@ -21557,39 +21320,6 @@ void Player::ContinueTaxiFlight() GetSession()->SendDoFlight(mountDisplayId, path, startNode); } -void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) -{ - PacketCooldowns cooldowns; - WorldPacket data; - time_t curTime = time(NULL); - for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) - { - if (itr->second->state == PLAYERSPELL_REMOVED) - continue; - uint32 unSpellId = itr->first; - SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(unSpellId); - - // Not send cooldown for this spells - if (spellInfo->IsCooldownStartedOnEvent()) - continue; - - if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) - continue; - - if ((idSchoolMask & spellInfo->GetSchoolMask()) && GetSpellCooldownDelay(unSpellId) < unTimeMs) - { - cooldowns[unSpellId] = unTimeMs; - AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/IN_MILLISECONDS); - } - } - - if (!cooldowns.empty()) - { - BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, cooldowns); - GetSession()->SendPacket(&data); - } -} - void Player::InitDataForForm(bool reapplyMods) { ShapeshiftForm form = GetShapeshiftForm(); @@ -22011,206 +21741,6 @@ void Player::UpdatePvP(bool state, bool _override) } } -bool Player::HasSpellCooldown(uint32 spell_id) const -{ - SpellCooldowns::const_iterator itr = m_spellCooldowns.find(spell_id); - return itr != m_spellCooldowns.end() && itr->second.end > time(NULL); -} - -uint32 Player::GetSpellCooldownDelay(uint32 spell_id) const -{ - SpellCooldowns::const_iterator itr = m_spellCooldowns.find(spell_id); - time_t t = time(NULL); - return uint32(itr != m_spellCooldowns.end() && itr->second.end > t ? itr->second.end - t : 0); -} - -void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 itemId, Spell* spell, bool infinityCooldown) -{ - // init cooldown values - uint32 cat = 0; - int32 rec = -1; - int32 catrec = -1; - - // some special item spells without correct cooldown in SpellInfo - // cooldown information stored in item prototype - // This used in same way in WorldSession::HandleItemQuerySingleOpcode data sending to client. - - if (itemId) - { - if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId)) - { - for (uint8 idx = 0; idx < MAX_ITEM_SPELLS; ++idx) - { - if (uint32(proto->Spells[idx].SpellId) == spellInfo->Id) - { - cat = proto->Spells[idx].SpellCategory; - rec = proto->Spells[idx].SpellCooldown; - catrec = proto->Spells[idx].SpellCategoryCooldown; - break; - } - } - } - } - - // if no cooldown found above then base at DBC data - if (rec < 0 && catrec < 0) - { - cat = spellInfo->GetCategory(); - rec = spellInfo->RecoveryTime; - catrec = spellInfo->CategoryRecoveryTime; - } - - time_t curTime = time(NULL); - - time_t catrecTime; - time_t recTime; - - bool needsCooldownPacket = false; - - // overwrite time for selected category - if (infinityCooldown) - { - // use +MONTH as infinity mark for spell cooldown (will checked as MONTH/2 at save ans skipped) - // but not allow ignore until reset or re-login - catrecTime = catrec > 0 ? curTime+infinityCooldownDelay : 0; - recTime = rec > 0 ? curTime+infinityCooldownDelay : catrecTime; - } - else - { - // shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK) - // prevent 0 cooldowns set by another way - if (rec <= 0 && catrec <= 0 && (cat == 76 || (spellInfo->IsAutoRepeatRangedSpell() && spellInfo->Id != 75))) - rec = GetAttackTime(RANGED_ATTACK); - - // Now we have cooldown data (if found any), time to apply mods - if (rec > 0) - ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, rec, spell); - - if (catrec > 0 && !spellInfo->HasAttribute(SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS)) - ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, catrec, spell); - - if (int32 cooldownMod = GetTotalAuraModifier(SPELL_AURA_MOD_COOLDOWN)) - { - // Apply SPELL_AURA_MOD_COOLDOWN only to own spells - if (HasSpell(spellInfo->Id)) - { - needsCooldownPacket = true; - rec += cooldownMod * IN_MILLISECONDS; // SPELL_AURA_MOD_COOLDOWN does not affect category cooldows, verified with shaman shocks - } - } - - // replace negative cooldowns by 0 - if (rec < 0) rec = 0; - if (catrec < 0) catrec = 0; - - // no cooldown after applying spell mods - if (rec == 0 && catrec == 0) - return; - - catrecTime = catrec ? curTime+catrec/IN_MILLISECONDS : 0; - recTime = rec ? curTime+rec/IN_MILLISECONDS : catrecTime; - } - - // self spell cooldown - if (recTime > 0) - { - AddSpellCooldown(spellInfo->Id, itemId, recTime); - - if (needsCooldownPacket) - { - WorldPacket data; - BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, spellInfo->Id, rec); - SendDirectMessage(&data); - } - } - - // category spells - if (cat && catrec > 0) - { - SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(cat); - if (i_scstore != sSpellsByCategoryStore.end()) - { - for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset) - { - if (*i_scset == spellInfo->Id) // skip main spell, already handled above - continue; - - AddSpellCooldown(*i_scset, itemId, catrecTime); - } - } - } -} - -void Player::AddSpellCooldown(uint32 spellid, uint32 itemid, time_t end_time) -{ - SpellCooldown sc; - sc.end = end_time; - sc.itemid = itemid; - m_spellCooldowns[spellid] = sc; -} - -void Player::ModifySpellCooldown(uint32 spellId, int32 cooldown) -{ - SpellCooldowns::iterator itr = m_spellCooldowns.find(spellId); - if (itr == m_spellCooldowns.end()) - return; - - time_t now = time(NULL); - if (itr->second.end + (cooldown / IN_MILLISECONDS) > now) - itr->second.end += (cooldown / IN_MILLISECONDS); - else - m_spellCooldowns.erase(itr); - - WorldPacket data(SMSG_MODIFY_COOLDOWN, 4 + 8 + 4); - data << uint32(spellId); // Spell ID - data << uint64(GetGUID()); // Player GUID - data << int32(cooldown); // Cooldown mod in milliseconds - GetSession()->SendPacket(&data); - - TC_LOG_DEBUG("misc", "ModifySpellCooldown:: Player: %s (GUID: %u) Spell: %u cooldown: %u", GetName().c_str(), GetGUIDLow(), spellId, GetSpellCooldownDelay(spellId)); -} - -void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= NULL*/, bool setCooldown /*= true*/) -{ - // start cooldowns at server side, if any - if (setCooldown) - AddSpellAndCategoryCooldowns(spellInfo, itemId, spell); - - // Send activate cooldown timer (possible 0) at client side - WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8); - data << uint32(spellInfo->Id); - data << uint64(GetGUID()); - SendDirectMessage(&data); - - uint32 cat = spellInfo->GetCategory(); - if (cat && spellInfo->CategoryRecoveryTime) - { - SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat); - if (ct != sSpellsByCategoryStore.end()) - { - SpellCategorySet const& catSet = ct->second; - for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end(); ++i) - { - if (i->first == spellInfo->Id) // skip main spell, already handled above - continue; - - SpellInfo const* spellInfo2 = sSpellMgr->GetSpellInfo(i->first); - if (!spellInfo2 || !spellInfo2->IsCooldownStartedOnEvent()) - continue; - - if (catSet.find(i->first) != catSet.end()) - { - // Send activate cooldown timer (possible 0) at client side - WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8); - data << uint32(i->first); - data << uint64(GetGUID()); - SendDirectMessage(&data); - } - } - } - } -} - void Player::UpdatePotionCooldown(Spell* spell) { // no potion used i combat or still in combat @@ -22222,14 +21752,14 @@ void Player::UpdatePotionCooldown(Spell* spell) { // spell/item pair let set proper cooldown (except not existed charged spell cooldown spellmods for potions) if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(m_lastPotionId)) - for (uint8 idx = 0; idx < MAX_ITEM_SPELLS; ++idx) + for (uint8 idx = 0; idx < MAX_ITEM_PROTO_SPELLS; ++idx) if (proto->Spells[idx].SpellId && proto->Spells[idx].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE) if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(proto->Spells[idx].SpellId)) - SendCooldownEvent(spellInfo, m_lastPotionId); + GetSpellHistory()->SendCooldownEvent(spellInfo, m_lastPotionId); } // from spell cases (m_lastPotionId set in Spell::SendSpellCooldown) else - SendCooldownEvent(spell->m_spellInfo, m_lastPotionId, spell); + GetSpellHistory()->SendCooldownEvent(spell->m_spellInfo, m_lastPotionId, spell); m_lastPotionId = 0; } @@ -23139,14 +22669,13 @@ void Player::ApplyEquipCooldown(Item* pItem) continue; // Don't replace longer cooldowns by equip cooldown if we have any. - SpellCooldowns::iterator itr = m_spellCooldowns.find(spellData.SpellId); - if (itr != m_spellCooldowns.end() && itr->second.itemid == pItem->GetEntry() && itr->second.end > time(NULL) + 30) + if (GetSpellHistory()->GetRemainingCooldown(spellData.SpellId) > 30 * IN_MILLISECONDS) continue; - AddSpellCooldown(spellData.SpellId, pItem->GetEntry(), time(NULL) + 30); + GetSpellHistory()->AddCooldown(spellData.SpellId, pItem->GetEntry(), std::chrono::seconds(30)); - WorldPacket data(SMSG_ITEM_COOLDOWN, 12); - data << pItem->GetGUID(); + WorldPacket data(SMSG_ITEM_COOLDOWN, 8 + 4); + data << uint64(pItem->GetGUID()); data << uint32(spellData.SpellId); GetSession()->SendPacket(&data); } @@ -24017,7 +23546,7 @@ uint32 Player::GetResurrectionSpellId() } // Reincarnation (passive spell) // prio: 1 // Glyph of Renewed Life - if (prio < 1 && HasSpell(20608) && !HasSpellCooldown(21169) && (HasAura(58059) || HasItemCount(17030))) + if (prio < 1 && HasSpell(20608) && !GetSpellHistory()->HasCooldown(21169) && (HasAura(58059) || HasItemCount(17030))) spell_id = 21169; return spell_id; @@ -26072,14 +25601,6 @@ void Player::RemoveAtLoginFlag(AtLoginFlags flags, bool persist /*= false*/) } } -void Player::SendClearCooldown(uint32 spell_id, Unit* target) -{ - WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8); - data << uint32(spell_id); - data << uint64(target->GetGUID()); - SendDirectMessage(&data); -} - void Player::ResetMap() { // this may be called during Map::Update diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e3a7f39b2ba..af640e4c73c 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -128,13 +128,6 @@ typedef std::unordered_map<uint32, PlayerTalent*> PlayerTalentMap; typedef std::unordered_map<uint32, PlayerSpell*> PlayerSpellMap; typedef std::list<SpellModifier*> SpellModList; -struct SpellCooldown -{ - time_t end; - uint16 itemid; -}; - -typedef std::map<uint32, SpellCooldown> SpellCooldowns; typedef std::unordered_map<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap; enum TrainerSpellState @@ -1655,8 +1648,6 @@ class Player : public Unit, public GridObject<Player> PlayerSpellMap const& GetSpellMap() const { return m_spells; } PlayerSpellMap & GetSpellMap() { return m_spells; } - SpellCooldowns const& GetSpellCooldownMap() const { return m_spellCooldowns; } - void AddSpellMod(SpellModifier* mod, bool apply); bool IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod, Spell* spell = NULL); template <class T> T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell = NULL); @@ -1666,26 +1657,7 @@ class Player : public Unit, public GridObject<Player> void DropModCharge(SpellModifier* mod, Spell* spell); void SetSpellModTakingSpell(Spell* spell, bool apply); - static uint32 const infinityCooldownDelay = MONTH; // used for set "infinity cooldowns" for spells and check - static uint32 const infinityCooldownDelayCheck = MONTH/2; - bool HasSpellCooldown(uint32 spell_id) const; - uint32 GetSpellCooldownDelay(uint32 spell_id) const; - void AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 itemId, Spell* spell = NULL, bool infinityCooldown = false); - void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time); - void ModifySpellCooldown(uint32 spellId, int32 cooldown); - void SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId = 0, Spell* spell = NULL, bool setCooldown = true); - void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override; - void RemoveSpellCooldown(uint32 spell_id, bool update = false); - void RemoveSpellCategoryCooldown(uint32 cat, bool update = false); - void SendClearCooldown(uint32 spell_id, Unit* target); - - GlobalCooldownMgr& GetGlobalCooldownMgr() { return m_GlobalCooldownMgr; } - - void RemoveCategoryCooldown(uint32 cat); void RemoveArenaSpellCooldowns(bool removeActivePetCooldowns = false); - void RemoveAllSpellCooldown(); - void _LoadSpellCooldowns(PreparedQueryResult result); - void _SaveSpellCooldowns(SQLTransaction& trans); uint32 GetLastPotionId() { return m_lastPotionId; } void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; } void UpdatePotionCooldown(Spell* spell = NULL); @@ -1975,8 +1947,6 @@ class Player : public Unit, public GridObject<Player> //End of PvP System - inline SpellCooldowns GetSpellCooldowns() const { return m_spellCooldowns; } - void SetDrunkValue(uint8 newDrunkValue, uint32 itemId = 0); uint8 GetDrunkValue() const { return GetByteValue(PLAYER_BYTES_3, 1); } static DrunkenState GetDrunkenstateByValue(uint8 value); @@ -2493,8 +2463,6 @@ class Player : public Unit, public GridObject<Player> PlayerTalentMap* m_talents[MAX_TALENT_SPECS]; uint32 m_lastPotionId; // last used health/mana potion in combat, that block next potion use - GlobalCooldownMgr m_GlobalCooldownMgr; - uint8 m_activeSpec; uint8 m_specsCount; @@ -2662,8 +2630,6 @@ class Player : public Unit, public GridObject<Player> AchievementMgr* m_achievementMgr; ReputationMgr* m_reputationMgr; - SpellCooldowns m_spellCooldowns; - uint32 m_ChampioningFaction; uint32 m_timeSyncCounter; diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 39a078a907f..85ee51aebf5 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -20,6 +20,7 @@ #include "Group.h" #include "Opcodes.h" #include "Player.h" +#include "SpellHistory.h" #include "SpellMgr.h" #include "SpellInfo.h" #include "WorldPacket.h" @@ -128,7 +129,7 @@ void Totem::UnSummon(uint32 msTime) owner->SendAutoRepeatCancel(this); if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(GetUInt32Value(UNIT_CREATED_BY_SPELL))) - owner->SendCooldownEvent(spell, 0, NULL, false); + GetSpellHistory()->SendCooldownEvent(spell, 0, nullptr, false); if (Group* group = owner->GetGroup()) { diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index d2fc27728ac..85dccddf186 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -32,7 +32,7 @@ Transport::Transport() : GameObject(), _transportInfo(NULL), _isMoving(true), _pendingStop(false), _triggeredArrivalEvent(false), _triggeredDepartureEvent(false), - _passengerTeleportItr(_passengers.begin()), _delayedAddModel(false) + _passengerTeleportItr(_passengers.begin()), _delayedAddModel(false), _delayedTeleport(false) { m_updateFlag = UPDATEFLAG_TRANSPORT | UPDATEFLAG_LOWGUID | UPDATEFLAG_STATIONARY_POSITION | UPDATEFLAG_ROTATION; } @@ -173,13 +173,13 @@ void Transport::Update(uint32 diff) MoveToNextWaypoint(); - sScriptMgr->OnRelocate(this, _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z); + sScriptMgr->OnRelocate(this, _currentFrame->Node->NodeIndex, _currentFrame->Node->MapID, _currentFrame->Node->LocX, _currentFrame->Node->LocY, _currentFrame->Node->LocZ); - TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z); + TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->NodeIndex, _currentFrame->Node->MapID, _currentFrame->Node->LocX, _currentFrame->Node->LocY, _currentFrame->Node->LocZ); // Departure event if (_currentFrame->IsTeleportFrame()) - if (TeleportTransport(_nextFrame->Node->mapid, _nextFrame->Node->x, _nextFrame->Node->y, _nextFrame->Node->z, _nextFrame->InitialOrientation)) + if (TeleportTransport(_nextFrame->Node->MapID, _nextFrame->Node->LocX, _nextFrame->Node->LocY, _nextFrame->Node->LocZ, _nextFrame->InitialOrientation)) return; // Update more in new map thread } @@ -226,6 +226,14 @@ void Transport::Update(uint32 diff) sScriptMgr->OnTransportUpdate(this, diff); } +void Transport::DelayedUpdate(uint32 diff) +{ + if (GetKeyFrames().size() <= 1) + return; + + DelayedTeleportTransport(); +} + void Transport::AddPassenger(WorldObject* passenger) { if (!IsInWorld()) @@ -591,36 +599,8 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl if (oldMap->GetId() != newMapid) { - Map* newMap = sMapMgr->CreateBaseMap(newMapid); + _delayedTeleport = true; UnloadStaticPassengers(); - GetMap()->RemoveFromMap<Transport>(this, false); - SetMap(newMap); - - for (_passengerTeleportItr = _passengers.begin(); _passengerTeleportItr != _passengers.end();) - { - WorldObject* obj = (*_passengerTeleportItr++); - - float destX, destY, destZ, destO; - obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO); - TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o); - - switch (obj->GetTypeId()) - { - case TYPEID_PLAYER: - if (!obj->ToPlayer()->TeleportTo(newMapid, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT)) - RemovePassenger(obj); - break; - case TYPEID_DYNAMICOBJECT: - obj->AddObjectToRemoveList(); - break; - default: - RemovePassenger(obj); - break; - } - } - - Relocate(x, y, z, o); - GetMap()->AddToMap<Transport>(this); return true; } else @@ -643,6 +623,48 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl } } +void Transport::DelayedTeleportTransport() +{ + if (!_delayedTeleport) + return; + + _delayedTeleport = false; + Map* newMap = sMapMgr->CreateBaseMap(_nextFrame->Node->MapID); + GetMap()->RemoveFromMap<Transport>(this, false); + SetMap(newMap); + + float x = _nextFrame->Node->LocX, + y = _nextFrame->Node->LocY, + z = _nextFrame->Node->LocZ, + o =_nextFrame->InitialOrientation; + + for (_passengerTeleportItr = _passengers.begin(); _passengerTeleportItr != _passengers.end();) + { + WorldObject* obj = (*_passengerTeleportItr++); + + float destX, destY, destZ, destO; + obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO); + TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o); + + switch (obj->GetTypeId()) + { + case TYPEID_PLAYER: + if (!obj->ToPlayer()->TeleportTo(_nextFrame->Node->MapID, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT)) + RemovePassenger(obj); + break; + case TYPEID_DYNAMICOBJECT: + obj->AddObjectToRemoveList(); + break; + default: + RemovePassenger(obj); + break; + } + } + + Relocate(x, y, z, o); + GetMap()->AddToMap<Transport>(this); +} + void Transport::UpdatePassengerPositions(PassengerSet& passengers) { for (PassengerSet::iterator itr = passengers.begin(); itr != passengers.end(); ++itr) @@ -697,9 +719,9 @@ void Transport::UpdatePassengerPositions(PassengerSet& passengers) void Transport::DoEventIfAny(KeyFrame const& node, bool departure) { - if (uint32 eventid = departure ? node.Node->departureEventID : node.Node->arrivalEventID) + if (uint32 eventid = departure ? node.Node->DepartureEventID : node.Node->ArrivalEventID) { - TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->index, GetName().c_str()); + TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->NodeIndex, GetName().c_str()); GetMap()->ScriptsStart(sEventScripts, eventid, this, this); EventInform(eventid); } diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index 90c1828253e..c56ceb1696d 100644 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -39,6 +39,7 @@ class Transport : public GameObject, public TransportBase void CleanupsBeforeDelete(bool finalCleanup = true) override; void Update(uint32 diff) override; + void DelayedUpdate(uint32 diff); void BuildUpdate(UpdateDataMapType& data_map) override; @@ -103,6 +104,7 @@ class Transport : public GameObject, public TransportBase void MoveToNextWaypoint(); float CalculateSegmentPos(float perc); bool TeleportTransport(uint32 newMapid, float x, float y, float z, float o); + void DelayedTeleportTransport(); void UpdatePassengerPositions(PassengerSet& passengers); void DoEventIfAny(KeyFrame const& node, bool departure); @@ -127,6 +129,7 @@ class Transport : public GameObject, public TransportBase PassengerSet _staticPassengers; bool _delayedAddModel; + bool _delayedTeleport; }; #endif diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9d7cdb895b2..219ee8b1002 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -51,6 +51,7 @@ #include "SpellAuras.h" #include "Spell.h" #include "SpellInfo.h" +#include "SpellHistory.h" #include "SpellMgr.h" #include "TemporarySummon.h" #include "Totem.h" @@ -163,7 +164,7 @@ Unit::Unit(bool isWorldObject) : i_AI(NULL), i_disabledAI(NULL), m_AutoRepeatFirstCast(false), m_procDeep(0), m_removedAurasCount(0), i_motionMaster(new MotionMaster(this)), m_regenTimer(0), m_ThreatManager(this), m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), - m_HostileRefManager(this), _lastDamagedTime(0) + m_HostileRefManager(this), _lastDamagedTime(0), m_spellHistory(new SpellHistory(this)) { m_objectType |= TYPEMASK_UNIT; m_objectTypeId = TYPEID_UNIT; @@ -257,24 +258,6 @@ Unit::Unit(bool isWorldObject) : } //////////////////////////////////////////////////////////// -// Methods of class GlobalCooldownMgr -bool GlobalCooldownMgr::HasGlobalCooldown(SpellInfo const* spellInfo) const -{ - GlobalCooldownList::const_iterator itr = m_GlobalCooldowns.find(spellInfo->StartRecoveryCategory); - return itr != m_GlobalCooldowns.end() && itr->second.duration && getMSTimeDiff(itr->second.cast_time, getMSTime()) < itr->second.duration; -} - -void GlobalCooldownMgr::AddGlobalCooldown(SpellInfo const* spellInfo, uint32 gcd) -{ - m_GlobalCooldowns[spellInfo->StartRecoveryCategory] = GlobalCooldown(gcd, getMSTime()); -} - -void GlobalCooldownMgr::CancelGlobalCooldown(SpellInfo const* spellInfo) -{ - m_GlobalCooldowns[spellInfo->StartRecoveryCategory].duration = 0; -} - -//////////////////////////////////////////////////////////// // Methods of class Unit Unit::~Unit() { @@ -291,6 +274,7 @@ Unit::~Unit() delete i_motionMaster; delete m_charmInfo; delete movespline; + delete m_spellHistory; ASSERT(!m_duringRemoveFromWorld); ASSERT(!m_attacking); @@ -406,7 +390,7 @@ void Unit::UpdateSplinePosition() pos.m_positionX = loc.x; pos.m_positionY = loc.y; pos.m_positionZ = loc.z; - pos.m_orientation = loc.orientation; + pos.SetOrientation(loc.orientation); if (TransportBase* transport = GetDirectTransport()) transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation); @@ -2925,6 +2909,8 @@ void Unit::_UpdateSpells(uint32 time) ++itr; } } + + m_spellHistory->Update(); } void Unit::_UpdateAutoRepeatSpell() @@ -4860,13 +4846,13 @@ void Unit::AddGameObject(GameObject* gameObj) m_gameObj.push_back(gameObj); gameObj->SetOwnerGUID(GetGUID()); - if (GetTypeId() == TYPEID_PLAYER && gameObj->GetSpellId()) + if (gameObj->GetSpellId()) { SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(gameObj->GetSpellId()); // Need disable spell use for owner if (createBySpell && createBySpell->IsCooldownStartedOnEvent()) // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) - ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, NULL, true); + GetSpellHistory()->StartCooldown(createBySpell, 0, nullptr, true); } } @@ -4891,14 +4877,11 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del) { RemoveAurasDueToSpell(spellid); - if (GetTypeId() == TYPEID_PLAYER) - { - SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(spellid); - // Need activate spell use for owner - if (createBySpell && createBySpell->IsCooldownStartedOnEvent()) - // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) - ToPlayer()->SendCooldownEvent(createBySpell); - } + SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(spellid); + // Need activate spell use for owner + if (createBySpell && createBySpell->IsCooldownStartedOnEvent()) + // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases) + GetSpellHistory()->SendCooldownEvent(createBySpell); } m_gameObj.remove(gameObj); @@ -5488,8 +5471,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster); for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) { - if (!ToPlayer()->HasSpellCooldown(*itr)) - ToPlayer()->AddSpellCooldown(*itr, 0, time(NULL) + cooldown); + if (!GetSpellHistory()->HasCooldown(*itr)) + GetSpellHistory()->AddCooldown(*itr, 0, std::chrono::seconds(cooldown)); } break; } @@ -5534,8 +5517,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster); for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) { - if (!ToPlayer()->HasSpellCooldown(*itr)) - ToPlayer()->AddSpellCooldown(*itr, 0, time(NULL) + cooldown); + if (!GetSpellHistory()->HasCooldown(*itr)) + GetSpellHistory()->AddCooldown(*itr, 0, std::chrono::seconds(cooldown)); } break; } @@ -5639,20 +5622,17 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Glyph of Ice Block case 56372: { - Player* player = ToPlayer(); - if (!player) + if (GetTypeId() != TYPEID_PLAYER) return false; - SpellCooldowns const cooldowns = player->GetSpellCooldowns(); - // remove cooldowns on all ranks of Frost Nova - for (SpellCooldowns::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr) + GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool { SpellInfo const* cdSpell = sSpellMgr->GetSpellInfo(itr->first); - // Frost Nova - if (cdSpell && cdSpell->SpellFamilyName == SPELLFAMILY_MAGE - && cdSpell->SpellFamilyFlags[0] & 0x00000040) - player->RemoveSpellCooldown(cdSpell->Id, true); - } + if (!cdSpell || cdSpell->SpellFamilyName != SPELLFAMILY_MAGE + || !(cdSpell->SpellFamilyFlags[0] & 0x00000040)) + return false; + return true; + }, true); break; } case 47020: // Enter vehicle XT-002 (Scrapbot) @@ -6061,7 +6041,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere int32 basepoints1 = CalculatePct(GetMaxPower(Powers(POWER_MANA)), triggerAmount * 2); // Improved Leader of the Pack // Check cooldown of heal spell cooldown - if (GetTypeId() == TYPEID_PLAYER && !ToPlayer()->HasSpellCooldown(34299)) + if (!GetSpellHistory()->HasCooldown(34299)) CastCustomSpell(this, 68285, &basepoints1, 0, 0, true, 0, triggeredByAura); break; } @@ -6732,7 +6712,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; // custom cooldown processing case - if (cooldown && player->HasSpellCooldown(dummySpell->Id)) + if (cooldown && GetSpellHistory()->HasCooldown(dummySpell->Id)) return false; if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID()) @@ -6798,7 +6778,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // apply cooldown before cast to prevent processing itself if (cooldown) - player->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown); + player->GetSpellHistory()->AddCooldown(dummySpell->Id, 0, std::chrono::seconds(cooldown)); // Attack Twice for (uint32 i = 0; i < 2; ++i) @@ -7040,7 +7020,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; // custom cooldown processing case - if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(dummySpell->Id)) + if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(dummySpell->Id)) return false; uint32 spellId = 0; @@ -7087,13 +7067,13 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; // Remove cooldown (Chain Lightning - has Category Recovery time) - ToPlayer()->RemoveSpellCooldown(spellId); + GetSpellHistory()->ResetCooldown(spellId); } CastSpell(victim, spellId, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ToPlayer()->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown); + GetSpellHistory()->AddCooldown(dummySpell->Id, 0, std::chrono::seconds(cooldown)); return true; } @@ -7106,8 +7086,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere uint32 spell = sSpellMgr->GetSpellWithRank(26364, aurEff->GetSpellInfo()->GetRank()); // custom cooldown processing case - if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(spell)) - ToPlayer()->RemoveSpellCooldown(spell); + if (GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(spell)) + GetSpellHistory()->ResetCooldown(spell); CastSpell(target, spell, true, castItem, triggeredByAura); aurEff->GetBase()->DropCharge(); @@ -7399,7 +7379,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (cooldown_spell_id == 0) cooldown_spell_id = triggered_spell_id; - if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(cooldown_spell_id)) + if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(cooldown_spell_id)) return false; if (basepoints0) @@ -7408,7 +7388,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere CastSpell(target, triggered_spell_id, true, castItem, triggeredByAura, originalCaster); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ToPlayer()->AddSpellCooldown(cooldown_spell_id, 0, time(NULL) + cooldown); + GetSpellHistory()->AddCooldown(cooldown_spell_id, 0, std::chrono::seconds(cooldown)); return true; } @@ -7629,9 +7609,9 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp *handled = true; if (cooldown && GetTypeId() == TYPEID_PLAYER) { - if (ToPlayer()->HasSpellCooldown(100000)) + if (GetSpellHistory()->HasCooldown(100000)) return false; - ToPlayer()->AddSpellCooldown(100000, 0, time(NULL) + cooldown); + GetSpellHistory()->AddCooldown(100000, 0, std::chrono::seconds(cooldown)); } return true; } @@ -8300,7 +8280,11 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg return false; // Howling Blast - ToPlayer()->RemoveSpellCategoryCooldown(1248, true); + GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); + return spellInfo && spellInfo->GetCategory() == 1248; + }, true); } // Custom basepoints/target for exist spell @@ -8319,13 +8303,13 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg if (!target) return false; - if (cooldown && target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->HasSpellCooldown(trigger_spell_id)) + if (cooldown && target->GetTypeId() == TYPEID_PLAYER && target->GetSpellHistory()->HasCooldown(trigger_spell_id)) return false; target->CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ToPlayer()->AddSpellCooldown(trigger_spell_id, 0, time(NULL) + cooldown); + GetSpellHistory()->AddCooldown(trigger_spell_id, 0, std::chrono::seconds(cooldown)); return true; } // Cast positive spell on enemy target @@ -8408,8 +8392,11 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 50227: { // Remove cooldown on Shield Slam - if (GetTypeId() == TYPEID_PLAYER) - ToPlayer()->RemoveSpellCategoryCooldown(1209, true); + GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); + return spellInfo && spellInfo->GetCategory() == 1209; + }, true); break; } // Maelstrom Weapon @@ -8469,8 +8456,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 58628: { // remove cooldown of Death Grip - if (GetTypeId() == TYPEID_PLAYER) - ToPlayer()->RemoveSpellCooldown(49576, true); + GetSpellHistory()->ResetCooldown(49576, true); return true; } // Savage Defense @@ -8501,7 +8487,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg } } - if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(trigger_spell_id)) + if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(trigger_spell_id)) return false; // extra attack should hit same target @@ -8518,7 +8504,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ToPlayer()->AddSpellCooldown(trigger_spell_id, 0, time(NULL) + cooldown); + GetSpellHistory()->AddCooldown(trigger_spell_id, 0, std::chrono::seconds(cooldown)); return true; } @@ -8614,13 +8600,13 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au return false; } - if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(triggered_spell_id)) + if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(triggered_spell_id)) return false; CastSpell(victim, triggered_spell_id, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ToPlayer()->AddSpellCooldown(triggered_spell_id, 0, time(NULL) + cooldown); + GetSpellHistory()->AddCooldown(triggered_spell_id, 0, std::chrono::seconds(cooldown)); return true; } @@ -9355,14 +9341,11 @@ void Unit::SetMinion(Minion *minion, bool apply) if (minion->IsPetGhoul()) minion->setPowerType(POWER_ENERGY); - if (GetTypeId() == TYPEID_PLAYER) - { - // Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL)); + // Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL)); - if (spellInfo && (spellInfo->IsCooldownStartedOnEvent())) - ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, NULL, true); - } + if (spellInfo && (spellInfo->IsCooldownStartedOnEvent())) + GetSpellHistory()->StartCooldown(spellInfo, 0, nullptr, true); } else { @@ -9396,13 +9379,10 @@ void Unit::SetMinion(Minion *minion, bool apply) } } - if (GetTypeId() == TYPEID_PLAYER) - { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL)); - // Remove infinity cooldown - if (spellInfo && (spellInfo->IsCooldownStartedOnEvent())) - ToPlayer()->SendCooldownEvent(spellInfo); - } + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL)); + // Remove infinity cooldown + if (spellInfo && (spellInfo->IsCooldownStartedOnEvent())) + GetSpellHistory()->SendCooldownEvent(spellInfo); //if (minion->HasUnitTypeMask(UNIT_MASK_GUARDIAN)) { @@ -15532,18 +15512,11 @@ void Unit::SetControlled(bool apply, UnitState state) { case UNIT_STATE_STUNNED: SetStunned(true); - // i need to stop fear on stun and root or i will get teleport to destination issue as MVMGEN for fear keeps going on - if (HasUnitState(UNIT_STATE_FLEEING)) - SetFeared(false); CastStop(); break; case UNIT_STATE_ROOT: if (!HasUnitState(UNIT_STATE_STUNNED)) - { SetRooted(true); - if (HasUnitState(UNIT_STATE_FLEEING)) - SetFeared(false); - } break; case UNIT_STATE_CONFUSED: if (!HasUnitState(UNIT_STATE_STUNNED)) @@ -15631,11 +15604,9 @@ void Unit::SetStunned(bool apply) // setting MOVEMENTFLAG_ROOT RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING); AddUnitMovementFlag(MOVEMENTFLAG_ROOT); + StopMoving(); - // Creature specific - if (GetTypeId() != TYPEID_PLAYER) - StopMoving(); - else + if (GetTypeId() == TYPEID_PLAYER) SetStandState(UNIT_STAND_STATE_STAND); WorldPacket data(SMSG_FORCE_MOVE_ROOT, 8); @@ -15679,6 +15650,7 @@ void Unit::SetRooted(bool apply) // setting MOVEMENTFLAG_ROOT RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING); AddUnitMovementFlag(MOVEMENTFLAG_ROOT); + StopMoving(); if (GetTypeId() == TYPEID_PLAYER) { @@ -15692,7 +15664,6 @@ void Unit::SetRooted(bool apply) WorldPacket data(SMSG_SPLINE_MOVE_ROOT, 8); data << GetPackGUID(); SendMessageToSet(&data, true); - StopMoving(); } } else @@ -17787,27 +17758,6 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target) data->append(fieldBuffer); } -void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown) -{ - data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + 4 + 4); - data << uint64(GetGUID()); - data << uint8(flags); - data << uint32(spellId); - data << uint32(cooldown); -} - -void Unit::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns const& cooldowns) -{ - data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + (4 + 4) * cooldowns.size()); - data << uint64(GetGUID()); - data << uint8(flags); - for (std::unordered_map<uint32, uint32>::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr) - { - data << uint32(itr->first); - data << uint32(itr->second); - } -} - int32 Unit::GetHighestExclusiveSameEffectSpellGroupValue(AuraEffect const* aurEff, AuraType auraType, bool checkMiscValue /*= false*/, int32 miscValue /*= 0*/) const { int32 val = 0; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index ddf43f30971..088a0bbdf73 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -339,6 +339,7 @@ class AuraEffect; class Creature; class Spell; class SpellInfo; +class SpellHistory; class DynamicObject; class GameObject; class Item; @@ -1031,30 +1032,6 @@ enum CurrentSpellTypes #define CURRENT_FIRST_NON_MELEE_SPELL 1 #define CURRENT_MAX_SPELL 4 -struct GlobalCooldown -{ - explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) { } - - uint32 duration; - uint32 cast_time; -}; - -typedef std::unordered_map<uint32 /*category*/, GlobalCooldown> GlobalCooldownList; - -class GlobalCooldownMgr // Shared by Player and CharmInfo -{ -public: - GlobalCooldownMgr() { } - -public: - bool HasGlobalCooldown(SpellInfo const* spellInfo) const; - void AddGlobalCooldown(SpellInfo const* spellInfo, uint32 gcd); - void CancelGlobalCooldown(SpellInfo const* spellInfo); - -private: - GlobalCooldownList m_GlobalCooldowns; -}; - enum ActiveStates { ACT_PASSIVE = 0x01, // 0x01 - passive @@ -1171,8 +1148,6 @@ struct CharmInfo CharmSpellInfo* GetCharmSpell(uint8 index) { return &(_charmspells[index]); } - GlobalCooldownMgr& GetGlobalCooldownMgr() { return m_GlobalCooldownMgr; } - void SetIsCommandAttack(bool val); bool IsCommandAttack(); void SetIsCommandFollow(bool val); @@ -1205,8 +1180,6 @@ struct CharmInfo float _stayX; float _stayY; float _stayZ; - - GlobalCooldownMgr m_GlobalCooldownMgr; }; // for clearing special attacks @@ -1237,16 +1210,6 @@ enum PlayerTotemType SUMMON_TYPE_TOTEM_AIR = 83 }; -/// Spell cooldown flags sent in SMSG_SPELL_COOLDOWN -enum SpellCooldownFlags -{ - SPELL_COOLDOWN_FLAG_NONE = 0x0, - SPELL_COOLDOWN_FLAG_INCLUDE_GCD = 0x1, ///< Starts GCD in addition to normal cooldown specified in the packet - SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS = 0x2 ///< Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUDE_GCD set -}; - -typedef std::unordered_map<uint32, uint32> PacketCooldowns; - // delay time next attack to prevent client attack animation problems #define ATTACK_DISPLAY_DELAY 200 #define MAX_PLAYER_STEALTH_DETECT_RANGE 30.0f // max distance for detection targets by player @@ -1585,8 +1548,6 @@ class Unit : public WorldObject void SetAuraStack(uint32 spellId, Unit* target, uint32 stack); void SendPlaySpellVisual(uint32 id); void SendPlaySpellImpact(ObjectGuid guid, uint32 id); - void BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown); - void BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns const& cooldowns); void DeMorph(); @@ -1845,7 +1806,6 @@ class Unit : public WorldObject void SetChannelObjectGuid(ObjectGuid guid) { SetGuidValue(UNIT_FIELD_CHANNEL_OBJECT, guid); } void SetCurrentCastSpell(Spell* pSpell); - virtual void ProhibitSpellSchool(SpellSchoolMask /*idSchoolMask*/, uint32 /*unTimeMs*/) { } void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed = true, bool withInstant = true); void FinishSpell(CurrentSpellTypes spellType, bool ok = true); @@ -1863,6 +1823,9 @@ class Unit : public WorldObject Spell* FindCurrentSpellBySpellId(uint32 spell_id) const; int32 GetCurrentSpellCastTime(uint32 spell_id) const; + SpellHistory* GetSpellHistory() { return m_spellHistory; } + SpellHistory const* GetSpellHistory() const { return m_spellHistory; } + ObjectGuid m_SummonSlot[MAX_SUMMON_SLOT]; ObjectGuid m_ObjectSlot[MAX_GAMEOBJECT_SLOT]; @@ -2293,6 +2256,8 @@ class Unit : public WorldObject bool _isWalkingBeforeCharm; ///< Are we walking before we were charmed? time_t _lastDamagedTime; // Part of Evade mechanics + + SpellHistory* m_spellHistory; }; namespace Trinity diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 59e4e871970..a3414c72613 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1039,6 +1039,66 @@ void ObjectMgr::LoadCreatureAddons() TC_LOG_INFO("server.loading", ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } +void ObjectMgr::LoadGameObjectAddons() +{ + uint32 oldMSTime = getMSTime(); + + // 0 1 2 + QueryResult result = WorldDatabase.Query("SELECT guid, invisibilityType, invisibilityValue FROM gameobject_addon"); + + if (!result) + { + TC_LOG_INFO("server.loading", ">> Loaded 0 gameobject addon definitions. DB table `gameobject_addon` is empty."); + return; + } + + uint32 count = 0; + do + { + Field* fields = result->Fetch(); + + ObjectGuid::LowType guid = fields[0].GetUInt64(); + + const GameObjectData* goData = GetGOData(guid); + if (!goData) + { + TC_LOG_ERROR("sql.sql", "GameObject (GUID: " UI64FMTD ") does not exist but has a record in `gameobject_addon`", guid); + continue; + } + + GameObjectAddon& gameObjectAddon = _gameObjectAddonStore[guid]; + gameObjectAddon.invisibilityType = InvisibilityType(fields[1].GetUInt8()); + gameObjectAddon.InvisibilityValue = fields[2].GetUInt32(); + + if (gameObjectAddon.invisibilityType >= TOTAL_INVISIBILITY_TYPES) + { + TC_LOG_ERROR("sql.sql", "GameObject (GUID: " UI64FMTD ") has invalid InvisibilityType in `gameobject_addon`", guid); + gameObjectAddon.invisibilityType = INVISIBILITY_GENERAL; + gameObjectAddon.InvisibilityValue = 0; + } + + if (gameObjectAddon.invisibilityType && !gameObjectAddon.InvisibilityValue) + { + TC_LOG_ERROR("sql.sql", "GameObject (GUID: " UI64FMTD ") has InvisibilityType set but has no InvisibilityValue in `gameobject_addon`, set to 1", guid); + gameObjectAddon.InvisibilityValue = 1; + } + + ++count; + } + while (result->NextRow()); + + TC_LOG_INFO("server.loading", ">> Loaded %u gameobject addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); +} + +GameObjectAddon const* ObjectMgr::GetGameObjectAddon(ObjectGuid::LowType lowguid) +{ + GameObjectAddonContainer::const_iterator itr = _gameObjectAddonStore.find(lowguid); + if (itr != _gameObjectAddonStore.end()) + return &(itr->second); + + return NULL; +} + CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid) { CreatureAddonContainer::const_iterator itr = _creatureAddonStore.find(lowguid); @@ -4941,11 +5001,11 @@ void ObjectMgr::LoadEventScripts() { TaxiPathNodeEntry const& node = sTaxiPathNodesByPath[path_idx][node_idx]; - if (node.arrivalEventID) - evt_scripts.insert(node.arrivalEventID); + if (node.ArrivalEventID) + evt_scripts.insert(node.ArrivalEventID); - if (node.departureEventID) - evt_scripts.insert(node.departureEventID); + if (node.DepartureEventID) + evt_scripts.insert(node.DepartureEventID); } } diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index f9562a12335..f18e39077f3 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -49,12 +49,7 @@ struct PlayerClassLevelInfo; struct PlayerInfo; struct PlayerLevelInfo; -// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct PageText { @@ -82,12 +77,7 @@ private: uint8 _summonGroup; ///< Summon's group id }; -// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif // DB scripting commands enum ScriptCommands @@ -732,6 +722,7 @@ class ObjectMgr static void ChooseCreatureFlags(CreatureTemplate const* cinfo, uint32& npcflag, uint32& unit_flags, uint32& dynamicflags, CreatureData const* data = NULL); EquipmentInfo const* GetEquipmentInfo(uint32 entry, int8& id); CreatureAddon const* GetCreatureAddon(uint32 lowguid); + GameObjectAddon const* GetGameObjectAddon(ObjectGuid::LowType lowguid); CreatureAddon const* GetCreatureTemplateAddon(uint32 entry); ItemTemplate const* GetItemTemplate(uint32 entry); ItemTemplateContainer const* GetItemTemplateStore() const { return &_itemTemplateStore; } @@ -974,6 +965,7 @@ class ObjectMgr void LoadLinkedRespawn(); bool SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid); void LoadCreatureAddons(); + void LoadGameObjectAddons(); void LoadCreatureModelInfo(); void LoadEquipmentTemplates(); void LoadGameObjectLocales(); @@ -1419,6 +1411,7 @@ class ObjectMgr CreatureModelContainer _creatureModelStore; CreatureAddonContainer _creatureAddonStore; CreatureAddonContainer _creatureTemplateAddonStore; + GameObjectAddonContainer _gameObjectAddonStore; EquipmentInfoContainer _equipmentInfoStore; LinkedRespawnContainer _linkedRespawnStore; CreatureLocaleContainer _creatureLocaleStore; diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 9ff2041ee92..0bf33eee234 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -30,6 +30,7 @@ #include "Pet.h" #include "World.h" #include "Group.h" +#include "SpellHistory.h" #include "SpellInfo.h" #include "Player.h" @@ -344,8 +345,6 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe if (result == SPELL_CAST_OK) { - pet->ToCreature()->AddCreatureSpellCooldown(spellid); - unit_target = spell->m_targets.GetUnitTarget(); //10% chance to play special pet attack talk, else growl @@ -379,8 +378,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe else spell->SendPetCastResult(result); - if (!pet->ToCreature()->HasSpellCooldown(spellid)) - GetPlayer()->SendClearCooldown(spellid, pet); + if (!pet->GetSpellHistory()->HasCooldown(spellid)) + pet->GetSpellHistory()->ResetCooldown(spellid, true); spell->finish(false); delete spell; @@ -794,7 +793,6 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) { if (Creature* creature = caster->ToCreature()) { - creature->AddCreatureSpellCooldown(spellId); if (Pet* pet = creature->ToPet()) { // 10% chance to play special pet attack talk, else growl @@ -812,16 +810,8 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) { spell->SendPetCastResult(result); - if (caster->GetTypeId() == TYPEID_PLAYER) - { - if (!caster->ToPlayer()->HasSpellCooldown(spellId)) - GetPlayer()->SendClearCooldown(spellId, caster); - } - else - { - if (!caster->ToCreature()->HasSpellCooldown(spellId)) - GetPlayer()->SendClearCooldown(spellId, caster); - } + if (!caster->GetSpellHistory()->HasCooldown(spellId)) + caster->GetSpellHistory()->ResetCooldown(spellId, true); spell->finish(false); delete spell; diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 5f641bf713f..a6108b36c13 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -491,8 +491,6 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket) } pet->RemoveOwnedAura(spellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL); - - pet->AddCreatureSpellCooldown(spellId); } void WorldSession::HandleCancelGrowthAuraOpcode(WorldPacket& /*recvPacket*/) { } diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp index a9dc7f26b8e..af0f5b0fc75 100644 --- a/src/server/game/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -237,7 +237,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData) TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()]; flight->SkipCurrentNode(); - GetPlayer()->TeleportTo(curDestNode->map_id, node.x, node.y, node.z, GetPlayer()->GetOrientation()); + GetPlayer()->TeleportTo(curDestNode->map_id, node.LocX, node.LocY, node.LocZ, GetPlayer()->GetOrientation()); } return; } diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 42bf61b6e38..da806e5b038 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -426,7 +426,26 @@ void InstanceScript::DoUseDoorOrButton(ObjectGuid guid, uint32 withRestoreTime / TC_LOG_ERROR("scripts", "InstanceScript: DoUseDoorOrButton can't use gameobject entry %u, because type is %u.", go->GetEntry(), go->GetGoType()); } else - TC_LOG_DEBUG("scripts", "InstanceScript: HandleGameObject failed"); + TC_LOG_DEBUG("scripts", "InstanceScript: DoUseDoorOrButton failed"); +} + +void InstanceScript::DoCloseDoorOrButton(ObjectGuid guid) +{ + if (!guid) + return; + + if (GameObject* go = instance->GetGameObject(guid)) + { + if (go->GetGoType() == GAMEOBJECT_TYPE_DOOR || go->GetGoType() == GAMEOBJECT_TYPE_BUTTON) + { + if (go->getLootState() == GO_ACTIVATED) + go->ResetDoorOrButton(); + } + else + TC_LOG_ERROR("scripts", "InstanceScript: DoCloseDoorOrButton can't use gameobject entry %u, because type is %u.", go->GetEntry(), go->GetGoType()); + } + else + TC_LOG_DEBUG("scripts", "InstanceScript: DoCloseDoorOrButton failed"); } void InstanceScript::DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn /*= MINUTE*/) diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 41a9e9d0be1..be05a9f4495 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -191,6 +191,7 @@ class InstanceScript : public ZoneScript // Change active state of doors or buttons void DoUseDoorOrButton(ObjectGuid guid, uint32 withRestoreTime = 0, bool useAlternativeState = false); + void DoCloseDoorOrButton(ObjectGuid guid); // Respawns a GO having negative spawntimesecs in gameobject-table void DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn = MINUTE); diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index dad24de7288..c1a462497cd 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2562,6 +2562,17 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y) void Map::DelayedUpdate(const uint32 t_diff) { + for (_transportsUpdateIter = _transports.begin(); _transportsUpdateIter != _transports.end();) + { + Transport* transport = *_transportsUpdateIter; + ++_transportsUpdateIter; + + if (!transport->IsInWorld()) + continue; + + transport->DelayedUpdate(t_diff); + } + RemoveAllObjectsInRemoveList(); // Don't unload grids if it's battleground, since we may have manually added GOs, creatures, those doesn't load from DB at grid re-load ! diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 3bbd6068e4e..43fcbaba31c 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -210,12 +210,7 @@ public: ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0); }; -// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct InstanceTemplate { @@ -241,11 +236,7 @@ struct ZoneDynamicInfo uint32 LightFadeInTime; }; -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif #define MAX_HEIGHT 100000.0f // can be use for find ground height at surface #define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp index b2e30473632..dadc2eeeac3 100644 --- a/src/server/game/Maps/TransportMgr.cpp +++ b/src/server/game/Maps/TransportMgr.cpp @@ -112,7 +112,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl Movement::PointsArray splinePath, allPoints; bool mapChange = false; for (size_t i = 0; i < path.size(); ++i) - allPoints.push_back(G3D::Vector3(path[i].x, path[i].y, path[i].z)); + allPoints.push_back(G3D::Vector3(path[i].LocX, path[i].LocY, path[i].LocZ)); // Add extra points to allow derivative calculations for all path nodes allPoints.insert(allPoints.begin(), allPoints.front().lerp(allPoints[1], -0.2f)); @@ -129,7 +129,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl if (!mapChange) { TaxiPathNodeEntry const& node_i = path[i]; - if (i != path.size() - 1 && (node_i.actionFlag & 1 || node_i.mapid != path[i + 1].mapid)) + if (i != path.size() - 1 && (node_i.Flags & 1 || node_i.MapID != path[i + 1].MapID)) { keyFrames.back().Teleport = true; mapChange = true; @@ -142,8 +142,8 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl k.InitialOrientation = Position::NormalizeOrientation(std::atan2(h.y, h.x) + float(M_PI)); keyFrames.push_back(k); - splinePath.push_back(G3D::Vector3(node_i.x, node_i.y, node_i.z)); - transport->mapsUsed.insert(k.Node->mapid); + splinePath.push_back(G3D::Vector3(node_i.LocX, node_i.LocY, node_i.LocZ)); + transport->mapsUsed.insert(k.Node->MapID); } } else @@ -153,12 +153,12 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl if (splinePath.size() >= 2) { // Remove special catmull-rom spline points - if (!keyFrames.front().IsStopFrame() && !keyFrames.front().Node->arrivalEventID && !keyFrames.front().Node->departureEventID) + if (!keyFrames.front().IsStopFrame() && !keyFrames.front().Node->ArrivalEventID && !keyFrames.front().Node->DepartureEventID) { splinePath.erase(splinePath.begin()); keyFrames.erase(keyFrames.begin()); } - if (!keyFrames.back().IsStopFrame() && !keyFrames.back().Node->arrivalEventID && !keyFrames.back().Node->departureEventID) + if (!keyFrames.back().IsStopFrame() && !keyFrames.back().Node->ArrivalEventID && !keyFrames.back().Node->DepartureEventID) { splinePath.pop_back(); keyFrames.pop_back(); @@ -311,7 +311,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl float curPathTime = 0.0f; if (keyFrames[0].IsStopFrame()) { - curPathTime = float(keyFrames[0].Node->delay); + curPathTime = float(keyFrames[0].Node->Delay); keyFrames[0].DepartureTime = uint32(curPathTime * IN_MILLISECONDS); } @@ -322,7 +322,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl { keyFrames[i].ArriveTime = uint32(curPathTime * IN_MILLISECONDS); keyFrames[i - 1].NextArriveTime = keyFrames[i].ArriveTime; - curPathTime += float(keyFrames[i].Node->delay); + curPathTime += float(keyFrames[i].Node->Delay); keyFrames[i].DepartureTime = uint32(curPathTime * IN_MILLISECONDS); } else @@ -374,10 +374,10 @@ Transport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map* // ...at first waypoint TaxiPathNodeEntry const* startNode = tInfo->keyFrames.begin()->Node; - uint32 mapId = startNode->mapid; - float x = startNode->x; - float y = startNode->y; - float z = startNode->z; + uint32 mapId = startNode->MapID; + float x = startNode->LocX; + float y = startNode->LocY; + float z = startNode->LocZ; float o = tInfo->keyFrames.begin()->InitialOrientation; // initialize the gameobject base diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h index dbd99bd163a..fff7b9d8afa 100644 --- a/src/server/game/Maps/TransportMgr.h +++ b/src/server/game/Maps/TransportMgr.h @@ -61,7 +61,7 @@ struct KeyFrame uint32 NextArriveTime; bool IsTeleportFrame() const { return Teleport; } - bool IsStopFrame() const { return Node->actionFlag == 2; } + bool IsStopFrame() const { return Node->Flags == 2; } }; struct TransportTemplate diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 685bcd338a9..06c58a408da 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -3599,4 +3599,12 @@ enum DiminishingLevels DIMINISHING_LEVEL_TAUNT_IMMUNE = 4 }; +/// Spell cooldown flags sent in SMSG_SPELL_COOLDOWN +enum SpellCooldownFlags +{ + SPELL_COOLDOWN_FLAG_NONE = 0x0, + SPELL_COOLDOWN_FLAG_INCLUDE_GCD = 0x1, ///< Starts GCD in addition to normal cooldown specified in the packet + SPELL_COOLDOWN_FLAG_INCLUDE_EVENT_COOLDOWNS = 0x2 ///< Starts GCD for spells that should start their cooldown on events, requires SPELL_COOLDOWN_FLAG_INCLUDE_GCD set +}; + #endif diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index a4c3831cf82..f91fc1985d5 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -248,10 +248,10 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const if (i_currentNode >= i_path->size()) return i_path->size(); - uint32 curMapId = (*i_path)[i_currentNode].mapid; + uint32 curMapId = (*i_path)[i_currentNode].MapID; for (uint32 i = i_currentNode; i < i_path->size(); ++i) { - if ((*i_path)[i].mapid != curMapId) + if ((*i_path)[i].MapID != curMapId) return i; } @@ -296,7 +296,7 @@ void FlightPathMovementGenerator::DoReset(Player* player) uint32 end = GetPathAtMapEnd(); for (uint32 i = GetCurrentNode(); i != end; ++i) { - G3D::Vector3 vertice((*i_path)[i].x, (*i_path)[i].y, (*i_path)[i].z); + G3D::Vector3 vertice((*i_path)[i].LocX, (*i_path)[i].LocY, (*i_path)[i].LocZ); init.Path().push_back(vertice); } init.SetFirstPointId(GetCurrentNode()); @@ -332,10 +332,10 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport() if (i_path->empty()) return; - uint32 map0 = (*i_path)[0].mapid; + uint32 map0 = (*i_path)[0].MapID; for (size_t i = 1; i < i_path->size(); ++i) { - if ((*i_path)[i].mapid != map0) + if ((*i_path)[i].MapID != map0) { i_currentNode = i; return; @@ -345,9 +345,9 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport() void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry const& node, bool departure) { - if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID) + if (uint32 eventid = departure ? node.DepartureEventID : node.ArrivalEventID) { - TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player->GetName().c_str()); + TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.NodeIndex, node.PathID, player->GetName().c_str()); player->GetMap()->ScriptsStart(sEventScripts, eventid, player, player); } } @@ -355,7 +355,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry bool FlightPathMovementGenerator::GetResetPos(Player*, float& x, float& y, float& z) { const TaxiPathNodeEntry& node = (*i_path)[i_currentNode]; - x = node.x; y = node.y; z = node.z; + x = node.LocX; y = node.LocY; z = node.LocZ; return true; } @@ -364,10 +364,10 @@ void FlightPathMovementGenerator::InitEndGridInfo() /*! Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will be reinitialized for each flightmaster at the end of each spline (or stop) in the flight. */ uint32 nodeCount = (*i_path).size(); //! Number of nodes in path. - _endMapId = (*i_path)[nodeCount - 1].mapid; //! MapId of last node + _endMapId = (*i_path)[nodeCount - 1].MapID; //! MapId of last node _preloadTargetNode = nodeCount - 3; - _endGridX = (*i_path)[nodeCount - 1].x; - _endGridY = (*i_path)[nodeCount - 1].y; + _endGridX = (*i_path)[nodeCount - 1].LocX; + _endGridY = (*i_path)[nodeCount - 1].LocY; } void FlightPathMovementGenerator::PreloadEndGrid() diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index 62fe808b6f5..0a3b41d412a 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -24,11 +24,7 @@ namespace Movement { -#if defined( __GNUC__ ) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif class MoveSplineFlag { @@ -136,11 +132,7 @@ namespace Movement bool unknown12 : 1; bool unknown13 : 1; }; -#if defined( __GNUC__ ) -#pragma pack() -#else #pragma pack(pop) -#endif } #endif // TRINITYSERVER_MOVESPLINEFLAG_H diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h index 68abadccf75..4b47e51fde6 100644 --- a/src/server/game/Server/Protocol/Opcodes.h +++ b/src/server/game/Server/Protocol/Opcodes.h @@ -1363,11 +1363,7 @@ enum PacketProcessing class WorldSession; class WorldPacket; -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct OpcodeHandler { @@ -1379,11 +1375,7 @@ struct OpcodeHandler extern OpcodeHandler opcodeTable[NUM_MSG_TYPES]; -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif /// Lookup opcode name for human understandable logging inline const char* LookupOpcodeName(uint16 id) diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index d79392177e4..d6055e9733b 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -1370,6 +1370,7 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co case MSG_RANDOM_ROLL: // not profiled case CMSG_TIME_SYNC_RESP: // not profiled case CMSG_TRAINER_BUY_SPELL: // not profiled + case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: // not profiled { // "0" is a magic number meaning there's no limit for the opcode. // All the opcodes above must cause little CPU usage and no sync/async database queries at all diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index de2dc26b643..378f5f0d622 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -27,6 +27,7 @@ #include "ObjectAccessor.h" #include "Util.h" #include "Spell.h" +#include "SpellHistory.h" #include "SpellAuraEffects.h" #include "Battleground.h" #include "OutdoorPvPMgr.h" @@ -1108,15 +1109,13 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const // Remove cooldown of spells triggered on stance change - they may share cooldown with stance spell if (spellId) { - if (target->GetTypeId() == TYPEID_PLAYER) - target->ToPlayer()->RemoveSpellCooldown(spellId); + target->GetSpellHistory()->ResetCooldown(spellId); target->CastSpell(target, spellId, true, NULL, this); } if (spellId2) { - if (target->GetTypeId() == TYPEID_PLAYER) - target->ToPlayer()->RemoveSpellCooldown(spellId2); + target->GetSpellHistory()->ResetCooldown(spellId2); target->CastSpell(target, spellId2, true, NULL, this); } @@ -3852,10 +3851,11 @@ void AuraEffect::HandleAuraModIncreaseHealth(AuraApplication const* aurApp, uint } else { - if (int32(target->GetHealth()) > GetAmount()) - target->ModifyHealth(-GetAmount()); - else - target->SetHealth(1); + if (target->GetHealth() > 0) + { + int32 value = std::min<int32>(target->GetHealth() - 1, GetAmount()); + target->ModifyHealth(-value); + } target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply); } } @@ -3867,19 +3867,15 @@ void AuraEffect::HandleAuraModIncreaseMaxHealth(AuraApplication const* aurApp, u Unit* target = aurApp->GetTarget(); - uint32 oldhealth = target->GetHealth(); - double healthPercentage = (double)oldhealth / (double)target->GetMaxHealth(); + float percent = target->GetHealthPct(); target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(GetAmount()), apply); // refresh percentage - if (oldhealth > 0) + if (target->GetHealth() > 0) { - uint32 newhealth = uint32(ceil((double)target->GetMaxHealth() * healthPercentage)); - if (newhealth == 0) - newhealth = 1; - - target->SetHealth(newhealth); + uint32 newHealth = std::max<uint32>(target->CountPctFromMaxHealth(int32(percent)), 1); + target->SetHealth(newHealth); } } @@ -3943,8 +3939,12 @@ void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const* aurAp // Unit will keep hp% after MaxHealth being modified if unit is alive. float percent = target->GetHealthPct(); target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(GetAmount()), apply); - if (target->IsAlive()) - target->SetHealth(target->CountPctFromMaxHealth(int32(percent))); + + if (target->GetHealth() > 0) + { + uint32 newHealth = std::max<uint32>(target->CountPctFromMaxHealth(int32(percent)), 1); + target->SetHealth(newHealth); + } } void AuraEffect::HandleAuraIncreaseBaseHealthPercent(AuraApplication const* aurApp, uint8 mode, bool apply) const diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 0ba059b1952..5479dcdbf00 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -25,6 +25,7 @@ #include "Player.h" #include "Unit.h" #include "Spell.h" +#include "SpellHistory.h" #include "SpellAuraEffects.h" #include "DynamicObject.h" #include "ObjectAccessor.h" @@ -418,7 +419,7 @@ void Aura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp if (m_spellInfo->IsCooldownStartedOnEvent()) { Item* castItem = m_castItemGuid ? caster->ToPlayer()->GetItemByGuid(m_castItemGuid) : NULL; - caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, NULL, true); + caster->GetSpellHistory()->StartCooldown(m_spellInfo, castItem ? castItem->GetEntry() : 0, nullptr, true); } } } @@ -446,12 +447,9 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraA m_removedApplications.push_back(auraApp); // reset cooldown state for spells - if (caster && caster->GetTypeId() == TYPEID_PLAYER) - { - if (GetSpellInfo()->IsCooldownStartedOnEvent()) - // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases) - caster->ToPlayer()->SendCooldownEvent(GetSpellInfo()); - } + if (caster && GetSpellInfo()->IsCooldownStartedOnEvent()) + // note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases) + caster->GetSpellHistory()->SendCooldownEvent(GetSpellInfo()); } // removes aura from all targets @@ -1215,7 +1213,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b break; case 60970: // Heroic Fury (remove Intercept cooldown) if (target->GetTypeId() == TYPEID_PLAYER) - target->ToPlayer()->RemoveSpellCooldown(20252, true); + target->GetSpellHistory()->ResetCooldown(20252, true); break; } break; @@ -1497,15 +1495,15 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b // check cooldown if (caster->GetTypeId() == TYPEID_PLAYER) { - if (caster->ToPlayer()->HasSpellCooldown(aura->GetId())) + if (caster->GetSpellHistory()->HasCooldown(aura->GetId())) { // This additional check is needed to add a minimal delay before cooldown in in effect // to allow all bubbles broken by a single damage source proc mana return - if (caster->ToPlayer()->GetSpellCooldownDelay(aura->GetId()) <= 11) + if (caster->GetSpellHistory()->GetRemainingCooldown(aura->GetId()) <= 11) break; } else // and add if needed - caster->ToPlayer()->AddSpellCooldown(aura->GetId(), 0, uint32(time(NULL) + 12)); + caster->GetSpellHistory()->AddCooldown(aura->GetId(), 0, std::chrono::seconds(12)); } // effect on caster @@ -1558,14 +1556,14 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b // Glyph of Guardian Spirit if (AuraEffect* aurEff = player->GetAuraEffect(63231, 0)) { - if (!player->HasSpellCooldown(47788)) + if (!player->GetSpellHistory()->HasCooldown(47788)) break; - player->RemoveSpellCooldown(GetSpellInfo()->Id, true); - player->AddSpellCooldown(GetSpellInfo()->Id, 0, uint32(time(NULL) + aurEff->GetAmount())); + player->GetSpellHistory()->ResetCooldown(GetSpellInfo()->Id, true); + player->GetSpellHistory()->AddCooldown(GetSpellInfo()->Id, 0, std::chrono::seconds(aurEff->GetAmount())); WorldPacket data; - player->BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, GetSpellInfo()->Id, aurEff->GetAmount()*IN_MILLISECONDS); + player->GetSpellHistory()->BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_NONE, GetSpellInfo()->Id, aurEff->GetAmount() * IN_MILLISECONDS); player->SendDirectMessage(&data); } break; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index dbe87daa1a1..94bb90487bc 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -50,6 +50,7 @@ #include "SpellScript.h" #include "InstanceScript.h" #include "SpellInfo.h" +#include "SpellHistory.h" #include "Battlefield.h" #include "BattlefieldMgr.h" @@ -3226,7 +3227,7 @@ void Spell::cast(bool skipCheck) //Clear spell cooldowns after every spell is cast if .cheat cooldown is enabled. if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_COOLDOWN)) - m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true); + m_caster->GetSpellHistory()->ResetCooldown(m_spellInfo->Id, true); } SetExecutedCurrently(false); @@ -3430,30 +3431,7 @@ void Spell::_handle_finish_phase() void Spell::SendSpellCooldown() { - Player* _player = m_caster->ToPlayer(); - if (!_player) - { - // Handle pet cooldowns here if needed instead of in PetAI to avoid hidden cooldown restarts - Creature* _creature = m_caster->ToCreature(); - if (_creature && (_creature->IsPet() || _creature->IsGuardian())) - _creature->AddCreatureSpellCooldown(m_spellInfo->Id); - - return; - } - - // mana/health/etc potions, disabled by client (until combat out as declarate) - if (m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent())) - { - // need in some way provided data for Spell::finish SendCooldownEvent - _player->SetLastPotionId(m_CastItem->GetEntry()); - return; - } - - // have infinity cooldown but set at aura apply // do not set cooldown for triggered spells (needed by reincarnation) - if (m_spellInfo->IsCooldownStartedOnEvent() || m_spellInfo->IsPassive() || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD)) - return; - - _player->AddSpellAndCategoryCooldowns(m_spellInfo, m_CastItem ? m_CastItem->GetEntry() : 0, this); + m_caster->GetSpellHistory()->HandleCooldowns(m_spellInfo, m_CastItem, this); } void Spell::update(uint32 difftime) @@ -4635,23 +4613,26 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_CASTER_DEAD; // check cooldowns to prevent cheating - if (m_caster->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE)) + if (!m_spellInfo->IsPassive()) { - //can cast triggered (by aura only?) spells while have this flag - if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURASTATE) && m_caster->ToPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_ALLOW_ONLY_ABILITY)) - return SPELL_FAILED_SPELL_IN_PROGRESS; + if (m_caster->GetTypeId() == TYPEID_PLAYER) + { + //can cast triggered (by aura only?) spells while have this flag + if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CASTER_AURASTATE) && m_caster->ToPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_ALLOW_ONLY_ABILITY)) + return SPELL_FAILED_SPELL_IN_PROGRESS; - if (m_caster->ToPlayer()->HasSpellCooldown(m_spellInfo->Id)) + // check if we are using a potion in combat for the 2nd+ time. Cooldown is added only after caster gets out of combat + if (m_caster->ToPlayer()->GetLastPotionId() && m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent())) + return SPELL_FAILED_NOT_READY; + } + + if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo)) { if (m_triggeredByAuraSpell) return SPELL_FAILED_DONT_REPORT; else return SPELL_FAILED_NOT_READY; } - - // check if we are using a potion in combat for the 2nd+ time. Cooldown is added only after caster gets out of combat - if (m_caster->ToPlayer()->GetLastPotionId() && m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent())) - return SPELL_FAILED_NOT_READY; } if (m_spellInfo->HasAttribute(SPELL_ATTR7_IS_CHEAT_SPELL) && !m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ALLOW_CHEAT_SPELLS)) @@ -5504,13 +5485,13 @@ SpellCastResult Spell::CheckPetCast(Unit* target) } // cooldown - if (Creature const* creatureCaster = m_caster->ToCreature()) - if (creatureCaster->HasSpellCooldown(m_spellInfo->Id)) + if (Creature* creatureCaster = m_caster->ToCreature()) + if (!creatureCaster->GetSpellHistory()->IsReady(m_spellInfo)) return SPELL_FAILED_NOT_READY; // Check if spell is affected by GCD if (m_spellInfo->StartRecoveryCategory > 0) - if (m_caster->GetCharmInfo() && m_caster->GetCharmInfo()->GetGlobalCooldownMgr().HasGlobalCooldown(m_spellInfo)) + if (m_caster->GetCharmInfo() && m_caster->GetSpellHistory()->HasGlobalCooldown(m_spellInfo)) return SPELL_FAILED_NOT_READY; return CheckCast(true); @@ -5801,7 +5782,7 @@ SpellCastResult Spell::CheckItems() if (!proto) return SPELL_FAILED_ITEM_NOT_READY; - for (uint8 i = 0; i < MAX_ITEM_SPELLS; ++i) + for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) if (proto->Spells[i].SpellCharges) if (m_CastItem->GetSpellCharges(i) == 0) return SPELL_FAILED_NO_CHARGES_REMAIN; @@ -7230,13 +7211,11 @@ enum GCDLimits bool Spell::HasGlobalCooldown() const { - // Only player or controlled units have global cooldown - if (m_caster->GetCharmInfo()) - return m_caster->GetCharmInfo()->GetGlobalCooldownMgr().HasGlobalCooldown(m_spellInfo); - else if (m_caster->GetTypeId() == TYPEID_PLAYER) - return m_caster->ToPlayer()->GetGlobalCooldownMgr().HasGlobalCooldown(m_spellInfo); - else + // Only players or controlled units have global cooldown + if (m_caster->GetTypeId() != TYPEID_PLAYER && !m_caster->GetCharmInfo()) return false; + + return m_caster->GetSpellHistory()->HasGlobalCooldown(m_spellInfo); } void Spell::TriggerGlobalCooldown() @@ -7245,6 +7224,10 @@ void Spell::TriggerGlobalCooldown() if (!gcd) return; + // Only players or controlled units have global cooldown + if (m_caster->GetTypeId() != TYPEID_PLAYER && !m_caster->GetCharmInfo()) + return; + if (m_caster->GetTypeId() == TYPEID_PLAYER) if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_COOLDOWN)) return; @@ -7266,11 +7249,7 @@ void Spell::TriggerGlobalCooldown() gcd = MAX_GCD; } - // Only players or controlled units have global cooldown - if (m_caster->GetCharmInfo()) - m_caster->GetCharmInfo()->GetGlobalCooldownMgr().AddGlobalCooldown(m_spellInfo, gcd); - else if (m_caster->GetTypeId() == TYPEID_PLAYER) - m_caster->ToPlayer()->GetGlobalCooldownMgr().AddGlobalCooldown(m_spellInfo, gcd); + m_caster->GetSpellHistory()->AddGlobalCooldown(m_spellInfo, gcd); } void Spell::CancelGlobalCooldown() @@ -7283,10 +7262,10 @@ void Spell::CancelGlobalCooldown() return; // Only players or controlled units have global cooldown - if (m_caster->GetCharmInfo()) - m_caster->GetCharmInfo()->GetGlobalCooldownMgr().CancelGlobalCooldown(m_spellInfo); - else if (m_caster->GetTypeId() == TYPEID_PLAYER) - m_caster->ToPlayer()->GetGlobalCooldownMgr().CancelGlobalCooldown(m_spellInfo); + if (m_caster->GetTypeId() != TYPEID_PLAYER && !m_caster->GetCharmInfo()) + return; + + m_caster->GetSpellHistory()->CancelGlobalCooldown(m_spellInfo); } namespace Trinity @@ -7405,7 +7384,7 @@ bool WorldObjectSpellConeTargetCheck::operator()(WorldObject* target) } else if (_spellInfo->HasAttribute(SPELL_ATTR0_CU_CONE_LINE)) { - if (!_caster->HasInLine(target, _caster->GetObjectSize())) + if (!_caster->HasInLine(target, _caster->GetObjectSize() + target->GetObjectSize())) return false; } else @@ -7422,7 +7401,7 @@ WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck(float range, Po bool WorldObjectSpellTrajTargetCheck::operator()(WorldObject* target) { // return all targets on missile trajectory (0 - size of a missile) - if (!_caster->HasInLine(target, 0)) + if (!_caster->HasInLine(target, target->GetObjectSize())) return false; return WorldObjectSpellAreaTargetCheck::operator ()(target); } diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 2ae2930aeb0..1aac88ac602 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -473,6 +473,7 @@ class Spell void ReSetTimer() { m_timer = m_casttime > 0 ? m_casttime : 0; } bool IsNextMeleeSwingSpell() const; bool IsTriggered() const { return (_triggeredCastFlags & TRIGGERED_FULL_MASK) != 0; } + bool IsIgnoringCooldowns() const { return (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD) != 0; } bool IsChannelActive() const { return m_caster->GetUInt32Value(UNIT_CHANNEL_SPELL) != 0; } bool IsAutoActionResetSpell() const; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index cb518ee6099..3829e12b790 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -48,6 +48,7 @@ #include "GridNotifiers.h" #include "Formulas.h" #include "ScriptMgr.h" +#include "SpellHistory.h" #include "GameObjectAI.h" #include "AccountMgr.h" #include "InstanceScript.h" @@ -769,8 +770,8 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) return; // Reset cooldown on stealth if needed - if (unitTarget->ToPlayer()->HasSpellCooldown(1784)) - unitTarget->ToPlayer()->RemoveSpellCooldown(1784); + if (unitTarget->GetSpellHistory()->HasCooldown(1784)) + unitTarget->GetSpellHistory()->ResetCooldown(1784); unitTarget->CastSpell(unitTarget, 1784, true); return; @@ -879,7 +880,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime && m_spellInfo->GetCategory() == spellInfo->GetCategory()) - m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id); + m_caster->GetSpellHistory()->ResetCooldown(spellInfo->Id); // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); @@ -932,7 +933,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime && m_spellInfo->GetCategory() == spellInfo->GetCategory()) - m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id); + m_caster->GetSpellHistory()->ResetCooldown(spellInfo->Id); // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); @@ -3472,7 +3473,7 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex) if (m_originalCaster) { int32 duration = m_spellInfo->GetDuration(); - unitTarget->ProhibitSpellSchool(curSpellInfo->GetSchoolMask(), unitTarget->ModSpellDuration(m_spellInfo, unitTarget, duration, false, 1 << effIndex)); + unitTarget->GetSpellHistory()->LockSpellSchool(curSpellInfo->GetSchoolMask(), unitTarget->ModSpellDuration(m_spellInfo, unitTarget, duration, false, 1 << effIndex)); } ExecuteLogEffectInterruptCast(effIndex, unitTarget, curSpellInfo->Id); unitTarget->InterruptSpell(CurrentSpellTypes(i), false); @@ -5839,7 +5840,7 @@ void Spell::EffectCastButtons(SpellEffIndex effIndex) if (!spellInfo) continue; - if (!p_caster->HasSpell(spell_id) || p_caster->HasSpellCooldown(spell_id)) + if (!p_caster->HasSpell(spell_id) || p_caster->GetSpellHistory()->HasCooldown(spell_id)) continue; if (!spellInfo->HasAttribute(SPELL_ATTR7_SUMMON_PLAYER_TOTEM)) diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp new file mode 100644 index 00000000000..09e3be690b1 --- /dev/null +++ b/src/server/game/Spells/SpellHistory.cpp @@ -0,0 +1,643 @@ +/* + * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * + * 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 + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "WorldPacket.h" +#include "SpellHistory.h" +#include "Pet.h" +#include "Player.h" +#include "SpellInfo.h" +#include "Spell.h" +#include "World.h" +#include "Opcodes.h" + +SpellHistory::Clock::duration const SpellHistory::InfinityCooldownDelay = std::chrono::duration_cast<SpellHistory::Clock::duration>(std::chrono::seconds(MONTH)); +SpellHistory::Clock::duration const SpellHistory::InfinityCooldownDelayCheck = std::chrono::duration_cast<SpellHistory::Clock::duration>(std::chrono::seconds(MONTH / 2)); + +template<> +struct SpellHistory::PersistenceHelper<Player> +{ + static CharacterDatabaseStatements const CooldownsDeleteStatement = CHAR_DEL_CHAR_SPELL_COOLDOWNS; + static CharacterDatabaseStatements const CooldownsInsertStatement = CHAR_INS_CHAR_SPELL_COOLDOWN; + + static void SetIdentifier(PreparedStatement* stmt, uint8 index, Unit* owner) { stmt->setUInt32(index, owner->GetGUID().GetCounter()); } + + static bool ReadCooldown(Field* fields, uint32* spellId, CooldownEntry* cooldownEntry) + { + *spellId = fields[0].GetUInt32(); + if (!sSpellMgr->GetSpellInfo(*spellId)) + return false; + + cooldownEntry->CooldownEnd = Clock::from_time_t(time_t(fields[2].GetUInt32())); + cooldownEntry->ItemId = fields[1].GetUInt32(); + return true; + } + + static void WriteCooldown(PreparedStatement* stmt, uint8& index, CooldownStorageType::value_type const& cooldown) + { + stmt->setUInt32(index++, cooldown.first); + stmt->setUInt32(index++, cooldown.second.ItemId); + stmt->setUInt32(index++, uint32(Clock::to_time_t(cooldown.second.CooldownEnd))); + } +}; + +template<> +struct SpellHistory::PersistenceHelper<Pet> +{ + static CharacterDatabaseStatements const CooldownsDeleteStatement = CHAR_DEL_PET_SPELL_COOLDOWNS; + static CharacterDatabaseStatements const CooldownsInsertStatement = CHAR_INS_PET_SPELL_COOLDOWN; + + static void SetIdentifier(PreparedStatement* stmt, uint8 index, Unit* owner) { stmt->setUInt32(index, owner->GetCharmInfo()->GetPetNumber()); } + + static bool ReadCooldown(Field* fields, uint32* spellId, CooldownEntry* cooldownEntry) + { + *spellId = fields[0].GetUInt32(); + if (!sSpellMgr->GetSpellInfo(*spellId)) + return false; + + cooldownEntry->CooldownEnd = Clock::from_time_t(time_t(fields[1].GetUInt32())); + cooldownEntry->ItemId = 0; + return true; + } + + static void WriteCooldown(PreparedStatement* stmt, uint8& index, CooldownStorageType::value_type const& cooldown) + { + stmt->setUInt32(index++, cooldown.first); + stmt->setUInt32(index++, uint32(Clock::to_time_t(cooldown.second.CooldownEnd))); + } +}; + +template<class OwnerType> +void SpellHistory::LoadFromDB(PreparedQueryResult cooldownsResult) +{ + typedef PersistenceHelper<OwnerType> StatementInfo; + + if (cooldownsResult) + { + do + { + uint32 spellId; + CooldownEntry cooldown; + if (StatementInfo::ReadCooldown(cooldownsResult->Fetch(), &spellId, &cooldown)) + _spellCooldowns[spellId] = cooldown; + + } while (cooldownsResult->NextRow()); + } +} + +template<class OwnerType> +void SpellHistory::SaveToDB(SQLTransaction& trans) +{ + typedef PersistenceHelper<OwnerType> StatementInfo; + + uint8 index = 0; + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(StatementInfo::CooldownsDeleteStatement); + StatementInfo::SetIdentifier(stmt, index++, _owner); + trans->Append(stmt); + + for (auto const& p : _spellCooldowns) + { + if (!p.second.OnHold) + { + index = 0; + stmt = CharacterDatabase.GetPreparedStatement(StatementInfo::CooldownsInsertStatement); + StatementInfo::SetIdentifier(stmt, index++, _owner); + StatementInfo::WriteCooldown(stmt, index, p); + trans->Append(stmt); + } + } +} + +void SpellHistory::Update() +{ + SQLTransaction t; + Clock::time_point now = Clock::now(); + for (auto itr = _spellCooldowns.begin(); itr != _spellCooldowns.end();) + { + if (itr->second.CooldownEnd < now) + itr = _spellCooldowns.erase(itr); + else + ++itr; + } +} + +void SpellHistory::HandleCooldowns(SpellInfo const* spellInfo, Item const* item, Spell* spell /*= nullptr*/) +{ + if (Player* player = _owner->ToPlayer()) + { + // potions start cooldown until exiting combat + if (item && (item->IsPotion() || spellInfo->IsCooldownStartedOnEvent())) + { + player->SetLastPotionId(item->GetEntry()); + return; + } + } + + if (spellInfo->IsCooldownStartedOnEvent() || spellInfo->IsPassive() || (spell && spell->IsIgnoringCooldowns())) + return; + + StartCooldown(spellInfo, item ? item->GetEntry() : 0, spell); +} + +bool SpellHistory::IsReady(SpellInfo const* spellInfo) const +{ + if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) + if (IsSchoolLocked(spellInfo->GetSchoolMask())) + return false; + + if (HasCooldown(spellInfo->Id)) + return false; + + return true; +} + +template<> +void SpellHistory::WritePacket<Pet>(WorldPacket& packet) const +{ + Clock::time_point now = Clock::now(); + + uint8 cooldownsCount = _spellCooldowns.size(); + packet << uint8(cooldownsCount); + + for (auto const& spellCooldown : _spellCooldowns) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellCooldown.first); + if (!spellInfo) + { + packet << uint32(0); + packet << uint16(0); + packet << uint32(0); + packet << uint32(0); + continue; + } + + packet << uint32(spellCooldown.first); // spell ID + packet << uint16(spellInfo->GetCategory()); // spell category + if (!spellCooldown.second.OnHold) + { + uint32 cooldownDuration = spellCooldown.second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(spellCooldown.second.CooldownEnd - now).count() : 0; + if (cooldownDuration <= 0) + { + packet << uint32(0); + packet << uint32(0); + continue; + } + + if (spellInfo->GetCategory()) + { + packet << uint32(0); + packet << uint32(cooldownDuration); + } + else + { + packet << uint32(cooldownDuration); + packet << uint32(0); + } + } + } +} + +template<> +void SpellHistory::WritePacket<Player>(WorldPacket& packet) const +{ + Clock::time_point now = Clock::now(); + Clock::time_point infTime = now + InfinityCooldownDelayCheck; + + uint16 cooldownsCount = _spellCooldowns.size(); + size_t dataPos = packet.wpos(); + packet << uint16(cooldownsCount); + + for (auto const& spellCooldown : _spellCooldowns) + { + SpellInfo const* sEntry = sSpellMgr->GetSpellInfo(spellCooldown.first); + if (!sEntry) + { + --cooldownsCount; + continue; + } + + packet << uint32(spellCooldown.first); + + packet << uint16(spellCooldown.second.ItemId); // cast item id + packet << uint16(sEntry->GetCategory()); // spell category + + // send infinity cooldown in special format + if (spellCooldown.second.CooldownEnd >= infTime) + { + packet << uint32(1); // cooldown + packet << uint32(0x80000000); // category cooldown + continue; + } + + uint32 cooldownDuration = spellCooldown.second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(spellCooldown.second.CooldownEnd - now).count() : 0; + + if (sEntry->GetCategory()) // may be wrong, but anyway better than nothing... + { + packet << uint32(0); // cooldown + packet << uint32(cooldownDuration); // category cooldown + } + else + { + packet << uint32(cooldownDuration); // cooldown + packet << uint32(0); // category cooldown + } + } + + packet.put<uint16>(dataPos, cooldownsCount); +} + +void SpellHistory::StartCooldown(SpellInfo const* spellInfo, uint32 itemId, Spell* spell /*= nullptr*/, bool onHold /*= false*/) +{ + // init cooldown values + uint32 categoryId = 0; + int32 cooldown = -1; + int32 categoryCooldown = -1; + + // some special item spells without correct cooldown in SpellInfo + // cooldown information stored in item prototype + if (itemId) + { + if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId)) + { + for (uint8 idx = 0; idx < MAX_ITEM_PROTO_SPELLS; ++idx) + { + if (uint32(proto->Spells[idx].SpellId) == spellInfo->Id) + { + categoryId = proto->Spells[idx].SpellCategory; + cooldown = proto->Spells[idx].SpellCooldown; + categoryCooldown = proto->Spells[idx].SpellCategoryCooldown; + break; + } + } + } + } + + // if no cooldown found above then base at DBC data + if (cooldown < 0 && categoryCooldown < 0) + { + categoryId = spellInfo->GetCategory(); + cooldown = spellInfo->RecoveryTime; + categoryCooldown = spellInfo->CategoryRecoveryTime; + } + + Clock::time_point curTime = Clock::now(); + Clock::time_point catrecTime; + Clock::time_point recTime; + bool needsCooldownPacket = false; + + // overwrite time for selected category + if (onHold) + { + // use +MONTH as infinite cooldown marker + catrecTime = categoryCooldown > 0 ? (curTime + InfinityCooldownDelay) : curTime; + recTime = cooldown > 0 ? (curTime + InfinityCooldownDelay) : catrecTime; + } + else + { + // shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK) + // prevent 0 cooldowns set by another way + if (cooldown <= 0 && categoryCooldown <= 0 && (categoryId == 76 || (spellInfo->IsAutoRepeatRangedSpell() && spellInfo->Id != 75))) + cooldown = _owner->GetAttackTime(RANGED_ATTACK); + + // Now we have cooldown data (if found any), time to apply mods + if (Player* modOwner = _owner->GetSpellModOwner()) + { + if (cooldown > 0) + modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, cooldown, spell); + + if (categoryCooldown > 0 && !spellInfo->HasAttribute(SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS)) + modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_COOLDOWN, categoryCooldown, spell); + } + + if (int32 cooldownMod = _owner->GetTotalAuraModifier(SPELL_AURA_MOD_COOLDOWN)) + { + // Apply SPELL_AURA_MOD_COOLDOWN only to own spells + Player* playerOwner = GetPlayerOwner(); + if (!playerOwner || playerOwner->HasSpell(spellInfo->Id)) + { + needsCooldownPacket = true; + cooldown += cooldownMod * IN_MILLISECONDS; // SPELL_AURA_MOD_COOLDOWN does not affect category cooldows, verified with shaman shocks + } + } + + // replace negative cooldowns by 0 + if (cooldown < 0) + cooldown = 0; + + if (categoryCooldown < 0) + categoryCooldown = 0; + + // no cooldown after applying spell mods + if (cooldown == 0 && categoryCooldown == 0) + return; + + catrecTime = categoryCooldown ? curTime + std::chrono::duration_cast<Clock::duration>(std::chrono::milliseconds(categoryCooldown)) : curTime; + recTime = cooldown ? curTime + std::chrono::duration_cast<Clock::duration>(std::chrono::milliseconds(cooldown)) : catrecTime; + } + + // self spell cooldown + if (recTime != curTime) + { + AddCooldown(spellInfo->Id, itemId, recTime, onHold); + + if (needsCooldownPacket) + { + if (Player* playerOwner = GetPlayerOwner()) + { + WorldPacket spellCooldown; + BuildCooldownPacket(spellCooldown, SPELL_COOLDOWN_FLAG_NONE, spellInfo->Id, cooldown); + playerOwner->SendDirectMessage(&spellCooldown); + } + } + } + + // category spells + if (categoryId && catrecTime != curTime) + { + SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(categoryId); + if (i_scstore != sSpellsByCategoryStore.end()) + { + for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset) + { + if (*i_scset == spellInfo->Id) // skip main spell, already handled above + continue; + + AddCooldown(*i_scset, itemId, catrecTime, onHold); + } + } + } +} + +void SpellHistory::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= nullptr*/, bool startCooldown /*= true*/) +{ + // start cooldowns at server side, if any + if (startCooldown) + StartCooldown(spellInfo, itemId, spell); + + if (Player* player = GetPlayerOwner()) + { + // Send activate cooldown timer (possible 0) at client side + WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8); + data << uint32(spellInfo->Id); + data << uint64(_owner->GetGUID()); + player->SendDirectMessage(&data); + + uint32 category = spellInfo->GetCategory(); + if (category && spellInfo->CategoryRecoveryTime) + { + SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(category); + if (ct != sSpellsByCategoryStore.end()) + { + for (auto const& cooldownPair : _spellCooldowns) + { + uint32 categorySpell = cooldownPair.first; + if (!ct->second.count(categorySpell)) + continue; + + if (categorySpell == spellInfo->Id) // skip main spell, already handled above + continue; + + SpellInfo const* spellInfo2 = sSpellMgr->EnsureSpellInfo(categorySpell); + if (!spellInfo2->IsCooldownStartedOnEvent()) + continue; + + data.Initialize(SMSG_COOLDOWN_EVENT, 4 + 8); + data << uint32(categorySpell); + data << uint64(_owner->GetGUID()); + player->SendDirectMessage(&data); + } + } + } + } +} + +void SpellHistory::AddCooldown(uint32 spellId, uint32 itemId, Clock::time_point cooldownEnd, bool onHold /*= false*/) +{ + CooldownEntry& cooldownEntry = _spellCooldowns[spellId]; + cooldownEntry.CooldownEnd = cooldownEnd; + cooldownEntry.ItemId = itemId; + cooldownEntry.OnHold = onHold; +} + +void SpellHistory::ModifyCooldown(uint32 spellId, int32 cooldownModMs) +{ + auto itr = _spellCooldowns.find(spellId); + if (!cooldownModMs || itr == _spellCooldowns.end()) + return; + + Clock::time_point now = Clock::now(); + Clock::duration offset = std::chrono::duration_cast<Clock::duration>(std::chrono::milliseconds(cooldownModMs)); + if (itr->second.CooldownEnd + offset > now) + itr->second.CooldownEnd += offset; + else + _spellCooldowns.erase(itr); + + if (Player* playerOwner = GetPlayerOwner()) + { + WorldPacket modifyCooldown(SMSG_MODIFY_COOLDOWN, 4 + 8 + 4); + modifyCooldown << uint32(spellId); + modifyCooldown << uint64(_owner->GetGUID()); + modifyCooldown << int32(cooldownModMs); + playerOwner->SendDirectMessage(&modifyCooldown); + } +} + +void SpellHistory::ResetCooldown(uint32 spellId, bool update /*= false*/) +{ + auto itr = _spellCooldowns.find(spellId); + if (itr == _spellCooldowns.end()) + return; + + ResetCooldown(itr, update); +} + +void SpellHistory::ResetCooldown(CooldownStorageType::iterator& itr, bool update /*= false*/) +{ + if (update) + { + if (Player* playerOwner = GetPlayerOwner()) + { + WorldPacket data(SMSG_CLEAR_COOLDOWN, 4 + 8); + data << uint32(itr->first); + data << uint64(_owner->GetGUID()); + playerOwner->SendDirectMessage(&data); + } + } + + itr = _spellCooldowns.erase(itr); +} + +void SpellHistory::ResetAllCooldowns() +{ + if (GetPlayerOwner()) + { + std::vector<int32> cooldowns; + cooldowns.reserve(_spellCooldowns.size()); + for (auto const& p : _spellCooldowns) + cooldowns.push_back(p.first); + + SendClearCooldowns(cooldowns); + } + + _spellCooldowns.clear(); +} + +bool SpellHistory::HasCooldown(uint32 spellId) const +{ + return _spellCooldowns.count(spellId) != 0; +} + +uint32 SpellHistory::GetRemainingCooldown(uint32 spellId) const +{ + auto itr = _spellCooldowns.find(spellId); + if (itr == _spellCooldowns.end()) + return 0; + + Clock::time_point now = Clock::now(); + if (itr->second.CooldownEnd < now) + return 0; + + Clock::duration remaining = itr->second.CooldownEnd - now; + return uint32(std::chrono::duration_cast<std::chrono::milliseconds>(remaining).count()); +} + +void SpellHistory::LockSpellSchool(SpellSchoolMask schoolMask, uint32 lockoutTime) +{ + Clock::time_point lockoutEnd = Clock::now() + std::chrono::duration_cast<Clock::duration>(std::chrono::milliseconds(lockoutTime)); + for (uint32 i = 0; i < MAX_SPELL_SCHOOL; ++i) + if (SpellSchoolMask(1 << i) & schoolMask) + _schoolLockouts[i] = lockoutEnd; + + std::set<uint32> knownSpells; + if (Player* plrOwner = _owner->ToPlayer()) + { + for (auto const& p : plrOwner->GetSpellMap()) + if (p.second->state != PLAYERSPELL_REMOVED) + knownSpells.insert(p.first); + } + else if (Pet* petOwner = _owner->ToPet()) + { + for (auto const& p : petOwner->m_spells) + if (p.second.state != PETSPELL_REMOVED) + knownSpells.insert(p.first); + } + else + { + Creature* creatureOwner = _owner->ToCreature(); + for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i) + if (creatureOwner->m_spells[i]) + knownSpells.insert(creatureOwner->m_spells[i]); + } + + PacketCooldowns cooldowns; + WorldPacket spellCooldowns; + for (uint32 spellId : knownSpells) + { + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(spellId); + if (spellInfo->IsCooldownStartedOnEvent()) + continue; + + if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE) + continue; + + if ((schoolMask & spellInfo->GetSchoolMask()) && GetRemainingCooldown(spellId) < lockoutTime) + { + cooldowns[spellId] = lockoutTime; + AddCooldown(spellId, 0, lockoutEnd); + } + } + + if (Player* player = GetPlayerOwner()) + { + if (!cooldowns.empty()) + { + BuildCooldownPacket(spellCooldowns, SPELL_COOLDOWN_FLAG_NONE, cooldowns); + player->SendDirectMessage(&spellCooldowns); + } + } +} + +bool SpellHistory::IsSchoolLocked(SpellSchoolMask schoolMask) const +{ + Clock::time_point now = Clock::now(); + for (uint32 i = 0; i < MAX_SPELL_SCHOOL; ++i) + if (SpellSchoolMask(1 << i) & schoolMask) + if (_schoolLockouts[i] > now) + return true; + + return false; +} + +bool SpellHistory::HasGlobalCooldown(SpellInfo const* spellInfo) const +{ + auto itr = _globalCooldowns.find(spellInfo->StartRecoveryCategory); + return itr != _globalCooldowns.end() && itr->second > Clock::now(); +} + +void SpellHistory::AddGlobalCooldown(SpellInfo const* spellInfo, uint32 duration) +{ + _globalCooldowns[spellInfo->StartRecoveryCategory] = Clock::now() + std::chrono::duration_cast<Clock::duration>(std::chrono::milliseconds(duration)); +} + +void SpellHistory::CancelGlobalCooldown(SpellInfo const* spellInfo) +{ + _globalCooldowns[spellInfo->StartRecoveryCategory] = Clock::time_point(Clock::duration(0)); +} + +Player* SpellHistory::GetPlayerOwner() const +{ + return _owner->GetCharmerOrOwnerPlayerOrPlayerItself(); +} + +void SpellHistory::SendClearCooldowns(std::vector<int32> const& cooldowns) const +{ + if (Player* playerOwner = GetPlayerOwner()) + { + for (int32 spell : cooldowns) + { + WorldPacket data(SMSG_CLEAR_COOLDOWN, 4 + 8); + data << uint32(spell); + data << uint64(_owner->GetGUID()); + playerOwner->SendDirectMessage(&data); + } + } +} + +void SpellHistory::BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown) const +{ + data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + 4 + 4); + data << uint64(_owner->GetGUID()); + data << uint8(flags); + data << uint32(spellId); + data << uint32(cooldown); +} + +void SpellHistory::BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns const& cooldowns) const +{ + data.Initialize(SMSG_SPELL_COOLDOWN, 8 + 1 + (4 + 4) * cooldowns.size()); + data << uint64(_owner->GetGUID()); + data << uint8(flags); + for (auto const& cooldown : cooldowns) + { + data << cooldown.first; + data << cooldown.second; + } +} + +template void SpellHistory::LoadFromDB<Player>(PreparedQueryResult cooldownsResult); +template void SpellHistory::LoadFromDB<Pet>(PreparedQueryResult cooldownsResult); +template void SpellHistory::SaveToDB<Player>(SQLTransaction& trans); +template void SpellHistory::SaveToDB<Pet>(SQLTransaction& trans); diff --git a/src/server/game/Spells/SpellHistory.h b/src/server/game/Spells/SpellHistory.h new file mode 100644 index 00000000000..f1533d57aef --- /dev/null +++ b/src/server/game/Spells/SpellHistory.h @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * + * 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 + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef SpellHistory_h__ +#define SpellHistory_h__ + +#include "SharedDefines.h" +#include "QueryResult.h" +#include "Transaction.h" +#include <chrono> +#include <deque> + +class Item; +class Player; +class Spell; +class SpellInfo; +class Unit; +struct SpellCategoryEntry; + +class SpellHistory +{ +public: + typedef std::chrono::system_clock Clock; + + struct CooldownEntry + { + CooldownEntry() : ItemId(0), OnHold(false) { } + CooldownEntry(Clock::time_point endTime, uint32 itemId) : CooldownEnd(endTime), ItemId(itemId), OnHold(false) { } + + Clock::time_point CooldownEnd; + uint32 ItemId; + bool OnHold; + }; + + typedef std::unordered_map<uint32 /*spellId*/, CooldownEntry> CooldownStorageType; + typedef std::unordered_map<uint32 /*categoryId*/, Clock::time_point> GlobalCooldownStorageType; + + explicit SpellHistory(Unit* owner) : _owner(owner), _schoolLockouts() { } + + template<class OwnerType> + void LoadFromDB(PreparedQueryResult cooldownsResult); + + template<class OwnerType> + void SaveToDB(SQLTransaction& trans); + + void Update(); + + void HandleCooldowns(SpellInfo const* spellInfo, Item const* item, Spell* spell = nullptr); + bool IsReady(SpellInfo const* spellInfo) const; + template<class OwnerType> + void WritePacket(WorldPacket& packet) const; + + // Cooldowns + static Clock::duration const InfinityCooldownDelay; // used for set "infinity cooldowns" for spells and check + static Clock::duration const InfinityCooldownDelayCheck; + + void StartCooldown(SpellInfo const* spellInfo, uint32 itemId, Spell* spell = nullptr, bool onHold = false); + void SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId = 0, Spell* spell = nullptr, bool startCooldown = true); + + template<class Type, class Period> + void AddCooldown(uint32 spellId, uint32 itemId, std::chrono::duration<Type, Period> cooldownDuration) + { + AddCooldown(spellId, itemId, Clock::now() + std::chrono::duration_cast<Clock::duration>(cooldownDuration)); + } + + void AddCooldown(uint32 spellId, uint32 itemId, Clock::time_point cooldownEnd, bool onHold = false); + void ModifyCooldown(uint32 spellId, int32 cooldownModMs); + void ResetCooldown(uint32 spellId, bool update = false); + void ResetCooldown(CooldownStorageType::iterator& itr, bool update = false); + template<typename Predicate> + void ResetCooldowns(Predicate predicate, bool update = false) + { + std::vector<int32> resetCooldowns; + resetCooldowns.reserve(_spellCooldowns.size()); + for (auto itr = _spellCooldowns.begin(); itr != _spellCooldowns.end();) + { + if (predicate(itr)) + { + resetCooldowns.push_back(itr->first); + ResetCooldown(itr, false); + } + else + ++itr; + } + + if (update && !resetCooldowns.empty()) + SendClearCooldowns(resetCooldowns); + } + + void ResetAllCooldowns(); + bool HasCooldown(uint32 spellId) const; + uint32 GetRemainingCooldown(uint32 spellId) const; + + // School lockouts + void LockSpellSchool(SpellSchoolMask schoolMask, uint32 lockoutTime); + bool IsSchoolLocked(SpellSchoolMask schoolMask) const; + + // Global cooldown + bool HasGlobalCooldown(SpellInfo const* spellInfo) const; + void AddGlobalCooldown(SpellInfo const* spellInfo, uint32 duration); + void CancelGlobalCooldown(SpellInfo const* spellInfo); + + void BuildCooldownPacket(WorldPacket& data, uint8 flags, uint32 spellId, uint32 cooldown) const; + + CooldownStorageType::size_type GetCooldownsSizeForPacket() const { return _spellCooldowns.size(); } + +private: + Player* GetPlayerOwner() const; + void SendClearCooldowns(std::vector<int32> const& cooldowns) const; + + typedef std::unordered_map<uint32, uint32> PacketCooldowns; + void BuildCooldownPacket(WorldPacket& data, uint8 flags, PacketCooldowns const& cooldowns) const; + + Unit* _owner; + CooldownStorageType _spellCooldowns; + Clock::time_point _schoolLockouts[MAX_SPELL_SCHOOL]; + GlobalCooldownStorageType _globalCooldowns; + + template<class T> + struct PersistenceHelper { }; +}; + +#endif // SpellHistory_h__ diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index be1384588fb..13290320084 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2954,6 +2954,10 @@ void SpellMgr::LoadSpellInfoCorrections() switch (spellInfo->Id) { + case 63026: // Force Cast (HACK: Target shouldn't be changed) + case 63137: // Force Cast (HACK: Target shouldn't be changed; summon position should be untied from spell destination) + spellInfo->Effects[0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_DB); + break; case 53096: // Quetz'lun's Judgment case 70743: // AoD Special case 70614: // AoD Special - Vegard @@ -3130,6 +3134,7 @@ void SpellMgr::LoadSpellInfoCorrections() case 64823: // Item - Druid T8 Balance 4P Bonus case 34477: // Misdirection case 44401: // Missile Barrage + case 18820: // Insight spellInfo->ProcCharges = 1; break; case 44544: // Fingers of Frost diff --git a/src/server/game/Warden/Warden.h b/src/server/game/Warden/Warden.h index 4d46773adcd..695c6730b27 100644 --- a/src/server/game/Warden/Warden.h +++ b/src/server/game/Warden/Warden.h @@ -57,11 +57,7 @@ enum WardenCheckType MODULE_CHECK = 0xD9 // 217: uint Seed + byte[20] SHA1 (check to ensure module isn't injected) }; -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct WardenModuleUse { @@ -84,11 +80,7 @@ struct WardenHashRequest uint8 Seed[16]; }; -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif struct ClientWardenModule { diff --git a/src/server/game/Warden/WardenWin.h b/src/server/game/Warden/WardenWin.h index 31d28b22e23..ab6ef7c8c65 100644 --- a/src/server/game/Warden/WardenWin.h +++ b/src/server/game/Warden/WardenWin.h @@ -25,11 +25,7 @@ #include "ByteBuffer.h" #include "Warden.h" -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct WardenInitModuleRequest { @@ -61,11 +57,7 @@ struct WardenInitModuleRequest uint8 Function3_set; }; -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif class WorldSession; class Warden; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 9a84fa1670d..5f54154fab1 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1523,6 +1523,9 @@ void World::SetInitialWorldSettings() TC_LOG_INFO("server.loading", "Loading Gameobject Data..."); sObjectMgr->LoadGameobjects(); + + TC_LOG_INFO("server.loading", "Loading GameObject Addon Data..."); + sObjectMgr->LoadGameObjectAddons(); // must be after LoadGameObjectTemplate() and LoadGameobjects() TC_LOG_INFO("server.loading", "Loading Creature Linked Respawn..."); sObjectMgr->LoadLinkedRespawn(); // must be after LoadCreatures(), LoadGameObjects() diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 0b74eb6bee7..c8a908f6930 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -35,6 +35,7 @@ #include "GroupMgr.h" #include "MMapFactory.h" #include "DisableMgr.h" +#include "SpellHistory.h" class misc_commandscript : public CommandScript { @@ -708,7 +709,7 @@ public: if (!*args) { - target->RemoveAllSpellCooldown(); + target->GetSpellHistory()->ResetAllCooldowns(); handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink.c_str()); } else @@ -718,14 +719,15 @@ public: if (!spellIid) return false; - if (!sSpellMgr->GetSpellInfo(spellIid)) + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellIid); + if (!spellInfo) { handler->PSendSysMessage(LANG_UNKNOWN_SPELL, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); handler->SetSentErrorMessage(true); return false; } - target->RemoveSpellCooldown(spellIid, true); + target->GetSpellHistory()->ResetCooldown(spellIid, true); handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); } return true; @@ -1438,7 +1440,7 @@ public: * Player %s %s (guid: %u) - I. LANG_PINFO_PLAYER * ** GM Mode active, Phase: -1 - II. LANG_PINFO_GM_ACTIVE (if GM) * ** Banned: (Type, Reason, Time, By) - III. LANG_PINFO_BANNED (if banned) - * ** Muted: (Time, Reason, By) - IV. LANG_PINFO_MUTED (if muted) + * ** Muted: (Reason, Time, By) - IV. LANG_PINFO_MUTED (if muted) * * Account: %s (id: %u), GM Level: %u - V. LANG_PINFO_ACC_ACCOUNT * * Last Login: %u (Failed Logins: %u) - VI. LANG_PINFO_ACC_LASTLOGIN * * Uses OS: %s - Latency: %u ms - VII. LANG_PINFO_ACC_OS @@ -1691,7 +1693,7 @@ public: // Output IV. LANG_PINFO_MUTED if mute is applied if (muteTime > 0) - handler->PSendSysMessage(LANG_PINFO_MUTED, secsToTimeString(muteTime - time(NULL), true).c_str(), muteReason.c_str(), muteBy.c_str()); + handler->PSendSysMessage(LANG_PINFO_MUTED, muteReason.c_str(), secsToTimeString(muteTime - time(nullptr), true).c_str(), muteBy.c_str()); // Output V. LANG_PINFO_ACC_ACCOUNT handler->PSendSysMessage(LANG_PINFO_ACC_ACCOUNT, userName.c_str(), accId, security); diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 4667b7c2767..54d1f314140 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -136,7 +136,7 @@ public: return false; } - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -164,17 +164,6 @@ public: if (!*args) return false; - // char* pmana = strtok((char*)args, " "); - // if (!pmana) - // return false; - - // char* pmanaMax = strtok(NULL, " "); - // if (!pmanaMax) - // return false; - - // int32 manam = atoi(pmanaMax); - // int32 mana = atoi(pmana); - int32 energy = atoi((char*)args)*10; int32 energym = atoi((char*)args)*10; @@ -185,7 +174,7 @@ public: return false; } - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -215,17 +204,6 @@ public: if (!*args) return false; - // char* pmana = strtok((char*)args, " "); - // if (!pmana) - // return false; - - // char* pmanaMax = strtok(NULL, " "); - // if (!pmanaMax) - // return false; - - // int32 manam = atoi(pmanaMax); - // int32 mana = atoi(pmana); - int32 rage = atoi((char*)args)*10; int32 ragem = atoi((char*)args)*10; @@ -236,7 +214,7 @@ public: return false; } - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -274,7 +252,7 @@ public: return false; } - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -390,7 +368,7 @@ public: else mark = atoi(pmark); - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (target == NULL) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -945,7 +923,7 @@ public: return false; } - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -986,7 +964,7 @@ public: if (!*args) return false; - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_NO_CHAR_SELECTED); @@ -1107,7 +1085,7 @@ public: if (!*args) return false; - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); @@ -1137,7 +1115,7 @@ public: if (drunklevel > 100) drunklevel = 100; - if (Player* target = handler->getSelectedPlayer()) + if (Player* target = handler->getSelectedPlayerOrSelf()) target->SetDrunkValue(drunklevel); return true; @@ -1148,7 +1126,7 @@ public: if (!*args) return false; - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); @@ -1302,7 +1280,7 @@ public: if (!*args) return false; - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); @@ -1324,7 +1302,7 @@ public: if (!*args) return false; - Player* target = handler->getSelectedPlayer(); + Player* target = handler->getSelectedPlayerOrSelf(); if (!target) { diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp index ec1291c6d18..5cb6e78b399 100644 --- a/src/server/scripts/Kalimdor/zone_winterspring.cpp +++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp @@ -377,12 +377,12 @@ public: void DoSummonPriestess() { // Summon 2 Elune priestess and make each of them move to a different spot - if (Creature* priestess = me->SummonCreature(NPC_PRIESTESS_ELUNE, wingThicketLocations[0].m_positionX, wingThicketLocations[0].m_positionY, wingThicketLocations[0].m_positionZ, wingThicketLocations[0].m_orientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if (Creature* priestess = me->SummonCreature(NPC_PRIESTESS_ELUNE, wingThicketLocations[0].m_positionX, wingThicketLocations[0].m_positionY, wingThicketLocations[0].m_positionZ, wingThicketLocations[0].GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0)) { priestess->GetMotionMaster()->MovePoint(0, wingThicketLocations[3].m_positionX, wingThicketLocations[3].m_positionY, wingThicketLocations[3].m_positionZ); _firstPriestessGUID = priestess->GetGUID(); } - if (Creature* priestess = me->SummonCreature(NPC_PRIESTESS_ELUNE, wingThicketLocations[1].m_positionX, wingThicketLocations[1].m_positionY, wingThicketLocations[1].m_positionZ, wingThicketLocations[1].m_orientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if (Creature* priestess = me->SummonCreature(NPC_PRIESTESS_ELUNE, wingThicketLocations[1].m_positionX, wingThicketLocations[1].m_positionY, wingThicketLocations[1].m_positionZ, wingThicketLocations[1].GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0)) { // Left priestess should have a distinct move point because she is the one who starts the dialogue at point reach priestess->GetMotionMaster()->MovePoint(1, wingThicketLocations[4].m_positionX, wingThicketLocations[4].m_positionY, wingThicketLocations[4].m_positionZ); @@ -480,7 +480,7 @@ public: break; case SAY_PRIESTESS_ALTAR_13: // summon the Guardian of Elune - if (Creature* guard = me->SummonCreature(NPC_GUARDIAN_ELUNE, wingThicketLocations[2].m_positionX, wingThicketLocations[2].m_positionY, wingThicketLocations[2].m_positionZ, wingThicketLocations[2].m_orientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if (Creature* guard = me->SummonCreature(NPC_GUARDIAN_ELUNE, wingThicketLocations[2].m_positionX, wingThicketLocations[2].m_positionY, wingThicketLocations[2].m_positionZ, wingThicketLocations[2].GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0)) { guard->GetMotionMaster()->MovePoint(0, wingThicketLocations[5].m_positionX, wingThicketLocations[5].m_positionY, wingThicketLocations[5].m_positionZ); _guardEluneGUID = guard->GetGUID(); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 39c9fbe37a6..c56a49cb92c 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -741,7 +741,7 @@ class boss_dreadscale : public CreatureScript switch (pointId) { case 0: - instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR)); + instance->DoCloseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR)); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index 15bdedc75db..68430f6f0f7 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -24,6 +24,7 @@ #include "PassiveAI.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellHistory.h" #include "SpellAuraEffects.h" #include "SpellScript.h" #include "Transport.h" @@ -644,10 +645,10 @@ protected: { if (Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS && !me->HasUnitState(UNIT_STATE_CASTING) && !me->HasReactState(REACT_PASSIVE) && - !me->HasSpellCooldown(BurningPitchId)) + !me->GetSpellHistory()->HasCooldown(BurningPitchId)) { DoCastAOE(BurningPitchId, true); - me->_AddCreatureSpellCooldown(BurningPitchId, time(NULL) + urand(3000, 4000) / IN_MILLISECONDS); + me->GetSpellHistory()->AddCooldown(BurningPitchId, 0, std::chrono::milliseconds(urand(3000, 4000))); } } @@ -1469,7 +1470,7 @@ struct npc_gunship_boarding_addAI : public gunship_npc_AI DoCast(me, SPELL_BATTLE_EXPERIENCE, true); DoCast(me, SPELL_TELEPORT_TO_ENEMY_SHIP, true); DoCast(me, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_MELEE_TARGETING_ON_ORGRIMS_HAMMER : SPELL_MELEE_TARGETING_ON_SKYBREAKER, true); - me->_AddCreatureSpellCooldown(BurningPitchId, time(NULL) + 3); + me->GetSpellHistory()->AddCooldown(BurningPitchId, 0, std::chrono::seconds(3)); std::list<Player*> players; Trinity::UnitAuraCheck check(true, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_ON_ORGRIMS_HAMMER_DECK : SPELL_ON_SKYBREAKER_DECK); @@ -1698,11 +1699,11 @@ class npc_gunship_rocketeer : public CreatureScript return; uint32 spellId = me->GetEntry() == NPC_SKYBREAKER_MORTAR_SOLDIER ? SPELL_ROCKET_ARTILLERY_A : SPELL_ROCKET_ARTILLERY_H; - if (me->HasSpellCooldown(spellId)) + if (me->GetSpellHistory()->HasCooldown(spellId)) return; DoCastAOE(spellId, true); - me->_AddCreatureSpellCooldown(spellId, time(NULL) + 9); + me->GetSpellHistory()->AddCooldown(spellId, 0, std::chrono::seconds(9)); } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 60268fc8d87..e908d088554 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -348,7 +348,7 @@ class boss_sindragosa : public CreatureScript events.ScheduleEvent(EVENT_AIR_MOVEMENT, 1); break; case POINT_AIR_PHASE: - me->CastCustomSpell(SPELL_ICE_TOMB_TARGET, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 5, 2, 6), NULL); + me->CastCustomSpell(SPELL_ICE_TOMB_TARGET, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 5, 2, 6), NULL, TRIGGERED_FULL_MASK); me->SetFacingTo(float(M_PI)); events.ScheduleEvent(EVENT_AIR_MOVEMENT_FAR, 1); events.ScheduleEvent(EVENT_FROST_BOMB, 9000); @@ -491,7 +491,7 @@ class boss_sindragosa : public CreatureScript if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, FrostBeaconSelector(me))) { Talk(EMOTE_WARN_FROZEN_ORB, target); - DoCast(target, SPELL_ICE_TOMB_DUMMY, true); + me->CastCustomSpell(SPELL_ICE_TOMB_TARGET, SPELLVALUE_MAX_TARGETS, 1, nullptr, TRIGGERED_FULL_MASK); } events.ScheduleEvent(EVENT_ICE_TOMB, urand(16000, 23000)); break; @@ -1631,7 +1631,7 @@ void AddSC_boss_sindragosa() new spell_rimefang_icy_blast(); new spell_frostwarden_handler_order_whelp(); new spell_frostwarden_handler_focus_fire(); - new spell_trigger_spell_from_caster("spell_sindragosa_ice_tomb", SPELL_ICE_TOMB_DUMMY); + new spell_trigger_spell_from_caster("spell_sindragosa_ice_tomb", SPELL_ICE_TOMB_DUMMY, TRIGGERED_IGNORE_SET_FACING); new spell_trigger_spell_from_caster("spell_sindragosa_ice_tomb_dummy", SPELL_FROST_BEACON); new at_sindragosa_lair(); new achievement_all_you_can_eat(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 8bf8e5ee6fb..091190b6b4e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -524,14 +524,16 @@ enum AreaIds class spell_trigger_spell_from_caster : public SpellScriptLoader { public: - spell_trigger_spell_from_caster(char const* scriptName, uint32 triggerId) : SpellScriptLoader(scriptName), _triggerId(triggerId) { } + spell_trigger_spell_from_caster(char const* scriptName, uint32 triggerId, TriggerCastFlags triggerFlags = TRIGGERED_FULL_MASK) + : SpellScriptLoader(scriptName), _triggerId(triggerId), _triggerFlags(triggerFlags) { } class spell_trigger_spell_from_caster_SpellScript : public SpellScript { PrepareSpellScript(spell_trigger_spell_from_caster_SpellScript); public: - spell_trigger_spell_from_caster_SpellScript(uint32 triggerId) : SpellScript(), _triggerId(triggerId) { } + spell_trigger_spell_from_caster_SpellScript(uint32 triggerId, TriggerCastFlags triggerFlags) + : SpellScript(), _triggerId(triggerId), _triggerFlags(triggerFlags) { } bool Validate(SpellInfo const* /*spell*/) override { @@ -542,7 +544,7 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader void HandleTrigger() { - GetCaster()->CastSpell(GetHitUnit(), _triggerId, true); + GetCaster()->CastSpell(GetHitUnit(), _triggerId, _triggerFlags); } void Register() override @@ -551,15 +553,17 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader } uint32 _triggerId; + TriggerCastFlags _triggerFlags; }; SpellScript* GetSpellScript() const override { - return new spell_trigger_spell_from_caster_SpellScript(_triggerId); + return new spell_trigger_spell_from_caster_SpellScript(_triggerId, _triggerFlags); } private: uint32 _triggerId; + TriggerCastFlags _triggerFlags; }; template<class AI> diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 6c3b2187325..9c339e596a4 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -128,7 +128,6 @@ enum Spells SPELL_ARCANE_BARRAGE_DAMAGE = 63934, // the actual damage - cast by affected player by script spell // Transition /II-III/ - SPELL_SUMMOM_RED_DRAGON_BUDYY = 56070, SPELL_RIDE_RED_DRAGON_BUDDY = 56071, SPELL_SUMMON_RED_DRAGON_BUDDY_F_CAST = 58846, // After implicitly hit player targets they will force cast 56070 on self SPELL_DESTROY_PLATFORM_CHANNEL = 58842, diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h index b6a0d3f9b62..d9b921b38a1 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h @@ -80,7 +80,8 @@ enum InstanceSpells SPELL_VORTEX_5 = 56263, // damage | used to enter to the vehicle SPELL_PORTAL_OPENED = 61236, SPELL_RIDE_RED_DRAGON_TRIGGERED = 56072, - SPELL_IRIS_OPENED = 61012 // visual when starting encounter + SPELL_IRIS_OPENED = 61012, // visual when starting encounter + SPELL_SUMMOM_RED_DRAGON_BUDDY = 56070 }; #endif diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index fffdbbc3d1b..7b884f39a41 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -39,6 +39,12 @@ public: SetBossNumber(MAX_ENCOUNTER); } + void OnPlayerEnter(Player* player) override + { + if (GetBossState(DATA_MALYGOS_EVENT) == DONE) + player->CastSpell(player, SPELL_SUMMOM_RED_DRAGON_BUDDY, true); + } + bool SetBossState(uint32 type, EncounterState state) override { if (!InstanceScript::SetBossState(type, state)) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 23b86737f4c..a04c809f893 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -482,40 +482,47 @@ class boss_flame_leviathan : public CreatureScript if (action && action <= 4) // Tower destruction, debuff leviathan loot and reduce active tower count { if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3 | LOOT_MODE_HARD_MODE_4) && ActiveTowersCount == 4) - { me->RemoveLootMode(LOOT_MODE_HARD_MODE_4); - --ActiveTowersCount; - } + if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3) && ActiveTowersCount == 3) - { me->RemoveLootMode(LOOT_MODE_HARD_MODE_3); - --ActiveTowersCount; - } + if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2) && ActiveTowersCount == 2) - { me->RemoveLootMode(LOOT_MODE_HARD_MODE_2); - --ActiveTowersCount; - } + if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1) && ActiveTowersCount == 1) - { me->RemoveLootMode(LOOT_MODE_HARD_MODE_1); - --ActiveTowersCount; - } } switch (action) { case ACTION_TOWER_OF_STORM_DESTROYED: - towerOfStorms = false; + if (towerOfStorms) + { + towerOfStorms = false; + --ActiveTowersCount; + } break; case ACTION_TOWER_OF_FROST_DESTROYED: - towerOfFrost = false; + if (towerOfFrost) + { + towerOfFrost = false; + --ActiveTowersCount; + } break; case ACTION_TOWER_OF_FLAMES_DESTROYED: - towerOfFlames = false; + if (towerOfFlames) + { + towerOfFlames = false; + --ActiveTowersCount; + } break; case ACTION_TOWER_OF_LIFE_DESTROYED: - towerOfLife = false; + if (towerOfLife) + { + towerOfLife = false; + --ActiveTowersCount; + } break; case ACTION_START_HARD_MODE: // Activate hard-mode enable all towers, apply buffs on leviathan ActiveTowers = true; diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index b7efa7c3d3e..dc5b75d425d 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -174,7 +174,7 @@ class npc_commander_eligor_dawnbringer : public CreatureScript { if (id == 1) { - me->SetFacingTo(PosTalkLocations[talkWing].m_orientation); + me->SetFacingTo(PosTalkLocations[talkWing].GetOrientation()); TurnAudience(); switch (talkWing) diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 7f29a6621bd..2e426fd77cf 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -25,53 +25,6 @@ #include "CombatAI.h" /*###### -## npc_squire_david -######*/ - -enum SquireDavid -{ - QUEST_THE_ASPIRANT_S_CHALLENGE_H = 13680, - QUEST_THE_ASPIRANT_S_CHALLENGE_A = 13679, - - NPC_ARGENT_VALIANT = 33448, - - GOSSIP_TEXTID_SQUIRE = 14407 -}; - -#define GOSSIP_SQUIRE_ITEM_1 "I am ready to fight!" -#define GOSSIP_SQUIRE_ITEM_2 "How do the Argent Crusader raiders fight?" - -class npc_squire_david : public CreatureScript -{ -public: - npc_squire_david() : CreatureScript("npc_squire_david") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(QUEST_THE_ASPIRANT_S_CHALLENGE_H) == QUEST_STATUS_INCOMPLETE || - player->GetQuestStatus(QUEST_THE_ASPIRANT_S_CHALLENGE_A) == QUEST_STATUS_INCOMPLETE)//We need more info about it. - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SQUIRE_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SQUIRE_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - } - - player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SQUIRE, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->CLOSE_GOSSIP_MENU(); - creature->SummonCreature(NPC_ARGENT_VALIANT, 8575.451f, 952.472f, 547.554f, 0.38f); - } - return true; - } -}; - -/*###### ## npc_argent_valiant ######*/ @@ -837,7 +790,6 @@ class npc_frostbrood_skytalon : public CreatureScript void AddSC_icecrown() { - new npc_squire_david; new npc_argent_valiant; new npc_guardian_pavilion; new npc_tournament_training_dummy; diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index bb1e88ce158..d5d9f8ae77e 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -19,6 +19,7 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "Vehicle.h" diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 2a568a84a7c..471c776d54b 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -420,10 +420,483 @@ public: } }; +enum ExorcismSpells +{ + SPELL_JULES_GOES_PRONE = 39283, + SPELL_JULES_THREATENS_AURA = 39284, + SPELL_JULES_GOES_UPRIGHT = 39294, + SPELL_JULES_VOMITS_AURA = 39295, + + SPELL_BARADAS_COMMAND = 39277, + SPELL_BARADA_FALTERS = 39278, +}; + +enum ExorcismTexts +{ + SAY_BARADA_1 = 0, + SAY_BARADA_2 = 1, + SAY_BARADA_3 = 2, + SAY_BARADA_4 = 3, + SAY_BARADA_5 = 4, + SAY_BARADA_6 = 5, + SAY_BARADA_7 = 6, + SAY_BARADA_8 = 7, + + SAY_JULES_1 = 0, + SAY_JULES_2 = 1, + SAY_JULES_3 = 2, + SAY_JULES_4 = 3, + SAY_JULES_5 = 4, +}; + +Position const exorcismPos[11] = +{ + { -707.123f, 2751.686f, 101.592f, 4.577416f }, //Barada Waypoint-1 0 + { -710.731f, 2749.075f, 101.592f, 1.513286f }, //Barada Cast position 1 + { -710.332f, 2754.394f, 102.948f, 3.207566f }, //Jules 2 + { -714.261f, 2747.754f, 103.391f, 0.0f }, //Jules Waypoint-1 3 + { -713.113f, 2750.194f, 103.391f, 0.0f }, //Jules Waypoint-2 4 + { -710.385f, 2750.896f, 103.391f, 0.0f }, //Jules Waypoint-3 5 + { -708.309f, 2750.062f, 103.391f, 0.0f }, //Jules Waypoint-4 6 + { -707.401f, 2747.696f, 103.391f, 0.0f }, //Jules Waypoint-5 7 + { -708.591f, 2745.266f, 103.391f, 0.0f }, //Jules Waypoint-6 8 + { -710.597f, 2744.035f, 103.391f, 0.0f }, //Jules Waypoint-7 9 + { -713.089f, 2745.302f, 103.391f, 0.0f }, //Jules Waypoint-8 10 +}; + +enum ExorcismMisc +{ + NPC_DARKNESS_RELEASED = 22507, + NPC_FOUL_PURGE = 22506, + NPC_COLONEL_JULES = 22432, + + BARADAS_GOSSIP_MESSAGE = 10683, + + QUEST_THE_EXORCISM_OF_COLONEL_JULES = 10935, + + ACTION_START_EVENT = 1, + ACTION_JULES_HOVER = 2, + ACTION_JULES_FLIGHT = 3, + ACTION_JULES_MOVE_HOME = 4, +}; + +enum ExorcismEvents +{ + EVENT_BARADAS_TALK = 1, + + //Colonel Jules + EVENT_SUMMON_SKULL = 1, +}; + +/*###### +## npc_barada +######*/ + +class npc_barada : public CreatureScript +{ +public: + npc_barada() : CreatureScript("npc_barada") { } + + struct npc_baradaAI : public ScriptedAI + { + npc_baradaAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + step = 0; + } + + void Reset() override + { + events.Reset(); + Initialize(); + + playerGUID.Clear(); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); + } + + void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override + { + player->PlayerTalkClass->ClearMenus(); + switch (gossipListId) + { + case 1: + player->PlayerTalkClass->SendCloseGossip(); + me->AI()->Talk(SAY_BARADA_1); + me->AI()->DoAction(ACTION_START_EVENT); + break; + default: + break; + } + } + + void DoAction(int32 action) override + { + if (action == ACTION_START_EVENT) + { + if (Creature* jules = me->FindNearestCreature(NPC_COLONEL_JULES, 20.0f, true)) + { + julesGUID = jules->GetGUID(); + jules->AI()->Talk(SAY_JULES_1); + } + + me->GetMotionMaster()->MovePoint(0, exorcismPos[1]); + Talk(SAY_BARADA_2); + + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); + } + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type != POINT_MOTION_TYPE) + return; + + if (id == 0) + me->GetMotionMaster()->MovePoint(1, exorcismPos[1]); + + if (id == 1) + events.ScheduleEvent(EVENT_BARADAS_TALK, 2000); + } + + void JustDied(Unit* /*killer*/) override + { + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + { + jules->AI()->DoAction(ACTION_JULES_MOVE_HOME); + jules->RemoveAllAuras(); + } + } + + void UpdateAI(uint32 diff) override + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BARADAS_TALK: + switch (step) + { + case 0: + me->SetFacingTo(1.513286f); + + me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); + events.ScheduleEvent(EVENT_BARADAS_TALK, 3000); + step++; + break; + case 1: + DoCast(SPELL_BARADAS_COMMAND); + events.ScheduleEvent(EVENT_BARADAS_TALK, 5000); + step++; + break; + case 2: + Talk(SAY_BARADA_3); + events.ScheduleEvent(EVENT_BARADAS_TALK, 7000); + step++; + break; + case 3: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_2); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 18000); + step++; + break; + case 4: + DoCast(SPELL_BARADA_FALTERS); + me->HandleEmoteCommand(EMOTE_STAND_STATE_NONE); + + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->DoAction(ACTION_JULES_HOVER); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 11000); + step++; + break; + case 5: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_3); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 13000); + step++; + break; + case 6: + Talk(SAY_BARADA_4); + events.ScheduleEvent(EVENT_BARADAS_TALK, 5000); + step++; + break; + case 7: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_3); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 13000); + step++; + break; + case 8: + Talk(SAY_BARADA_4); + events.ScheduleEvent(EVENT_BARADAS_TALK, 12000); + step++; + break; + case 9: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_4); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 12000); + step++; + break; + case 10: + Talk(SAY_BARADA_4); + events.ScheduleEvent(EVENT_BARADAS_TALK, 5000); + step++; + break; + case 11: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->DoAction(ACTION_JULES_FLIGHT); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 12: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_4); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 8000); + step++; + break; + case 13: + Talk(SAY_BARADA_5); + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 14: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_4); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 15: + Talk(SAY_BARADA_6); + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 16: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_5); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 17: + Talk(SAY_BARADA_7); + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 18: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->AI()->Talk(SAY_JULES_3); + + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 19: + Talk(SAY_BARADA_7); + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 20: + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + { + jules->AI()->DoAction(ACTION_JULES_MOVE_HOME); + jules->RemoveAura(SPELL_JULES_VOMITS_AURA); + } + + events.ScheduleEvent(EVENT_BARADAS_TALK, 10000); + step++; + break; + case 21: + //End + if (Player* player = ObjectAccessor::FindPlayer(playerGUID)) + player->KilledMonsterCredit(NPC_COLONEL_JULES, ObjectGuid::Empty); + + if (Creature* jules = ObjectAccessor::GetCreature(*me, julesGUID)) + jules->RemoveAllAuras(); + + me->RemoveAura(SPELL_BARADAS_COMMAND); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); + + Talk(SAY_BARADA_8); + me->GetMotionMaster()->MoveTargetedHome(); + EnterEvadeMode(); + break; + } + break; + } + } + } + + private: + EventMap events; + uint8 step; + ObjectGuid julesGUID; + ObjectGuid playerGUID; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_baradaAI(creature); + } +}; + +/*###### +## npc_colonel_jules +######*/ + +class npc_colonel_jules : public CreatureScript +{ +public: + npc_colonel_jules() : CreatureScript("npc_colonel_jules") { } + + struct npc_colonel_julesAI : public ScriptedAI + { + npc_colonel_julesAI(Creature* creature) : ScriptedAI(creature), summons(me) + { + Initialize(); + } + + void Initialize() + { + circleRounds = 0; + point = 0; + } + + void Reset() override + { + events.Reset(); + + summons.DespawnAll(); + circleRounds = 0; + point = 3; + wpreached = false; + } + + void DoAction(int32 action) override + { + switch (action) + { + case ACTION_JULES_HOVER: + me->AddAura(SPELL_JULES_GOES_PRONE, me); + me->AddAura(SPELL_JULES_THREATENS_AURA, me); + + me->SetCanFly(true); + me->SetSpeed(MOVE_RUN, 0.2f); + + me->SetFacingTo(3.207566f); + me->GetMotionMaster()->MoveJump(exorcismPos[2], 2.0f, 2.0f); + + events.ScheduleEvent(EVENT_SUMMON_SKULL, 10000); + break; + case ACTION_JULES_FLIGHT: + circleRounds++; + + me->RemoveAura(SPELL_JULES_GOES_PRONE); + + me->AddAura(SPELL_JULES_GOES_UPRIGHT, me); + me->AddAura(SPELL_JULES_VOMITS_AURA, me); + + wpreached = true; + me->GetMotionMaster()->MovePoint(point, exorcismPos[point]); + break; + case ACTION_JULES_MOVE_HOME: + wpreached = false; + me->SetSpeed(MOVE_RUN, 1.0f); + me->GetMotionMaster()->MovePoint(11, exorcismPos[2]); + + events.CancelEvent(EVENT_SUMMON_SKULL); + break; + } + } + + void JustSummoned(Creature* summon) override + { + summons.Summon(summon); + summon->GetMotionMaster()->MoveRandom(10.0f); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type != POINT_MOTION_TYPE) + return; + + if (id < 10) + wpreached = true; + + if (id == 8) + { + for (uint8 i = 0; i < circleRounds; i++) + DoSummon(NPC_FOUL_PURGE, exorcismPos[8]); + } + + if (id == 10) + { + wpreached = true; + point = 3; + circleRounds++; + } + } + + void UpdateAI(uint32 diff) override + { + if (wpreached) + { + me->GetMotionMaster()->MovePoint(point, exorcismPos[point]); + point++; + wpreached = false; + } + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SUMMON_SKULL: + uint8 summonCount = urand(1,3); + + for (uint8 i = 0; i < summonCount; i++) + me->SummonCreature(NPC_DARKNESS_RELEASED, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 1.5f, 0, TEMPSUMMON_MANUAL_DESPAWN); + + events.ScheduleEvent(EVENT_SUMMON_SKULL, urand(10000, 15000)); + break; + } + } + } + + private: + EventMap events; + SummonList summons; + + uint8 circleRounds; + uint8 point; + + bool wpreached; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_colonel_julesAI(creature); + } +}; + void AddSC_hellfire_peninsula() { new npc_aeranas(); new npc_ancestral_wolf(); new npc_wounded_blood_elf(); new npc_fel_guard_hound(); + new npc_barada(); + new npc_colonel_jules(); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 993e64f22dc..68c115f9faf 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -34,6 +34,7 @@ #include "Pet.h" #include "ReputationMgr.h" #include "SkillDiscovery.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "Vehicle.h" @@ -1293,8 +1294,8 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader void HandleScript(SpellEffIndex /*effIndex*/) { Player* caster = GetCaster()->ToPlayer(); - if (caster->HasSpellCooldown(SPELL_DIVINE_STORM)) - caster->RemoveSpellCooldown(SPELL_DIVINE_STORM, true); + if (caster->GetSpellHistory()->HasCooldown(SPELL_DIVINE_STORM)) + caster->GetSpellHistory()->ResetCooldown(SPELL_DIVINE_STORM, true); } void Register() override @@ -3330,7 +3331,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader { // This is only needed because spells cast from spell_linked_spell are triggered by default // Spell::SendSpellCooldown() skips all spells with TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD - GetCaster()->ToPlayer()->AddSpellAndCategoryCooldowns(GetSpellInfo(), GetCastItem() ? GetCastItem()->GetEntry() : 0, GetSpell()); + GetCaster()->GetSpellHistory()->StartCooldown(GetSpellInfo(), 0, GetSpell()); } void Register() override diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 3ee337f81d4..75df264360f 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -27,6 +27,7 @@ #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -246,7 +247,7 @@ class spell_hun_chimera_shot : public SpellScriptLoader if (spellId) caster->CastCustomSpell(unitTarget, spellId, &basePoint, 0, 0, true); if (spellId == SPELL_HUNTER_CHIMERA_SHOT_SCORPID && caster->ToPlayer()) // Scorpid Sting - Add 1 minute cooldown - caster->ToPlayer()->AddSpellCooldown(spellId, 0, uint32(time(NULL) + 60)); + caster->GetSpellHistory()->AddCooldown(spellId, 0, std::chrono::minutes(1)); } } @@ -654,24 +655,20 @@ class spell_hun_readiness : public SpellScriptLoader void HandleDummy(SpellEffIndex /*effIndex*/) { - Player* caster = GetCaster()->ToPlayer(); // immediately finishes the cooldown on your other Hunter abilities except Bestial Wrath - const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap(); - for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) + GetCaster()->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); ///! If spellId in cooldown map isn't valid, the above will return a null pointer. - if (spellInfo && - spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && + if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->Id != SPELL_HUNTER_READINESS && spellInfo->Id != SPELL_HUNTER_BESTIAL_WRATH && spellInfo->Id != SPELL_DRAENEI_GIFT_OF_THE_NAARU && spellInfo->GetRecoveryTime() > 0) - caster->RemoveSpellCooldown((itr++)->first, true); - else - ++itr; - } + return true; + return false; + }, true); } void Register() override diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index b290cb75a2b..717382a0e36 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -24,6 +24,7 @@ #include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "SkillDiscovery.h" @@ -1349,7 +1350,7 @@ class spell_item_red_rider_air_rifle : public SpellScriptLoader caster->CastSpell(caster, SPELL_AIR_RIFLE_HOLD_VISUAL, true); // needed because this spell shares GCD with its triggered spells (which must not be cast with triggered flag) if (Player* player = caster->ToPlayer()) - player->GetGlobalCooldownMgr().CancelGlobalCooldown(GetSpellInfo()); + player->GetSpellHistory()->CancelGlobalCooldown(GetSpellInfo()); if (urand(0, 4)) caster->CastSpell(target, SPELL_AIR_RIFLE_SHOOT, false); else @@ -2368,7 +2369,7 @@ class spell_item_rocket_boots : public SpellScriptLoader if (Battleground* bg = caster->GetBattleground()) bg->EventPlayerDroppedFlag(caster); - caster->RemoveSpellCooldown(SPELL_ROCKET_BOOTS_PROC); + caster->GetSpellHistory()->ResetCooldown(SPELL_ROCKET_BOOTS_PROC); caster->CastSpell(caster, SPELL_ROCKET_BOOTS_PROC, true, NULL); } @@ -2548,14 +2549,14 @@ class spell_item_refocus : public SpellScriptLoader if (!caster || caster->getClass() != CLASS_HUNTER) return; - if (caster->HasSpellCooldown(SPELL_AIMED_SHOT)) - caster->RemoveSpellCooldown(SPELL_AIMED_SHOT, true); + if (caster->GetSpellHistory()->HasCooldown(SPELL_AIMED_SHOT)) + caster->GetSpellHistory()->ResetCooldown(SPELL_AIMED_SHOT, true); - if (caster->HasSpellCooldown(SPELL_MULTISHOT)) - caster->RemoveSpellCooldown(SPELL_MULTISHOT, true); + if (caster->GetSpellHistory()->HasCooldown(SPELL_MULTISHOT)) + caster->GetSpellHistory()->ResetCooldown(SPELL_MULTISHOT, true); - if (caster->HasSpellCooldown(SPELL_VOLLEY)) - caster->RemoveSpellCooldown(SPELL_VOLLEY, true); + if (caster->GetSpellHistory()->HasCooldown(SPELL_VOLLEY)) + caster->GetSpellHistory()->ResetCooldown(SPELL_VOLLEY, true); } void Register() override diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index ba9f66d255b..4edbf8822f7 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -23,6 +23,7 @@ #include "Player.h" #include "ScriptMgr.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -171,22 +172,12 @@ class spell_mage_cold_snap : public SpellScriptLoader void HandleDummy(SpellEffIndex /*effIndex*/) { - Player* caster = GetCaster()->ToPlayer(); - // immediately finishes the cooldown on Frost spells - const SpellCooldowns& cm = caster->GetSpellCooldownMap(); - for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) + GetCaster()->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool { SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); - - if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && - (spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && - spellInfo->Id != SPELL_MAGE_COLD_SNAP && spellInfo->GetRecoveryTime() > 0) - { - caster->RemoveSpellCooldown((itr++)->first, true); - } - else - ++itr; - } + return spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && + spellInfo->Id != SPELL_MAGE_COLD_SNAP && spellInfo->GetRecoveryTime() > 0; + }, true); } void Register() override diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index cf320a05346..197d55486a8 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -25,6 +25,7 @@ #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" +#include "SpellHistory.h" #include "Group.h" enum PaladinSpells @@ -133,7 +134,7 @@ class spell_pal_ardent_defender : public SpellScriptLoader int32 remainingHealth = victim->GetHealth() - dmgInfo.GetDamage(); uint32 allowedHealth = victim->CountPctFromMaxHealth(35); // If damage kills us - if (remainingHealth <= 0 && !victim->ToPlayer()->HasSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL)) + if (remainingHealth <= 0 && !victim->GetSpellHistory()->HasCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL)) { // Cast healing spell, completely avoid damage absorbAmount = dmgInfo.GetDamage(); @@ -148,7 +149,7 @@ class spell_pal_ardent_defender : public SpellScriptLoader int32 healAmount = int32(victim->CountPctFromMaxHealth(uint32(healPct * pctFromDefense))); victim->CastCustomSpell(victim, PAL_SPELL_ARDENT_DEFENDER_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff); - victim->ToPlayer()->AddSpellCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, time(NULL) + 120); + victim->GetSpellHistory()->AddCooldown(PAL_SPELL_ARDENT_DEFENDER_HEAL, 0, std::chrono::minutes(2)); } else if (remainingHealth < int32(allowedHealth)) { diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index d98ef2ec799..0ec8bfc3a9c 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -208,22 +208,23 @@ class spell_q6124_6129_apply_salve : public SpellScriptLoader if (GetCastItem()) if (Creature* creatureTarget = GetHitCreature()) { - uint32 uiNewEntry = 0; + uint32 newEntry = 0; switch (caster->GetTeam()) { case HORDE: if (creatureTarget->GetEntry() == NPC_SICKLY_GAZELLE) - uiNewEntry = NPC_CURED_GAZELLE; + newEntry = NPC_CURED_GAZELLE; break; case ALLIANCE: if (creatureTarget->GetEntry() == NPC_SICKLY_DEER) - uiNewEntry = NPC_CURED_DEER; + newEntry = NPC_CURED_DEER; break; } - if (uiNewEntry) + if (newEntry) { - creatureTarget->UpdateEntry(uiNewEntry); + creatureTarget->UpdateEntry(newEntry); creatureTarget->DespawnOrUnsummon(DESPAWN_TIME); + caster->KilledMonsterCredit(newEntry); } } } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index edb5cd5260c..da50f471f1c 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -25,6 +25,7 @@ #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" +#include "SpellHistory.h" #include "Containers.h" enum RogueSpells @@ -139,11 +140,11 @@ class spell_rog_cheat_death : public SpellScriptLoader void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount) { Player* target = GetTarget()->ToPlayer(); - if (dmgInfo.GetDamage() < target->GetHealth() || target->HasSpellCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN) || !roll_chance_i(absorbChance)) + if (dmgInfo.GetDamage() < target->GetHealth() || target->GetSpellHistory()->HasCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN) || !roll_chance_i(absorbChance)) return; target->CastSpell(target, SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, true); - target->AddSpellCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, 0, time(NULL) + 60); + target->GetSpellHistory()->AddCooldown(SPELL_ROGUE_CHEAT_DEATH_COOLDOWN, 0, std::chrono::minutes(1)); uint32 health10 = target->CountPctFromMaxHealth(10); @@ -443,35 +444,21 @@ class spell_rog_preparation : public SpellScriptLoader void HandleDummy(SpellEffIndex /*effIndex*/) { - Player* caster = GetCaster()->ToPlayer(); - - //immediately finishes the cooldown on certain Rogue abilities - const SpellCooldowns& cm = caster->GetSpellCooldownMap(); - for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) + Unit* caster = GetCaster(); + caster->GetSpellHistory()->ResetCooldowns([caster](SpellHistory::CooldownStorageType::iterator itr) -> bool { SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); - - if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE) - { - if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep - spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) // Vanish, Evasion, Sprint - caster->RemoveSpellCooldown((itr++)->first, true); - else if (caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION)) - { - if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle - spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick - (spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry - spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY)) - caster->RemoveSpellCooldown((itr++)->first, true); - else - ++itr; - } - else - ++itr; - } - else - ++itr; - } + if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE) + return false; + + return (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep + spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) || // Vanish, Evasion, Sprint + (caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION) && + (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle + spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick + (spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry + spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY))); + }, true); } void Register() override diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 2ee0d5091b5..5564a8275c8 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -25,6 +25,7 @@ #include "ScriptMgr.h" #include "GridNotifiers.h" #include "Unit.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -338,7 +339,7 @@ class spell_sha_earth_shield : public SpellScriptLoader { //! HACK due to currenct proc system implementation if (Player* player = GetTarget()->ToPlayer()) - if (player->HasSpellCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL)) + if (player->GetSpellHistory()->HasCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL)) return false; return true; } @@ -351,7 +352,7 @@ class spell_sha_earth_shield : public SpellScriptLoader /// @hack: due to currenct proc system implementation if (Player* player = GetTarget()->ToPlayer()) - player->AddSpellCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL, 0, time(NULL) + 3); + player->GetSpellHistory()->AddCooldown(SPELL_SHAMAN_EARTH_SHIELD_HEAL, 0, std::chrono::seconds(3)); } void Register() override @@ -804,7 +805,7 @@ class spell_sha_item_t10_elemental_2p_bonus : public SpellScriptLoader { PreventDefaultAction(); if (Player* target = GetTarget()->ToPlayer()) - target->ModifySpellCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, -aurEff->GetAmount()); + target->GetSpellHistory()->ModifyCooldown(SPELL_SHAMAN_ELEMENTAL_MASTERY, -aurEff->GetAmount()); } void Register() override diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index fa2b323e220..c7839a59608 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -23,6 +23,7 @@ #include "Player.h" #include "ScriptMgr.h" +#include "SpellHistory.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -847,7 +848,7 @@ class spell_warr_vigilance_trigger : public SpellScriptLoader // Remove Taunt cooldown if (Player* target = GetHitPlayer()) - target->RemoveSpellCooldown(SPELL_WARRIOR_TAUNT, true); + target->GetSpellHistory()->ResetCooldown(SPELL_WARRIOR_TAUNT, true); } void Register() override diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 93010f06283..d1d2ddc8a80 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -53,6 +53,7 @@ EndContentData */ #include "GridNotifiersImpl.h" #include "Cell.h" #include "CellImpl.h" +#include "SpellHistory.h" #include "SpellAuras.h" #include "Pet.h" #include "CreatureTextMgr.h" @@ -1214,14 +1215,14 @@ public: if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); - if (player->HasSpellCooldown(SPELL_INT) || - player->HasSpellCooldown(SPELL_ARM) || - player->HasSpellCooldown(SPELL_DMG) || - player->HasSpellCooldown(SPELL_RES) || - player->HasSpellCooldown(SPELL_STR) || - player->HasSpellCooldown(SPELL_AGI) || - player->HasSpellCooldown(SPELL_STM) || - player->HasSpellCooldown(SPELL_SPI)) + if (player->GetSpellHistory()->HasCooldown(SPELL_INT) || + player->GetSpellHistory()->HasCooldown(SPELL_ARM) || + player->GetSpellHistory()->HasCooldown(SPELL_DMG) || + player->GetSpellHistory()->HasCooldown(SPELL_RES) || + player->GetSpellHistory()->HasCooldown(SPELL_STR) || + player->GetSpellHistory()->HasCooldown(SPELL_AGI) || + player->GetSpellHistory()->HasCooldown(SPELL_STM) || + player->GetSpellHistory()->HasCooldown(SPELL_SPI)) player->SEND_GOSSIP_MENU(7393, creature->GetGUID()); else { @@ -1281,52 +1282,44 @@ public: bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override { player->PlayerTalkClass->ClearMenus(); + uint32 spellId = 0; switch (sender) { case GOSSIP_SENDER_MAIN: SendAction(player, creature, action); break; case GOSSIP_SENDER_MAIN + 1: - creature->CastSpell(player, SPELL_DMG, false); - player->AddSpellCooldown(SPELL_DMG, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_DMG; break; case GOSSIP_SENDER_MAIN + 2: - creature->CastSpell(player, SPELL_RES, false); - player->AddSpellCooldown(SPELL_RES, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_RES; break; case GOSSIP_SENDER_MAIN + 3: - creature->CastSpell(player, SPELL_ARM, false); - player->AddSpellCooldown(SPELL_ARM, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_ARM; break; case GOSSIP_SENDER_MAIN + 4: - creature->CastSpell(player, SPELL_SPI, false); - player->AddSpellCooldown(SPELL_SPI, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_SPI; break; case GOSSIP_SENDER_MAIN + 5: - creature->CastSpell(player, SPELL_INT, false); - player->AddSpellCooldown(SPELL_INT, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_INT; break; case GOSSIP_SENDER_MAIN + 6: - creature->CastSpell(player, SPELL_STM, false); - player->AddSpellCooldown(SPELL_STM, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_STM; break; case GOSSIP_SENDER_MAIN + 7: - creature->CastSpell(player, SPELL_STR, false); - player->AddSpellCooldown(SPELL_STR, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_STR; break; case GOSSIP_SENDER_MAIN + 8: - creature->CastSpell(player, SPELL_AGI, false); - player->AddSpellCooldown(SPELL_AGI, 0, time(NULL) + 7200); - SendAction(player, creature, action); + spellId = SPELL_AGI; break; } + + if (spellId) + { + creature->CastSpell(player, spellId, false); + player->GetSpellHistory()->AddCooldown(spellId, 0, std::chrono::hours(2)); + SendAction(player, creature, action); + } return true; } }; diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h index b88fb56cb06..1bbd264482f 100644 --- a/src/server/shared/Database/Field.h +++ b/src/server/shared/Database/Field.h @@ -255,11 +255,7 @@ class Field Field(); ~Field(); - #if defined(__GNUC__) - #pragma pack(1) - #else #pragma pack(push, 1) - #endif struct { uint32 length; // Length (prepared strings only) @@ -267,11 +263,7 @@ class Field enum_field_types type; // Field type bool raw; // Raw bytes? (Prepared statement or ad hoc) } data; - #if defined(__GNUC__) - #pragma pack() - #else #pragma pack(pop) - #endif void SetByteValue(void const* newValue, size_t const newSize, enum_field_types newType, uint32 length); void SetStructuredValue(char* newValue, enum_field_types newType); diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp index c8632b8a3c2..1ca01501d01 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp @@ -105,7 +105,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_MAIL_COUNT, "SELECT COUNT(*) FROM mail WHERE receiver = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHARACTER_SOCIALLIST, "SELECT friend, flags, note FROM character_social JOIN characters ON characters.guid = character_social.friend WHERE character_social.guid = ? AND deleteinfos_name IS NULL LIMIT 255", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, "SELECT spell, item, time FROM character_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, "SELECT spell, item, time FROM character_spell_cooldown WHERE guid = ? AND time > UNIX_TIMESTAMP()", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_GUILD_MEMBER, "SELECT guildid, rank FROM guild_member WHERE guid = ?", CONNECTION_BOTH); PrepareStatement(CHAR_SEL_GUILD_MEMBER_EXTENDED, "SELECT g.guildid, g.name, gr.rname, gr.rid, gm.pnote, gm.offnote " @@ -497,7 +497,8 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_CHAR_REP_FACTION_CHANGE, "UPDATE character_reputation SET faction = ?, standing = ? WHERE faction = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_TITLES_FACTION_CHANGE, "UPDATE characters SET knownTitles = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_RES_CHAR_TITLES_FACTION_CHANGE, "UPDATE characters SET chosenTitle = 0 WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_CHAR_SPELL_COOLDOWN, "DELETE FROM character_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_CHAR_SPELL_COOLDOWNS, "DELETE FROM character_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_CHAR_SPELL_COOLDOWN, "INSERT INTO character_spell_cooldown (guid, spell, item, time) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHARACTER, "DELETE FROM characters WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_ACTION, "DELETE FROM character_action WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_AURA, "DELETE FROM character_aura WHERE guid = ?", CONNECTION_ASYNC); @@ -577,7 +578,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_INS_CHAR_PET_DECLINEDNAME, "INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_PET_AURA, "SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges FROM pet_aura WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_PET_SPELL, "SELECT spell, active FROM pet_spell WHERE guid = ?", CONNECTION_SYNCH); - PrepareStatement(CHAR_SEL_PET_SPELL_COOLDOWN, "SELECT spell, time FROM pet_spell_cooldown WHERE guid = ?", CONNECTION_SYNCH); + PrepareStatement(CHAR_SEL_PET_SPELL_COOLDOWN, "SELECT spell, time FROM pet_spell_cooldown WHERE guid = ? AND time > UNIX_TIMESTAMP()", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_PET_DECLINED_NAME, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_pet_declinedname WHERE owner = ? AND id = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_DEL_PET_AURAS, "DELETE FROM pet_aura WHERE guid = ?", CONNECTION_BOTH); PrepareStatement(CHAR_DEL_PET_SPELLS, "DELETE FROM pet_spell WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h index e56a24d6865..f88a912e022 100644 --- a/src/server/shared/Database/Implementation/CharacterDatabase.h +++ b/src/server/shared/Database/Implementation/CharacterDatabase.h @@ -436,7 +436,8 @@ enum CharacterDatabaseStatements CHAR_UPD_CHAR_REP_FACTION_CHANGE, CHAR_UPD_CHAR_TITLES_FACTION_CHANGE, CHAR_RES_CHAR_TITLES_FACTION_CHANGE, - CHAR_DEL_CHAR_SPELL_COOLDOWN, + CHAR_DEL_CHAR_SPELL_COOLDOWNS, + CHAR_INS_CHAR_SPELL_COOLDOWN, CHAR_DEL_CHARACTER, CHAR_DEL_CHAR_ACTION, CHAR_DEL_CHAR_AURA, diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index f8f641a9ea7..e50cf42e439 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.cpp +++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp @@ -61,6 +61,7 @@ HANDLE WheatyExceptionReport::m_hDumpFile; HANDLE WheatyExceptionReport::m_hProcess; SymbolPairs WheatyExceptionReport::symbols; std::stack<SymbolDetail> WheatyExceptionReport::symbolDetails; +bool WheatyExceptionReport::stackOverflowException; // Declare global instance of class WheatyExceptionReport g_WheatyExceptionReport; @@ -72,6 +73,7 @@ WheatyExceptionReport::WheatyExceptionReport() // Constructor // Install the unhandled exception filter function m_previousFilter = SetUnhandledExceptionFilter(WheatyUnhandledExceptionFilter); m_hProcess = GetCurrentProcess(); + stackOverflowException = false; if (!IsDebuggerPresent()) { _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); @@ -97,6 +99,9 @@ WheatyExceptionReport::~WheatyExceptionReport() LONG WINAPI WheatyExceptionReport::WheatyUnhandledExceptionFilter( PEXCEPTION_POINTERS pExceptionInfo) { + if (pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_STACK_OVERFLOW) + stackOverflowException = true; + TCHAR module_folder_name[MAX_PATH]; GetModuleFileName(0, module_folder_name, MAX_PATH); TCHAR* pos = _tcsrchr(module_folder_name, '\\'); @@ -419,107 +424,114 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables) void WheatyExceptionReport::GenerateExceptionReport( PEXCEPTION_POINTERS pExceptionInfo) { - SYSTEMTIME systime; - GetLocalTime(&systime); - - // Start out with a banner - _tprintf(_T("Revision: %s\r\n"), _FULLVERSION); - _tprintf(_T("Date %u:%u:%u. Time %u:%u \r\n"), systime.wDay, systime.wMonth, systime.wYear, systime.wHour, systime.wMinute); - PEXCEPTION_RECORD pExceptionRecord = pExceptionInfo->ExceptionRecord; - - PrintSystemInfo(); - // First print information about the type of fault - _tprintf(_T("\r\n//=====================================================\r\n")); - _tprintf(_T("Exception code: %08X %s\r\n"), - pExceptionRecord->ExceptionCode, - GetExceptionString(pExceptionRecord->ExceptionCode)); - - // Now print information about where the fault occured - TCHAR szFaultingModule[MAX_PATH]; - DWORD section; - DWORD_PTR offset; - GetLogicalAddress(pExceptionRecord->ExceptionAddress, - szFaultingModule, - sizeof(szFaultingModule), - section, offset); + __try + { + SYSTEMTIME systime; + GetLocalTime(&systime); + + // Start out with a banner + _tprintf(_T("Revision: %s\r\n"), _FULLVERSION); + _tprintf(_T("Date %u:%u:%u. Time %u:%u \r\n"), systime.wDay, systime.wMonth, systime.wYear, systime.wHour, systime.wMinute); + PEXCEPTION_RECORD pExceptionRecord = pExceptionInfo->ExceptionRecord; + + PrintSystemInfo(); + // First print information about the type of fault + _tprintf(_T("\r\n//=====================================================\r\n")); + _tprintf(_T("Exception code: %08X %s\r\n"), + pExceptionRecord->ExceptionCode, + GetExceptionString(pExceptionRecord->ExceptionCode)); + + // Now print information about where the fault occured + TCHAR szFaultingModule[MAX_PATH]; + DWORD section; + DWORD_PTR offset; + GetLogicalAddress(pExceptionRecord->ExceptionAddress, + szFaultingModule, + sizeof(szFaultingModule), + section, offset); #ifdef _M_IX86 - _tprintf(_T("Fault address: %08X %02X:%08X %s\r\n"), - pExceptionRecord->ExceptionAddress, - section, offset, szFaultingModule); + _tprintf(_T("Fault address: %08X %02X:%08X %s\r\n"), + pExceptionRecord->ExceptionAddress, + section, offset, szFaultingModule); #endif #ifdef _M_X64 - _tprintf(_T("Fault address: %016I64X %02X:%016I64X %s\r\n"), - pExceptionRecord->ExceptionAddress, - section, offset, szFaultingModule); + _tprintf(_T("Fault address: %016I64X %02X:%016I64X %s\r\n"), + pExceptionRecord->ExceptionAddress, + section, offset, szFaultingModule); #endif - PCONTEXT pCtx = pExceptionInfo->ContextRecord; + PCONTEXT pCtx = pExceptionInfo->ContextRecord; - // Show the registers - #ifdef _M_IX86 // X86 Only! - _tprintf(_T("\r\nRegisters:\r\n")); + // Show the registers +#ifdef _M_IX86 // X86 Only! + _tprintf(_T("\r\nRegisters:\r\n")); - _tprintf(_T("EAX:%08X\r\nEBX:%08X\r\nECX:%08X\r\nEDX:%08X\r\nESI:%08X\r\nEDI:%08X\r\n") - , pCtx->Eax, pCtx->Ebx, pCtx->Ecx, pCtx->Edx, - pCtx->Esi, pCtx->Edi); + _tprintf(_T("EAX:%08X\r\nEBX:%08X\r\nECX:%08X\r\nEDX:%08X\r\nESI:%08X\r\nEDI:%08X\r\n") + , pCtx->Eax, pCtx->Ebx, pCtx->Ecx, pCtx->Edx, + pCtx->Esi, pCtx->Edi); - _tprintf(_T("CS:EIP:%04X:%08X\r\n"), pCtx->SegCs, pCtx->Eip); - _tprintf(_T("SS:ESP:%04X:%08X EBP:%08X\r\n"), - pCtx->SegSs, pCtx->Esp, pCtx->Ebp); - _tprintf(_T("DS:%04X ES:%04X FS:%04X GS:%04X\r\n"), - pCtx->SegDs, pCtx->SegEs, pCtx->SegFs, pCtx->SegGs); - _tprintf(_T("Flags:%08X\r\n"), pCtx->EFlags); - #endif + _tprintf(_T("CS:EIP:%04X:%08X\r\n"), pCtx->SegCs, pCtx->Eip); + _tprintf(_T("SS:ESP:%04X:%08X EBP:%08X\r\n"), + pCtx->SegSs, pCtx->Esp, pCtx->Ebp); + _tprintf(_T("DS:%04X ES:%04X FS:%04X GS:%04X\r\n"), + pCtx->SegDs, pCtx->SegEs, pCtx->SegFs, pCtx->SegGs); + _tprintf(_T("Flags:%08X\r\n"), pCtx->EFlags); +#endif - #ifdef _M_X64 - _tprintf(_T("\r\nRegisters:\r\n")); - _tprintf(_T("RAX:%016I64X\r\nRBX:%016I64X\r\nRCX:%016I64X\r\nRDX:%016I64X\r\nRSI:%016I64X\r\nRDI:%016I64X\r\n") - _T("R8: %016I64X\r\nR9: %016I64X\r\nR10:%016I64X\r\nR11:%016I64X\r\nR12:%016I64X\r\nR13:%016I64X\r\nR14:%016I64X\r\nR15:%016I64X\r\n") - , pCtx->Rax, pCtx->Rbx, pCtx->Rcx, pCtx->Rdx, - pCtx->Rsi, pCtx->Rdi, pCtx->R9, pCtx->R10, pCtx->R11, pCtx->R12, pCtx->R13, pCtx->R14, pCtx->R15); - _tprintf(_T("CS:RIP:%04X:%016I64X\r\n"), pCtx->SegCs, pCtx->Rip); - _tprintf(_T("SS:RSP:%04X:%016X RBP:%08X\r\n"), - pCtx->SegSs, pCtx->Rsp, pCtx->Rbp); - _tprintf(_T("DS:%04X ES:%04X FS:%04X GS:%04X\r\n"), - pCtx->SegDs, pCtx->SegEs, pCtx->SegFs, pCtx->SegGs); - _tprintf(_T("Flags:%08X\r\n"), pCtx->EFlags); - #endif +#ifdef _M_X64 + _tprintf(_T("\r\nRegisters:\r\n")); + _tprintf(_T("RAX:%016I64X\r\nRBX:%016I64X\r\nRCX:%016I64X\r\nRDX:%016I64X\r\nRSI:%016I64X\r\nRDI:%016I64X\r\n") + _T("R8: %016I64X\r\nR9: %016I64X\r\nR10:%016I64X\r\nR11:%016I64X\r\nR12:%016I64X\r\nR13:%016I64X\r\nR14:%016I64X\r\nR15:%016I64X\r\n") + , pCtx->Rax, pCtx->Rbx, pCtx->Rcx, pCtx->Rdx, + pCtx->Rsi, pCtx->Rdi, pCtx->R9, pCtx->R10, pCtx->R11, pCtx->R12, pCtx->R13, pCtx->R14, pCtx->R15); + _tprintf(_T("CS:RIP:%04X:%016I64X\r\n"), pCtx->SegCs, pCtx->Rip); + _tprintf(_T("SS:RSP:%04X:%016X RBP:%08X\r\n"), + pCtx->SegSs, pCtx->Rsp, pCtx->Rbp); + _tprintf(_T("DS:%04X ES:%04X FS:%04X GS:%04X\r\n"), + pCtx->SegDs, pCtx->SegEs, pCtx->SegFs, pCtx->SegGs); + _tprintf(_T("Flags:%08X\r\n"), pCtx->EFlags); +#endif - SymSetOptions(SYMOPT_DEFERRED_LOADS); + SymSetOptions(SYMOPT_DEFERRED_LOADS); - // Initialize DbgHelp - if (!SymInitialize(GetCurrentProcess(), 0, TRUE)) - { - _tprintf(_T("\n\rCRITICAL ERROR.\n\r Couldn't initialize the symbol handler for process.\n\rError [%s].\n\r\n\r"), - ErrorMessage(GetLastError())); - } + // Initialize DbgHelp + if (!SymInitialize(GetCurrentProcess(), 0, TRUE)) + { + _tprintf(_T("\n\rCRITICAL ERROR.\n\r Couldn't initialize the symbol handler for process.\n\rError [%s].\n\r\n\r"), + ErrorMessage(GetLastError())); + } - CONTEXT trashableContext = *pCtx; + CONTEXT trashableContext = *pCtx; - WriteStackDetails(&trashableContext, false, NULL); - printTracesForAllThreads(false); + WriteStackDetails(&trashableContext, false, NULL); + printTracesForAllThreads(false); -// #ifdef _M_IX86 // X86 Only! + // #ifdef _M_IX86 // X86 Only! - _tprintf(_T("========================\r\n")); - _tprintf(_T("Local Variables And Parameters\r\n")); + _tprintf(_T("========================\r\n")); + _tprintf(_T("Local Variables And Parameters\r\n")); - trashableContext = *pCtx; - WriteStackDetails(&trashableContext, true, NULL); - printTracesForAllThreads(true); + trashableContext = *pCtx; + WriteStackDetails(&trashableContext, true, NULL); + printTracesForAllThreads(true); - /*_tprintf(_T("========================\r\n")); - _tprintf(_T("Global Variables\r\n")); + /*_tprintf(_T("========================\r\n")); + _tprintf(_T("Global Variables\r\n")); - SymEnumSymbols(GetCurrentProcess(), + SymEnumSymbols(GetCurrentProcess(), (UINT_PTR)GetModuleHandle(szFaultingModule), 0, EnumerateSymbolsCallback, 0);*/ - // #endif // X86 Only! + // #endif // X86 Only! - SymCleanup(GetCurrentProcess()); + SymCleanup(GetCurrentProcess()); - _tprintf(_T("\r\n")); + _tprintf(_T("\r\n")); + } + __except (EXCEPTION_EXECUTE_HANDLER) + { + _tprintf(_T("Error writing the crash log\r\n")); + } } //====================================================================== @@ -1313,16 +1325,43 @@ DWORD_PTR WheatyExceptionReport::DereferenceUnsafePointer(DWORD_PTR address) //============================================================================ int __cdecl WheatyExceptionReport::_tprintf(const TCHAR * format, ...) { - TCHAR szBuff[WER_LARGE_BUFFER_SIZE]; int retValue; - DWORD cbWritten; va_list argptr; - va_start(argptr, format); + if (stackOverflowException) + { + retValue = heapprintf(format, argptr); + va_end(argptr); + } + else + { + retValue = stackprintf(format, argptr); + va_end(argptr); + } + + return retValue; +} + +int __cdecl WheatyExceptionReport::stackprintf(const TCHAR * format, va_list argptr) +{ + int retValue; + DWORD cbWritten; + + TCHAR szBuff[WER_LARGE_BUFFER_SIZE]; retValue = vsprintf(szBuff, format, argptr); - va_end(argptr); + WriteFile(m_hReportFile, szBuff, retValue * sizeof(TCHAR), &cbWritten, 0); + return retValue; +} + +int __cdecl WheatyExceptionReport::heapprintf(const TCHAR * format, va_list argptr) +{ + int retValue; + DWORD cbWritten; + TCHAR* szBuff = (TCHAR*)malloc(sizeof(TCHAR) * WER_LARGE_BUFFER_SIZE); + retValue = vsprintf(szBuff, format, argptr); WriteFile(m_hReportFile, szBuff, retValue * sizeof(TCHAR), &cbWritten, 0); + free(szBuff); return retValue; } diff --git a/src/server/shared/Debugging/WheatyExceptionReport.h b/src/server/shared/Debugging/WheatyExceptionReport.h index b7731daaa2b..101b6187f2b 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.h +++ b/src/server/shared/Debugging/WheatyExceptionReport.h @@ -178,6 +178,8 @@ class WheatyExceptionReport static DWORD_PTR DereferenceUnsafePointer(DWORD_PTR address); static int __cdecl _tprintf(const TCHAR * format, ...); + static int __cdecl stackprintf(const TCHAR * format, va_list argptr); + static int __cdecl heapprintf(const TCHAR * format, va_list argptr); static bool StoreSymbol(DWORD type , DWORD_PTR offset); static void ClearSymbols(); @@ -191,6 +193,7 @@ class WheatyExceptionReport static HANDLE m_hProcess; static SymbolPairs symbols; static std::stack<SymbolDetail> symbolDetails; + static bool stackOverflowException; static char* PushSymbolDetail(char* pszCurrBuffer); static char* PopSymbolDetail(char* pszCurrBuffer); diff --git a/src/server/shared/Networking/MessageBuffer.h b/src/server/shared/Networking/MessageBuffer.h index 90afaf35796..95e26974626 100644 --- a/src/server/shared/Networking/MessageBuffer.h +++ b/src/server/shared/Networking/MessageBuffer.h @@ -55,9 +55,9 @@ public: uint8* GetBasePointer() { return _storage.data(); } - uint8* GetReadPointer() { return &_storage[_rpos]; } + uint8* GetReadPointer() { return GetBasePointer() + _rpos; } - uint8* GetWritePointer() { return &_storage[_wpos]; } + uint8* GetWritePointer() { return GetBasePointer() + _wpos; } void ReadCompleted(size_type bytes) { _rpos += bytes; } |