Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions sql/updates/world/2013_02_18_00_world_love_is_in_the_air.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
SET @Event = 8;
SET @CGUID := 209183;
SET @OGUID := 164235;

DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID AND @CGUID+5;
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,36885,33,1,1,0,0,-207.869,2174.97,79.7664,0.661457,300,0,0,1,0,0,0,0,0),
(@CGUID+1,36885,33,1,1,0,0,-200.286,2201.67,79.765,0.537364,300,0,0,1,0,0,0,0,0),
(@CGUID+2,36885,33,1,1,0,0,-220.323,2207.68,79.7636,3.0687,300,0,0,1,0,0,0,0,0),
(@CGUID+3,36565,33,1,1,0,0,-209.602,2215.42,79.7633,0.723503,86400,0,0,269000,0,0,0,0,0),
(@CGUID+4,36296,33,1,1,0,0,-208.723,2218.5,79.7633,5.16886,86400,0,0,269000,0,0,3,0,0),
(@CGUID+5,36272,33,1,1,0,0,-205.449,2219.56,79.7633,3.85724,86400,0,0,269000,0,0,0,0,0);

DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+43;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(@OGUID,201289,33,1,1,-222.652,2207.23,79.7614,3.34831,0,0,0.994663,-0.103175,300,0,1),
(@OGUID+1,201289,33,1,1,-222.311,2211.65,79.7616,2.93597,0,0,0.99472,0.10263,300,0,1),
(@OGUID+2,201289,33,1,1,-220.849,2216.83,79.7609,2.90848,0,0,0.993215,0.116293,300,0,1),
(@OGUID+3,201289,33,1,1,-205.261,2177.29,79.7651,0.756489,0,0,0.36929,0.929314,300,0,1),
(@OGUID+4,200332,33,1,1,-228.634,2196.77,79.7618,6.06264,0,0,0.110049,-0.993926,300,0,1),
(@OGUID+5,200332,33,1,1,-229.234,2192.63,79.7622,6.13725,0,0,0.0729029,-0.997339,300,0,1),
(@OGUID+6,200332,33,1,1,-228.925,2195.46,82.4863,6.02886,0,0,0.12682,-0.991926,300,0,1),
(@OGUID+7,200300,33,1,1,-229.234,2192.63,79.7622,6.13725,0,0,0.0729029,-0.997339,300,0,1),
(@OGUID+8,200300,33,1,1,-228.634,2196.77,79.7618,6.06264,0,0,0.110049,-0.993926,300,0,1),
(@OGUID+9,200300,33,1,1,-228.925,2195.46,82.4863,6.02886,0,0,0.12682,-0.991926,300,0,1),
(@OGUID+10,200336,33,1,1,-195.872,2205.43,79.7639,1.19474,0,0,0.56247,0.826818,300,0,1),
(@OGUID+11,200336,33,1,1,-217.118,2219.3,79.7625,2.30215,0,0,0.913203,0.407506,300,0,1),
(@OGUID+12,200333,33,1,1,-193.981,2199.37,79.7493,3.65696,0,0,0.966983,-0.254841,300,0,1),
(@OGUID+13,200334,33,1,1,-205.174,2177.62,81.039,3.76692,0,0,0.951518,-0.307594,300,0,1),
(@OGUID+14,200335,33,1,1,-196.556,2195.78,79.7637,0,0,0,0,1,180,0,1),
(@OGUID+15,200337,33,1,1,-220.423,2216.37,81.0388,2.59275,0,0,0.962582,0.27099,300,0,1),
(@OGUID+16,200337,33,1,1,-213.83,2218.7,79.7631,5.03141,0,0,0.585817,-0.810444,300,0,1),
(@OGUID+17,200337,33,1,1,-217.341,2220.39,80.8288,2.23539,0,0,0.899094,0.437756,300,0,1),
(@OGUID+18,200337,33,1,1,-216.527,2219.35,80.7348,2.23539,0,0,0.899094,0.437756,300,0,1),
(@OGUID+19,200337,33,1,1,-215.719,2218.32,80.7345,2.23539,0,0,0.899094,0.437756,300,0,1),
(@OGUID+20,200337,33,1,1,-218.174,2219.65,80.7954,2.38305,0,0,0.928935,0.370244,300,0,1),
(@OGUID+21,200337,33,1,1,-217.446,2218.96,80.7347,2.38305,0,0,0.928935,0.370244,300,0,1),
(@OGUID+22,200337,33,1,1,-216.943,2218.31,80.7347,2.35556,0,0,0.923758,0.382976,300,0,1),
(@OGUID+23,200337,33,1,1,-216.325,2217.69,80.7346,2.35556,0,0,0.923758,0.382976,300,0,1),
(@OGUID+24,200337,33,1,1,-218.195,2219.56,81.9112,2.35556,0,0,0.923758,0.382976,300,0,1),
(@OGUID+25,200338,33,1,1,-198.645,2203.81,79.7959,4.6882,0,0,0.715607,-0.698503,300,0,1),
(@OGUID+26,200338,33,1,1,-196.699,2203.76,80.7359,0.933992,0,0,0.450206,0.892925,300,0,1),
(@OGUID+27,200338,33,1,1,-195.022,2206.03,80.7362,0.933992,0,0,0.450206,0.892925,300,0,1),
(@OGUID+28,200338,33,1,1,-196.073,2206.38,80.7368,1.10678,0,0,0.525574,0.850748,300,0,1),
(@OGUID+29,200338,33,1,1,-195.499,2206.3,81.6454,1.26386,0,0,0.590703,0.806889,300,0,1),
(@OGUID+30,200338,33,1,1,-196.832,2193.36,79.764,5.88593,0,0,0.197324,-0.980338,300,0,1),
(@OGUID+31,200338,33,1,1,-197.179,2192.53,79.7641,5.90163,0,0,0.189623,-0.981857,300,0,1),
(@OGUID+32,200338,33,1,1,-198.496,2193.06,79.7644,5.90163,0,0,0.189623,-0.981857,300,0,1),
(@OGUID+33,202105,33,1,1,-227.017,2172.73,79.7664,3.8541,0,0,0.93721,-0.348766,300,0,1),
(@OGUID+34,201906,33,1,1,-199.137,2165.32,80.6689,2.04204,0,0,0.852641,0.522496,180,100,1),
(@OGUID+35,201906,33,1,1,-200.911,2162.44,79.7639,2.04204,0,0,0.852641,0.522496,180,100,1),
(@OGUID+36,201906,33,1,1,-199.852,2164.86,80.6729,3.08918,0,0,0.999657,0.0262033,180,100,1),
(@OGUID+37,201906,33,1,1,-201.056,2165.41,80.6763,0.680677,0,0,0.333806,0.942642,180,100,1),
(@OGUID+38,201906,33,1,1,-200.339,2165.8,80.671,-0.645772,0,0,-0.317305,0.948324,180,100,1),
(@OGUID+39,201906,33,1,1,-201.795,2162.82,79.7638,2.04204,0,0,0.852641,0.522496,180,100,1),
(@OGUID+40,201906,33,1,1,-199.467,2166.15,80.6654,0.174532,0,0,0.0871553,0.996195,180,100,1),
(@OGUID+41,201906,33,1,1,-200.524,2164.54,80.6773,0.174532,0,0,0.0871553,0.996195,180,100,1),
(@OGUID+42,201906,33,1,1,-201.818,2165.14,80.6793,1.37881,0,0,0.636078,0.771625,180,100,1),
(@OGUID+43,190678,33,1,1,-222.55,2206.36,81.0686,0,0,0,0,1,180,0,1);

