diff options
25 files changed, 572 insertions, 92 deletions
diff --git a/sql/updates/world/2016_01_20_02_world.sql.sql b/sql/updates/world/2016_01_20_02_world.sql index d026c3cb478..d026c3cb478 100644 --- a/sql/updates/world/2016_01_20_02_world.sql.sql +++ b/sql/updates/world/2016_01_20_02_world.sql diff --git a/sql/updates/world/2016_01_23_00_world.sql b/sql/updates/world/2016_01_23_00_world.sql new file mode 100644 index 00000000000..02eaa7c370d --- /dev/null +++ b/sql/updates/world/2016_01_23_00_world.sql @@ -0,0 +1,43 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=63381; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(63381, 63381, 0, 0, 1), +(63381, 63380, 2, 270, 2); + +-- Pathing for Blade of Argus Entry: 17659 'TDB FORMAT' +SET @NPC := 63381; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2393.32,`position_y`=-12009.38,`position_z`=26.83788 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,-2393.32,-12009.38,26.83788,0,0,0,0,100,0), -- 09:35:02 +(@PATH,2,-2430.895,-12030.52,28.6322,0,0,0,0,100,0), -- 09:35:35 +(@PATH,3,-2449.131,-12041.39,30.04015,0,0,0,0,100,0), -- 09:35:47 +(@PATH,4,-2469.279,-12052.41,30.91039,0,0,0,0,100,0), -- 09:35:58 +(@PATH,5,-2485.917,-12057.62,31.67413,0,0,0,0,100,0), -- 09:36:06 +(@PATH,6,-2499.339,-12060.41,32.19662,0,0,0,0,100,0), -- 09:36:16 +(@PATH,7,-2551.131,-12097.43,31.56079,0,0,0,0,100,0), -- 09:36:26 +(@PATH,8,-2561.849,-12106.37,30.36333,0,0,0,0,100,0), -- 09:36:45 +(@PATH,9,-2594.441,-12132.8,25.2879,0,0,0,0,100,0), -- 09:36:59 +(@PATH,10,-2614.055,-12144.08,22.40907,0,0,0,0,100,0), -- 09:37:10 +(@PATH,11,-2646.337,-12163.92,17.16356,0,0,0,0,100,0), -- 09:37:24 +(@PATH,12,-2662.804,-12174.26,14.88417,0,0,0,0,100,0), -- 09:37:33 +(@PATH,13,-2684.956,-12188.63,12.24028,0,0,0,0,100,0), -- 09:37:43 +(@PATH,14,-2717.39,-12205.54,9.461565,0,0,0,0,100,0), -- 09:37:57 +(@PATH,15,-2734.083,-12209.19,8.946226,0,0,0,0,100,0), -- 09:38:09 +(@PATH,16,-2734.196,-12209.07,8.88302,0,0,0,0,100,0), -- 09:38:21 +(@PATH,17,-2716.481,-12205.85,9.632504,0,0,0,0,100,0), -- 09:38:31 +(@PATH,18,-2690.927,-12193.18,11.25666,0,0,0,0,100,0), -- 09:38:43 +(@PATH,19,-2673.976,-12180.86,13.79457,0,0,0,0,100,0), -- 09:38:55 +(@PATH,20,-2653.271,-12168.26,16.31552,0,0,0,0,100,0), -- 09:39:06 +(@PATH,21,-2634.485,-12156.3,19.4272,0,0,0,0,100,0), -- 09:39:16 +(@PATH,22,-2600.122,-12135.83,24.54786,0,0,0,0,100,0), -- 09:39:29 +(@PATH,23,-2580.325,-12122.89,27.64962,0,0,0,0,100,0), -- 09:39:40 +(@PATH,24,-2535.282,-12085.34,32.13941,0,0,0,0,100,0), -- 09:39:54 +(@PATH,25,-2520.165,-12073.53,32.51933,0,0,0,0,100,0), -- 09:40:14 +(@PATH,26,-2475.724,-12055.97,31.22906,0,0,0,0,100,0), -- 09:40:24 +(@PATH,27,-2463.655,-12049.68,30.5184,0,0,0,0,100,0), -- 09:40:33 +(@PATH,28,-2435.532,-12033.4,29.11832,0,0,0,0,100,0), -- 09:40:42 +(@PATH,29,-2407.538,-12018.4,27.76891,0,0,0,0,100,0), -- 09:40:53 +(@PATH,30,-2393.296,-12009.36,26.8369,0,0,0,0,100,0); -- 09:41:05 diff --git a/sql/updates/world/2016_01_24_00_world.sql b/sql/updates/world/2016_01_24_00_world.sql new file mode 100644 index 00000000000..a28b3fa25b8 --- /dev/null +++ b/sql/updates/world/2016_01_24_00_world.sql @@ -0,0 +1,62 @@ +-- +SET @guid:=134881; +DELETE FROM `creature` WHERE `guid` BETWEEN @guid+0 AND @guid+53; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@guid+0, 18927, 571, 0, 0, 1, 1, 18800, 0, 5740.71, 686.122, 643.896, 3.82227, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+1, 18927, 571, 0, 0, 1, 1, 18801, 0, 5739.36, 684.622, 644.191, 0.872665, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+2, 18927, 571, 0, 0, 1, 1, 18800, 0, 5664.31, 666.273, 652.064, 1.39626, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+3, 18927, 571, 0, 0, 1, 1, 18801, 0, 5664.37, 668.047, 652.051, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+4, 18927, 0, 0, 0, 1, 1, 18800, 0, -8364.87207, 617.860, 95.345, 2.580013, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+5, 18927, 0, 0, 0, 1, 1, 18801, 0, -8367.4511, 619.1992, 95.2811, 5.804225, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+6, 19169, 530, 0, 0, 1, 1, 18785, 0, 9375.07, -7157.06, 9.25588, 1.6057, 5, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+7, 19169, 530, 0, 0, 1, 1, 18793, 0, 9374.67, -7155.09, 9.33675, 4.95674, 5, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+8, 19169, 530, 0, 0, 1, 1, 18785, 0, 9689.33, -7345.39, 11.9144, 4.20624, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+9, 19169, 530, 0, 0, 1, 1, 18793, 0, 9687.96, -7346.09, 11.956, 1.50098, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+10, 19169, 530, 0, 0, 1, 1, 18785, 0, 9556.56, -7157.38, 14.2799, 6.10865, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+11, 19169, 530, 0, 0, 1, 1, 18793, 0, 9558.34, -7157.94, 14.3132, 2.63545, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+12, 19169, 530, 0, 0, 1, 1, 18785, 0, 9757.39, -7485.7, 13.6171, 4.76475, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+13, 19169, 530, 0, 0, 1, 1, 18793, 0, 9757.64, -7487.37, 13.6167, 1.55334, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+14, 19169, 571, 0, 0, 1, 1, 18785, 0, 5942.95, 629.234, 650.668, 1.5708, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+15, 19169, 571, 0, 0, 1, 1, 18793, 0, 5943.17, 630.894, 650.666, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+16, 19169, 571, 0, 0, 1, 1, 18785, 0, 5899.04, 532.766, 640.979, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+17, 19169, 571, 0, 0, 1, 1, 18793, 0, 5899.1, 530.898, 641.056, 1.67552, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+18, 19171, 530, 0, 0, 1, 1, 18795, 0, -4270.06, -11333.1, 5.57545, 4.67748, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+19, 19171, 530, 0, 0, 1, 1, 18794, 0, -4269.71, -11336.5, 5.80931, 1.69297, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+20, 19175, 1, 0, 0, 1, 1, 18804, 0, 1609.47, -4323.21, 2.33176, 3.34811, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+21, 19175, 1, 0, 0, 1, 1, 18805, 0, 1605.95, -4324.2, 2.19915, 0.0101724, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+22, 19177, 1, 0, 0, 1, 1, 18808, 0, 1748.94, -4497.53, 28.793, 5.47104, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+23, 19177, 1, 0, 0, 1, 1, 18808, 0, 1752.58, -4499.43, 28.2911, 2.89886, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+24, 19178, 0, 0, 0, 1, 1, 18810, 0, 1629.95, 219.238, -43.1027, 1.91079, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+25, 20102, 0, 0, 0, 1, 1, 19342, 0, -14313.5, 508.853, 8.69121, 4.27606, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+26, 20102, 0, 0, 0, 1, 1, 19339, 0, -14314, 507.109, 8.68829, 1.22173, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+27, 20102, 1, 0, 0, 1, 1, 19342, 0, -1030.97, -3678.41, 23.2479, 1.62316, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+28, 20102, 1, 0, 0, 1, 1, 19339, 0, -1031.03, -3676.2, 23.1851, 4.69494, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+29, 20102, 1, 0, 0, 1, 1, 19342, 0, -924.656, -3715.91, 9.13173, 5.06145, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+30, 20102, 1, 0, 0, 1, 1, 19339, 0, -924.099, -3718, 9.18514, 1.69297, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+31, 20102, 1, 0, 0, 1, 1, 19342, 0, 6791.34, -4747.01, 701.617, 2.21657, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+32, 20102, 1, 0, 0, 1, 1, 19339, 0, -7144.12, -3830.95, 8.50543, 3.26377, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+33, 20102, 1, 0, 0, 1, 1, 19342, 0, -7147.06, -3830.22, 8.51396, 6.05629, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+34, 20102, 1, 0, 0, 1, 1, 19339, 0, -7217.57, -3735.16, 8.45314, 2.28638, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+35, 20102, 1, 0, 0, 1, 1, 19342, 0, -7219.66, -3731.91, 8.4635, 5.13127, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+36, 20102, 1, 0, 0, 1, 1, 19339, 0, -7053.62, -3777.21, 10.2047, 5.25344, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+37, 20102, 1, 0, 0, 1, 1, 19342, 0, -7053, -3779.9, 10.1478, 1.53589, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+38, 20102, 530, 0, 0, 1, 1, 19339, 0, -1818.99, 5305.67, -12.3448, 4.03171, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+39, 20102, 530, 0, 0, 1, 1, 19342, 0, -1821.12, 5303.35, -12.3448, 0.767945, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+40, 20102, 530, 0, 0, 1, 1, 19339, 0, -1748.08, 5493.86, -12.3448, 4.2586, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+41, 20102, 530, 0, 0, 1, 1, 19342, 0, -1747.9, 5492.11, -12.3448, 1.3439, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+42, 20102, 530, 0, 0, 1, 1, 19339, 0, -1978.82, 5365.21, -12.3448, 3.63029, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+43, 20102, 530, 0, 0, 1, 1, 19342, 0, -1980.72, 5364.88, -12.3225, 0.226893, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+44, 20102, 530, 0, 0, 1, 1, 19339, 0, -1875.93, 5376.2, -12.3448, 0.820305, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+45, 20102, 530, 0, 0, 1, 1, 19342, 0, -1875.06, 5378.04, -12.3448, 4.36332, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+46, 20102, 530, 0, 0, 1, 1, 19339, 0, -2175.76, 5414.62, 50.3112, 5.60251, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+47, 20102, 530, 0, 0, 1, 1, 19342, 0, -2174.14, 5413.06, 50.3112, 2.56563, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+48, 20102, 530, 0, 0, 1, 1, 19339, 0, -1809.92, 5418.64, -12.3448, 5.55015, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+49, 20102, 530, 0, 0, 1, 1, 19342, 0, -1808.36, 5417.01, -12.3448, 2.32129, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+50, 20102, 530, 0, 0, 1, 1, 19339, 0, -1917.81, 5441.85, -12.3448, 2.35619, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+51, 20102, 530, 0, 0, 1, 1, 19342, 0, -1920.17, 5443.52, -12.3448, 5.86431, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+52, 20102, 530, 0, 0, 1, 1, 19339, 0, -1883.61, 5769.28, 129.641, 4.15388, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+53, 20102, 530, 0, 0, 1, 1, 19342, 0, -1884.14, 5766.55, 129.641, 1.309, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0); + +SET @Event=2; +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @guid+0 AND @guid+53 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @guid+0 AND @guid+53; diff --git a/sql/updates/world/2016_01_26_00_world.sql b/sql/updates/world/2016_01_26_00_world.sql new file mode 100644 index 00000000000..71fe8dc21e3 --- /dev/null +++ b/sql/updates/world/2016_01_26_00_world.sql @@ -0,0 +1,11 @@ +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28931; +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 +(28931, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Data Set 1 1 - Set Unit Flags'), +(28931, 0, 1, 6, 7, 0, 100, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Evade - Set Unit Flags'), +(28931, 0, 2, 0, 8, 0, 100, 0, 61492, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Despawn Blightblood) - Despawn'), +(28931, 0, 3, 7, 54, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Just Summoned - Set Phase 1'), +(28931, 0, 4, 0, 4, 0, 100, 1, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Agro - Set Phase 2'), +(28931, 0, 5, 6, 8, 0, 100, 0, 53103, 0, 30000, 30000, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Charm Blightblood Troll) - Set Phase 2'), +(28931, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Charm Blightblood Troll) - Set Aggresie'), +(28931, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Just Summoned - Set Passive'), +(28931, 0, 8, 0, 1, 2, 100, 1, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 29100, 10, 0, 0, 0, 0, 0, 'Blightblood Troll - OOC (Phase 2) - Set Data 3 3 on Totally Generic Bunny (JSB)'); diff --git a/sql/updates/world/2016_01_28_00_world_335.sql b/sql/updates/world/2016_01_28_00_world_335.sql new file mode 100644 index 00000000000..64b32cb2d89 --- /dev/null +++ b/sql/updates/world/2016_01_28_00_world_335.sql @@ -0,0 +1,12 @@ +-- Create new gossip_menu_option 3223 for Apothecary Dithers and 3228 for Alchemist Arbington: +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (3223,3228,3229) AND `OptionBroadcastTextID` IN (6516,6517,6518,6519,6531); +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 +(3223,0,0,"What's needed for the cauldron at Felstone Field?",6516,3,131,0,0,0,0,'',0), +(3223,1,0,"What's needed for the cauldron at Dalson's Tears?",6517,3,131,0,0,0,0,'',0), +(3223,2,0,"What's needed for the cauldron at the Writhing Haunt?",6518,3,131,0,0,0,0,'',0), +(3223,3,0,"What's needed for the cauldron at Gahrron's Withering?",6519,3,131,0,0,0,0,'',0), +(3228,0,0,"What's needed for the cauldron at Felstone Field?",6516,3,131,0,0,0,0,'',0), +(3228,1,0,"What's needed for the cauldron at Dalson's Tears?",6517,3,131,0,0,0,0,'',0), +(3228,2,0,"What's needed for the cauldron at the Writhing Haunt?",6518,3,131,0,0,0,0,'',0), +(3228,3,0,"What's needed for the cauldron at Gahrron's Withering?",6519,3,131,0,0,0,0,'',0), +(3229,0,0,"I need a Vitreous Focuser.",6531,3,131,0,0,0,0,'',0); diff --git a/sql/updates/world/2016_01_28_01_world.sql b/sql/updates/world/2016_01_28_01_world.sql new file mode 100644 index 00000000000..3c4cadb310d --- /dev/null +++ b/sql/updates/world/2016_01_28_01_world.sql @@ -0,0 +1,194 @@ +SET @ENTRY := 177226; +SET @GOSSIP_ID := 7058; +SET @NPC_TEXT_UNLEARN := 8321; +SET @NPC_TEXT_LEARN_ENG := 6; +SET @NPC_TEXT_LEARN_LW := 7; +UPDATE `gameobject_template` SET `ScriptName`='go_soothsaying_for_dummies' WHERE `entry`=@ENTRY; +-- Missing gossip texts +DELETE FROM `npc_text` WHERE `ID` IN (@NPC_TEXT_LEARN_ENG,@NPC_TEXT_LEARN_LW); +INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`BroadcastTextID0`,`lang0`,`Probability0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`BroadcastTextID1`,`lang1`,`Probability1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`BroadcastTextID2`,`lang2`,`Probability2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`BroadcastTextID3`,`lang3`,`Probability3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`BroadcastTextID4`,`lang4`,`Probability4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`BroadcastTextID5`,`lang5`,`Probability5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`BroadcastTextID6`,`lang6`,`Probability6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`BroadcastTextID7`,`lang7`,`Probability7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`VerifiedBuild`) VALUES +(@NPC_TEXT_LEARN_ENG,'Hundreds of various diagrams and schematics begin to take shape on the pages of the book. You recognize some of the diagrams while others remain foreign but familiar.','Hundreds of various diagrams and schematics begin to take shape on the pages of the book. You recognize some of the diagrams while others remain foreign but familiar.',11875,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,0), +(@NPC_TEXT_LEARN_LW,'The assortment of images, shapes, and markings come together before your eyes. The book seems to know your skill with leatherworking and offers you a choice - but be warned - you may only select one and once you have done so, may not change your mind!:','The assortment of images, shapes, and markings come together before your eyes. The book seems to know your skill with leatherworking and offers you a choice - but be warned - you may only select one and once you have done so, may not change your mind!:',11892,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,0,0); +-- Link gossip to menu +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_ID AND `text_id` IN (@NPC_TEXT_LEARN_ENG,@NPC_TEXT_LEARN_LW); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@GOSSIP_ID, @NPC_TEXT_LEARN_ENG), +(@GOSSIP_ID, @NPC_TEXT_LEARN_LW); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_ID; +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 +(@GOSSIP_ID,0,0,'I wish to unlearn my Gnomish Engineering specialization!',36143,1,0,0,0,0,1500000,'Do you really want to unlearn your Gnomish Engineering specialization and lose all associated recipes?',36144), +(@GOSSIP_ID,1,0,'I wish to unlearn my Goblin Engineering specialization!',36146,1,0,0,0,0,1500000,'Do you really want to unlearn your Goblin Engineering specialization and lose all associated recipes?',36145), +(@GOSSIP_ID,2,0,'I am 100% confident that I wish to learn in the ways of gnomish engineering.',11878,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,3,0,'I am 100% confident that I wish to learn in the ways of goblin engineering.',11876,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,4,0,'I am absolutely certain that I want to learn dragonscale leatherworking.',11889,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,5,0,'I am absolutely certain that I want to learn elemental leatherworking.',11890,1,0,0,0,0,0,'',0), +(@GOSSIP_ID,6,0,'I am absolutely certain that I want to learn tribal leatherworking.',11891,1,0,0,0,0,0,'',0); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP_ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,8,0,3639,0,0,0,0,0,'','Show this menu if player has rewarded Show your Work [Goblin]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,25,0,20219,0,0,1,0,0,'','Show this menu if player doesn''t have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,0,25,0,20222,0,0,1,0,0,'','Show this menu if player doesn''t have Goblin Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,8,0,3641,0,0,0,0,0,'','Show this menu if player has rewarded Show your Work [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,25,0,20219,0,0,1,0,0,'','Show this menu if player doesn''t have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,1,25,0,20222,0,0,1,0,0,'','Show this menu if player doesn''t have Goblin Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,8,0,3643,0,0,0,0,0,'','Show this menu if player has rewarded Show your Work [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,25,0,20219,0,0,1,0,0,'','Show this menu if player doesn''t have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_ENG,0,2,25,0,20222,0,0,1,0,0,'','Show this menu if player doesn''t have Goblin Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_LEARN_LW,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,0,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,0,25,0,20219,0,0,0,0,0,'','Show this menu if player does have Gnomish Engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,1,7,0,202,200,0,0,0,0,'','Show this menu if player has engineering'), +(14,@GOSSIP_ID,@NPC_TEXT_UNLEARN,0,1,25,0,20222,0,0,0,0,0,'','Show this menu if player does have Goblin Engineering'), +(15,@GOSSIP_ID,0,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,0,0,0,25,0,20219,0,0,0,0,0,'','Show option if player does have Gnomish Engineering'), +(15,@GOSSIP_ID,1,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,1,0,0,25,0,20222,0,0,0,0,0,'','Show option if player does have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,2,0,0,8,0,3639,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Goblin]'), +(15,@GOSSIP_ID,2,0,0,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,0,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,2,0,1,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,2,0,1,8,0,3641,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Alliance]'), +(15,@GOSSIP_ID,2,0,1,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,1,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,2,0,2,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,2,0,2,8,0,3643,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Horde]'), +(15,@GOSSIP_ID,2,0,2,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,2,0,2,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,3,0,0,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,3,0,0,8,0,3639,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Goblin]'), +(15,@GOSSIP_ID,3,0,0,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,3,0,0,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,3,0,1,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,3,0,1,8,0,3641,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Alliance]'), +(15,@GOSSIP_ID,3,0,1,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,3,0,1,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,3,0,2,7,0,202,200,0,0,0,0,'','Show option if player has engineering'), +(15,@GOSSIP_ID,3,0,2,8,0,3643,0,0,0,0,0,'','Show option if player has rewarded Show your Work [Horde]'), +(15,@GOSSIP_ID,3,0,2,25,0,20219,0,0,1,0,0,'','Show option if player doesn''t have Gnomish Engineering'), +(15,@GOSSIP_ID,3,0,2,25,0,20222,0,0,1,0,0,'','Show option if player doesn''t have Goblin Engineering'), +(15,@GOSSIP_ID,4,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(15,@GOSSIP_ID,4,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(15,@GOSSIP_ID,4,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(15,@GOSSIP_ID,4,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(15,@GOSSIP_ID,4,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(15,@GOSSIP_ID,4,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,4,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,4,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(15,@GOSSIP_ID,4,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,4,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,4,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(15,@GOSSIP_ID,5,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(15,@GOSSIP_ID,5,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(15,@GOSSIP_ID,5,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(15,@GOSSIP_ID,5,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(15,@GOSSIP_ID,5,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,5,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,5,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(15,@GOSSIP_ID,5,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,5,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,5,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,0,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,0,8,0,5141,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Alliance]'), +(15,@GOSSIP_ID,6,0,0,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,0,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,0,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,1,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,1,8,0,5143,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Alliance]'), +(15,@GOSSIP_ID,6,0,1,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,1,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,1,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,2,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,2,8,0,5144,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Alliance]'), +(15,@GOSSIP_ID,6,0,2,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,2,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,2,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,3,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,3,8,0,5145,0,0,0,0,0,'','Show this menu if player has rewarded Dragonscale Leatherworking [Horde]'), +(15,@GOSSIP_ID,6,0,3,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,3,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,3,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,4,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,4,8,0,5148,0,0,0,0,0,'','Show this menu if player has rewarded Tribal Leatherworking [Horde]'), +(15,@GOSSIP_ID,6,0,4,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,4,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,4,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'), +(15,@GOSSIP_ID,6,0,5,7,0,165,225,0,0,0,0,'','Show this menu if player has leatherworking'), +(15,@GOSSIP_ID,6,0,5,8,0,5146,0,0,0,0,0,'','Show this menu if player has rewarded Elemental Leatherworking [Horde]'), +(15,@GOSSIP_ID,6,0,5,25,0,10656,0,0,1,0,0,'','Show this menu if player doesn''t have Dragonscale Leatherworking'), +(15,@GOSSIP_ID,6,0,5,25,0,10658,0,0,1,0,0,'','Show this menu if player doesn''t have Elemental Leatherworking'), +(15,@GOSSIP_ID,6,0,5,25,0,10660,0,0,1,0,0,'','Show this menu if player doesn''t have Tribal Leatherworking'); diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index f72c1430370..1f3b78a8d56 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -27,6 +27,7 @@ #include <vector> #include <list> #include <map> +#include <ctime> // Searcher for map of structs template<typename T, class S> struct Finder diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 69a0f684a84..808491495a9 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2305,6 +2305,31 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } break; } + case SMART_ACTION_RANDOM_SOUND: + { + std::vector<uint32> sounds; + std::copy_if(e.action.randomSound.sounds.begin(), e.action.randomSound.sounds.end(), + std::back_inserter(sounds), [](uint32 sound) { return sound != 0; }); + + bool onlySelf = e.action.randomSound.onlySelf != 0; + + if (ObjectList* targets = GetTargets(e, unit)) + { + for (WorldObject* const obj : *targets) + { + if (IsUnit(obj)) + { + uint32 sound = Trinity::Containers::SelectRandomContainerElement(sounds); + obj->PlayDirectSound(sound, onlySelf ? obj->ToPlayer() : nullptr); + TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: %s (%s), sound: %u, onlyself: %s", + obj->GetName().c_str(), obj->GetGUID().ToString().c_str(), sound, onlySelf ? "true" : "false"); + } + } + + delete targets; + break; + } + } default: TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); break; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index d56983924b4..977847e60c9 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -827,6 +827,21 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (e.action.randomEmote.emote6 && !IsEmoteValid(e, e.action.randomEmote.emote6)) return false; break; + case SMART_ACTION_RANDOM_SOUND: + { + if (std::all_of(e.action.randomSound.sounds.begin(), e.action.randomSound.sounds.end(), [](uint32 sound) { return sound == 0; })) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u does not have any non-zero sound", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return false; + } + + for (uint32 sound : e.action.randomSound.sounds) + if (sound && !IsSoundValid(e, sound)) + return false; + + break; + } case SMART_ACTION_CAST: { if (!IsSpellValid(e, e.action.cast.spell)) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 91ee0a1d1e0..c0ea648462d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -43,6 +43,16 @@ struct WayPoint float z; }; +enum eSmartAI +{ + SMART_EVENT_PARAM_COUNT = 4, + SMART_ACTION_PARAM_COUNT = 6, + SMART_SUMMON_COUNTER = 0xFFFFFF, + SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF, + SMART_RANDOM_POINT = 0xFFFFFE, + SMART_ESCORT_TARGETS = 0xFFFFFF +}; + enum SMART_EVENT_PHASE { SMART_EVENT_PHASE_ALWAYS = 0, @@ -540,8 +550,9 @@ enum SMART_ACTION SMART_ACTION_GAME_EVENT_START = 112, // GameEventId SMART_ACTION_START_CLOSEST_WAYPOINT = 113, // wp1, wp2, wp3, wp4, wp5, wp6, wp7 SMART_ACTION_RISE_UP = 114, // distance + SMART_ACTION_RANDOM_SOUND = 115, // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf - SMART_ACTION_END = 115 + SMART_ACTION_END = 116 }; struct SmartAction @@ -1017,6 +1028,12 @@ struct SmartAction uint32 wp6; } closestWaypointFromList; + struct + { + std::array<uint32, SMART_ACTION_PARAM_COUNT - 1> sounds; + uint32 onlySelf; + } randomSound; + //! Note for any new future actions //! All parameters must have type uint32 @@ -1180,16 +1197,6 @@ struct SmartTarget }; }; -enum eSmartAI -{ - SMART_EVENT_PARAM_COUNT = 4, - SMART_ACTION_PARAM_COUNT = 6, - SMART_SUMMON_COUNTER = 0xFFFFFF, - SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF, - SMART_RANDOM_POINT = 0xFFFFFE, - SMART_ESCORT_TARGETS = 0xFFFFFF -}; - enum SmartScriptType { SMART_SCRIPT_TYPE_CREATURE = 0, //done diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a826f841058..e1305bcbb37 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1692,6 +1692,9 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe RoundToInterval(auraAbsorbMod, 0.0f, 100.0f); + uint32 absorbIgnoringDamage = CalculatePct(dmgInfo.GetDamage(), auraAbsorbMod); + dmgInfo.ModifyDamage(-absorbIgnoringDamage); + // We're going to call functions which can modify content of the list during iteration over it's elements // Let's copy the list so we can prevent iterator invalidation AuraEffectList vSchoolAbsorbCopy(victim->GetAuraEffectsByType(SPELL_AURA_SCHOOL_ABSORB)); @@ -1724,9 +1727,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe if (defaultPrevented) continue; - // Apply absorb mod auras - AddPct(currentAbsorb, -auraAbsorbMod); - // absorb must be smaller than the damage itself currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage())); @@ -1775,8 +1775,6 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe if (defaultPrevented) continue; - AddPct(currentAbsorb, -auraAbsorbMod); - // absorb must be smaller than the damage itself currentAbsorb = RoundToInterval(currentAbsorb, 0, int32(dmgInfo.GetDamage())); @@ -1805,6 +1803,8 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe } } + dmgInfo.ModifyDamage(absorbIgnoringDamage); + // split damage auras - only when not damaging self if (victim != this) { @@ -7099,9 +7099,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere float chance = 100.0f / procSpell->Effects[effIndex].ChainTarget; if (!roll_chance_f(chance)) return false; - - // Remove cooldown (Chain Lightning - has Category Recovery time) - GetSpellHistory()->ResetCooldown(spellId); } CastSpell(victim, spellId, true, castItem, triggeredByAura); diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 8ebc71b0146..43159828a3c 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -2274,6 +2274,8 @@ LootMethod Group::GetLootMethod() const ObjectGuid Group::GetLooterGuid() const { + if (GetLootMethod() == FREE_FOR_ALL) + return ObjectGuid::Empty; return m_looterGuid; } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index a4e7f61d83c..6a10d113553 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1103,18 +1103,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (apply) { - // Remove cooldown of spells triggered on stance change - they may share cooldown with stance spell if (spellId) - { - target->GetSpellHistory()->ResetCooldown(spellId); target->CastSpell(target, spellId, true, NULL, this); - } if (spellId2) - { - target->GetSpellHistory()->ResetCooldown(spellId2); target->CastSpell(target, spellId2, true, NULL, this); - } if (target->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 84bff4a69d6..63fe148dd93 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4701,7 +4701,7 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_NOT_READY; } - if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry)) + if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry, IsIgnoringCooldowns())) { if (m_triggeredByAuraSpell) return SPELL_FAILED_DONT_REPORT; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 40bd4e3c263..f961654f279 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -877,11 +877,6 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage); } - // 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->GetSpellHistory()->ResetCooldown(spellInfo->Id); - // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); } @@ -930,11 +925,6 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage); } - // 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->GetSpellHistory()->ResetCooldown(spellInfo->Id); - // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); } diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp index ac08f681933..adf5fc47c77 100644 --- a/src/server/game/Spells/SpellHistory.cpp +++ b/src/server/game/Spells/SpellHistory.cpp @@ -182,13 +182,13 @@ void SpellHistory::HandleCooldowns(SpellInfo const* spellInfo, uint32 itemID, Sp StartCooldown(spellInfo, itemID, spell); } -bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/) const +bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) if (IsSchoolLocked(spellInfo->GetSchoolMask())) return false; - if (HasCooldown(spellInfo->Id, itemId)) + if (HasCooldown(spellInfo->Id, itemId, ignoreCategoryCooldown)) return false; return true; @@ -465,11 +465,14 @@ void SpellHistory::ResetAllCooldowns() _spellCooldowns.clear(); } -bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/) const +bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { if (_spellCooldowns.count(spellInfo->Id) != 0) return true; + if (ignoreCategoryCooldown) + return false; + uint32 category = 0; GetCooldownDurations(spellInfo, itemId, nullptr, &category, nullptr); if (!category) @@ -478,9 +481,9 @@ bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/ return _categoryCooldowns.count(category) != 0; } -bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/) const +bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { - return HasCooldown(sSpellMgr->EnsureSpellInfo(spellId), itemId); + return HasCooldown(sSpellMgr->EnsureSpellInfo(spellId), itemId, ignoreCategoryCooldown); } uint32 SpellHistory::GetRemainingCooldown(SpellInfo const* spellInfo) const diff --git a/src/server/game/Spells/SpellHistory.h b/src/server/game/Spells/SpellHistory.h index 00c790a670d..f0a53fe130d 100644 --- a/src/server/game/Spells/SpellHistory.h +++ b/src/server/game/Spells/SpellHistory.h @@ -62,7 +62,7 @@ public: void HandleCooldowns(SpellInfo const* spellInfo, Item const* item, Spell* spell = nullptr); void HandleCooldowns(SpellInfo const* spellInfo, uint32 itemID, Spell* spell = nullptr); - bool IsReady(SpellInfo const* spellInfo, uint32 itemId = 0) const; + bool IsReady(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; template<class OwnerType> void WritePacket(WorldPacket& packet) const; @@ -105,8 +105,8 @@ public: } void ResetAllCooldowns(); - bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0) const; - bool HasCooldown(uint32 spellId, uint32 itemId = 0) const; + bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; + bool HasCooldown(uint32 spellId, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; uint32 GetRemainingCooldown(SpellInfo const* spellInfo) const; // School lockouts diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h index 39c9d9a79a7..9fce132ea7e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h @@ -59,7 +59,7 @@ enum CreatureIds enum GameObjectIds { GO_BLACK_DRAGON_EGG = 177807, - GO_BOSSGATE01 = 175946, + GO_PORTCULLIS = 176965, GO_DRAKE_RIDER_PORTCULLIS = 175185, GO_ALTERAC_VALLEY_GATE = 180424, GO_GATE = 185483, diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 83b2b45851c..a4241b16f8d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -22,7 +22,7 @@ DoorData const doorData[] = { - { GO_BOSSGATE01, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, + { GO_PORTCULLIS, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, { GO_DRAKE_RIDER_PORTCULLIS, DATA_VAELASTRAZ_THE_CORRUPT, DOOR_TYPE_PASSAGE }, { GO_ALTERAC_VALLEY_GATE, DATA_BROODLORD_LASHLAYER, DOOR_TYPE_PASSAGE }, { GO_GATE, DATA_FIREMAW, DOOR_TYPE_PASSAGE }, diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index 6cf86c3069f..b1a00f35bb5 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -41,12 +41,23 @@ EndContentData */ ## npcs_dithers_and_arbington ######*/ -#define GOSSIP_HDA1 "What does the Felstone Field Cauldron need?" -#define GOSSIP_HDA2 "What does the Dalson's Tears Cauldron need?" -#define GOSSIP_HDA3 "What does the Writhing Haunt Cauldron need?" -#define GOSSIP_HDA4 "What does the Gahrron's Withering Cauldron need?" - -#define GOSSIP_SDA1 "Thanks, i need a Vitreous Focuser" +enum DithersAndArbington +{ + GOSSIP_ITEM_ID_FELSTONE_FIELD = 0, + GOSSIP_ITEM_ID_DALSON_S_TEARS = 1, + GOSSIP_ITEM_ID_WRITHING_HAUNT = 2, + GOSSIP_ITEM_ID_GAHRRON_S_WITH = 3, + GOSSIP_MENU_ID_LETS_GET_TO_WORK = 3223, + GOSSIP_MENU_ID_VITREOUS_FOCUSER = 3229, + NPC_TEXT_OSSEOUS_AGITATORS = 3980, + NPC_TEXT_SOMATIC_INTENSIFIERS_1 = 3981, + NPC_TEXT_SOMATIC_INTENSIFIERS_2 = 3982, + NPC_TEXT_ECTOPLASMIC_RESONATORS = 3983, + NPC_TEXT_LET_S_GET_TO_WORK = 3985, + QUEST_MISSION_ACCOMPLISHED_H = 5237, + QUEST_MISSION_ACCOMPLISHED_A = 5238, + CREATE_ITEM_VITREOUS_FOCUSER = 17529 +}; class npcs_dithers_and_arbington : public CreatureScript { @@ -62,24 +73,24 @@ public: player->GetSession()->SendListInventory(creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3980, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_OSSEOUS_AGITATORS, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3981, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_SOMATIC_INTENSIFIERS_1, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3982, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_SOMATIC_INTENSIFIERS_2, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(3983, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_VITREOUS_FOCUSER, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + player->SEND_GOSSIP_MENU(NPC_TEXT_ECTOPLASMIC_RESONATORS, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+5: player->CLOSE_GOSSIP_MENU(); - creature->CastSpell(player, 17529, false); + creature->CastSpell(player, CREATE_ITEM_VITREOUS_FOCUSER, false); break; } return true; @@ -93,13 +104,13 @@ public: if (creature->IsVendor()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - if (player->GetQuestRewardStatus(5237) || player->GetQuestRewardStatus(5238)) + if (player->GetQuestRewardStatus(QUEST_MISSION_ACCOMPLISHED_H) || player->GetQuestRewardStatus(QUEST_MISSION_ACCOMPLISHED_A)) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HDA4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - player->SEND_GOSSIP_MENU(3985, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_FELSTONE_FIELD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_DALSON_S_TEARS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_WRITHING_HAUNT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_ID_LETS_GET_TO_WORK, GOSSIP_ITEM_ID_GAHRRON_S_WITH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + player->SEND_GOSSIP_MENU(NPC_TEXT_LET_S_GET_TO_WORK, creature->GetGUID()); } else player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 869a3ec3921..a7a89f44d81 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -67,7 +67,8 @@ enum Actions enum HorsemenData { - DATA_MOVEMENT_FINISHED = DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT + 1, // make sure we don't conflict with the one from naxxramas.h + DATA_HORSEMEN_IS_TIMED_KILL = Data::DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT, // inherit from naxxramas.h - this needs to be the first entry to ensure that there are no conflicts + DATA_MOVEMENT_FINISHED, DATA_DEATH_TIME }; @@ -130,7 +131,7 @@ struct boss_four_horsemen_baseAI : public BossAI return _myMovementFinished ? 1 : 0; case DATA_DEATH_TIME: return _timeDied; - case DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT: + case DATA_HORSEMEN_IS_TIMED_KILL: { uint32 minTime = 0, maxTime = 0; for (Horseman boss : horsemen) diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp index fee47aa1fa2..37584bda2ae 100644 --- a/src/server/scripts/Pet/pet_mage.cpp +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -178,6 +178,9 @@ class npc_pet_mage_mirror_image : public CreatureScript void UpdateAI(uint32 diff) override { Unit* owner = me->GetCharmerOrOwner(); + if (!owner) + return; + Unit* target = owner->getAttackerForHelper(); events.Update(diff); @@ -192,9 +195,6 @@ class npc_pet_mage_mirror_image : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - if (!owner) - return; - // assign target if image doesnt have any or the target is not actual if (!target || me->GetVictim() != target) { diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 13e7697910b..8bd4b3eb070 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1195,7 +1195,7 @@ class spell_pal_light_s_beacon : public SpellScriptLoader if (!procSpell) return; - uint32 healSpellId = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_PALADIN_HOLY_LIGHT)) ? SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1 : SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3; + uint32 healSpellId = procSpell->IsRankOf(sSpellMgr->EnsureSpellInfo(SPELL_PALADIN_HOLY_LIGHT)) ? SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1 : SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3; uint32 heal = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()); Unit* beaconTarget = GetCaster(); diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp index c5b53368bc8..3c46255a1bf 100644 --- a/src/server/scripts/World/duel_reset.cpp +++ b/src/server/scripts/World/duel_reset.cpp @@ -34,9 +34,8 @@ class DuelResetScript : public PlayerScript player1->GetSpellHistory()->SaveCooldownStateBeforeDuel(); player2->GetSpellHistory()->SaveCooldownStateBeforeDuel(); - - ResetSpellCooldowns(player1); - ResetSpellCooldowns(player2); + ResetSpellCooldowns(player1, true); + ResetSpellCooldowns(player2, true); } // Health and mana reset @@ -73,9 +72,8 @@ class DuelResetScript : public PlayerScript // Cooldown restore if (sWorld->getBoolConfig(CONFIG_RESET_DUEL_COOLDOWNS)) { - - ResetSpellCooldowns(winner); - ResetSpellCooldowns(loser); + ResetSpellCooldowns(winner, false); + ResetSpellCooldowns(loser, false); winner->GetSpellHistory()->RestoreCooldownStateAfterDuel(); loser->GetSpellHistory()->RestoreCooldownStateAfterDuel(); @@ -98,14 +96,35 @@ class DuelResetScript : public PlayerScript } } - static void ResetSpellCooldowns(Player* player) + static void ResetSpellCooldowns(Player* player, bool onStartDuel) { - // remove cooldowns on spells that have < 10 min CD and has no onHold - player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + if (onStartDuel) { - SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); - return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS && !itr->second.OnHold; - }, true); + // remove cooldowns on spells that have < 10 min CD > 30 sec and has no onHold + player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellHistory::Clock::time_point now = SpellHistory::Clock::now(); + uint32 cooldownDuration = itr->second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(itr->second.CooldownEnd - now).count() : 0; + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); + return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && !itr->second.OnHold + && cooldownDuration > 0 + && ( spellInfo->RecoveryTime - cooldownDuration ) > (MINUTE / 2) * IN_MILLISECONDS + && ( spellInfo->CategoryRecoveryTime - cooldownDuration ) > (MINUTE / 2) * IN_MILLISECONDS; + }, true); + } + else + { + // remove cooldowns on spells that have < 10 min CD and has no onHold + player->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool + { + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); + return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS + && !itr->second.OnHold; + }, true); + } // pet cooldowns if (Pet* pet = player->GetPet()) diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 4dca55d562d..867ebafe32b 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -18,27 +18,26 @@ /* ScriptData SDName: Npc_Professions -SD%Complete: 80 -SDComment: Provides learn/unlearn/relearn-options for professions. Not supported: Unlearn engineering, re-learn engineering, re-learn leatherworking. -SDCategory: NPCs +SD%Complete: 100 +SDComment: Provides learn/unlearn/relearn-options for professions. +SDCategory: NPCs/GOBs EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" +#include "GameObjectAI.h" #include "Player.h" #include "SpellInfo.h" #include "WorldSession.h" /* A few notes for future developement: -- A full implementation of gossip for GO's is required. They must have the same scripting capabilities as creatures. Basically, -there is no difference here (except that default text is chosen with `gameobject_template`.`data3` (for GO type2, different dataN for a few others) - It's possible blacksmithing still require some tweaks and adjustments due to the way we _have_ to use reputation. */ /*### -# to be removed from here (->ncp_text). This is data for database projects. +# to be removed from here (->npc_text). This is data for database projects. ###*/ #define TALK_MUST_UNLEARN_WEAPON "You must forget your weapon type specialty before I can help you. Go to Everlook in Winterspring and seek help there." @@ -153,6 +152,9 @@ enum ProfessionSpells S_LEARN_GOBLIN = 20221, S_LEARN_GNOMISH = 20220, + S_UNLEARN_GOBLIN = 68334, + S_UNLEARN_GNOMISH = 68333, + S_SPELLFIRE = 26797, S_MOONCLOTH = 26798, S_SHADOWEAVE = 26801, @@ -376,6 +378,27 @@ void ProfessionUnlearnSpells(Player* player, uint32 type) player->RemoveSpell(36075); // Wildfeather Leggings player->RemoveSpell(36078); // Living Crystal Breastplate break; + case S_UNLEARN_GOBLIN: // S_UNLEARN_GOBLIN + player->RemoveSpell(30565); // Foreman's Enchanted Helmet + player->RemoveSpell(30566); // Foreman's Reinforced Helmet + player->RemoveSpell(30563); // Goblin Rocket Launcher + player->RemoveSpell(56514); // Global Thermal Sapper Charge + player->RemoveSpell(36954); // Dimensional Ripper - Area 52 + player->RemoveSpell(23486); // Dimensional Ripper - Everlook + player->RemoveSpell(23078); // Goblin Jumper Cables XL + player->RemoveSpell(72952); // Shatter Rounds + break; + case S_UNLEARN_GNOMISH: // S_UNLEARN_GNOMISH + player->RemoveSpell(30575); // Gnomish Battle Goggles + player->RemoveSpell(30574); // Gnomish Power Goggles + player->RemoveSpell(56473); // Gnomish X-Ray Specs + player->RemoveSpell(30569); // Gnomish Poultryizer + player->RemoveSpell(30563); // Ultrasafe Transporter - Toshley's Station + player->RemoveSpell(23489); // Ultrasafe Transporter - Gadgetzan + player->RemoveSpell(23129); // World Enlarger + player->RemoveSpell(23096); // Gnomish Alarm-o-Bot + player->RemoveSpell(72953); // Iceblade Arrow + break; case S_UNLEARN_SPELLFIRE: // S_UNLEARN_SPELLFIRE player->RemoveSpell(26752); // Spellfire Belt player->RemoveSpell(26753); // Spellfire Gloves @@ -923,6 +946,76 @@ public: } }; +// Object ID - 177226 +// Book "Soothsaying for dummies" +enum SoothsayingForDummies +{ + GOSSIP_ID = 7058, + + // Engineering + OPTION_UNLEARN_GNOMISH = 0, + OPTION_UNLEARN_GOBLIN = 1, + OPTION_LEARN_GNOMISH = 2, + OPTION_LEARN_GOBLIN = 3, + + // Leatherworking + OPTION_LEARN_DRAGONSCALE = 4, + OPTION_LEARN_ELEMENTAL = 5, + OPTION_LEARN_TRIBAL = 6 +}; + +class go_soothsaying_for_dummies : public GameObjectScript +{ + public: + go_soothsaying_for_dummies() : GameObjectScript("go_soothsaying_for_dummies") { } + + struct go_soothsaying_for_dummiesAI : public GameObjectAI + { + go_soothsaying_for_dummiesAI(GameObject* go) : GameObjectAI(go) { } + + bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + if (menuId != GOSSIP_ID) + return false; + + switch (gossipListId) + { + case OPTION_UNLEARN_GNOMISH: + ProcessUnlearnAction(player, nullptr, S_UNLEARN_GNOMISH, 0, 0); // cost is handled by gossip code + break; + case OPTION_UNLEARN_GOBLIN: + ProcessUnlearnAction(player, nullptr, S_UNLEARN_GOBLIN, 0, 0); + break; + case OPTION_LEARN_GNOMISH: + player->CastSpell(player, S_LEARN_GNOMISH, true); + break; + case OPTION_LEARN_GOBLIN: + player->CastSpell(player, S_LEARN_GOBLIN, true); + break; + case OPTION_LEARN_DRAGONSCALE: + player->CastSpell(player, S_LEARN_DRAGON, true); + break; + case OPTION_LEARN_ELEMENTAL: + player->CastSpell(player, S_LEARN_ELEMENTAL, true); + break; + case OPTION_LEARN_TRIBAL: + player->CastSpell(player, S_LEARN_TRIBAL, true); + break; + default: + return false; + } + + player->CLOSE_GOSSIP_MENU(); + return true; // prevent further processing + } + }; + + GameObjectAI* GetAI(GameObject* go) const override + { + return new go_soothsaying_for_dummiesAI(go); + } +}; + /*### # start menues leatherworking ###*/ @@ -1212,6 +1305,7 @@ void AddSC_npc_professions() new npc_prof_alchemy(); new npc_prof_blacksmith(); new npc_engineering_tele_trinket(); + new go_soothsaying_for_dummies(); new npc_prof_leather(); new npc_prof_tailor(); } |