diff options
42 files changed, 1175 insertions, 130 deletions
diff --git a/sql/updates/world/2016_01_30_02_world.sql b/sql/updates/world/2016_01_30_02_world.sql new file mode 100644 index 00000000000..25325dddd7a --- /dev/null +++ b/sql/updates/world/2016_01_30_02_world.sql @@ -0,0 +1,336 @@ +SET @CGUID := 106855; + +UPDATE `creature_template` SET `unit_flags`=33536 WHERE `entry`=31029; +UPDATE `creature_template` SET `unit_flags`=33088 WHERE `entry`=31016; +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=31083; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN(31050,31030,31029,31087); +UPDATE `creature_template` SET `unit_flags`=256 WHERE `entry`=31050; +UPDATE `creature_template` SET `unit_flags`=33555200 WHERE `entry`=31077; +UPDATE `creature_template_addon` SET `auras`='0' WHERE `entry`=31083; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(4020); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 4020, 0, 0, 31, 0, 3, 31077, 0, 0, 0, 0, '', ''); + +DELETE FROM `creature` WHERE `id`=31077; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+23 AND `id` IN(31030,31077); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 31030, 571, 1, 1, 7108.229, 4428.539, 837.9857, 4.782202, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+1, 31030, 571, 1, 1, 7092.146, 4431.81, 836.628, 4.590216, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+2, 31030, 571, 1, 1, 7118.42, 4432.598, 837.9554, 4.869469, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+3, 31030, 571, 1, 1, 7083.883, 4438.466, 834.9834, 4.572762, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+4, 31030, 571, 1, 1, 7111.272, 4445.171, 838.5065, 4.834562, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) (possible waypoints or random movement) +(@CGUID+5, 31030, 571, 1, 1, 7090.73, 4446.96, 837.0818, 3.402185, 120, 0, 0), -- 31030 (Area: 210) (Auras: 4366 - 4366) +(@CGUID+6, 31077, 571, 1, 1, 7081.854, 4311.559, 871.1456, 0.8552113, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+7, 31077, 571, 1, 1, 7097.221, 4343.909, 871.829, 4.24115, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+8, 31077, 571, 1, 1, 7073.036, 4321.123, 871.2318, 4.118977, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+9, 31077, 571, 1, 1, 7058.097, 4318.563, 871.0363, 2.216568, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+10, 31077, 571, 1, 1, 7069.263, 4307.413, 870.969, 3.769911, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+11, 31077, 571, 1, 1, 7091.653, 4324.766, 871.4558, 6.161012, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+12, 31077, 571, 1, 1, 7105.507, 4331.751, 871.8961, 5.270895, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+13, 31077, 571, 1, 1, 7081.499, 4355.459, 871.8806, 3.089233, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+14, 31077, 571, 1, 1, 7107.956, 4349.756, 872.166, 3.316126, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+15, 31077, 571, 1, 1, 7060.825, 4333.478, 871.3121, 2.565634, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+16, 31077, 571, 1, 1, 7077.684, 4338.44, 871.5625, 1.710423, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+17, 31077, 571, 1, 1, 7103.35, 4365.286, 872.2496, 2.792527, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+18, 31077, 571, 1, 1, 7069.498, 4374.775, 872.0762, 3.700098, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+19, 31077, 571, 1, 1, 7056.396, 4366.188, 871.9349, 4.415683, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+20, 31077, 571, 1, 1, 7088.755, 4385.249, 872.4426, 0.4014257, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+21, 31077, 571, 1, 1, 7084.891, 4370.708, 872.1652, 3.525565, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+22, 31077, 571, 1, 1, 7065.018, 4353.726, 871.6901, 5.899213, 120, 0, 0), -- 31077 (Area: 210) +(@CGUID+23, 31077, 571, 1, 1, 7048.843, 4346.518, 871.6175, 2.984513, 120, 0, 0); -- 31077 (Area: 210) + +DELETE FROM `vehicle_template_accessory` WHERE `entry`=31050; +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES +(31050, 31016, 0, 0, '31050 - 31016', 6, 30000); -- 31050 - 31016 + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=31050; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(31050, 46598, 1, 0); + +DELETE FROM `spell_group` WHERE `id`=4307; + +DELETE FROM `spell_group_stack_rules` WHERE `group_id`=4307; + +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+5; +INSERT INTO `creature_addon` (`guid`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(@CGUID+0, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D57 +(@CGUID+1, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D58 +(@CGUID+2, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D59 +(@CGUID+3, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D5A +(@CGUID+4, 26882, 0x3000000, 0x1, '4366'), -- 31030 - 4366 - 4366 0xF130793600719D5B +(@CGUID+5, 26882, 0x3000000, 0x1, '4366'); -- 31030 - 4366 - 4366 0xF130793600719D5C + +DELETE FROM `creature_template_addon` WHERE `entry` IN(31016,31083,31029,31050); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(31016, 0, 0x0, 0x1, '61081'), -- 31016 - 61081 +(31083, 0, 0x0, 0x1, '34427'), -- 31083 - 34427 +(31029, 0, 0x3000000, 0x1, '58102'), -- 31029 - 58102 +(31050, 0, 0x3000000, 0x1, ''); -- 31050 - 4366 + +DELETE FROM `event_scripts` WHERE `id`=20108; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(20108,0,10,31029,1800000,0,7116.824,4308.362,883.3842,2.46227), -- Possessed Vardmadra 0xF130793500719D55 +(20108,0,16,14969,0,0,0,0,0,0); + +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=193028; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(31016,31029,31030,31050,31083,31087,31077); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN(31016,31029,31030,31050,31083,31087,31077); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` BETWEEN -@CGUID-5 AND -@CGUID-0; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`IN(3105000,3105001,3101600,3108300,3108301,19302800); +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`IN(193028); + +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 +(31077, 0, 0, 0, 8, 0, 100, 0, 4020, 0, 0, 0, 11, 4307, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrangs Chill target - On Spell Hit Safirdrangs Chill - Cast Safirdrangs Chill'), +(31077, 0, 1, 2, 25, 0, 100, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrangs Chill target - On Reset - Set Unit Flags'), +(31077, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrangs Chill target - On Reset - Set Faction'), +(193028, 1, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 32, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'War Horn of Jotunheim - On Data Set - Reset Go'), +(31083, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 3108300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Just Summoned Run Script'), +(31083, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 3108300, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Data Set - Start WP (Path 2)'), +(31083, 0, 2, 0, 40, 0, 100, 0, 1, 3108300, 0, 0, 80, 3108301, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Reached WP1 (Path 2) - Run Script 2'), +(31083, 0, 3, 0, 40, 0, 100, 0, 4, 31083, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 4.468043, 'The Lich King - On Reached WP4 (Path 1) - Set Orientation'), +(31083, 0, 4, 5, 40, 0, 100, 0, 2, 31083, 0, 0, 54, 35600, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Reached WP2 (Path 1) - Set Pause WP'), +(31083, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - On Reached WP2 (Path 1) - Face Possessed Vardmadra'), +(3108300, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 34427, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Cast Ethereal Teleport'), +(3108300, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script - Despawn Balargarde Elite'), +(3108300, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 53274, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Cast Icebound Visage'), +(3108300, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Face Possessed Vardmadra'), +(3108300, 9, 9, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 0 '), +(3108300, 9, 10, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Possessed Vardmadra'), +(3108300, 9, 11, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 1 '), +(3108300, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 31083, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Start WP '), +(3108300, 9, 13, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 2 on Possessed Vardmadra '), +(3108300, 9, 14, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 2 '), +(3108300, 9, 15, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 11, 42904, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Cast Cosmetic - Combat Special Attack 2H (Whirlwind SFX) '), +(3108300, 9, 16, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Possessed Vardmadra '), +(3108300, 9, 17, 0, 0, 0, 100, 0, 600, 600, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Possessed Vardmadra '), +(3108300, 9, 18, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 4, 15714, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Play sound 15714'), +(3108300, 9, 19, 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 - Script - Say Line 3 '), +(3108300, 9, 20, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Face Overthane Balargarde <Master of Jotunheim>'), +(3108300, 9, 21, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 6 on Overthane Balargarde <Master of Jotunheim> '), +(3108300, 9, 22, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 4 '), +(3108300, 9, 23, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Say Line 7 on Overthane Balargarde <Master of Jotunheim> '), +(3108300, 9, 24, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'The Lich King - Script - Set Data on Overthane Balargarde <Master of Jotunheim> '), +(3108301, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 31050, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Set Data on Safirdrang '), +(3108301, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Face Player'), +(3108301, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Say Line 5'), +(3108301, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Say Line 6'), +(3108301, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 11, 34427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Cast Ethereal Teleport'), +(3108301, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Balargarde Elite'), +(3108301, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 31050, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Safirdrang'), +(3108301, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31087, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn Lady Nightswood'), +(3108301, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 2 - Despawn'), +(31087, 0, 0, 0, 1, 0, 100, 1, 20000, 20000, 0, 0, 53, 1, 31087, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Nightswood - OOC (No repeat) - Start WP'), +(31087, 0, 1, 0, 40, 0, 100, 0, 3, 31087, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Nightswood - On Reached WP3 - Despawn'), +(31087, 0, 2, 0, 54, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Lady Nightswood - On Just Summoned - Face The Lich King'), +(31016, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Remove Flags Immune to PC'), +(31016, 0, 2, 3, 61, 0, 100, 0, 1, 1, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Home Position'), +(31016, 0, 3, 0, 61, 0, 100, 0, 1, 1, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Start Attack'), +(31016, 0, 4, 18, 4, 0, 100, 0, 0, 0, 0, 0, 42, 0, 49, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Invincibility HP'), +(31016, 0, 5, 6, 7, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 31050, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Safirdrang'), +(31016, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 11, 12, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Evade - Set Data Balargarde Elite'), +(31016, 0, 12, 22, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Evade - Despawn'), +(31016, 0, 13, 0, 38, 0, 100, 0, 2, 2, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Visible'), +(31016,0,14,0,0,3,100,0,20000,30000,25000,32000,11,60108,0,0,0,0,0,5,0,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 1 & 2) - Cast 'Heroic Leap'"), +(31016,0,15,0,9,3,100,0,0,5,60000,90000,11,61076,0,0,0,0,0,1,0,0,0,0,0,0,0,"Overthane Balargarde - On Range (Phase 1 & 2) - Cast 'Whirlwind'"), +(31016,0,16,0,0,3,100,0,20000,25000,25000,30000,11,15043,0,0,0,0,0,2,0,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 1 & 2) - Cast 'Frostbolt'"), +(31016,0,17,0,0,3,100,0,15000,25000,25000,35000,11,61085,0,0,0,0,0,5,0,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 1 & 2) - Cast 'Blizzard'"), +(31016, 0, 18, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 19, 20, 2, 0, 100, 1, 0, 80, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - At 80% HP - Say Line 4'), +(31016, 0, 20, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - At 80% HP - Set Phase 2'), +(31016, 0, 21, 0, 2, 0, 100, 1, 0, 50, 0, 0, 80, 3101600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - At 50% HP - Run Script'), +(31016, 0, 22, 28, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 23, 24, 38, 0, 100, 0, 3, 3, 0, 0, 20, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Enable Attack'), +(31016, 0, 24, 25, 61, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Enable Comabt Movement'), +(31016, 0, 25, 26, 61, 0, 100, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Turn Invincebility HP Off'), +(31016, 0, 26, 33, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Phase 1'), +(31016, 0, 27, 29, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Death - Set Data on the Lich King'), +(31016, 0, 28, 29, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 31087, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 29, 32, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 14, 62011, 193028, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Link - Set Data on War Horn of Jotunheim'), +(31016,0,31,0,0,2,100,0,3000,5000,13000,14000,45,3,3,0,0,0,0,19,31050,0,0,0,0,0,0,"Overthane Balargarde - In Combat (Phase 2) - Set Data on Safirdrang"), +(31016, 0, 32, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - On Agro - Set Phase 1'), +(31016, 0, 33, 0, 61, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Remove Bytes 1'), +(31016, 0, 34, 0, 0, 4, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - IC (Phase 3) - Face the Lich King'), +(3101600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Set Phase 3'), +(3101600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Stop Attack'), +(3101600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Disable Combat Movement'), +(3101600, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Say Line 5'), +(3101600, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 31083, 8, 0, 0, 0, 0, 8, 0, 0, 0, 7088.768, 4385.59, 872.4484, 4.468043, 'Overthane Balargarde <Master of Jotunheim> - Script - Summon The Lich King'), +(3101600, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Add Unit Flags UNIT_FLAG_NOT_SELECTABLE'), +(3101600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Set Bytes 1'), +(3101600, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Face the Lich King'), +(3101600, 9, 8, 0, 0, 0, 100, 0, 100, 100, 0, 0, 19, 33554432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Overthane Balargarde <Master of Jotunheim> - Script - Remove Unit Flags UNIT_FLAG_NOT_SELECTABLE'), +(31029, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 1, 31029, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Just Summoned - Start WP'), +(31029, 0, 1, 2, 40, 0, 100, 0, 4, 31029, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+0, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+1, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+2, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+3, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+4, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+5, 31030, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Set Data Balargarde Elite'), +(31029, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Just Summoned - Set Data Balargarde Elite'), +(31029, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 12, 31050, 8, 0, 0, 0, 0, 8, 0, 0, 0, 7097.292,4416.581,831.8486,4.485496, 'Possessed Vardmadra - On Data Set - Start WP Path 2'), +(31029, 0, 9, 10, 38, 0, 100, 0, 1, 1, 0, 0, 11, 58359, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Cast Banshees Revenge: Summon Lady Nightswood'), +(31029, 0, 10, 16, 61, 0, 100, 0, 0, 0, 0, 0, 11, 51744, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Cast Suicide (No Log)'), +(31029, 0, 12, 13, 38, 0, 100, 0, 3, 3, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Set Bytes 1'), +(31029, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 53, 1, 3102900, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Start WP (Path 2)'), +(31029, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 60, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Turn Fly Off'), +(31029, 0, 15, 0, 40, 0, 100, 0, 4, 31029, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Reached WP4 - Say Line 0'), +(31029, 0, 16, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Despawn after 15 seconds'), +(31029, 0, 17, 0, 38, 0, 100, 0, 5, 5, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Possessed Vardmadra - On Data Set - Say Line 3'), +(31050, 0, 0, 3, 54, 0, 100, 0, 0, 0, 0, 0, 53, 1, 31050, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Start WP'), +(31050, 0, 1, 0, 40, 0, 100, 0, 6, 31050, 0, 0, 80, 3105000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Reached WP6 - Run Script'), +(31050, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Despawn'), +(31050, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Set Visible'), +(31050, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 80, 3105001, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Run Script'), +(31050, 0, 5, 0, 38, 0, 100, 0, 4, 4, 0, 0, 53, 1, 3105000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Data Set - Start WP (Path 2)'), +(31050, 0, 6, 0, 40, 0, 100, 0, 4, 3105000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - On Reached WP4 (Path 2) - Despawn'), +(3105001, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script 2 - Face Player'), +(3105001, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 4020, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script 2 - Cast Safirdrangs Chill'), +(3105001, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script 2 - Face Player'), +(3105000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 1 on Overthane Balargarde'), -- 20:05:22.766 +(3105000, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 1 on Possessed Vardmadra'), -- 20:05:28.375 +(3105000, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 2 on Overthane Balargarde'), -- 20:05:34.422 +(3105000, 9, 3, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Say Line 3 on Overthane Balargarde'), -- 20:05:40.828 +(3105000, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 46598, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Eject Overthane Balargarde'), -- 20:05:22.766 +(3105000, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 31016, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Eject Overthane Balargarde'), -- 20:05:22.766 +(3105000, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Safirdrang - Script - Set Home Position'), -- 20:05:22.766 +(-@CGUID-0, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-1, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103002, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-2, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103003, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-3, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103004, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-4, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103005, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-5, 0, 0, 3, 38, 0, 100, 0, 1, 1, 0, 0, 53, 1, 3103006, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Start WP'), +(-@CGUID-0, 0, 1, 0, 40, 0, 100, 0, 5, 3103001, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-1, 0, 1, 0, 40, 0, 100, 0, 5, 3103002, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-2, 0, 1, 0, 40, 0, 100, 0, 5, 3103003, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-3, 0, 1, 0, 40, 0, 100, 0, 6, 3103004, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP6 - Set Phase 1'), +(-@CGUID-4, 0, 1, 0, 40, 0, 100, 0, 5, 3103005, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP5 - Set Phase 1'), +(-@CGUID-5, 0, 1, 0, 40, 0, 100, 0, 8, 3103006, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Reached WP8 - Set Phase 1'), +(-@CGUID-0, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-1, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-2, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-3, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-4, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-5, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Evade'), +(-@CGUID-0, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-1, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-2, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-3, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-4, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-5, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 4366, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Remove Aura'), +(-@CGUID-0, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-1, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-2, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-3, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-4, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-5, 0, 4, 0, 38, 0, 100, 0, 3, 3, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - On Data Set - Set Phase 2'), +(-@CGUID-0, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-1, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-2, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-3, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-4, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-5, 0, 5, 0, 1, 1, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31029, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 1) - Face Possessed Vardmadra'), +(-@CGUID-0, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-1, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-2, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-3, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-4, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'), +(-@CGUID-5, 0, 6, 0, 1, 2, 100, 0, 1000, 1000, 1000, 1000, 66, 0, 0, 0, 0, 0, 0, 19, 31083, 0, 0, 0, 0, 0, 0, 'Balargarde Elite - OOC (Phase 2) - Face The Lich King'); + +-- Texts +DELETE FROM `creature_text` WHERE `entry` IN(31016,31029,31083); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(31016, 1, 0, 'You dare to challenge me? You haven''t earned the right!', 14, 0, 100, 25, 0, 15633, 31597, 'Overthane Balargarde to Safirdrang'), +(31016, 2, 0, 'Vardmadra?! Did the Lich King send you personally?', 14, 0, 100, 66, 0, 15634, 31599, 'Overthane Balargarde to Possessed Vardmadra'), +(31016, 3, 0, 'Very well. I will dispatch these creatures. It is only an inconvenience. Prepare to die!', 14, 0, 100, 0, 0, 15635, 31600, 'Overthane Balargarde to Possessed Vardmadra'), +(31016, 4, 0, 'Safirdrang, let them feel the chill of Icecrown!', 14, 0, 100, 0, 0, 15636, 31601, 'Overthane Balargarde to 0'), +(31016, 5, 0, 'STOP! Kneel you fools, it''s the Lich King!', 14, 0, 100, 0, 0, 15637, 31627, 'Overthane Balargarde to The Lich King'), +(31016, 6, 0, 'But, my lord...?', 14, 0, 100, 0, 0, 15638, 31635, 'Overthane Balargarde to The Lich King'), +(31016, 7, 0, 'DIE DOGS!', 14, 0, 100, 0, 0, 15639, 31637, 'Overthane Balargarde to The Lich King'), +(31029, 0, 0, 'He''s on his way!', 14, 0, 100, 457, 0, 15643, 31595, 'Possessed Vardmadra to Player'), +(31029, 1, 0, 'Wrong, Balargarde. You WILL accept this challenge!', 14, 0, 100, 457, 0, 15644, 31598, 'Possessed Vardmadra to Overthane Balargarde'), +(31029, 2, 0, 'My lord.', 14, 0, 100, 457, 0, 15645, 31631, 'Possessed Vardmadra to The Lich King'), +(31029, 3, 0, 'But...!', 14, 0, 100, 0, 0, 15646, 31633, 'Possessed Vardmadra to The Lich King'), +(31083, 0, 0, 'Honor guard stay where you are.', 14, 0, 100, 1, 0, 15600, 31628, 'The Lich King to 0'), +(31083, 1, 0, 'Vardmadra. I''d wondered where you disappeared to. How is Iskalder?', 14, 0, 100, 6, 0, 15601, 31629, 'The Lich King to 0'), +(31083, 2, 0, 'I see through your disguise, Lady Nightswood. YOU THINK THAT YOU CAN FOOL ME?!', 14, 0, 100, 5, 0, 15602, 31632, 'The Lich King to 0'), +(31083, 3, 0, 'You may continue your combat, overthane.', 14, 0, 100, 25, 0, 15603, 31634, 'The Lich King to 0'), +(31083, 4, 0, 'But nothing! Finish them! DO NOT FAIL ME, BALARGARDE!', 14, 0, 100, 5, 0, 15604, 31636, 'The Lich King to Overthane Balargarde'), +(31083, 5, 0, 'You have bested one of my finest, but your efforts are for naught.', 14, 0, 100, 1, 0, 15605, 31693, 'The Lich King to 0'), +(31083, 6, 0, 'The frozen heart of Icecrown awaits....', 14, 0, 100, 1, 0, 15606, 31695, 'The Lich King to 0'); + +-- Waypoints +DELETE FROM `waypoints` WHERE `entry` IN(31029,31050,3103001,3103002,3103003,3103004,3103005,3103006,31087,3105000,31083,3108300,3102900); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(31029, 1, 7119.714 , 4305.82 , 883.7371, 'Possessed Vardmadra'), +(31029, 2, 7119.045 , 4306.563 , 883.7371, 'Possessed Vardmadra'), +(31029, 3, 7094.592 , 4326.246 , 879.7935, 'Possessed Vardmadra'), +(31029, 4, 7094.592 , 4326.246 , 879.7935, 'Possessed Vardmadra'), +(3102900, 1, 7094.592, 4326.246, 871.4232, 'Possessed Vardmadra (Path 2)'), +(31087, 1, 7079.599, 4301.017, 874.3533, 'Lady Nightswood'), +(31087, 2, 7082.374, 4283.685, 878.2528, 'Lady Nightswood'), +(31087, 3, 7093.269, 4251.247, 855.1418, 'Lady Nightswood'), +(31050, 1, 7097.518 ,4417.555 ,831.8486, 'Safirdrang'), +(31050, 2, 7097.292 ,4416.581 ,831.8486, 'Safirdrang'), +(31050, 3, 7097.876 ,4416.293 ,832.2352, 'Safirdrang'), +(31050, 4, 7096.67 ,4412.85 ,892.0963, 'Safirdrang'), +(31050, 5, 7083.72 ,4365.534 ,886.1511, 'Safirdrang'), +(31050, 6, 7083.72 ,4365.534 ,886.1511, 'Safirdrang'), +(3105000, 1, 7053.937, 4377.317, 901.5513, 'Safirdrang (Path 2)'), +(3105000, 2, 7020.913, 4415.733, 938.7733, 'Safirdrang (Path 2)'), +(3105000, 3, 7014.491, 4475.228, 933.1346, 'Safirdrang (Path 2)'), +(3105000, 4, 7053.163, 4507.731, 899.1902, 'Safirdrang (Path 2)'), +(3103001, 1, 7108.212 ,4429.457 ,837.8948, 'Balargarde Elite Path 1'), +(3103001, 2, 7108.282 ,4428.459 ,837.8948, 'Balargarde Elite Path 1'), +(3103001, 3, 7106.677 ,4418.644 ,890.2556, 'Balargarde Elite Path 1'), +(3103001, 4, 7105.132 ,4316.933 ,890.2556, 'Balargarde Elite Path 1'), +(3103001, 5, 7105.132 ,4316.933 ,890.2556, 'Balargarde Elite Path 1'), +(3103002, 1, 7092.335 ,4432.937 ,836.562, 'Balargarde Elite Path 2'), +(3103002, 2, 7092.213 ,4431.944 ,836.562, 'Balargarde Elite Path 2'), +(3103002, 3, 7088.707 ,4422.627 ,890.4507, 'Balargarde Elite Path 2'), +(3103002, 4, 7042.402 ,4334.195 ,890.4507, 'Balargarde Elite Path 2'), +(3103002, 5, 7042.402 ,4334.195 ,890.4507, 'Balargarde Elite Path 2'), +(3103003, 1, 7118.292 ,4433.163 ,837.6826, 'Balargarde Elite Path 3'), +(3103003, 2, 7118.448 ,4432.175 ,837.6826, 'Balargarde Elite Path 3'), +(3103003, 3, 7118.339 ,4415.652 ,891.2397, 'Balargarde Elite Path 3'), +(3103003, 4, 7116.423 ,4360.689 ,891.2397, 'Balargarde Elite Path 3'), +(3103003, 5, 7116.423 ,4360.689 ,891.2397, 'Balargarde Elite Path 3'), +(3103004, 1, 7084.022 ,4439.456 ,834.9834, 'Balargarde Elite Path 4'), +(3103004, 2, 7083.883 ,4438.466 ,834.9834, 'Balargarde Elite Path 4'), +(3103004, 3, 7084.125 ,4439.286 ,835.0841, 'Balargarde Elite Path 4'), +(3103004, 4, 7078.116 ,4422.103 ,891.0005, 'Balargarde Elite Path 4'), +(3103004, 5, 7052.648 ,4376.112 ,891.0005, 'Balargarde Elite Path 4'), +(3103004, 6, 7052.648 ,4376.112 ,891.0005, 'Balargarde Elite Path 4'), +(3103005, 1, 7111.17 ,4446.118 ,838.3093, 'Balargarde Elite Path 5'), +(3103005, 2, 7111.292 ,4445.125 ,838.3093, 'Balargarde Elite Path 5'), +(3103005, 3, 7097.193 ,4415.753 ,886.4199, 'Balargarde Elite Path 5'), +(3103005, 4, 7091.205 ,4393.473 ,886.4199, 'Balargarde Elite Path 5'), +(3103005, 5, 7091.205 ,4393.473 ,886.4199, 'Balargarde Elite Path 5'), +(3103006, 1, 7095.478 ,4449.356 ,836.9002, 'Balargarde Elite Path 6'), +(3103006, 2, 7095.443 ,4448.357 ,836.9002, 'Balargarde Elite Path 6'), +(3103006, 3, 7052.521 ,4434.108 ,838.8722, 'Balargarde Elite Path 6'), +(3103006, 4, 7003.175 ,4398.929 ,844.0392, 'Balargarde Elite Path 6'), +(3103006, 5, 6988.518 ,4335.11 ,856.9001, 'Balargarde Elite Path 6'), +(3103006, 6, 7018.119 ,4279.629 ,875.7885, 'Balargarde Elite Path 6'), +(3103006, 7, 7067.475 ,4300.513 ,892.5076, 'Balargarde Elite Path 6'), +(3103006, 8, 7067.475 ,4300.513 ,892.5076, 'Balargarde Elite Path 6'), +(31083, 1, 7092.936, 4343.906, 871.9753, 'The Lich King'), +(31083, 2, 7094.104, 4331.222, 871.5023, 'The Lich King'), +(31083, 3, 7092.936, 4343.906, 871.9331, 'The Lich King'), +(31083, 4, 7088.768, 4385.59, 872.3639, 'The Lich King'), +(3108300, 1, 7091.374, 4344.362, 871.9679, 'The Lich King Path 2'); diff --git a/sql/updates/world/2016_01_30_03_world.sql b/sql/updates/world/2016_01_30_03_world.sql new file mode 100644 index 00000000000..06c4b0826c0 --- /dev/null +++ b/sql/updates/world/2016_01_30_03_world.sql @@ -0,0 +1,136 @@ +-- Pathing for Bloodcursed Naga Entry: 17713 'TDB FORMAT' +SET @NPC := 63485; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1928.789,`position_y`=-12869.43,`position_z`=86.3521 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,-1928.789,-12869.43,86.3521,0,0,0,0,100,0), -- 09:15:24 +(@PATH,2,-1926.808,-12868.42,86.50182,0,0,0,0,100,0), -- 09:15:32 +(@PATH,3,-1915.362,-12863.29,87.48274,0,0,0,0,100,0), -- 09:15:37 +(@PATH,4,-1895.262,-12862.47,87.17763,0,0,0,0,100,0), -- 09:15:44 +(@PATH,5,-1888.151,-12870.06,85.72816,0,0,0,0,100,0), -- 09:15:50 +(@PATH,6,-1881.628,-12885.19,81.05202,0,0,0,0,100,0), -- 09:15:58 +(@PATH,7,-1882.931,-12895.07,76.1616,0,0,0,0,100,0), -- 09:16:03 +(@PATH,8,-1896.266,-12915.07,69.35283,0,0,0,0,100,0), -- 09:16:13 +(@PATH,9,-1908.279,-12924.68,66.72368,0,0,0,0,100,0), -- 09:16:19 +(@PATH,10,-1933.388,-12933.09,64.4604,0,0,0,0,100,0), -- 09:16:28 +(@PATH,11,-1947.921,-12933.25,61.58389,0,0,0,0,100,0), -- 09:16:36 +(@PATH,12,-1964.046,-12931.37,54.13368,0,0,0,0,100,0), -- 09:16:45 +(@PATH,13,-1985.971,-12921.06,46.1943,0,0,0,0,100,0), -- 09:16:54 +(@PATH,14,-2008.113,-12899.47,43.04699,0,0,0,0,100,0), -- 09:17:06 +(@PATH,15,-2009.894,-12861.36,40.86951,0,0,0,0,100,0), -- 09:17:15 +(@PATH,16,-2002.674,-12851.02,38.75832,0,0,0,0,100,0), -- 09:17:26 +(@PATH,17,-1982.862,-12829.53,35.24951,0,0,0,0,100,0), -- 09:17:38 +(@PATH,18,-1963.942,-12804.68,29.6003,0,0,0,0,100,0), -- 09:17:50 +(@PATH,19,-1947.879,-12792.53,25.92624,0,0,0,0,100,0), -- 09:18:00 +(@PATH,20,-1936.599,-12789.01,24.07749,0,0,0,0,100,0), -- 09:18:06 +(@PATH,21,-1922.057,-12789.15,21.28288,0,0,0,0,100,0), -- 09:18:15 +(@PATH,22,-1919.057,-12789.16,20.79777,0,0,0,0,100,0), -- 09:18:16 +(@PATH,23,-1910.856,-12787.78,18.40594,0,0,0,0,100,0), -- 09:18:17 +(@PATH,24,-1865.516,-12783.02,8.171058,0,0,0,0,100,0), -- 09:18:33 +(@PATH,25,-1828.088,-12780.68,5.281821,0,0,0,0,100,0), -- 09:18:47 +(@PATH,26,-1821.925,-12778.83,4.372193,0,0,0,0,100,0), -- 09:18:55 +(@PATH,27,-1808.465,-12775.22,3.311753,0,0,0,0,100,0), -- 09:19:11 +(@PATH,28,-1840.72,-12785.45,6.14157,0,0,0,0,100,0), -- 09:19:26 +(@PATH,29,-1857.858,-12783.72,7.100934,0,0,0,0,100,0), -- 09:19:32 +(@PATH,30,-1882.401,-12782.23,10.96099,0,0,0,0,100,0), -- 09:19:47 +(@PATH,31,-1918.945,-12788.79,20.91866,0,0,0,0,100,0), -- 09:20:03 +(@PATH,32,-1946.804,-12792.22,25.9647,0,0,0,0,100,0), -- 09:20:12 +(@PATH,33,-1957.95,-12798.83,28.51275,0,0,0,0,100,0), -- 09:20:18 +(@PATH,34,-1972.832,-12814.32,31.96672,0,0,0,0,100,0), -- 09:20:28 +(@PATH,35,-1998.71,-12847.28,38.17815,0,0,0,0,100,0), -- 09:20:41 +(@PATH,36,-2010.876,-12865.39,41.37553,0,0,0,0,100,0), -- 09:20:52 +(@PATH,37,-2008.604,-12898.32,42.78571,0,0,0,0,100,0), -- 09:21:03 +(@PATH,38,-1999.134,-12909.23,44.42824,0,0,0,0,100,0), -- 09:21:12 +(@PATH,39,-1977.069,-12925.9,48.62286,0,0,0,0,100,0), -- 09:21:25 +(@PATH,40,-1960.811,-12931.79,56.09935,0,0,0,0,100,0), -- 09:21:34 +(@PATH,41,-1938.755,-12933.6,63.95058,0,0,0,0,100,0), -- 09:21:43 +(@PATH,42,-1901.555,-12919.94,68.1657,0,0,0,0,100,0), -- 09:21:59 +(@PATH,43,-1892.329,-12910.31,70.69868,0,0,0,0,100,0), -- 09:22:05 +(@PATH,44,-1881.857,-12893.26,77.24239,0,0,0,0,100,0), -- 09:22:15 +(@PATH,45,-1882.775,-12878.57,83.94725,0,0,0,0,100,0), -- 09:22:21 +(@PATH,46,-1903.748,-12860.37,87.55596,0,0,0,0,100,0), -- 09:22:30 +(@PATH,47,-1921.45,-12865.49,86.99675,0,0,0,0,100,0), -- 09:22:34 +(@PATH,48,-1928.858,-12869.55,86.33754,0,0,0,0,100,0); -- 09:22:43 +-- 0x1C09E44240114C4000002500002C696C .go -1928.789 -12869.43 86.3521 + +-- Pathing for Bloodcursed Naga Entry: 17713 'TDB FORMAT' +SET @NPC := 63492; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-1796.121,`position_y`=-12771.99,`position_z`=2.181608 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,-1796.121,-12771.99,2.181608,0,0,0,0,100,0), -- 09:11:36 +(@PATH,2,-1808.465,-12775.22,3.311753,0,0,0,0,100,0), -- 09:11:53 +(@PATH,3,-1840.747,-12785.32,6.340456,0,0,0,0,100,0), -- 09:12:08 +(@PATH,4,-1857.898,-12783.8,7.071639,0,0,0,0,100,0), -- 09:12:14 +(@PATH,5,-1882.401,-12782.29,10.8823,0,0,0,0,100,0), -- 09:12:29 +(@PATH,6,-1921.118,-12788.98,21.68076,0,0,0,0,100,0), -- 09:12:45 +(@PATH,7,-1946.973,-12792.21,25.87914,0,0,0,0,100,0), -- 09:12:55 +(@PATH,8,-1957.784,-12798.69,28.39876,0,0,0,0,100,0), -- 09:13:01 +(@PATH,9,-1972.893,-12814.4,31.85242,0,0,0,0,100,0), -- 09:13:10 +(@PATH,10,-1998.871,-12847.28,38.12544,0,0,0,0,100,0), -- 09:13:23 +(@PATH,11,-2009.722,-12860.75,40.77156,0,0,0,0,100,0), -- 09:13:34 +(@PATH,12,-2008.599,-12898.46,42.77578,0,0,0,0,100,0), -- 09:13:46 +(@PATH,13,-1998.956,-12909.28,44.34562,0,0,0,0,100,0), -- 09:13:55 +(@PATH,14,-1977.231,-12926.03,48.51125,0,0,0,0,100,0), -- 09:14:07 +(@PATH,15,-1960.969,-12931.87,56.10593,0,0,0,0,100,0), -- 09:14:15 +(@PATH,16,-1938.779,-12933.54,63.8186,0,0,0,0,100,0), -- 09:14:25 +(@PATH,17,-1913.007,-12927.43,66.26051,0,0,0,0,100,0), -- 09:14:34 +(@PATH,18,-1898.97,-12917.32,68.56851,0,0,0,0,100,0), -- 09:14:42 +(@PATH,19,-1893.777,-12912.74,70.14345,0,0,0,0,100,0), -- 09:14:47 +(@PATH,20,-1881.76,-12893.25,77.15878,0,0,0,0,100,0), -- 09:14:57 +(@PATH,21,-1882.529,-12878.56,83.82611,0,0,0,0,100,0), -- 09:15:03 +(@PATH,22,-1903.836,-12860.37,87.51022,0,0,0,0,100,0), -- 09:15:11 +(@PATH,23,-1921.361,-12865.68,87.0482,0,0,0,0,100,0), -- 09:15:17 +(@PATH,24,-1928.789,-12869.43,86.3521,0,0,0,0,100,0), -- 09:15:24 +(@PATH,25,-1926.808,-12868.42,86.50182,0,0,0,0,100,0), -- 09:15:32 +(@PATH,26,-1915.362,-12863.29,87.48274,0,0,0,0,100,0), -- 09:15:37 +(@PATH,27,-1895.262,-12862.47,87.17763,0,0,0,0,100,0), -- 09:15:44 +(@PATH,28,-1888.151,-12870.06,85.72816,0,0,0,0,100,0), -- 09:15:50 +(@PATH,29,-1881.628,-12885.19,81.05202,0,0,0,0,100,0), -- 09:15:58 +(@PATH,30,-1882.931,-12895.07,76.1616,0,0,0,0,100,0), -- 09:16:03 +(@PATH,31,-1896.266,-12915.07,69.35283,0,0,0,0,100,0), -- 09:16:13 +(@PATH,32,-1908.279,-12924.68,66.72368,0,0,0,0,100,0), -- 09:16:19 +(@PATH,33,-1933.388,-12933.09,64.4604,0,0,0,0,100,0), -- 09:16:28 +(@PATH,34,-1947.921,-12933.25,61.58389,0,0,0,0,100,0), -- 09:16:36 +(@PATH,35,-1964.046,-12931.37,54.13368,0,0,0,0,100,0), -- 09:16:45 +(@PATH,36,-1985.971,-12921.06,46.1943,0,0,0,0,100,0), -- 09:16:54 +(@PATH,37,-2008.113,-12899.47,43.04699,0,0,0,0,100,0), -- 09:17:06 +(@PATH,38,-2009.894,-12861.36,40.86951,0,0,0,0,100,0), -- 09:17:15 +(@PATH,39,-2002.674,-12851.02,38.75832,0,0,0,0,100,0), -- 09:17:26 +(@PATH,40,-1982.862,-12829.53,35.24951,0,0,0,0,100,0), -- 09:17:38 +(@PATH,41,-1963.942,-12804.68,29.6003,0,0,0,0,100,0), -- 09:17:50 +(@PATH,42,-1947.879,-12792.53,25.92624,0,0,0,0,100,0), -- 09:18:00 +(@PATH,43,-1936.599,-12789.01,24.07749,0,0,0,0,100,0), -- 09:18:06 +(@PATH,44,-1922.057,-12789.15,21.28288,0,0,0,0,100,0), -- 09:18:15 +(@PATH,45,-1919.057,-12789.16,20.79777,0,0,0,0,100,0), -- 09:18:16 +(@PATH,46,-1910.856,-12787.78,18.40594,0,0,0,0,100,0), -- 09:18:17 +(@PATH,47,-1870.516,-12782.52,8.421058,0,0,0,0,100,0), -- 09:18:33 +(@PATH,48,-1828.088,-12780.68,5.281821,0,0,0,0,100,0), -- 09:18:47 +(@PATH,49,-1821.925,-12778.83,4.372193,0,0,0,0,100,0), -- 09:18:55 +(@PATH,50,-1808.465,-12775.22,3.311753,0,0,0,0,100,0); -- 09:19:11 +-- 0x1C09E44240114C4000002500002C696C .go -1796.121 -12771.99 2.181608 + +-- Bloodcursed Naga SAI +SET @ENTRY := 17713; +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,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bloodcursed Naga - On Reset - Cast 'Frost Armor'"); + +-- Pathing for Lord Xiz Entry: 17701 'TDB FORMAT' +SET @NPC := 63448; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2226.604,`position_y`=-12321.21,`position_z`=57.54912 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,-2253.258,-12320.91,57.29495,0,0,0,0,100,0), -- 09:08:14 +(@PATH,2,-2214.95,-12321.52,57.30329,0,0,0,0,100,0); -- 09:08:29 +-- 0x1C09E4424011494000002500002C576E .go -2226.604 -12321.21 57.54912 diff --git a/sql/updates/world/2016_01_30_04_world.sql b/sql/updates/world/2016_01_30_04_world.sql new file mode 100644 index 00000000000..b90e7b95810 --- /dev/null +++ b/sql/updates/world/2016_01_30_04_world.sql @@ -0,0 +1,11 @@ +-- Pathing for Mine Car Entry: 23289 'TDB FORMAT' +SET @NPC := 143599; +SET @PATH := @NPC * 10; +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, '40684'); + +-- Pathing for Mine Car Entry: 23289 'TDB FORMAT' +SET @NPC := 143600; +SET @PATH := @NPC * 10; +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, '40684'); diff --git a/sql/updates/world/2016_01_30_05_world.sql b/sql/updates/world/2016_01_30_05_world.sql new file mode 100644 index 00000000000..1e341506dfc --- /dev/null +++ b/sql/updates/world/2016_01_30_05_world.sql @@ -0,0 +1,2 @@ +UPDATE `smart_scripts` SET `event_param1`=60600, `event_param2`=60600 WHERE `entryorguid`=3101600 AND `source_type`=9 AND `id`=8 AND `link`=0; +UPDATE `smart_scripts` SET `action_param1`=2, `comment`='Overthane Balargarde <Master of Jotunheim> - On Data Set - Set Phase 2' WHERE `entryorguid`=31016 AND `source_type`=0 AND `id`=26 AND `link`=33; diff --git a/sql/updates/world/2016_01_31_00_world.sql b/sql/updates/world/2016_01_31_00_world.sql new file mode 100644 index 00000000000..f64d9182784 --- /dev/null +++ b/sql/updates/world/2016_01_31_00_world.sql @@ -0,0 +1,2 @@ +-- fix cyanigosa hitbox +UPDATE `creature_model_info` SET `BoundingRadius`=0.2325, `CombatReach`=6.25 WHERE `DisplayID`=27340; diff --git a/sql/updates/world/2016_02_02_00_world.sql b/sql/updates/world/2016_02_02_00_world.sql new file mode 100644 index 00000000000..ce561af3a61 --- /dev/null +++ b/sql/updates/world/2016_02_02_00_world.sql @@ -0,0 +1,5 @@ +-- Transition some creatures to use new CREATURE_FLAGS_EXTRA_NO_PLAYER_DAMAGE_REQ +-- 27685/27686/27531: Target creatures for Quest 12416 ("Heated Battle") +-- 24051/24063: Target creatures for Quest 11243 ("If Valgarde Falls...") +-- 28034/28035/28036: Targets for Quest 12508 ("Mopping Up") +UPDATE `creature_template` SET `flags_extra`=(`flags_extra`|2097152) WHERE `entry` IN (27685,27686,27531,24051,24063,28034,28035,28036); diff --git a/sql/updates/world/2016_02_02_01_world.sql b/sql/updates/world/2016_02_02_01_world.sql new file mode 100644 index 00000000000..f1b181a29e3 --- /dev/null +++ b/sql/updates/world/2016_02_02_01_world.sql @@ -0,0 +1,4 @@ +-- new gossip_menu for NPC 3678 Disciple of Naralex: +DELETE FROM `gossip_menu_option` WHERE `menu_id`= 201 AND `OptionBroadcastTextID`= 2662; +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 +(201, 0, 0, 'Let the event begin!', 2662, 1, 1, 0, 0, 0, 0, '', 0); diff --git a/sql/updates/world/2016_02_04_00_world.sql b/sql/updates/world/2016_02_04_00_world.sql new file mode 100644 index 00000000000..758286544af --- /dev/null +++ b/sql/updates/world/2016_02_04_00_world.sql @@ -0,0 +1,54 @@ +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID`=11921; +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID`=11926; +UPDATE `quest_template` SET `TimeAllowed`=45 WHERE `ID` IN (11922,11731); +UPDATE `quest_template` SET `TimeAllowed`=90 WHERE `ID` IN (11921,11926); +UPDATE `quest_template_addon` SET `PrevQuestId`=11731 WHERE `ID`=11921; -- More Torch Tossing(A) requires Torch Tossing +UPDATE `quest_template_addon` SET `PrevQuestId`=11922 WHERE `ID`=11926; -- More Torch Tossing(H) requires Torch Tossing +UPDATE `quest_template_addon` SET `PrevQuestId`=11731 WHERE `ID`=11657; -- Torch Catching(A) requires Torch Tossing(A) +UPDATE `quest_template_addon` SET `PrevQuestId`=11922 WHERE `ID`=11923; -- Torch Catching(H) requires Torch Tossing(H) +UPDATE `quest_template_addon` SET `PrevQuestId`=11657 WHERE `ID`=11924; -- More Torch Catching(A) requires Torch Catching +UPDATE `quest_template_addon` SET `PrevQuestId`=11923 WHERE `ID`=11925; -- More Torch Catching(H) requires Torch Catching + +DELETE FROM `creature_queststarter` WHERE `id` IN (26113,25975); +-- Master Flame/Fire Eater SAI +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (25975,26113); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN (25975,26113); +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 +(25975,0,0,0,19,0,100,0,11731,0,0,0,11,45716,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Fire Eater - On Quest \'Torch Tossing\' Accepted - Cast \'Torch Tossing Training\''), +(25975,0,1,0,19,0,100,0,11921,0,0,0,11,46630,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Fire Eater - On Quest \'More Torch Tossing\' Accepted - Cast \'Torch Tossing Practice\''), +(26113,0,0,0,19,0,100,0,11922,0,0,0,11,45716,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Flame Eater - On Quest \'Torch Tossing\' Accepted - Cast \'Torch Tossing Training\''), +(26113,0,1,0,19,0,100,0,11926,0,0,0,11,46630,2,0,0,0,0,7,0,0,0,0,0,0,0,'Master Flame Eater - On Quest \'More Torch Tossing\' Accepted - Cast \'Torch Tossing Practice\''); + +-- [DNT] Torch Tossing Target Bunny +DELETE FROM `creature_template_addon` WHERE `entry`=25535; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(25535,0,0,0,0,0,45720); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25535; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25535; +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 +(25535,0,0,0,8,0,100,0,45732,0,0,0,11,45724,2,0,0,0,0,7,0,0,0,0,0,0,0,'[DNT] Torch Tossing Target Bunny - On Spellhit \'Torch Land\' - Cast \'Brazzier Hit\''); + +-- [DNT] Torch Tossing Target Bunny Controller +UPDATE `creature_template` SET `ScriptName`='npc_torch_tossing_target_bunny_controller' WHERE `entry`=25536; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (45732); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,45732,0,0,1,0,45723,0,0,0,0,'','Spell \'Torch Toss\' can only hit targets with Aura \'Target Indicator\''); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (45719,46651,46630,45723,-46630,45716,-45716); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(45719,-46630,0,'Torch Tossing Success remove Torch Tossing Practice'), +(46651,-45716,0,'Torch Tossing Success remove Torch Tossing Training'), +(46630,45725 ,2,'Torch Tossing Practice trigger Detect Invisibility'), +(45716,45725 ,2,'Torch Tossing Training trigger Detect Invisibility'), +(46630,-45724,0,'Torch Tossing Practice remove Brazier Hit'), +(45716,-45724,0,'Torch Tossing Training remove Brazier Hit'), +(-46630,-45724,0,'Torch Tossing Practice expired - clear Braziers Hit!'), +(-45716,-45724,0,'Torch Tossing Training expired - clear Braziers Hit!'), +(45723,43313,2,'Target Indicator(duration) trigger Target Indicator(visual)'); + +-- Fix A Thief's Reward +DELETE FROM `creature_queststarter` WHERE `quest` IN (9365, 9339); +UPDATE `quest_template_addon` SET `NextQuestID`=9365 WHERE `ID` IN (9324,9325,9326,11935); +UPDATE `quest_template_addon` SET `NextQuestID`=9339 WHERE `ID` IN (9330,9331,9332,11933); diff --git a/sql/updates/world/2016_02_05_00_world.sql b/sql/updates/world/2016_02_05_00_world.sql new file mode 100644 index 00000000000..46f2b488b9a --- /dev/null +++ b/sql/updates/world/2016_02_05_00_world.sql @@ -0,0 +1,6 @@ +-- Implement "Toy Train Set" and "Wind-Up Train Wrecker" +UPDATE `gameobject_template` SET `ScriptName`="go_toy_train_set" WHERE `entry`=193963; +UPDATE `creature_template` SET `ScriptName`="npc_train_wrecker" WHERE `entry`=33404; +DELETE FROM `spell_script_names` WHERE `spell_id`=61551; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(61551,"spell_item_toy_train_set_pulse"); diff --git a/sql/updates/world/2016_02_06_00_world.sql b/sql/updates/world/2016_02_06_00_world.sql new file mode 100644 index 00000000000..d303a8b5b85 --- /dev/null +++ b/sql/updates/world/2016_02_06_00_world.sql @@ -0,0 +1,2 @@ +-- Implement Egbert's running +UPDATE creature_template SET ScriptName = "npc_egbert" WHERE entry = 23258; diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index f3c20750069..035d9af4369 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -573,6 +573,14 @@ void AuctionHouseObject::Update() if (AuctionsMap.empty()) return; + // Clear expired throttled players + for (PlayerGetAllThrottleMap::const_iterator itr = GetAllThrottleMap.begin(); itr != GetAllThrottleMap.end();) + { + if (itr->second <= curTime) + itr = GetAllThrottleMap.erase(itr); + else + ++itr; + } SQLTransaction trans = CharacterDatabase.BeginTransaction(); @@ -648,13 +656,40 @@ void AuctionHouseObject::BuildListOwnerItems(WorldPacket& data, Player* player, void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player, std::wstring const& wsearchedname, uint32 listfrom, uint8 levelmin, uint8 levelmax, uint8 usable, uint32 inventoryType, uint32 itemClass, uint32 itemSubClass, uint32 quality, - uint32& count, uint32& totalcount) + uint32& count, uint32& totalcount, bool getall) { int loc_idx = player->GetSession()->GetSessionDbLocaleIndex(); int locdbc_idx = player->GetSession()->GetSessionDbcLocale(); time_t curTime = sWorld->GetGameTime(); + PlayerGetAllThrottleMap::const_iterator itr = GetAllThrottleMap.find(player->GetGUID()); + time_t throttleTime = itr != GetAllThrottleMap.end() ? itr->second : curTime; + + if (getall && throttleTime <= curTime) + { + for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) + { + AuctionEntry* Aentry = itr->second; + // Skip expired auctions + if (Aentry->expire_time < curTime) + continue; + + Item* item = sAuctionMgr->GetAItem(Aentry->itemGUIDLow); + if (!item) + continue; + + ++count; + ++totalcount; + Aentry->BuildAuctionInfo(data, item); + + if (count >= MAX_GETALL_RETURN) + break; + } + GetAllThrottleMap[player->GetGUID()] = curTime + sWorld->getIntConfig(CONFIG_AUCTION_GETALL_DELAY); + return; + } + for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { AuctionEntry* Aentry = itr->second; @@ -744,16 +779,16 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player if (count < 50 && totalcount >= listfrom) { ++count; - Aentry->BuildAuctionInfo(data); + Aentry->BuildAuctionInfo(data, item); } ++totalcount; } } //this function inserts to WorldPacket auction's data -bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const +bool AuctionEntry::BuildAuctionInfo(WorldPacket& data, Item* sourceItem) const { - Item* item = sAuctionMgr->GetAItem(itemGUIDLow); + Item* item = (sourceItem) ? sourceItem : sAuctionMgr->GetAItem(itemGUIDLow); if (!item) { TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow); diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 4a2b79ab170..fe4b9ed07de 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -30,6 +30,7 @@ class WorldPacket; #define MIN_AUCTION_TIME (12*HOUR) #define MAX_AUCTION_ITEMS 160 +#define MAX_GETALL_RETURN 55000 enum AuctionError { @@ -90,7 +91,7 @@ struct AuctionEntry uint8 GetHouseId() const { return houseId; } uint32 GetAuctionCut() const; uint32 GetAuctionOutBid() const; - bool BuildAuctionInfo(WorldPacket & data) const; + bool BuildAuctionInfo(WorldPacket & data, Item* sourceItem = nullptr) const; void DeleteFromDB(SQLTransaction& trans) const; void SaveToDB(SQLTransaction& trans) const; bool LoadFromDB(Field* fields); @@ -110,6 +111,7 @@ class AuctionHouseObject } typedef std::map<uint32, AuctionEntry*> AuctionEntryMap; + typedef std::unordered_map<ObjectGuid, time_t> PlayerGetAllThrottleMap; uint32 Getcount() const { return AuctionsMap.size(); } @@ -133,10 +135,15 @@ class AuctionHouseObject void BuildListAuctionItems(WorldPacket& data, Player* player, std::wstring const& searchedname, uint32 listfrom, uint8 levelmin, uint8 levelmax, uint8 usable, uint32 inventoryType, uint32 itemClass, uint32 itemSubClass, uint32 quality, - uint32& count, uint32& totalcount); + uint32& count, uint32& totalcount, bool getall = false); private: AuctionEntryMap AuctionsMap; + + // Map of throttled players for GetAll, and throttle expiry time + // Stored here, rather than player object to maintain persistence after logout + PlayerGetAllThrottleMap GetAllThrottleMap; + }; class AuctionHouseMgr diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 9ab96383ed1..1942ac9d648 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -389,6 +389,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { if (TotalTime >= BG_SA_ROUNDLENGTH) { + CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); + CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); RoundScores[0].winner = Attackers; RoundScores[0].time = BG_SA_ROUNDLENGTH; TotalTime = 0; @@ -401,8 +403,6 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) ToggleTimer(); ResetObjs(); GetBgMap()->UpdateAreaDependentAuras(); - CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); - CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); return; } } @@ -410,6 +410,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { if (TotalTime >= EndRoundTimer) { + CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); + CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); RoundScores[1].time = BG_SA_ROUNDLENGTH; RoundScores[1].winner = (Attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; if (RoundScores[0].time == RoundScores[1].time) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 5f1de673294..c73350872cc 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -91,6 +91,9 @@ DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt); DBCStorage <EmotesEntry> sEmotesStore(EmotesEntryfmt); DBCStorage <EmotesTextEntry> sEmotesTextStore(EmotesTextEntryfmt); +typedef std::tuple<uint32, uint32, uint32> EmotesTextSoundKey; +static std::map<EmotesTextSoundKey, EmotesTextSoundEntry const*> sEmotesTextSoundMap; +DBCStorage <EmotesTextSoundEntry> sEmotesTextSoundStore(EmotesTextSoundEntryfmt); typedef std::map<uint32, SimpleFactionsList> FactionTeamMap; static FactionTeamMap sFactionTeamMap; @@ -338,6 +341,10 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityQualityStore, dbcPath, "DurabilityQuality.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesStore, dbcPath, "Emotes.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextStore, dbcPath, "EmotesText.dbc"); + LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextSoundStore, dbcPath, "EmotesTextSound.dbc"); + for (uint32 i = 0; i < sEmotesTextSoundStore.GetNumRows(); ++i) + if (EmotesTextSoundEntry const* entry = sEmotesTextSoundStore.LookupEntry(i)) + sEmotesTextSoundMap[EmotesTextSoundKey(entry->EmotesTextId, entry->RaceId, entry->SexId)] = entry; LoadDBC(availableDbcLocales, bad_dbc_files, sFactionStore, dbcPath, "Faction.dbc"); for (uint32 i=0; i<sFactionStore.GetNumRows(); ++i) { @@ -1060,3 +1067,8 @@ ResponseCodes ValidateName(std::string const& name, LocaleConstant locale) return CHAR_NAME_SUCCESS; } + +EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender) +{ + return sEmotesTextSoundMap[EmotesTextSoundKey(emote, race, gender)]; +} diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 41a97382b0b..14f59b04e6d 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -82,6 +82,8 @@ SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, u ResponseCodes ValidateName(std::string const& name, LocaleConstant locale); +EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender); + extern DBCStorage <AchievementEntry> sAchievementStore; extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore; extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions @@ -113,6 +115,7 @@ extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore; extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore; extern DBCStorage <EmotesEntry> sEmotesStore; extern DBCStorage <EmotesTextEntry> sEmotesTextStore; +extern DBCStorage <EmotesTextSoundEntry> sEmotesTextSoundStore; extern DBCStorage <FactionEntry> sFactionStore; extern DBCStorage <FactionTemplateEntry> sFactionTemplateStore; extern DBCStorage <GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index d1794a0ea90..2f4820d0353 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -926,6 +926,15 @@ struct EmotesTextEntry uint32 textid; }; +struct EmotesTextSoundEntry +{ + uint32 Id; // 0 + uint32 EmotesTextId; // 1 + uint32 RaceId; // 2 + uint32 SexId; // 3, 0 male / 1 female + uint32 SoundId; // 4 +}; + struct FactionEntry { uint32 ID; // 0 m_ID diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index aade6d91d61..22a01dae9f0 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -52,6 +52,7 @@ char const DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; char const DurabilityQualityfmt[] = "nf"; char const EmotesEntryfmt[] = "nxxiiix"; char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx"; +char const EmotesTextSoundEntryfmt[] = "niiii"; char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixssssssssssssssssxxxxxxxxxxxxxxxxxx"; char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii"; char const GameObjectDisplayInfofmt[] = "nsxxxxxxxxxxffffffx"; diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 20d4d1c6caf..8711cd1a5f5 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -905,6 +905,12 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u if (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING) AddUnitState(UNIT_STATE_IGNORE_PATHFINDING); + if (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK) + { + ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); + ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true); + } + return true; } @@ -1292,8 +1298,38 @@ bool Creature::CreateFromProto(ObjectGuid::LowType guidlow, uint32 entry, Creatu return true; } -bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap) +bool Creature::LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap, bool allowDuplicate) { + if (!allowDuplicate) + { + // If an alive instance of this spawnId is already found, skip creation + // If only dead instance(s) exist, despawn them and spawn a new (maybe also dead) version + const auto creatureBounds = map->GetCreatureBySpawnIdStore().equal_range(spawnId); + std::vector <Creature*> despawnList; + + if (creatureBounds.first != creatureBounds.second) + { + for (auto itr = creatureBounds.first; itr != creatureBounds.second; ++itr) + { + if (itr->second->IsAlive()) + { + TC_LOG_DEBUG("maps", "Would have spawned %u but %s already exists", spawnId, creatureBounds.first->second->GetGUID().ToString().c_str()); + return false; + } + else + { + despawnList.push_back(itr->second); + TC_LOG_DEBUG("maps", "Despawned dead instance of spawn %u (%s)", spawnId, itr->second->GetGUID().ToString().c_str()); + } + } + + for (Creature* despawnCreature : despawnList) + { + despawnCreature->AddObjectToRemoveList(); + } + } + } + CreatureData const* data = sObjectMgr->GetCreatureData(spawnId); if (!data) @@ -1605,13 +1641,29 @@ void Creature::setDeathState(DeathState s) UpdateMovementFlags(); - CreatureTemplate const* cinfo = GetCreatureTemplate(); - SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); ClearUnitState(uint32(UNIT_STATE_ALL_STATE & ~UNIT_STATE_IGNORE_PATHFINDING)); - SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); + + if (!IsPet()) + { + CreatureData const* creatureData = GetCreatureData(); + CreatureTemplate const* cinfo = GetCreatureTemplate(); + + uint32 npcflag, unit_flags, dynamicflags; + ObjectMgr::ChooseCreatureFlags(cinfo, npcflag, unit_flags, dynamicflags, creatureData); + + SetUInt32Value(UNIT_NPC_FLAGS, npcflag); + SetUInt32Value(UNIT_FIELD_FLAGS, unit_flags); + SetUInt32Value(UNIT_DYNAMIC_FLAGS, dynamicflags); + + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + + SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); + + if (creatureData && GetPhaseMask() != creatureData->phaseMask) + SetPhaseMask(creatureData->phaseMask, false); + } + Motion_Initialize(); - if (GetCreatureData() && GetPhaseMask() != GetCreatureData()->phaseMask) - SetPhaseMask(GetCreatureData()->phaseMask, false); Unit::setDeathState(ALIVE); LoadCreaturesAddon(); } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 3ee1ba7db7b..49bd854ef2f 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -39,23 +39,25 @@ class WorldSession; enum CreatureFlagsExtra { - CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group - CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility) - CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry - CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry - CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block - CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks - CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP - CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature - CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and effect attack me - CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging) - CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard - CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes - CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills - CREATURE_FLAG_EXTRA_TAUNT_DIMINISH = 0x00080000, // Taunt is a subject to diminishing returns on this creautre - CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // Creature is subject to all diminishing returns as player are - CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB) - CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000 // creature ignore pathfinding + CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group + CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility) + CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry + CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry + CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block + CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks + CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP + CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature + CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and effect attack me + CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging) + CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard + CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes + CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills + CREATURE_FLAG_EXTRA_TAUNT_DIMINISH = 0x00080000, // Taunt is a subject to diminishing returns on this creautre + CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // creature is subject to all diminishing returns as player are + CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ = 0x00200000, // creature does not need to take player damage for kill credit + CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB) + CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000, // creature ignore pathfinding + CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK = 0x40000000 // creature is immune to knockback effects }; #define CREATURE_FLAG_EXTRA_DB_ALLOWED (CREATURE_FLAG_EXTRA_INSTANCE_BIND | CREATURE_FLAG_EXTRA_CIVILIAN | \ @@ -63,7 +65,7 @@ enum CreatureFlagsExtra CREATURE_FLAG_EXTRA_NO_CRUSH | CREATURE_FLAG_EXTRA_NO_XP_AT_KILL | CREATURE_FLAG_EXTRA_TRIGGER | \ CREATURE_FLAG_EXTRA_NO_TAUNT | CREATURE_FLAG_EXTRA_WORLDEVENT | CREATURE_FLAG_EXTRA_NO_CRIT | \ CREATURE_FLAG_EXTRA_NO_SKILLGAIN | CREATURE_FLAG_EXTRA_TAUNT_DIMINISH | CREATURE_FLAG_EXTRA_ALL_DIMINISH | \ - CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING) + CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING | CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ | CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK) #define CREATURE_REGEN_INTERVAL 2 * IN_MILLISECONDS @@ -534,7 +536,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject void setDeathState(DeathState s) override; // override virtual Unit::setDeathState bool LoadFromDB(ObjectGuid::LowType spawnId, Map* map) { return LoadCreatureFromDB(spawnId, map, false); } - bool LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap = true); + bool LoadCreatureFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap = true, bool allowDuplicate = false); void SaveToDB(); // overriden in Pet virtual void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask); @@ -656,7 +658,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; } bool IsReputationGainDisabled() const { return DisableReputationGain; } - bool IsDamageEnoughForLootingAndReward() const { return m_PlayerDamageReq == 0; } + bool IsDamageEnoughForLootingAndReward() const { return (m_creatureInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ) || (m_PlayerDamageReq == 0); } void LowerPlayerDamageReq(uint32 unDamage); void ResetPlayerDamageReq() { m_PlayerDamageReq = GetHealth() / 2; } uint32 m_PlayerDamageReq; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 95e76a25763..8ce78f88906 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2406,7 +2406,7 @@ bool Player::CanInteractWithQuestGiver(Object* questGiver) return false; } -Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) +Creature* Player::GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask) { // unit checks if (!guid) @@ -2450,7 +2450,21 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) return creature; } -GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const +GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid) const +{ + if (GameObject* go = GetMap()->GetGameObject(guid)) + { + if (go->IsWithinDistInMap(this, go->GetInteractionDistance())) + return go; + + TC_LOG_DEBUG("maps", "GetGameObjectIfCanInteractWith: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal %f is allowed)", go->GetGOInfo()->name.c_str(), + go->GetGUID().GetCounter(), GetName().c_str(), GetGUID().GetCounter(), go->GetDistance(this), go->GetInteractionDistance()); + } + + return nullptr; +} + +GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const { if (GameObject* go = GetMap()->GetGameObject(guid)) { @@ -2459,12 +2473,12 @@ GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTy if (go->IsWithinDistInMap(this, go->GetInteractionDistance())) return go; - TC_LOG_DEBUG("maps", "GetGameObjectIfCanInteractWith: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name.c_str(), - go->GetGUID().GetCounter(), GetName().c_str(), GetGUID().GetCounter(), go->GetDistance(this)); + TC_LOG_DEBUG("maps", "GetGameObjectIfCanInteractWith: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal %f is allowed)", go->GetGOInfo()->name.c_str(), + go->GetGUID().GetCounter(), GetName().c_str(), GetGUID().GetCounter(), go->GetDistance(this), go->GetInteractionDistance()); } } - return NULL; + return nullptr; } bool Player::IsUnderWater() const diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e7af827e9c7..9b64023698c 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1050,8 +1050,9 @@ class Player : public Unit, public GridObject<Player> void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool welcome); bool CanInteractWithQuestGiver(Object* questGiver); - Creature* GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask); - GameObject* GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const; + Creature* GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflagmask); + GameObject* GetGameObjectIfCanInteractWith(ObjectGuid const& guid) const; + GameObject* GetGameObjectIfCanInteractWith(ObjectGuid const& guid, GameobjectTypes type) const; void ToggleAFK(); void ToggleDND(); diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index f23888cab03..efe0526baae 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -706,7 +706,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData) TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_ITEMS"); std::string searchedname; - uint8 levelmin, levelmax, usable; + uint8 levelmin, levelmax, usable, getAll; uint32 listfrom, auctionSlotID, auctionMainCategory, auctionSubCategory, quality; ObjectGuid guid; @@ -718,7 +718,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData) recvData >> auctionSlotID >> auctionMainCategory >> auctionSubCategory; recvData >> quality >> usable; - recvData.read_skip<uint8>(); // unk + recvData >> getAll; // this block looks like it uses some lame byte packing or similar... uint8 unkCnt; @@ -760,11 +760,11 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData) auctionHouse->BuildListAuctionItems(data, _player, wsearchedname, listfrom, levelmin, levelmax, usable, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, - count, totalcount); + count, totalcount, (getAll != 0 && sWorld->getIntConfig(CONFIG_AUCTION_GETALL_DELAY) != 0)); data.put<uint32>(0, count); data << (uint32) totalcount; - data << (uint32) 300; // unk 2.3.0 const? + data << (uint32) sWorld->getIntConfig(CONFIG_AUCTION_SEARCH_DELAY); SendPacket(&data); } diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index 758d5af83f7..6cd8bfc014e 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -105,7 +105,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) GameObject* go = NULL; if (guid.IsCreatureOrVehicle()) { - unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_GOSSIP); if (!unit) { TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with him.", guid.ToString().c_str()); @@ -114,10 +114,10 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) } else if (guid.IsGameObject()) { - go = _player->GetMap()->GetGameObject(guid); + go = _player->GetGameObjectIfCanInteractWith(guid); if (!go) { - TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str()); + TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.ToString().c_str()); return; } } diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index f272cd4a034..1e00c25a0c3 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -292,7 +292,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData) ObjectGuid guid; recvData >> guid; - Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_GOSSIP); if (!unit) { TC_LOG_DEBUG("network", "WORLD: HandleGossipHelloOpcode - %s not found or you can not interact with him.", guid.ToString().c_str()); @@ -334,47 +334,6 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData) unit->AI()->sGossipHello(_player); } -/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData) -{ - TC_LOG_DEBUG("network", "WORLD: CMSG_GOSSIP_SELECT_OPTION"); - - uint32 option; - uint32 unk; - uint64 guid; - std::string code = ""; - - recvData >> guid >> unk >> option; - - if (_player->PlayerTalkClass->GossipOptionCoded(option)) - { - TC_LOG_DEBUG("network", "reading string"); - recvData >> code; - TC_LOG_DEBUG("network", "string read: %s", code.c_str()); - } - - Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); - if (!unit) - { - TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); - return; - } - - // remove fake death - if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) - GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - - if (!code.empty()) - { - if (!Script->GossipSelectWithCode(_player, unit, _player->PlayerTalkClass->GossipOptionSender (option), _player->PlayerTalkClass->GossipOptionAction(option), code.c_str())) - unit->OnGossipSelect (_player, option); - } - else - { - if (!Script->OnGossipSelect (_player, unit, _player->PlayerTalkClass->GossipOptionSender (option), _player->PlayerTalkClass->GossipOptionAction (option))) - unit->OnGossipSelect (_player, option); - } -}*/ - void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE"); diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index 002adc19a86..a7db18deddb 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -75,7 +75,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket& recvData) TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_HELLO %s", guid.ToString().c_str()); - Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); + Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_QUESTGIVER); if (!creature) { TC_LOG_DEBUG("network", "WORLD: HandleQuestgiverHelloOpcode - %s not found or you can't interact with him.", diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 0943d9db26a..6be1fd30ae3 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -268,11 +268,8 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData) TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_USE Message [%s]", guid.ToString().c_str()); - if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid)) + if (GameObject* obj = GetPlayer()->GetGameObjectIfCanInteractWith(guid)) { - if (!obj->IsWithinDistInMap(GetPlayer(), obj->GetInteractionDistance())) - return; - // ignore for remote control state if (GetPlayer()->m_mover != GetPlayer()) if (!(GetPlayer()->IsOnVehicle(GetPlayer()->m_mover) || GetPlayer()->IsMounted()) && !obj->GetGOInfo()->IsUsableMounted()) @@ -293,17 +290,13 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket) if (_player->m_mover != _player) return; - GameObject* go = GetPlayer()->GetMap()->GetGameObject(guid); - if (!go) - return; - - if (!go->IsWithinDistInMap(_player, INTERACTION_DISTANCE)) - return; - - if (go->AI()->GossipHello(_player)) - return; + if (GameObject* go = GetPlayer()->GetGameObjectIfCanInteractWith(guid)) + { + if (go->AI()->GossipHello(_player)) + return; - _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, go->GetEntry()); + _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_GAMEOBJECT, go->GetEntry()); + } } void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 52b80ce92ab..b5c6f37b14e 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -185,6 +185,9 @@ namespace Trinity } xpMod *= isBattleGround ? sWorld->getRate(RATE_XP_BG_KILL) : sWorld->getRate(RATE_XP_KILL); + if (creature && creature->m_PlayerDamageReq) // if players dealt less than 50% of the damage and were credited anyway (due to CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), scale XP gained appropriately (linear scaling) + xpMod *= 1.0f - 2.0f*creature->m_PlayerDamageReq / creature->GetMaxHealth(); + gain = uint32(gain * xpMod); } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 1b7e0f1ea0d..1ca5df6b327 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1487,7 +1487,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b { // 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->GetSpellHistory()->GetRemainingCooldown(aura->GetSpellInfo()) <= 11) + if (caster->GetSpellHistory()->GetRemainingCooldown(aura->GetSpellInfo()) <= 11 * IN_MILLISECONDS) break; } else // and add if needed diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e0b9bf53b63..ff8fc4539ff 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2944,6 +2944,7 @@ void SpellMgr::LoadSpellInfoCorrections() case 53096: // Quetz'lun's Judgment case 70743: // AoD Special case 70614: // AoD Special - Vegard + case 4020: // Safirdrang's Chill spellInfo->MaxAffectedTargets = 1; break; case 42436: // Drink! (Brewfest) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 09cc9180a57..289a4d47666 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -575,6 +575,13 @@ void World::LoadConfigSettings(bool reload) m_bool_configs[CONFIG_ADDON_CHANNEL] = sConfigMgr->GetBoolDefault("AddonChannel", true); m_bool_configs[CONFIG_CLEAN_CHARACTER_DB] = sConfigMgr->GetBoolDefault("CleanCharacterDB", false); m_int_configs[CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS] = sConfigMgr->GetIntDefault("PersistentCharacterCleanFlags", 0); + m_int_configs[CONFIG_AUCTION_GETALL_DELAY] = sConfigMgr->GetIntDefault("Auction.GetAllScanDelay", 900); + m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] = sConfigMgr->GetIntDefault("Auction.SearchDelay", 300); + if (m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] < 100 || m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] > 10000) + { + TC_LOG_ERROR("server.loading", "Auction.SearchDelay (%i) must be between 100 and 10000. Using default of 300ms", m_int_configs[CONFIG_AUCTION_SEARCH_DELAY]); + m_int_configs[CONFIG_AUCTION_SEARCH_DELAY] = 300; + } m_int_configs[CONFIG_CHAT_CHANNEL_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Channel", 1); m_int_configs[CONFIG_CHAT_WHISPER_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Whisper", 1); m_int_configs[CONFIG_CHAT_SAY_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Say", 1); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index a624fd6e6a7..00b244c9efb 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -356,6 +356,8 @@ enum WorldIntConfigs CONFIG_CHARTER_COST_ARENA_5v5, CONFIG_NO_GRAY_AGGRO_ABOVE, CONFIG_NO_GRAY_AGGRO_BELOW, + CONFIG_AUCTION_GETALL_DELAY, + CONFIG_AUCTION_SEARCH_DELAY, INT_CONFIG_VALUE_COUNT }; diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index daf4fe5866a..fbd199b99db 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -43,7 +43,7 @@ struct EnumName #define CREATE_NAMED_ENUM(VALUE) { VALUE, STRINGIZE(VALUE) } #define NPCFLAG_COUNT 24 -#define FLAGS_EXTRA_COUNT 16 +#define FLAGS_EXTRA_COUNT 19 EnumName<NPCFlags, int32> const npcFlagTexts[NPCFLAG_COUNT] = { @@ -162,7 +162,10 @@ EnumName<CreatureFlagsExtra> const flagsExtra[FLAGS_EXTRA_COUNT] = CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_SKILLGAIN), CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_TAUNT_DIMINISH), CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_ALL_DIMINISH), - CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_DUNGEON_BOSS) + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ), + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_DUNGEON_BOSS), + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING), + CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK) }; class npc_commandscript : public CommandScript diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 622c8f0de01..447dbcd67f9 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -132,7 +132,10 @@ public: ## at_map_chamber ######*/ -#define QUEST_HIDDEN_CHAMBER 2240 +enum MapChamber +{ + QUEST_HIDDEN_CHAMBER = 2240 +}; class AreaTrigger_at_map_chamber : public AreaTriggerScript { diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 63c56e29414..29a754d5895 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -58,6 +58,10 @@ enum Enums SAY_FAREWELL = 5, SAY_ATTACKED = 11, + GOSSIP_OPTION_LET_EVENT_BEGIN = 201, + NPC_TEXT_NARALEX_SLEEPS_AGAIN = 698, + NPC_TEXT_FANGLORDS_ARE_DEAD = 699, + SPELL_MARK_OF_THE_WILD_RANK_2 = 5232, SPELL_SERPENTINE_CLEANSING = 6270, SPELL_NARALEXS_AWAKENING = 6271, @@ -70,10 +74,6 @@ enum Enums NPC_MUTANUS_THE_DEVOURER = 3654, }; -#define GOSSIP_ID_START_1 698 //Naralex sleeps again! -#define GOSSIP_ID_START_2 699 //The fanglords are dead! -#define GOSSIP_ITEM_NARALEX "Let the event begin!" - class npc_disciple_of_naralex : public CreatureScript { public: @@ -116,8 +116,8 @@ public: if ((instance->GetData(TYPE_LORD_COBRAHN) == DONE) && (instance->GetData(TYPE_LORD_PYTHAS) == DONE) && (instance->GetData(TYPE_LADY_ANACONDRA) == DONE) && (instance->GetData(TYPE_LORD_SERPENTIS) == DONE)) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NARALEX, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(GOSSIP_ID_START_2, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_OPTION_LET_EVENT_BEGIN, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(NPC_TEXT_FANGLORDS_ARE_DEAD, creature->GetGUID()); if (!instance->GetData(TYPE_NARALEX_YELLED)) { @@ -127,7 +127,7 @@ public: } else { - player->SEND_GOSSIP_MENU(GOSSIP_ID_START_1, creature->GetGUID()); + player->SEND_GOSSIP_MENU(NPC_TEXT_NARALEX_SLEEPS_AGAIN, creature->GetGUID()); } } return true; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index dbb00fa252e..fd945db4604 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -979,6 +979,9 @@ class go_celestial_planetarium_access : public GameObjectScript bool GossipHello(Player* player) override { + if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE)) + return false; + bool hasKey = true; if (LockEntry const* lock = sLockStore.LookupEntry(go->GetGOInfo()->goober.lockId)) { 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 c77f5b2bce3..01c4704592f 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -1186,6 +1186,7 @@ class npc_brann_bronzebeard_ulduar_intro : public CreatureScript { if (menuId == GOSSIP_MENU_BRANN_BRONZEBEARD && gossipListId == GOSSIP_OPTION_BRANN_BRONZEBEARD) { + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); player->PlayerTalkClass->SendCloseGossip(); if (Creature* loreKeeper = _instance->GetCreature(DATA_LORE_KEEPER_OF_NORGANNON)) loreKeeper->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); @@ -1238,6 +1239,7 @@ class npc_lorekeeper : public CreatureScript { if (menuId == GOSSIP_MENU_LORE_KEEPER && gossipListId == GOSSIP_OPTION_LORE_KEEPER) { + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); player->PlayerTalkClass->SendCloseGossip(); _instance->instance->LoadGrid(364, -16); // make sure leviathan is loaded @@ -1250,6 +1252,7 @@ class npc_lorekeeper : public CreatureScript { if (Creature* brann = _instance->GetCreature(DATA_BRANN_BRONZEBEARD_INTRO)) { + brann->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); delorah->GetMotionMaster()->MovePoint(0, brann->GetPositionX() - 4, brann->GetPositionY(), brann->GetPositionZ()); /// @todo delorah->AI()->Talk(xxxx, brann->GetGUID()); when reached at branz } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 820332791c8..4d6aa046d10 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -1634,8 +1634,11 @@ class go_mimiron_hardmode_button : public GameObjectScript public: go_mimiron_hardmode_button() : GameObjectScript("go_mimiron_hardmode_button") { } - bool OnGossipHello(Player* /*player*/, GameObject* go) + bool OnGossipHello(Player* /*player*/, GameObject* go) override { + if (go->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE)) + return false; + InstanceScript* instance = go->GetInstanceScript(); if (!instance) return false; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index b72bcbecdac..86a4a9caf3a 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -110,30 +110,24 @@ class boss_ingvar_the_plunderer : public CreatureScript { if (me->GetEntry() != NPC_INGVAR) me->UpdateEntry(NPC_INGVAR); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); _Reset(); - events.SetPhase(PHASE_HUMAN); - - events.ScheduleEvent(EVENT_CLEAVE, urand(6, 12)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18, 21)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_ENRAGE, urand(7, 14)*IN_MILLISECONDS, 0, PHASE_HUMAN); - events.ScheduleEvent(EVENT_SMASH, urand(12, 17)*IN_MILLISECONDS, 0, PHASE_HUMAN); } void DamageTaken(Unit* /*doneBy*/, uint32& damage) override { if (damage >= me->GetHealth() && events.IsInPhase(PHASE_HUMAN)) { + events.SetPhase(PHASE_EVENT); + events.ScheduleEvent(EVENT_SUMMON_BANSHEE, 3 * IN_MILLISECONDS, 0, PHASE_EVENT); + me->RemoveAllAuras(); + me->StopMoving(); DoCast(me, SPELL_INGVAR_FEIGN_DEATH, true); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); - events.SetPhase(PHASE_EVENT); - events.ScheduleEvent(EVENT_SUMMON_BANSHEE, 3 * IN_MILLISECONDS, 0, PHASE_EVENT); - Talk(SAY_DEATH); } @@ -152,13 +146,28 @@ class boss_ingvar_the_plunderer : public CreatureScript me->RemoveAura(SPELL_INGVAR_FEIGN_DEATH); DoCast(me, SPELL_INGVAR_TRANSFORM, true); me->UpdateEntry(NPC_INGVAR_UNDEAD); - events.ScheduleEvent(EVENT_JUST_TRANSFORMED, 2 * IN_MILLISECONDS, 0, PHASE_EVENT); + events.ScheduleEvent(EVENT_JUST_TRANSFORMED, IN_MILLISECONDS / 2, 0, PHASE_EVENT); } void EnterCombat(Unit* /*who*/) override { + if (events.IsInPhase(PHASE_EVENT) || events.IsInPhase(PHASE_UNDEAD)) // ingvar gets multiple EnterCombat calls + return; _EnterCombat(); + Talk(SAY_AGGRO); + events.SetPhase(PHASE_HUMAN); + events.ScheduleEvent(EVENT_CLEAVE, urand(6, 12)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_STAGGERING_ROAR, urand(18, 21)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_ENRAGE, urand(7, 14)*IN_MILLISECONDS, 0, PHASE_HUMAN); + events.ScheduleEvent(EVENT_SMASH, urand(12, 17)*IN_MILLISECONDS, 0, PHASE_HUMAN); + } + + void AttackStart(Unit* who) override + { + if (events.IsInPhase(PHASE_EVENT)) // prevent ingvar from beginning to attack/chase during transition + return; + BossAI::AttackStart(who); } void JustDied(Unit* /*killer*/) override @@ -171,7 +180,7 @@ class boss_ingvar_the_plunderer : public CreatureScript { events.SetPhase(PHASE_UNDEAD); events.ScheduleEvent(EVENT_DARK_SMASH, urand(14, 18)*IN_MILLISECONDS, 0, PHASE_UNDEAD); - events.ScheduleEvent(EVENT_DREADFUL_ROAR, urand(18, 22)*IN_MILLISECONDS, 0, PHASE_UNDEAD); + events.ScheduleEvent(EVENT_DREADFUL_ROAR, 0, 0, PHASE_UNDEAD); events.ScheduleEvent(EVENT_WOE_STRIKE, urand(10, 14)*IN_MILLISECONDS, 0, PHASE_UNDEAD); events.ScheduleEvent(EVENT_SHADOW_AXE, 30*IN_MILLISECONDS, 0, PHASE_UNDEAD); } @@ -214,9 +223,17 @@ class boss_ingvar_the_plunderer : public CreatureScript events.ScheduleEvent(EVENT_SMASH, urand(12, 16)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_JUST_TRANSFORMED: + ScheduleSecondPhase(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + if (Unit* target = me->getThreatManager().getHostilTarget()) + AttackStart(target); + else + { + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + return; + } + Talk(SAY_AGGRO); DoZoneInCombat(); - ScheduleSecondPhase(); return; case EVENT_SUMMON_BANSHEE: DoCast(me, SPELL_SUMMON_BANSHEE); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 9475da91a77..0abff255e4b 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -29,6 +29,7 @@ #include "SpellAuraEffects.h" #include "SkillDiscovery.h" #include "Battleground.h" +#include "DBCStores.h" // Generic script for handling item dummy effects which trigger another spell. class spell_item_trigger_spell : public SpellScriptLoader @@ -2630,6 +2631,43 @@ public: } }; +class spell_item_toy_train_set_pulse : public SpellScriptLoader +{ +public: + spell_item_toy_train_set_pulse() : SpellScriptLoader("spell_item_toy_train_set_pulse") { } + + class spell_item_toy_train_set_pulse_SpellScript : public SpellScript + { + PrepareSpellScript(spell_item_toy_train_set_pulse_SpellScript); + + void HandleDummy(SpellEffIndex /*index*/) + { + if (Player* target = GetHitUnit()->ToPlayer()) + { + target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN); + if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->getRace(), target->getGender())) + target->PlayDistanceSound(soundEntry->SoundId); + } + } + + void HandleTargets(std::list<WorldObject*>& targetList) + { + targetList.remove_if([](WorldObject const* obj) { return obj->GetTypeId() != TYPEID_PLAYER; }); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_item_toy_train_set_pulse_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_item_toy_train_set_pulse_SpellScript::HandleTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_item_toy_train_set_pulse_SpellScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -2698,4 +2736,5 @@ void AddSC_item_spell_scripts() new spell_item_chicken_cover(); new spell_item_muisek_vessel(); new spell_item_greatmothers_soulcatcher(); + new spell_item_toy_train_set_pulse(); } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index ef4a2b0e32f..b90839f50c5 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -41,6 +41,7 @@ go_tadpole_cage go_amberpine_outhouse go_hive_pod go_veil_skith_cage +go_toy_train_set EndContentData */ #include "ScriptMgr.h" @@ -1196,6 +1197,48 @@ public: } }; + +enum ToyTrainSpells +{ + SPELL_TOY_TRAIN_PULSE = 61551, +}; + +class go_toy_train_set : public GameObjectScript +{ + public: + go_toy_train_set() : GameObjectScript("go_toy_train_set") { } + + struct go_toy_train_setAI : public GameObjectAI + { + go_toy_train_setAI(GameObject* go) : GameObjectAI(go), _pulseTimer(3 * IN_MILLISECONDS) { } + + void UpdateAI(uint32 diff) override + { + if (diff < _pulseTimer) + _pulseTimer -= diff; + else + { + go->CastSpell(nullptr, SPELL_TOY_TRAIN_PULSE, true); + _pulseTimer = 6 * IN_MILLISECONDS; + } + } + + // triggered on wrecker'd + void DoAction(int32 /*action*/) override + { + go->Delete(); + } + + private: + uint32 _pulseTimer; + }; + + GameObjectAI* GetAI(GameObject* go) const override + { + return new go_toy_train_setAI(go); + } +}; + void AddSC_go_scripts() { new go_cat_figurine(); @@ -1231,4 +1274,5 @@ void AddSC_go_scripts() new go_veil_skith_cage(); new go_frostblade_shrine(); new go_midsummer_bonfire(); + new go_toy_train_set(); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 16b95e555bb..40f9e63f4f6 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -38,6 +38,7 @@ npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage npc_locksmith 75% list of keys needs to be confirmed npc_firework 100% NPC's summoned by rockets and rocket clusters, for making them cast visual +npc_train_wrecker 100% Wind-Up Train Wrecker that kills train set EndContentData */ #include "ScriptMgr.h" @@ -56,6 +57,7 @@ EndContentData */ #include "SpellHistory.h" #include "SpellAuras.h" #include "Pet.h" +#include "PetAI.h" #include "CreatureTextMgr.h" #include "SmartAI.h" @@ -519,6 +521,67 @@ public: }; /*###### +## npc_torch_tossing_target_bunny_controller +######*/ + +enum TorchTossingTarget +{ + NPC_TORCH_TOSSING_TARGET_BUNNY = 25535, + SPELL_TARGET_INDICATOR = 45723 +}; + +class npc_torch_tossing_target_bunny_controller : public CreatureScript +{ +public: + npc_torch_tossing_target_bunny_controller() : CreatureScript("npc_torch_tossing_target_bunny_controller") { } + + struct npc_torch_tossing_target_bunny_controllerAI : public ScriptedAI + { + npc_torch_tossing_target_bunny_controllerAI(Creature* creature) : ScriptedAI(creature) + { + _targetTimer = 3000; + } + + ObjectGuid DoSearchForTargets(ObjectGuid lastTargetGUID) + { + std::list<Creature*> targets; + me->GetCreatureListWithEntryInGrid(targets, NPC_TORCH_TOSSING_TARGET_BUNNY, 60.0f); + targets.remove_if([lastTargetGUID](Creature* creature) { return creature->GetGUID() == lastTargetGUID; }); + + if (!targets.empty()) + { + _lastTargetGUID = Trinity::Containers::SelectRandomContainerElement(targets)->GetGUID(); + + return _lastTargetGUID; + } + return ObjectGuid::Empty; + } + + void UpdateAI(uint32 diff) override + { + if (_targetTimer < diff) + { + if (Unit* target = ObjectAccessor::GetUnit(*me, DoSearchForTargets(_lastTargetGUID))) + target->CastSpell(target, SPELL_TARGET_INDICATOR, true); + + _targetTimer = 3000; + } + else + _targetTimer -= diff; + } + + private: + uint32 _targetTimer; + ObjectGuid _lastTargetGUID; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_torch_tossing_target_bunny_controllerAI(creature); + } +}; + +/*###### ## Triage quest ######*/ @@ -2387,12 +2450,198 @@ class npc_stable_master : public CreatureScript } }; +enum TrainWrecker +{ + GO_TOY_TRAIN = 193963, + SPELL_TOY_TRAIN_PULSE = 61551, + SPELL_WRECK_TRAIN = 62943, + ACTION_WRECKED = 1, + EVENT_DO_JUMP = 1, + EVENT_DO_FACING = 2, + EVENT_DO_WRECK = 3, + EVENT_DO_DANCE = 4, + MOVEID_CHASE = 1, + MOVEID_JUMP = 2 +}; +class npc_train_wrecker : public CreatureScript +{ + public: + npc_train_wrecker() : CreatureScript("npc_train_wrecker") { } + + struct npc_train_wreckerAI : public NullCreatureAI + { + npc_train_wreckerAI(Creature* creature) : NullCreatureAI(creature), _isSearching(true), _nextAction(0), _timer(1 * IN_MILLISECONDS) { } + + GameObject* VerifyTarget() const + { + if (GameObject* target = ObjectAccessor::GetGameObject(*me, _target)) + return target; + me->HandleEmoteCommand(EMOTE_ONESHOT_RUDE); + me->DespawnOrUnsummon(3 * IN_MILLISECONDS); + return nullptr; + } + + void UpdateAI(uint32 diff) override + { + if (_isSearching) + { + if (diff < _timer) + _timer -= diff; + else + { + if (GameObject* target = me->FindNearestGameObject(GO_TOY_TRAIN, 15.0f)) + { + _isSearching = false; + _target = target->GetGUID(); + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(MOVEID_CHASE, target->GetNearPosition(3.0f, target->GetAngle(me))); + } + else + _timer = 3 * IN_MILLISECONDS; + } + } + else + { + switch (_nextAction) + { + case EVENT_DO_JUMP: + if (GameObject* target = VerifyTarget()) + me->GetMotionMaster()->MoveJump(*target, 5.0, 10.0, MOVEID_JUMP); + _nextAction = 0; + break; + case EVENT_DO_FACING: + if (GameObject* target = VerifyTarget()) + { + me->SetFacingTo(target->GetOrientation()); + me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H); + _timer = 1.5 * IN_MILLISECONDS; + _nextAction = EVENT_DO_WRECK; + } + else + _nextAction = 0; + break; + case EVENT_DO_WRECK: + if (diff < _timer) + { + _timer -= diff; + break; + } + if (GameObject* target = VerifyTarget()) + { + me->CastSpell(target, SPELL_WRECK_TRAIN, false); + target->AI()->DoAction(ACTION_WRECKED); + _timer = 2 * IN_MILLISECONDS; + _nextAction = EVENT_DO_DANCE; + } + else + _nextAction = 0; + break; + case EVENT_DO_DANCE: + if (diff < _timer) + { + _timer -= diff; + break; + } + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_DANCE); + me->DespawnOrUnsummon(5 * IN_MILLISECONDS); + _nextAction = 0; + break; + default: + break; + } + } + } + + void MovementInform(uint32 /*type*/, uint32 id) override + { + if (id == MOVEID_CHASE) + _nextAction = EVENT_DO_JUMP; + else if (id == MOVEID_JUMP) + _nextAction = EVENT_DO_FACING; + } + + private: + bool _isSearching; + uint8 _nextAction; + uint32 _timer; + ObjectGuid _target; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_train_wreckerAI(creature); + } +}; + +enum EgbertMisc +{ + EVENT_MOVE_POS = 1, + EVENT_RETURN = 2 +}; + +class npc_egbert : public CreatureScript +{ +public: + npc_egbert() : CreatureScript("npc_egbert") {} + + struct npc_egbertAI : public PetAI + { + npc_egbertAI(Creature* creature) : PetAI(creature) + { + if (Unit* owner = me->GetCharmerOrOwner()) + if (owner->GetMap()->GetEntry()->addon > 1) + me->SetCanFly(true); + } + + void Reset() override + { + _events.Reset(); + _events.ScheduleEvent(EVENT_MOVE_POS, urandms(1, 20)); + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_MOVE_POS: + if (Unit* owner = me->GetCharmerOrOwner()) + { + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovePoint(0, owner->GetPositionX() + frand(-30.0f, 30.0f), owner->GetPositionY() + frand(-30.0f, 30.0f), owner->GetPositionZ()); + } + _events.ScheduleEvent(EVENT_RETURN, urandms(3, 4)); + break; + case EVENT_RETURN: + if (Unit* owner = me->GetCharmerOrOwner()) + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle()); + _events.ScheduleEvent(EVENT_MOVE_POS, urandms(1, 20)); + break; + default: + break; + } + } + } + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_egbertAI(creature); + } +}; + void AddSC_npcs_special() { new npc_air_force_bots(); new npc_lunaclaw_spirit(); new npc_chicken_cluck(); new npc_dancing_flames(); + new npc_torch_tossing_target_bunny_controller(); new npc_doctor(); new npc_injured_patient(); new npc_garments_of_quests(); @@ -2410,4 +2659,6 @@ void AddSC_npcs_special() new npc_spring_rabbit(); new npc_imp_in_a_ball(); new npc_stable_master(); + new npc_train_wrecker(); + new npc_egbert(); } diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 5b07dde22bb..217995cb88a 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -406,6 +406,24 @@ CleanCharacterDB = 0 PersistentCharacterCleanFlags = 0 # +# Auction.GetAllScanDelay +# Description: Sets the minimum time in seconds, a single player character can perform a getall scan. +# The value is only held in memory so a server restart will clear it. +# Setting this to zero, will disable GetAll functions completely. +# Default: 900 - (GetAll scan limited to once every 15mins per player character) + +Auction.GetAllScanDelay = 900 + +# +# Auction.SearchDelay +# Description: Sets the minimum time in milliseconds (seconds x 1000), that the client must wait between +# auction search operations. This can be increased if somehow Auction House activity is causing +# too much load. +# Default: 300 - (Time delay between auction searches set to 0.3secs) + +Auction.SearchDelay = 300 + +# ################################################################################################### ################################################################################################### |