DELETE FROM `creature_template_addon` WHERE `entry` IN (36565,36296,36272);
INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(36565,0,0,0,1,0,'68946 71869'),
(36296,0,0,0,1,0,'68589 71856'),
(36272,0,0,0,1,0,'68946 71869');

DELETE FROM `game_event_creature` WHERE `eventEntry`=@Event AND `guid` BETWEEN @CGUID AND @CGUID+5;
DELETE FROM `game_event_gameobject` WHERE `eventEntry`=@Event AND `guid` BETWEEN @OGUID AND @OGUID+43;
INSERT INTO game_event_creature SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID AND @CGUID+5;
INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID AND @OGUID+43;
UPDATE `creature_template` SET `faction_A`=35, `faction_H`=35, `AIName`='SmartAI' WHERE `entry` IN (36565,36296,36272);

-- Hummel gossip menu.
SET @NPC_HUMMEL = 36296;
SET @MENU_ID = 10847;
SET @TEXT_ID = 15040;
-- Assing gossip menu
UPDATE `creature_template` SET `gossip_menu_id`=@MENU_ID WHERE `entry`=@NPC_HUMMEL;
-- Add text id to gossip menu
DELETE FROM `gossip_menu` WHERE `entry`=@MENU_ID;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
(@MENU_ID,@TEXT_ID);
-- Add gossip option to gossip menu
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@MENU_ID;
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`) VALUES
(@MENU_ID,1,0,'Start the battle.',1,1,0,0,0,0,NULL);
-- Send gossipmenu options only to players level 78 and higher
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10847 AND `SourceEntry`=0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(15,@MENU_ID,0,0,0,27,0,78,0,0,0,0,0,'0','Hummel - Send gossip option only if the player is level 78+');

DELETE FROM `smart_scripts` WHERE `entryorguid`=-209187;
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
(-209187,0,0,0,62,0,100,0,10847,1,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Hummel - Close gossipmenu'),
(-209187,0,1,0,62,0,100,0,10847,1,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Hummel - Remove gossip flags on gossip selection.'),
(-209187,0,2,0,62,0,100,0,10847,1,0,0,2,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Hummel - Set hostile faction gossip selection.');

-- Hummel - add script.
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=36296;

-- Add loot for Heart-Shaped Box. Source - http://www.wowhead.com
DELETE FROM `item_loot_template` WHERE `entry`=54537;
INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
(54537,49927,100,0,0,5,10),
(54537,49715,7,0,0,1,1),
(54537,50446,7,0,0,1,1),
(54537,50741,7,0,0,1,1),
(54537,50471,1.3,0,0,1,1),
(54537,50250,0.03,0,0,1,1);