diff options
76 files changed, 3454 insertions, 875 deletions
diff --git a/sql/updates/world/2015_12_20_00_world.sql b/sql/updates/world/2015_12_20_00_world.sql index 51f762c5fd7..7c658877f13 100644 --- a/sql/updates/world/2015_12_20_00_world.sql +++ b/sql/updates/world/2015_12_20_00_world.sql @@ -1,5 +1,5 @@ SET @OGUID:=78976; -DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+543; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+544; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (@OGUID+0 , 187567, 530, 1, 1, -2972.565, 2562.675, 83.66947, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3744) (@OGUID+1 , 187567, 530, 1, 1, -2955.605, 2554.495, 110.3285, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3744) diff --git a/sql/updates/world/2016_01_16_04_world.sql b/sql/updates/world/2016_01_16_04_world.sql new file mode 100644 index 00000000000..a6bb7ae185c --- /dev/null +++ b/sql/updates/world/2016_01_16_04_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=53651; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(53651, 'spell_pal_light_s_beacon'); diff --git a/sql/updates/world/2016_01_16_05_world.sql b/sql/updates/world/2016_01_16_05_world.sql new file mode 100644 index 00000000000..46511cb0de8 --- /dev/null +++ b/sql/updates/world/2016_01_16_05_world.sql @@ -0,0 +1,32 @@ +-- +SET @guid=87572; +DELETE FROM `creature` WHERE `guid` BETWEEN 87572 AND 87592; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `curhealth`) VALUES +(@Guid+0, 23008, 530, 1, 1, 0, 0, 3647.45, 1918.92, 118.17, 3.80525, 600, 0, 13285), +(@Guid+1, 23008, 530, 1, 1, 0, 0, 3600.99, 1898.07, 111.36, 4.56316, 600, 0, 13285), +(@Guid+2, 23008, 530, 1, 1, 0, 0, 3573.03, 1861.43, 108.895, 2.74103, 600, 0, 13285), +(@Guid+3, 23008, 530, 1, 1, 0, 0, 3669.82, 1815.83, 126.059, 6.17322, 600, 0, 13285), +(@Guid+4, 23008, 530, 1, 1, 0, 0, 3685.04, 1772.15, 130.008, 5.97294, 600, 0, 13285), +(@Guid+5, 23008, 530, 1, 1, 0, 0, 3718.62, 1728.71, 138.644, 5.75303, 600, 0, 13285), +(@Guid+6, 23008, 530, 1, 1, 0, 0, 3770.45, 1704.41, 149.751, 4.0016, 600, 0, 13285), +(@Guid+7, 23008, 530, 1, 1, 0, 0, 3793.48, 1638.27, 135.625, 0.0691063, 600, 0, 13285), +(@Guid+8, 23008, 530, 1, 1, 0, 0, 3805.98, 1573.23, 118.196, 1.39643, 600, 0, 13285), +(@Guid+9, 23008, 530, 1, 1, 0, 0, 3835.62, 1614.66, 127.926, 1.56529, 600, 0, 13285), +(@Guid+10, 23008, 530, 1, 1, 0, 0, 3894.74, 1649.2, 127.552, 4.65976, 600, 0, 13285), +(@Guid+11, 23008, 530, 1, 1, 0, 0, 3930.28, 1647.93, 126.538, 0.685644, 600, 0, 13285), +(@Guid+12, 23008, 530, 1, 1, 0, 0, 4057.55, 1698.7, 136.879, 4.81684, 600, 0, 13285), +(@Guid+13, 23008, 530, 1, 1, 0, 0, 4097.41, 1710.19, 137.963, 0.756329, 600, 0, 13285), +(@Guid+14, 23008, 530, 1, 1, 0, 0, 4123.97, 1661.08, 126.587, 0.316505, 600, 0, 13285), +(@Guid+15, 23008, 530, 1, 1, 0, 0, 4162.44, 1671.21, 116.169, 1.18437, 600, 0, 13285), +(@Guid+16, 23008, 530, 1, 1, 0, 0, 4196.29, 1697.37, 118.356, 1.66346, 600, 0, 13285), +(@Guid+17, 23008, 530, 1, 1, 0, 0, 4227.59, 1710.46, 121.084, 2.26429, 600, 0, 13285), +(@Guid+18, 23008, 530, 1, 1, 0, 0, 4221.32, 1766.66, 130.509, 2.1779, 600, 0, 13285), +(@Guid+19, 23008, 530, 1, 1, 0, 0, 4252.49, 1835.95, 143.106, 2.0758, 600, 0, 13285), +(@Guid+20, 23008, 530, 1, 1, 0, 0, 4285.64, 1900.79, 134.852, 2.0758, 600, 0, 13285); + +SET @ENTRY := 23008; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,3000,4000,12000,16000,11,35924,0,0,0,0,0,2,0,0,0,0,0,0,0,'Ethereum Jailor - IC - Cast Energy Flux'), +(@ENTRY,0,1,0,0,0,100,0,4000,5000,9000,17000,11,36513,0,0,0,0,0,2,0,0,0,0,0,0,0,'Ethereum Jailor - IC - Cast Intangible Presence'); diff --git a/sql/updates/world/2016_01_17_00_world_335.sql b/sql/updates/world/2016_01_17_00_world_335.sql new file mode 100644 index 00000000000..abb3579fb07 --- /dev/null +++ b/sql/updates/world/2016_01_17_00_world_335.sql @@ -0,0 +1,26 @@ +-- +SET @NPC := 26577; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2369.16,`position_y`=-876.936,`position_z`=-9.42208 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,-2369.16,-876.936,-9.42208,0,0,0,0,100,0), +(@PATH,2,-2366.53,-856.691,-9.36085,0,0,0,0,100,0), +(@PATH,3,-2357.15,-811.864,-9.42138,0,0,0,0,100,0), +(@PATH,4,-2345.23,-748.967,-9.42454,0,0,0,0,100,0), +(@PATH,5,-2341.13,-700.582,-9.29519,0,0,0,0,100,0), +(@PATH,6,-2335.57,-673.555,-9.41523,0,0,0,0,100,0), +(@PATH,7,-2323.8,-641.711,-9.34184,0,0,0,0,100,0), +(@PATH,8,-2310.09,-613.217,-9.42431,0,0,0,0,100,0), +(@PATH,9,-2295.38,-586.808,-9.4231,2.396761,21600,0,0,100,0), +(@PATH,10,-2323.09,-595.375,-9.42242,0,0,0,0,100,0), +(@PATH,11,-2312.27,-614.66,-9.42405,0,0,0,0,100,0), +(@PATH,12,-2326.41,-645.536,-9.34993,0,0,0,0,100,0), +(@PATH,13,-2336.51,-676.214,-9.40864,0,0,0,0,100,0), +(@PATH,14,-2344.05,-723.843,-9.42353,0,0,0,0,100,0), +(@PATH,15,-2346.75,-760.367,-9.42353,0,0,0,0,100,0), +(@PATH,16,-2357.56,-811.652,-9.42353,0,0,0,0,100,0), +(@PATH,17,-2366.12,-855.675,-9.32695,0,0,0,0,100,0), +(@PATH,18,-2376.83,-896.428,-9.39643,6.216497,21600,0,0,100,0); diff --git a/sql/updates/world/2016_01_17_01_world.sql b/sql/updates/world/2016_01_17_01_world.sql new file mode 100644 index 00000000000..8e5bcd22a07 --- /dev/null +++ b/sql/updates/world/2016_01_17_01_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry` IN (21694,21914,17796,17797,20629,20630); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(21694,0,0x0,0x1,'18950'), -- 21694 - 18950 +(21914,0,0x0,0x1,'18950'), -- 21914 - 18950 +(17796,0,0x0,0x1,'18950'), -- 17796 - 18950 +(17797,0,0x0,0x1,'18950'), -- 17797 - 18950 +(20629,0,0x0,0x1,'18950'), -- 20629 - 18950 +(20630,0,0x0,0x1,'18950'); -- 20630 - 18950 diff --git a/sql/updates/world/2016_01_17_02_world.sql b/sql/updates/world/2016_01_17_02_world.sql new file mode 100644 index 00000000000..f019b927228 --- /dev/null +++ b/sql/updates/world/2016_01_17_02_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_onkill_reputation` WHERE `creature_id`=20477; +INSERT INTO `creature_onkill_reputation` (`creature_id`, `RewOnKillRepFaction1`, `RewOnKillRepFaction2`, `MaxStanding1`, `IsTeamAward1`, `RewOnKillRepValue1`, `MaxStanding2`, `IsTeamAward2`, `RewOnKillRepValue2`, `TeamDependent`) VALUES +(20477, 942, 0, 5, 0, 7, 0, 0, 0, 0); diff --git a/sql/updates/world/2016_01_17_03_world.sql b/sql/updates/world/2016_01_17_03_world.sql new file mode 100644 index 00000000000..cf43c650888 --- /dev/null +++ b/sql/updates/world/2016_01_17_03_world.sql @@ -0,0 +1,46 @@ +SET @OGUID:=66937; +SET @CGUID:=12545; +SET @Event:=2; + +-- Add missing xmas ornaments in silvermoon +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+26; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 187567, 530, 1, 1, 9757.145, -7186.155, 23.50618, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+1, 187567, 530, 1, 1, 9799.123, -7310.608, 35.23363, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+2, 187567, 530, 1, 1, 9790.945, -7316.393, 35.23556, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+3, 187567, 530, 1, 1, 9752.514, -7336.514, 34.97601, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+4, 187567, 530, 1, 1, 9724.499, -7346.248, 34.95547, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+5, 187567, 530, 1, 1, 9743.402, -7339.749, 34.94567, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+6, 187567, 530, 1, 1, 9734.03, -7343.019, 35.02362, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+7, 187567, 530, 1, 1, 9767.382, -7480.58, 28.18164, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+8, 187567, 530, 1, 1, 9767.383, -7495.052, 28.28906, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+9, 187567, 530, 1, 1, 9694.368, -7495.957, 25.62033, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+10, 187567, 530, 1, 1, 9683.361, -7495.406, 26.99795, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+11, 187567, 530, 1, 1, 9638.369, -7397.279, 22.68563, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+12, 187567, 530, 1, 1, 9672.388, -7495.991, 25.67016, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+13, 187567, 530, 1, 1, 9648.386, -7152.304, 23.26344, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+14, 187567, 530, 1, 1, 9665.867, -7135.831, 23.16022, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+15, 187567, 530, 1, 1, 9631.138, -7135.575, 23.11801, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+16, 187567, 530, 1, 1, 9648.528, -7119.087, 23.2984, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+17, 187567, 530, 1, 1, 9485.029, -7132.405, 24.43083, 0, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3487) +(@OGUID+18, 187194, 530, 1, 1, 9954.997, -7098.571, 59.86189, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+19, 187194, 530, 1, 1, 10007.34, -7030.903, 57.97285, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+20, 187194, 530, 1, 1, 10002.23, -7202.467, 44.06782, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+21, 187194, 530, 1, 1, 10010.68, -7199.167, 44.22095, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+22, 187194, 530, 1, 1, 9992.33, -7205.063, 44.06255, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+23, 187194, 530, 1, 1, 9952.419, -7232.268, 43.9028, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+24, 187194, 530, 1, 1, 9945.498, -7242.049, 43.90578, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 187194 (Area: 3487) +(@OGUID+25, 187235, 530, 1, 1, 9982.972, -7098.827, 47.70499, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3487) +(@OGUID+26, 187235, 530, 1, 1, 9987.122, -7093.597, 47.70498, 5.253442, 0, 0, 0, 1, 120, 255, 1); -- 187235 (Area: 3487) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+26 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+26; + +-- Add spawns Pat's Snowcloud Guy +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15730, 530, 9346.396, -7265.283, 20.67977, 6.021386, 120, 0), -- 15730 (Area: 0) (Auras: 26000 - 26000) +(@CGUID+1, 15730, 530, 9347.098, -7267.961, 20.6914, 3.263766, 120, 0); -- 15730 (Area: 0) (Auras: 26000 - 26000) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+1; diff --git a/sql/updates/world/2016_01_17_04_world.sql b/sql/updates/world/2016_01_17_04_world.sql new file mode 100644 index 00000000000..6d72807e0b1 --- /dev/null +++ b/sql/updates/world/2016_01_17_04_world.sql @@ -0,0 +1,81 @@ +SET @OGUID:=79522; +SET @CGUID:=52022; +SET @Event:=2; + +-- Add missing xmas ornaments in Azuremyst Isle (Exodar) +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+61; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0 , 178425, 530, 1, 1, -3949.436, -11658.67, -138.7108, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 178425 (Area: 0) +(@OGUID+1 , 178746, 530, 1, 1, -3954.361, -11657.59, -138.7044, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 178746 (Area: 0) +(@OGUID+2 , 178428, 530, 1, 1, -3951.378, -11661.31, -138.977, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 178428 (Area: 0) +(@OGUID+3 , 178428, 530, 1, 1, -3953.229, -11658.62, -138.7581, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 178428 (Area: 0) +(@OGUID+4 , 178428, 530, 1, 1, -3951.486, -11658.68, -138.7432, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 178428 (Area: 0) +(@OGUID+5 , 178429, 530, 1, 1, -3950.01, -11652.94, -138.6416, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 178429 (Area: 0) +(@OGUID+6 , 178429, 530, 1, 1, -3950.755, -11660.4, -138.7645, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 178429 (Area: 0) +(@OGUID+7 , 178430, 530, 1, 1, -3952.516, -11660.61, -138.7691, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 178430 (Area: 0) +(@OGUID+8 , 178430, 530, 1, 1, -3949.488, -11653.97, -138.6341, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 178430 (Area: 0) +(@OGUID+9 , 178430, 530, 1, 1, -3951.285, -11659.1, -138.3316, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 178430 (Area: 0) +(@OGUID+10, 178431, 530, 1, 1, -3952.399, -11660.72, -138.4649, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 178431 (Area: 0) +(@OGUID+11, 178431, 530, 1, 1, -3950.715, -11659.36, -138.9473, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 178431 (Area: 0) +(@OGUID+12, 178432, 530, 1, 1, -3950.486, -11661.66, -138.9796, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 178432 (Area: 0) +(@OGUID+13, 178432, 530, 1, 1, -3951.252, -11654.2, -138.6518, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 178432 (Area: 0) +(@OGUID+14, 178432, 530, 1, 1, -3952.455, -11658.96, -138.7532, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 178432 (Area: 0) +(@OGUID+15, 178433, 530, 1, 1, -3949.59, -11660.9, -138.9695, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 178433 (Area: 0) +(@OGUID+16, 178433, 530, 1, 1, -3953.01, -11659.64, -138.7615, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 178433 (Area: 0) +(@OGUID+17, 178433, 530, 1, 1, -3950.47, -11653.59, -138.645, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 178433 (Area: 0) +(@OGUID+18, 187567, 530, 1, 1, -4213.729, -11685.4, -130.8234, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 0) +(@OGUID+19, 187567, 530, 1, 1, -4145.799, -11745.62, -124.1529, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 0) +(@OGUID+20, 187567, 530, 1, 1, -4205.994, -12527.13, 50.12775, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 0) +(@OGUID+21, 187567, 530, 1, 1, -4152.035, -12529.42, 49.52319, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3576) +(@OGUID+22, 187567, 530, 1, 1, -4171.053, -13734.39, 82.08741, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3526) +(@OGUID+23, 187567, 530, 1, 1, -4054.646, -13772.28, 84.39475, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 187567 (Area: 3527) +(@OGUID+24, 187235, 530, 1, 1, -4214.633, -12476, 45.07409, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+25, 187235, 530, 1, 1, -4212.527, -12510.34, 45.44406, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+26, 187235, 530, 1, 1, -4209.379, -12517.65, 45.81722, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+27, 187235, 530, 1, 1, -4185.712, -12504.83, 44.36132, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+28, 187235, 530, 1, 1, -4158.139, -12463.08, 45.08138, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+29, 187235, 530, 1, 1, -4176.958, -12493.97, 44.361, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+30, 187235, 530, 1, 1, -4171.624, -12506.62, 44.36132, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+31, 187235, 530, 1, 1, -4153.742, -12484.6, 44.51342, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+32, 187235, 530, 1, 1, -4158.644, -12533.33, 45.45204, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3576) +(@OGUID+33, 187235, 530, 1, 1, -3928.31, -11712.54, -135.2059, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+34, 187235, 530, 1, 1, -3938.107, -11702.05, -135.2763, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+35, 187235, 530, 1, 1, -3891.189, -11640.65, -134.4907, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+36, 187235, 530, 1, 1, -3919.52, -11641.97, -134.8313, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+37, 187235, 530, 1, 1, -3905.643, -11638.75, -134.6634, 5.864307, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+38, 187235, 530, 1, 1, -3943.941, -11674.08, -135.2386, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+39, 187235, 530, 1, 1, -3939.98, -11660.92, -135.1454, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+40, 187235, 530, 1, 1, -3943.487, -11689.1, -135.2892, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+41, 187235, 530, 1, 1, -3931.237, -11649.39, -135.003, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+42, 187235, 530, 1, 1, -3877.953, -11647.35, -134.3679, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+43, 187235, 530, 1, 1, -4040.372, -11581.41, -138.4519, 0.6806767, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+44, 187235, 530, 1, 1, -4025.329, -11590.4, -138.3277, 1.762782, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+45, 187235, 530, 1, 1, -4006.567, -11572.73, -138.0419, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+46, 187235, 530, 1, 1, -4228.949, -11818.94, -115.9345, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 0) +(@OGUID+47, 187235, 530, 1, 1, -4048.503, -13778.93, 75.01585, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 187235 (Area: 3527) +(@OGUID+48, 187193, 530, 1, 1, -3929.128, -11744.82, -138.6122, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+49, 187193, 530, 1, 1, -3970.78, -11722.88, -138.8356, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+50, 187193, 530, 1, 1, -3862.003, -11617.36, -136.8326, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+51, 187193, 530, 1, 1, -3935.253, -11599.68, -138.455, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+52, 187193, 530, 1, 1, -3903.503, -11599.64, -137.7858, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+53, 187193, 530, 1, 1, -3821.196, -11515.72, -138.6442, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+54, 187193, 530, 1, 1, -3843.451, -11503.5, -139.0975, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+55, 187193, 530, 1, 1, -3753.633, -11517.73, -134.327, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+56, 187193, 530, 1, 1, -3898.609, -11445.35, -132.8523, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+57, 187193, 530, 1, 1, -3732.545, -11501.01, -134.0293, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+58, 187193, 530, 1, 1, -3657.605, -11491.42, -119.0973, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+59, 187193, 530, 1, 1, -3640.533, -11468.59, -118.8086, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+60, 187193, 530, 1, 1, -3903.453, -11420.75, -132.7737, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 187193 (Area: 0) +(@OGUID+61, 187193, 530, 1, 1, -3985.045, -11695.91, -139.3659, 5.742135, 0, 0, 0, 1, 120, 255, 1); -- 187193 (Area: 0) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+61 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+61; + +-- Add spawns Pat's Snowcloud Guy +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15730, 530, -3997.986, -11908.32, -1.411356, 0.2617994, 120, 0), -- 15730 (Area: 0) (Auras: 26000 - 26000) +(@CGUID+1, 15730, 530, -3997.807, -11908.79, 0.8329293, 4.782202, 120, 0); -- 15730 (Area: 0) (Auras: 26000 - 26000) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+1; diff --git a/sql/updates/world/2016_01_17_05_world.sql b/sql/updates/world/2016_01_17_05_world.sql new file mode 100644 index 00000000000..2d253bae713 --- /dev/null +++ b/sql/updates/world/2016_01_17_05_world.sql @@ -0,0 +1,16 @@ +UPDATE`spell_dbc` SET `Effect1`=28, `EffectMiscValueB1`=64 WHERE `Id`IN(14313,14307,14252); + +-- Spell 14313 Summon Enraged Gryphon +-- Spell 14307 Summon Enraged Wyvern +-- Spell 14252 Summon Enraged Felbat +-- Spell 14329 Summon Enraged Hippogryph + +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9297 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9526 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9521 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9527 AND `id`=1; + +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14307, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9297; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14313, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9526; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14252, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9521; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14329, `action_param2`=2, `action_param3`=0,`link`=0 WHERE `source_type` =0 AND `action_type` =12 AND `action_param1` =9527; diff --git a/sql/updates/world/2016_01_17_06_world.sql b/sql/updates/world/2016_01_17_06_world.sql new file mode 100644 index 00000000000..659f146845a --- /dev/null +++ b/sql/updates/world/2016_01_17_06_world.sql @@ -0,0 +1,5 @@ +UPDATE `smart_scripts` SET `id`=5 WHERE `source_type` = 9 AND `entryorguid` = 2229300 AND `id`=4 AND `action_type`=51; + +DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` = 2229300 AND `id`=4; +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 +(2229300, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 85, 38758, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Inactive Fel Reaver - Action list - Invoker Cast [PH] Quest reward: Nether Gas In a Fel Fire Engine'); diff --git a/sql/updates/world/2016_01_17_07_world.sql b/sql/updates/world/2016_01_17_07_world.sql new file mode 100644 index 00000000000..df588168d38 --- /dev/null +++ b/sql/updates/world/2016_01_17_07_world.sql @@ -0,0 +1,22 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=33658; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(33658, 33658, 0, 0, 1), +(33658, 33657, 10, 0, 2); + +-- Pathing for Hazzas Entry: 5722 'TDB FORMAT' +SET @NPC := 33658; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-649.7056,`position_y`=131.495,`position_z`=-90.5838 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,-649.7056,131.495,-90.5838,0,0,1,0,100,0), -- 14:04:57 +(@PATH,2,-665.5804,131.4927,-90.58052,0,0,1,0,100,0), -- 14:05:00 +(@PATH,3,-673.0132,94.911,-90.58176,0,0,1,0,100,0), -- 14:05:02 +(@PATH,4,-673.0271,83.92074,-90.58344,0,0,1,0,100,0), -- 14:05:04 +(@PATH,5,-665.4554,60.56186,-90.5854,0,0,1,0,100,0), -- 14:05:07 +(@PATH,6,-649.9196,60.34818,-90.58607,0,0,1,0,100,0), -- 14:05:08 +(@PATH,7,-641.7787,99.33066,-90.58942,0,0,1,0,100,0), -- 14:05:10 +(@PATH,8,-644.1965,115.6559,-90.58284,0,0,1,0,100,0); -- 14:05:13 +-- 0x1C30A00DA00596800034A9000018FBD3 .go -649.7056 131.495 -90.5838 diff --git a/sql/updates/world/2016_01_17_08_world.sql b/sql/updates/world/2016_01_17_08_world.sql new file mode 100644 index 00000000000..48cd420a242 --- /dev/null +++ b/sql/updates/world/2016_01_17_08_world.sql @@ -0,0 +1,408 @@ +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57733; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4259.922,`position_y`=-11744.17,`position_z`=-132.7823 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,-4259.922,-11744.17,-132.7823,0,0,0,0,100,0), -- 10:11:34 +(@PATH,2,-4253.737,-11752.62,-132.103,0,0,0,0,100,0), -- 10:11:50 +(@PATH,3,-4251.487,-11755.87,-132.603,0,0,0,0,100,0), -- 10:11:50 +(@PATH,4,-4248.737,-11759.37,-132.603,0,0,0,0,100,0), -- 10:11:50 +(@PATH,5,-4242.487,-11767.87,-131.853,0,0,0,0,100,0), -- 10:11:50 +(@PATH,6,-4234.163,-11770.65,-131.4757,0,0,0,0,100,0), -- 10:12:04 +(@PATH,7,-4205.663,-11771.65,-131.9757,0,0,0,0,100,0), -- 10:12:04 +(@PATH,8,-4199.815,-11770.93,-132.2653,0,0,0,0,100,0), -- 10:12:20 +(@PATH,9,-4176.882,-11762.18,-132.0013,0,0,0,0,100,0), -- 10:12:29 +(@PATH,10,-4166.132,-11757.68,-136.7513,0,0,0,0,100,0), -- 10:12:29 +(@PATH,11,-4166.266,-11739.91,-136.6903,0,0,0,0,100,0), -- 10:12:36 +(@PATH,12,-4166.516,-11733.41,-136.6903,0,0,0,0,100,0), -- 10:12:36 +(@PATH,13,-4166.766,-11730.66,-136.6903,0,0,0,0,100,0), -- 10:12:36 +(@PATH,14,-4179.53,-11763.62,-132.2955,0,0,0,0,100,0), -- 10:13:15 +(@PATH,15,-4180.446,-11764.02,-132.2955,0,0,0,0,100,0), -- 10:13:15 +(@PATH,16,-4200.114,-11771.23,-132.5309,0,0,0,0,100,0), -- 10:13:15 +(@PATH,17,-4202.051,-11771.94,-132.4386,0,0,0,0,100,0), -- 10:13:15 +(@PATH,18,-4202.051,-11771.94,-132.4386,0,0,0,0,100,0), -- 10:13:15 +(@PATH,19,-4205.86,-11771.68,-132.0416,0,0,0,0,100,0), -- 10:13:17 +(@PATH,20,-4234.11,-11770.68,-131.5416,0,0,0,0,100,0), -- 10:13:17 +(@PATH,21,-4248.942,-11759.42,-132.5334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,22,-4251.192,-11755.92,-132.5334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,23,-4253.692,-11752.67,-132.0334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,24,-4258.692,-11745.92,-132.5334,0,0,0,0,100,0), -- 10:13:33 +(@PATH,25,-4259.942,-11744.17,-132.7834,0,0,0,0,100,0); -- 10:13:33 + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57732; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4216.665,`position_y`=-11647.06,`position_z`=-143.7448 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,-4216.665,-11647.06,-143.7448,4.590216,5000,0,0,100,0), -- 10:39:00 +(@PATH,2,-4216.917,-11623.43,-132.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,3,-4216.917,-11613.93,-128.6019,0,0,0,0,100,0), -- 10:39:16 +(@PATH,4,-4216.917,-11607.68,-125.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,5,-4216.917,-11604.68,-125.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,6,-4216.917,-11602.93,-125.8519,0,0,0,0,100,0), -- 10:39:16 +(@PATH,7,-4217.17,-11602.3,-125.959,4.817109,5000,0,0,100,0), -- 10:39:36 +(@PATH,8,-4197.176,-11597.41,-124.0743,0,0,0,0,100,0), -- 10:39:56 +(@PATH,9,-4195.676,-11597.16,-125.3243,0,0,0,0,100,0), -- 10:39:56 +(@PATH,10,-4187.176,-11595.16,-124.8243,0,0,0,0,100,0), -- 10:39:56 +(@PATH,11,-4183.45,-11596.95,-124.1946,0,0,0,0,100,0), -- 10:40:08 +(@PATH,12,-4179.45,-11604.45,-121.1946,0,0,0,0,100,0), -- 10:40:08 +(@PATH,13,-4175.45,-11610.7,-119.1946,0,0,0,0,100,0), -- 10:40:08 +(@PATH,14,-4164.444,-11628.77,-104.9988,0,0,0,0,100,0), -- 10:40:21 +(@PATH,15,-4160.194,-11635.52,-97.99881,0,0,0,0,100,0), -- 10:40:21 +(@PATH,16,-4162.848,-11643.82,-98.11985,0,0,0,0,100,0), -- 10:40:31 +(@PATH,17,-4165.893,-11649.45,-98.40599,3.246312,5000,0,0,100,0), -- 10:40:39 +(@PATH,18,-4166.085,-11630.18,-104.5746,0,0,0,0,100,0), -- 10:40:53 +(@PATH,19,-4174.826,-11610.26,-119.0268,0,0,0,0,100,0), -- 10:41:04 +(@PATH,20,-4178.826,-11602.76,-121.5268,0,0,0,0,100,0), -- 10:41:04 +(@PATH,21,-4182.576,-11596.51,-124.0268,0,0,0,0,100,0), -- 10:41:04 +(@PATH,22,-4186.426,-11593.54,-124.7621,0,0,0,0,100,0), -- 10:41:19 +(@PATH,23,-4193.426,-11591.54,-124.7621,0,0,0,0,100,0), -- 10:41:19 +(@PATH,24,-4198.176,-11589.79,-125.2621,0,0,0,0,100,0), -- 10:41:19 +(@PATH,25,-4209.176,-11586.04,-125.5121,0,0,0,0,100,0), -- 10:41:19 +(@PATH,26,-4211.554,-11587.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,27,-4212.304,-11589.44,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,28,-4213.554,-11592.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,29,-4215.804,-11597.44,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,30,-4217.054,-11600.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,31,-4217.554,-11601.69,-125.6955,0,0,0,0,100,0), -- 10:41:30 +(@PATH,32,-4218.49,-11603.42,-126.0363,4.834562,5000,0,0,100,0), -- 10:41:39 +(@PATH,33,-4217.827,-11613.99,-128.6406,0,0,0,0,100,0), -- 10:41:55 +(@PATH,34,-4217.577,-11622.99,-132.6406,0,0,0,0,100,0), -- 10:41:55 +(@PATH,35,-4217.077,-11638.74,-139.8906,0,0,0,0,100,0), -- 10:41:55 +(@PATH,36,-4216.827,-11644.74,-143.3906,0,0,0,0,100,0); -- 10:41:55 + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57731; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4055.538,`position_y`=-11719.55,`position_z`=-138.8952 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,-4055.538,-11719.55,-138.8952,0,0,0,0,100,0), -- 10:45:16 +(@PATH,2,-4069.275,-11725.09,-138.3611,0,0,0,0,100,0), -- 10:45:34 +(@PATH,3,-4092.408,-11723.83,-139.1332,0,0,0,0,100,0), -- 10:45:49 +(@PATH,4,-4099.328,-11724.08,-139.0543,0,0,0,0,100,0), -- 10:45:56 +(@PATH,5,-4111.578,-11729.58,-139.3043,0,0,0,0,100,0), -- 10:45:56 +(@PATH,6,-4117.578,-11732.08,-136.3043,0,0,0,0,100,0), -- 10:45:56 +(@PATH,7,-4119.328,-11733.08,-136.3043,0,0,0,0,100,0), -- 10:45:56 +(@PATH,8,-4139.16,-11723.72,-136.5828,0,0,0,0,100,0), -- 10:46:09 +(@PATH,9,-4143.91,-11720.22,-136.5828,0,0,0,0,100,0), -- 10:46:09 +(@PATH,10,-4125.933,-11733.08,-136.3418,0,0,0,0,100,0), -- 10:46:21 +(@PATH,11,-4117.555,-11732.18,-136.3103,0,0,0,0,100,0), -- 10:46:31 +(@PATH,12,-4111.555,-11729.43,-139.3103,0,0,0,0,100,0), -- 10:46:31 +(@PATH,13,-4099.305,-11723.93,-139.0603,0,0,0,0,100,0), -- 10:46:31 +(@PATH,14,-4080.146,-11728.12,-138.7241,0,0,0,0,100,0), -- 10:46:43 +(@PATH,15,-4069.389,-11725.02,-138.4003,0,0,0,0,100,0), -- 10:46:51 +(@PATH,16,-4067.389,-11724.27,-138.4003,0,0,0,0,100,0), -- 10:46:51 +(@PATH,17,-4055.639,-11719.52,-138.9003,0,0,0,0,100,0); -- 10:46:51 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=57722; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(57722, 57722, 0, 0, 1), +(57722, 57723, 2, 270, 2); + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57722; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4035.478,`position_y`=-11451.96,`position_z`=-55.53455 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,-4035.478,-11451.96,-55.53455,0,15000,0,0,100,0), -- 10:28:52 +(@PATH,2,-4038.098,-11441.65,-62.00945,0,0,0,0,100,0), -- 10:29:19 +(@PATH,3,-4048.067,-11425.79,-72.46973,0,0,0,0,100,0), -- 10:29:29 +(@PATH,4,-4072.011,-11409.6,-88.05364,0,0,0,0,100,0), -- 10:29:37 +(@PATH,5,-4090.952,-11407.41,-98.80654,0,0,0,0,100,0), -- 10:29:48 +(@PATH,6,-4100.202,-11406.66,-104.3065,0,0,0,0,100,0), -- 10:29:48 +(@PATH,7,-4118.357,-11413.92,-114.891,0,0,0,0,100,0), -- 10:30:01 +(@PATH,8,-4134.707,-11426.21,-125.61,0,0,0,0,100,0), -- 10:30:13 +(@PATH,9,-4137.963,-11431.42,-128.7505,0,0,0,0,100,0), -- 10:30:21 +(@PATH,10,-4144.455,-11462.52,-130.7656,0,0,0,0,100,0), -- 10:30:26 +(@PATH,11,-4143.278,-11481.03,-130.6259,0,0,0,0,100,0), -- 10:30:36 +(@PATH,12,-4141.778,-11489.78,-130.6259,0,0,0,0,100,0), -- 10:30:36 +(@PATH,13,-4133.984,-11497.89,-130.5813,0,0,0,0,100,0), -- 10:30:46 +(@PATH,14,-4123.734,-11506.64,-135.3313,0,0,0,0,100,0), -- 10:30:46 +(@PATH,15,-4118.456,-11529.87,-135.6161,0,0,0,0,100,0), -- 10:30:57 +(@PATH,16,-4118.632,-11541.07,-135.6777,0,15000,0,0,100,0), -- 10:31:08 +(@PATH,17,-4107.033,-11536.5,-135.5405,0,0,0,0,100,0), -- 10:31:33 +(@PATH,18,-4095.169,-11530.58,-135.5151,0,0,0,0,100,0), -- 10:31:43 +(@PATH,19,-4072.678,-11526.62,-135.1866,0,0,0,0,100,0), -- 10:31:50 +(@PATH,20,-4068.678,-11527.37,-135.6866,0,0,0,0,100,0), -- 10:31:50 +(@PATH,21,-4062.178,-11528.87,-138.1866,0,0,0,0,100,0), -- 10:31:50 +(@PATH,22,-4044.695,-11532.02,-138.1443,0,0,0,0,100,0), -- 10:31:59 +(@PATH,23,-4042.251,-11532.67,-138.0262,0,0,0,0,100,0), -- 10:32:05 +(@PATH,24,-4035.501,-11537.42,-138.0262,0,0,0,0,100,0), -- 10:32:05 +(@PATH,25,-4028.77,-11550.78,-137.9687,0,0,0,0,100,0), -- 10:32:09 +(@PATH,26,-4026.27,-11555.78,-137.9687,0,0,0,0,100,0), -- 10:32:09 +(@PATH,27,-4020.903,-11567.01,-137.9309,0,0,0,0,100,0), -- 10:32:18 +(@PATH,28,-4006.608,-11590.79,-135.6749,0,0,0,0,100,0), -- 10:32:27 +(@PATH,29,-4001.739,-11597.25,-134.446,0,15000,0,0,100,0), -- 10:32:37 +(@PATH,30,-4003.607,-11589.51,-135.0951,0,0,0,0,100,0), -- 10:33:00 +(@PATH,31,-4008.607,-11582.01,-137.5951,0,0,0,0,100,0), -- 10:33:00 +(@PATH,32,-4020.018,-11566.11,-137.9106,0,0,0,0,100,0), -- 10:33:08 +(@PATH,33,-4028.915,-11551.29,-137.955,0,0,0,0,100,0), -- 10:33:18 +(@PATH,34,-4035.739,-11537.94,-137.9934,0,0,0,0,100,0), -- 10:33:27 +(@PATH,35,-4044.477,-11531.19,-138.0956,0,0,0,0,100,0), -- 10:33:30 +(@PATH,36,-4064.476,-11525.09,-135.8434,0,0,0,0,100,0), -- 10:33:36 +(@PATH,37,-4070.578,-11522.78,-135.0313,0,0,0,0,100,0), -- 10:33:44 +(@PATH,38,-4073.483,-11514.04,-135.0202,0,15000,0,0,100,0), -- 10:33:47 +(@PATH,39,-4112.552,-11504.43,-135.4866,0,0,0,0,100,0), -- 10:34:12 +(@PATH,40,-4118.729,-11500.47,-135.2996,0,0,0,0,100,0), -- 10:34:27 +(@PATH,41,-4131.229,-11491.97,-130.2996,0,0,0,0,100,0), -- 10:34:27 +(@PATH,42,-4134.815,-11481.72,-130.2471,0,0,0,0,100,0), -- 10:34:37 +(@PATH,43,-4135.565,-11478.97,-130.2471,0,0,0,0,100,0), -- 10:34:37 +(@PATH,44,-4136.778,-11458.39,-130.6105,0,0,0,0,100,0), -- 10:34:47 +(@PATH,45,-4136.778,-11457.14,-130.6105,0,0,0,0,100,0), -- 10:34:47 +(@PATH,46,-4133.271,-11441.38,-130.0716,0,0,0,0,100,0), -- 10:34:56 +(@PATH,47,-4122.668,-11422.46,-118.9364,0,0,0,0,100,0), -- 10:35:04 +(@PATH,48,-4108.187,-11412.36,-108.8878,0,0,0,0,100,0), -- 10:35:11 +(@PATH,49,-4089.786,-11408.53,-98.16229,0,0,0,0,100,0), -- 10:35:20 +(@PATH,50,-4071.33,-11410.57,-87.74048,0,0,0,0,100,0), -- 10:35:28 +(@PATH,51,-4054.675,-11419.34,-76.96556,0,0,0,0,100,0), -- 10:35:37 +(@PATH,52,-4047.425,-11424.59,-72.71556,0,0,0,0,100,0), -- 10:35:37 +(@PATH,53,-4042.097,-11435.35,-65.71899,0,0,0,0,100,0), -- 10:35:48 +(@PATH,54,-4039.347,-11441.85,-62.21899,0,0,0,0,100,0); -- 10:35:48 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=57721; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(57721, 57721, 0, 0, 1), +(57721, 57720, 2, 270, 2); + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57721; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-3967.541,`position_y`=-11439.45,`position_z`=-136.5146 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,-3967.541,-11439.45,-136.5146,0,0,0,0,100,0), -- 10:19:30 +(@PATH,2,-3988.034,-11458.35,-136.91,0,0,0,0,100,0), -- 10:19:56 +(@PATH,3,-3995.157,-11467.58,-136.9,0,0,0,0,100,0), -- 10:20:09 +(@PATH,4,-3998.407,-11481.33,-137.15,0,0,0,0,100,0), -- 10:20:09 +(@PATH,5,-3998.143,-11483.91,-137.1721,0,0,0,0,100,0), -- 10:20:18 +(@PATH,6,-3993.893,-11490.66,-137.1721,0,0,0,0,100,0), -- 10:20:18 +(@PATH,7,-3991.643,-11494.16,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,8,-3990.893,-11495.41,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,9,-3985.393,-11504.16,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,10,-3982.393,-11509.16,-136.9221,0,0,0,0,100,0), -- 10:20:18 +(@PATH,11,-3978.886,-11514.21,-136.8319,0,0,0,0,100,0), -- 10:20:31 +(@PATH,12,-3965.32,-11535.52,-135.6286,0,0,0,0,100,0), -- 10:20:39 +(@PATH,13,-3962.82,-11541.27,-134.3786,0,0,0,0,100,0), -- 10:20:39 +(@PATH,14,-3962.07,-11543.27,-134.1286,0,0,0,0,100,0), -- 10:20:39 +(@PATH,15,-3960.32,-11547.27,-134.1286,0,0,0,0,100,0), -- 10:20:39 +(@PATH,16,-3953.078,-11561.7,-133.8862,0,0,0,0,100,0), -- 10:20:49 +(@PATH,17,-3952.157,-11563.7,-133.8141,0,0,0,0,100,0), -- 10:20:55 +(@PATH,18,-3954.035,-11559.74,-134.0775,0,0,0,0,100,0), -- 10:21:18 +(@PATH,19,-3958.522,-11542.85,-134.0628,0,0,0,0,100,0), -- 10:21:24 +(@PATH,20,-3958.772,-11541.35,-134.3128,0,0,0,0,100,0), -- 10:21:24 +(@PATH,21,-3959.772,-11534.6,-135.5628,0,0,0,0,100,0), -- 10:21:24 +(@PATH,22,-3960.772,-11530.1,-136.5628,0,0,0,0,100,0), -- 10:21:24 +(@PATH,23,-3976.953,-11511.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,24,-3980.453,-11507.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,25,-3984.203,-11503.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,26,-3991.703,-11495.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,27,-3992.703,-11494.68,-136.8674,0,0,0,0,100,0), -- 10:21:33 +(@PATH,28,-3995.201,-11491.97,-137.0053,0,0,0,0,100,0), -- 10:21:52 +(@PATH,29,-4000.951,-11484.97,-137.0053,0,0,0,0,100,0), -- 10:21:52 +(@PATH,30,-4001.701,-11483.97,-137.0053,0,0,0,0,100,0), -- 10:21:52 +(@PATH,31,-3997.792,-11464.48,-137.0493,0,0,0,0,100,0), -- 10:22:02 +(@PATH,32,-3990.042,-11456.23,-136.7993,0,0,0,0,100,0), -- 10:22:02 +(@PATH,33,-3987.292,-11453.23,-136.7993,0,0,0,0,100,0), -- 10:22:02 +(@PATH,34,-3986.042,-11451.73,-136.7993,0,0,0,0,100,0); -- 10:22:02 + +-- Pathing for Exodar Peacekeeper Entry: 16733 'TDB FORMAT' +SET @NPC := 57735; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4251.791,`position_y`=-11767.84,`position_z`=-93.89223 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,-4251.791,-11767.84,-93.89223,0,0,0,0,100,0), -- 10:07:56 +(@PATH,2,-4253.477,-11770.7,-93.53635,0,0,0,0,100,0), -- 10:08:00 +(@PATH,3,-4266.667,-11783.95,-93.56421,0,0,0,0,100,0), -- 10:08:04 +(@PATH,4,-4287.891,-11793.3,-94.06949,0,0,0,0,100,0), -- 10:08:13 +(@PATH,5,-4292.896,-11799.17,-94.09827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,6,-4291.396,-11801.67,-94.09827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,7,-4284.396,-11814.92,-99.59827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,8,-4283.396,-11816.67,-99.59827,0,0,0,0,100,0), -- 10:08:21 +(@PATH,9,-4271.257,-11813.78,-99.64638,0,0,0,0,100,0), -- 10:08:33 +(@PATH,10,-4247.323,-11799.34,-95.82317,0,0,0,0,100,0), -- 10:08:40 +(@PATH,11,-4244.717,-11797.41,-95.79004,0,0,0,0,100,0), -- 10:08:50 +(@PATH,12,-4237.407,-11793.06,-95.55835,0,0,0,0,100,0), -- 10:08:53 +(@PATH,13,-4233.212,-11797.79,-95.51921,0,0,0,0,100,0), -- 10:08:57 +(@PATH,14,-4230.32,-11804.69,-95.54309,0,0,0,0,100,0), -- 10:08:59 +(@PATH,15,-4242.375,-11806.88,-95.75206,0,0,0,0,100,0), -- 10:09:02 +(@PATH,16,-4249.163,-11807,-98.797,0,0,0,0,100,0), -- 10:09:08 +(@PATH,17,-4271.709,-11816.08,-99.78216,0,0,0,0,100,0), -- 10:09:15 +(@PATH,18,-4278.459,-11818.83,-99.78216,0,0,0,0,100,0), -- 10:09:15 +(@PATH,19,-4278.884,-11823.21,-99.79669,0,0,0,0,100,0), -- 10:09:21 +(@PATH,20,-4277.884,-11824.96,-99.79669,0,0,0,0,100,0), -- 10:09:21 +(@PATH,21,-4267.689,-11842.01,-112.3755,0,0,0,0,100,0), -- 10:09:25 +(@PATH,22,-4266.437,-11843.94,-112.2757,0,0,0,0,100,0), -- 10:09:34 +(@PATH,23,-4257.481,-11844.73,-112.4191,0,0,0,0,100,0), -- 10:09:36 +(@PATH,24,-4256.231,-11843.73,-112.4191,0,0,0,0,100,0), -- 10:09:36 +(@PATH,25,-4255.231,-11843.23,-112.1691,0,0,0,0,100,0), -- 10:09:36 +(@PATH,26,-4249.231,-11839.98,-115.6691,0,0,0,0,100,0), -- 10:09:36 +(@PATH,27,-4239.349,-11833.89,-115.6299,0,0,0,0,100,0), -- 10:09:43 +(@PATH,28,-4231.849,-11829.14,-115.6299,0,0,0,0,100,0), -- 10:09:43 +(@PATH,29,-4226.349,-11825.89,-115.6299,0,0,0,0,100,0), -- 10:09:43 +(@PATH,30,-4221.665,-11822.42,-116.7485,0,0,0,0,100,0), -- 10:09:55 +(@PATH,31,-4219.165,-11820.92,-117.9985,0,0,0,0,100,0), -- 10:09:55 +(@PATH,32,-4216.665,-11819.17,-119.2485,0,0,0,0,100,0), -- 10:09:55 +(@PATH,33,-4207.821,-11811.86,-123.7914,0,0,0,0,100,0), -- 10:10:00 +(@PATH,34,-4204.571,-11808.86,-125.5414,0,0,0,0,100,0), -- 10:10:00 +(@PATH,35,-4202.321,-11806.86,-126.7914,0,0,0,0,100,0), -- 10:10:00 +(@PATH,36,-4199.845,-11803.17,-128.7961,0,0,0,0,100,0), -- 10:10:08 +(@PATH,37,-4198.095,-11800.17,-130.2961,0,0,0,0,100,0), -- 10:10:08 +(@PATH,38,-4194.845,-11794.67,-132.7961,0,0,0,0,100,0), -- 10:10:08 +(@PATH,39,-4199.826,-11803.24,-128.946,0,0,0,0,100,0), -- 10:10:15 +(@PATH,40,-4207.697,-11811.62,-124.236,0,0,0,0,100,0), -- 10:10:20 +(@PATH,41,-4210.447,-11813.87,-122.736,0,0,0,0,100,0), -- 10:10:20 +(@PATH,42,-4216.582,-11818.92,-119.3844,0,0,0,0,100,0), -- 10:10:27 +(@PATH,43,-4218.832,-11820.67,-118.1344,0,0,0,0,100,0), -- 10:10:27 +(@PATH,44,-4221.582,-11822.42,-116.6344,0,0,0,0,100,0), -- 10:10:27 +(@PATH,45,-4222.832,-11823.42,-115.6344,0,0,0,0,100,0), -- 10:10:27 +(@PATH,46,-4224.417,-11824.55,-115.6566,0,0,0,0,100,0), -- 10:10:32 +(@PATH,47,-4226.417,-11825.8,-115.6566,0,0,0,0,100,0), -- 10:10:32 +(@PATH,48,-4231.917,-11829.3,-115.9066,0,0,0,0,100,0), -- 10:10:32 +(@PATH,49,-4239.417,-11833.8,-115.9066,0,0,0,0,100,0), -- 10:10:32 +(@PATH,50,-4255.09,-11843.43,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,51,-4255.84,-11843.93,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,52,-4257.34,-11844.68,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,53,-4259.59,-11846.18,-112.396,0,0,0,0,100,0), -- 10:10:44 +(@PATH,54,-4266.089,-11844.57,-112.6297,0,0,0,0,100,0), -- 10:10:51 +(@PATH,55,-4267.195,-11842.41,-112.1786,0,0,0,0,100,0), -- 10:10:54 +(@PATH,56,-4278.661,-11823.64,-99.84711,0,0,0,0,100,0), -- 10:11:03 +(@PATH,57,-4271.714,-11815.94,-99.62749,0,0,0,0,100,0), -- 10:11:06 +(@PATH,58,-4269.714,-11815.19,-99.62749,0,0,0,0,100,0), -- 10:11:06 +(@PATH,59,-4266.714,-11813.94,-99.62749,0,0,0,0,100,0), -- 10:11:06 +(@PATH,60,-4249.543,-11807.19,-99.2198,0,0,0,0,100,0), -- 10:11:13 +(@PATH,61,-4238.826,-11807.14,-95.64388,0,0,0,0,100,0), -- 10:11:21 +(@PATH,62,-4234.899,-11806.84,-95.56003,0,0,0,0,100,0), -- 10:11:25 +(@PATH,63,-4230.451,-11804.73,-95.52745,0,0,0,0,100,0), -- 10:11:28 +(@PATH,64,-4237.342,-11793.27,-95.53383,0,0,0,0,100,0), -- 10:11:30 +(@PATH,65,-4244.645,-11797.43,-95.85562,0,0,0,0,100,0), -- 10:11:34 +(@PATH,66,-4247.373,-11799.21,-95.78325,0,0,0,0,100,0), -- 10:11:38 +(@PATH,67,-4252.373,-11802.46,-99.03325,0,0,0,0,100,0), -- 10:11:38 +(@PATH,68,-4270.794,-11813.47,-99.60289,0,0,0,0,100,0), -- 10:11:48 +(@PATH,69,-4284.358,-11814.79,-99.57885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,70,-4291.358,-11801.79,-94.07885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,71,-4292.858,-11799.29,-94.07885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,72,-4294.358,-11796.54,-94.07885,0,0,0,0,100,0), -- 10:11:55 +(@PATH,73,-4282.959,-11793.07,-93.84309,0,0,0,0,100,0), -- 10:12:07 +(@PATH,74,-4266.636,-11784.24,-93.59824,0,0,0,0,100,0), -- 10:12:14 +(@PATH,75,-4252.229,-11768.59,-93.55703,0,0,0,0,100,0); -- 10:12:24 + +-- Pathing for Worker Entry: 18800 'TDB FORMAT' +SET @NPC := 67155; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4045.227,`position_y`=-11567.36,`position_z`=-138.4557 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,-4045.227,-11567.36,-138.4557,2.657736,60000,0,0,100,0), -- 10:20:52 +(@PATH,2,-4041.453,-11566.98,-138.16,0,0,0,0,100,0), -- 10:21:06 +(@PATH,3,-4037.367,-11566.4,-138.3107,0,0,0,0,100,0), -- 10:21:08 +(@PATH,4,-4031.307,-11552.28,-137.9972,0,0,0,0,100,0), -- 10:21:13 +(@PATH,5,-4042.002,-11530.51,-138.0085,0,0,0,0,100,0), -- 10:21:19 +(@PATH,6,-4041.574,-11527.51,-138.0677,0,0,0,0,100,0), -- 10:21:24 +(@PATH,7,-4038.824,-11520.26,-141.0677,0,0,0,0,100,0), -- 10:21:24 +(@PATH,8,-4026.281,-11500.64,-140.7895,0,0,0,0,100,0), -- 10:21:29 +(@PATH,9,-4015.825,-11486.67,-139.4373,0,0,0,0,100,0), -- 10:21:42 +(@PATH,10,-4014.075,-11484.67,-138.1873,0,0,0,0,100,0), -- 10:21:42 +(@PATH,11,-4012.325,-11483.17,-137.1873,0,0,0,0,100,0), -- 10:21:42 +(@PATH,12,-4009.575,-11480.42,-137.1873,0,0,0,0,100,0), -- 10:21:42 +(@PATH,13,-3995.471,-11465.6,-136.9284,0,0,0,0,100,0), -- 10:21:51 +(@PATH,14,-3967.808,-11441.67,-136.644,0,0,0,0,100,0), -- 10:22:00 +(@PATH,15,-3952.092,-11437.37,-136.3886,0,0,0,0,100,0), -- 10:22:13 +(@PATH,16,-3933.094,-11436.87,-134.5441,0,0,0,0,100,0), -- 10:22:20 +(@PATH,17,-3913.105,-11438.32,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,18,-3905.355,-11438.57,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,19,-3898.855,-11439.07,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,20,-3894.605,-11439.32,-132.681,0,0,0,0,100,0), -- 10:22:28 +(@PATH,21,-3878.679,-11443.58,-132.5145,0,0,0,0,100,0), -- 10:22:44 +(@PATH,22,-3872.179,-11446.33,-132.2645,0,0,0,0,100,0), -- 10:22:44 +(@PATH,23,-3840.745,-11457.86,-131.9258,0,0,0,0,100,0), -- 10:22:59 +(@PATH,24,-3839.995,-11457.86,-131.9258,0,0,0,0,100,0), -- 10:22:59 +(@PATH,25,-3834.995,-11459.36,-135.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,26,-3829.995,-11461.11,-138.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,27,-3828.745,-11461.61,-138.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,28,-3825.995,-11462.36,-138.1758,0,0,0,0,100,0), -- 10:22:59 +(@PATH,29,-3819.628,-11464.71,-138.4012,0,0,0,0,100,0), -- 10:23:11 +(@PATH,30,-3812.128,-11467.21,-138.1512,0,0,0,0,100,0), -- 10:23:11 +(@PATH,31,-3795.622,-11472.34,-137.6514,0,0,0,0,100,0), -- 10:23:21 +(@PATH,32,-3789.372,-11473.84,-134.6514,0,0,0,0,100,0), -- 10:23:21 +(@PATH,33,-3786.872,-11474.34,-134.4014,0,0,0,0,100,0), -- 10:23:21 +(@PATH,34,-3778.248,-11477.4,-134.2023,0,20000,0,0,100,0), -- 10:23:29 +(@PATH,35,-3779.69,-11479.03,-134.2154,0,0,0,0,100,0), -- 10:23:51 +(@PATH,36,-3790.385,-11476.55,-134.3773,0,0,0,0,100,0), -- 10:23:57 +(@PATH,37,-3795.885,-11475.05,-137.3773,0,0,0,0,100,0), -- 10:23:57 +(@PATH,38,-3796.885,-11474.8,-137.8773,0,0,0,0,100,0), -- 10:23:57 +(@PATH,39,-3798.306,-11474.22,-137.853,0,0,0,0,100,0), -- 10:24:02 +(@PATH,40,-3800.556,-11473.22,-137.853,0,0,0,0,100,0), -- 10:24:02 +(@PATH,41,-3812.556,-11467.97,-137.853,0,0,0,0,100,0), -- 10:24:02 +(@PATH,42,-3819.806,-11464.72,-138.103,0,0,0,0,100,0), -- 10:24:02 +(@PATH,43,-3825.306,-11462.22,-138.103,0,0,0,0,100,0), -- 10:24:02 +(@PATH,44,-3829.718,-11460.37,-138.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,45,-3834.718,-11458.62,-135.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,46,-3839.718,-11456.87,-132.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,47,-3840.718,-11456.62,-132.1092,0,0,0,0,100,0), -- 10:24:15 +(@PATH,48,-3872.166,-11446.86,-132.4203,0,0,0,0,100,0), -- 10:24:22 +(@PATH,49,-3880.416,-11444.36,-132.4203,0,0,0,0,100,0), -- 10:24:22 +(@PATH,50,-3894.63,-11440.23,-132.5016,0,0,0,0,100,0), -- 10:24:39 +(@PATH,51,-3898.38,-11438.98,-132.7516,0,0,0,0,100,0), -- 10:24:39 +(@PATH,52,-3905.38,-11436.98,-132.7516,0,0,0,0,100,0), -- 10:24:39 +(@PATH,53,-3909.953,-11436.46,-132.7919,0,0,0,0,100,0), -- 10:24:49 +(@PATH,54,-3919.703,-11436.96,-132.7919,0,0,0,0,100,0), -- 10:24:49 +(@PATH,55,-3932.703,-11437.46,-134.2919,0,0,0,0,100,0), -- 10:24:49 +(@PATH,56,-3955.675,-11438.13,-136.1737,0,0,0,0,100,0), -- 10:25:01 +(@PATH,57,-3967.982,-11443.01,-136.5633,0,0,0,0,100,0), -- 10:25:10 +(@PATH,58,-3987.157,-11453.09,-136.8458,0,0,0,0,100,0), -- 10:25:22 +(@PATH,59,-3990.157,-11456.09,-136.8458,0,0,0,0,100,0), -- 10:25:22 +(@PATH,60,-3998.407,-11464.34,-137.0958,0,0,0,0,100,0), -- 10:25:22 +(@PATH,61,-3999.407,-11465.34,-137.0958,0,0,0,0,100,0), -- 10:25:22 +(@PATH,62,-4014.187,-11479.69,-137.1316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,63,-4015.437,-11481.19,-138.1316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,64,-4017.937,-11483.44,-139.6316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,65,-4019.687,-11485.19,-140.6316,0,0,0,0,100,0), -- 10:25:33 +(@PATH,66,-4020.62,-11486.18,-140.636,0,0,0,0,100,0), -- 10:25:41 +(@PATH,67,-4029.12,-11499.68,-140.886,0,0,0,0,100,0), -- 10:25:41 +(@PATH,68,-4042.905,-11526.72,-138.0882,0,0,0,0,100,0), -- 10:25:57 +(@PATH,69,-4041.908,-11531.32,-138.0012,0,0,0,0,100,0), -- 10:26:02 +(@PATH,70,-4035.658,-11537.57,-138.0012,0,0,0,0,100,0), -- 10:26:02 +(@PATH,71,-4033.483,-11539.54,-137.9768,0,0,0,0,100,0), -- 10:26:08 +(@PATH,72,-4033.447,-11555.33,-138.039,0,0,0,0,100,0), -- 10:26:12 +(@PATH,73,-4041.411,-11566.91,-138.1366,0,0,0,0,100,0), -- 10:26:19 +(@PATH,74,-4043.277,-11567.36,-138.179,0,0,0,0,100,0); -- 10:26:21 + +-- Add missing Exodar Peace Keepers +SET @CGUID:=87912; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+15; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 16733, 530, -4014.95, -11691.79, -134.8826, 3.211406, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+1, 16733, 530, -3872.768, -11745.65, -107.2824, 1.937315, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+2, 16733, 530, -3858.128, -11736.21, -107.0747, 2.111848, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+3, 16733, 530, -3874.034, -11619.76, -137.4797, 4.118977, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+4, 16733, 530, -3896.759, -11608.23, -137.7288, 4.13643, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+5, 16733, 530, -3883.912, -11577.22, -132.7659, 1.169371, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+6, 16733, 530, -3857.081, -11591.1, -132.5431, 0.8901179, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+7, 16733, 530, -3928.165, -11568.19, -150.2529, 1.012291, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+8, 16733, 530, -3983.486, -11659.17, -139.0413, 6.126106, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+9, 16733, 530, -4128.439, -11441.22, -130.4346, 3.892084, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+10, 16733, 530, -4145.358, -11432.4, -130.6977, 4.13643, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+11, 16733, 530, -3958.252, -11432.68, -136.5482, 3.089233, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+12, 16733, 530, -3957.141, -11443.25, -136.5704, 2.984513, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+13, 16733, 530, -3914.363, -11441.08, -132.8212, 0.01745329, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+14, 16733, 530, -3915.224, -11430.32, -132.7888, 0, 120, 0), -- 16733 (Area: -1) (Auras: ) +(@CGUID+15, 16733, 530, -3735.099, -11505.95, -133.9994, 2.722714, 120, 0); -- 16733 (Area: -1) (Auras: ) diff --git a/sql/updates/world/2016_01_17_09_world.sql b/sql/updates/world/2016_01_17_09_world.sql new file mode 100644 index 00000000000..85e6f535866 --- /dev/null +++ b/sql/updates/world/2016_01_17_09_world.sql @@ -0,0 +1,31 @@ +SET @OGUID:=6362; +SET @CGUID:=78301; +SET @Event:=2; + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 180796, 0, 1, 1, -3826.189, -771.3663, 8.083211, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 180796 (Area: 150) +(@OGUID+1, 180797, 0, 1, 1, -3825.66, -770.9445, 8.083211, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 180797 (Area: 150) +(@OGUID+2, 178746, 0, 1, 1, -3822.936, -769.4861, 8.083211, 1.518436, 0, 0, 0, 1, 120, 255, 1); -- 178746 (Area: 150) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+2; + +-- Add spawns Pat's Snowcloud Guy & Wonderform Operator <Smokywood Pastures> +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+10; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0, 15730, 0, 2051.343, 272.4555, 57.25123, 0, 120, 0), -- 15730 (Area: 159) (Auras: 26000 - 26000) +(@CGUID+1, 15730, 0, 2051.359, 272.4567, 57.25214, 0, 120, 0), -- 15730 (Area: 159) (Auras: 26000 - 26000) +(@CGUID+2, 15730, 0, -5049.26, -818.5426, 495.3753, 0, 120, 0), -- 15730 (Area: 809) (Auras: 26000 - 26000) +(@CGUID+3, 15730, 0, -5049.293, -818.5344, 495.3785, 0, 120, 0), -- 15730 (Area: 809) (Auras: 26000 - 26000) +(@CGUID+4, 15730, 0, -8823.889, 540.5417, 96.89484, 5.951573, 120, 0), -- 15730 (Area: 5148) (Auras: 26000 - 26000) +(@CGUID+5, 15730, 0, -8823.89, 540.528, 96.89533, 2.443461, 120, 0), -- 15730 (Area: 5148) (Auras: 26000 - 26000) +(@CGUID+6, 15730, 0, -14294.22, 516.1476, 9.037167, 5.340707, 120, 0), -- 15730 (Area: 35) (Auras: 26000 - 26000) +(@CGUID+7, 15730, 0, -14294.3, 516.146, 9.037253, 1.815142, 120, 0), -- 15730 (Area: 35) (Auras: 26000 - 26000) +(@CGUID+8, 15730, 0, -3826.132, -771.75, 8.083211, 0.1396263, 120, 0), -- 15730 (Area: 150) (Auras: 26000 - 26000) +(@CGUID+9, 15730, 0, -3826.108, -771.7864, 8.083211, 3.665191, 120, 0), -- 15730 (Area: 150) (Auras: 26000 - 26000) +(@CGUID+10, 15732, 0, -3821.368, -768.9375, 8.083211, 1.745329, 120, 0); -- 15732 (Area: 150) + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+10 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+10; + diff --git a/sql/updates/world/2016_01_17_10_world.sql b/sql/updates/world/2016_01_17_10_world.sql new file mode 100644 index 00000000000..0fdc04eb60f --- /dev/null +++ b/sql/updates/world/2016_01_17_10_world.sql @@ -0,0 +1 @@ +UPDATE `creature` SET `MovementType`=0 WHERE `guid`=131180; diff --git a/sql/updates/world/2016_01_17_11_world.sql b/sql/updates/world/2016_01_17_11_world.sql new file mode 100644 index 00000000000..9ab963a2ff2 --- /dev/null +++ b/sql/updates/world/2016_01_17_11_world.sql @@ -0,0 +1,10 @@ +UPDATE `smart_scripts` SET `event_type`=4 WHERE `entryorguid` in (18942,7823,18789,16587,17554,2859,2858,523,352,26876,3615,18937,24032,26852,16192,4312,27344,1571,12596,2409,931,6026,12577,16822,1572,8610,4407,1387,3310,19181,18808,1573,2995,2835,3838,2389,12740,2226,18939,3841,2299,26879,18931,2432,10897,6726,2851,2861,2941,12578,4321,3305,4314,11899,15178,31426,12636,4267,26881,4317,4319,4551,22935,6706,7824,8018,8019,8020,20762,18791,8609,12616,18807,19317,26878,10378,11138,11139,37915,26846,22485,11900,11901,12617,13177,18938,15177,16189,16227,17555,24366,18785,18788,18809,26602,18930,18953,19558,20234,21107,26844,22936,23736,24061,24155,26847,25288,26566,26845,26848,26850,26853,26877,26880,29762,30271) and id =2; +UPDATE `smart_scripts` SET `link`=3, `event_type`=4 WHERE `entryorguid`=18931 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26602 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26853 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26881 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=20234 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid`=26876 AND `source_type`=0 AND `id`=0 AND `link`=0; +UPDATE `smart_scripts` SET `link`=3, `event_type`=4 WHERE `entryorguid`=18930 AND `source_type`=0 AND `id`=2 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=2385900 AND `source_type`=9 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `action_type`=11, `action_param1`=14313, `action_param2`=2, `action_param3`=0, `target_type`=1 WHERE `entryorguid`=2385900 AND `source_type`=9 AND `id`=1 AND `link`=0; diff --git a/sql/updates/world/2016_01_17_12_world.sql b/sql/updates/world/2016_01_17_12_world.sql new file mode 100644 index 00000000000..e4e8ab5e9e2 --- /dev/null +++ b/sql/updates/world/2016_01_17_12_world.sql @@ -0,0 +1,30 @@ +-- +SET @pool_id=369; +SET @GUID=87572; +DELETE FROM `pool_template` WHERE `entry` = @pool_id; +INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES +(@pool_id, 5, 'Ethereum Jailor'); + +DELETE FROM `pool_creature` WHERE `guid` BETWEEN @GUID AND @GUID+20; +INSERT INTO `pool_creature` (`guid`, `pool_entry`, `chance`, `description`) VALUES +(@GUID+0, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+1, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+2, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+3, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+4, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+5, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+6, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+7, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+8, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+9, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+10, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+11, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+12, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+13, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+14, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+15, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+16, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+17, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+18, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+19, @pool_id, 0, 'Ethereum Jailor'), +(@Guid+20, @pool_id, 0, 'Ethereum Jailor'); diff --git a/sql/updates/world/2016_01_17_13_world.sql b/sql/updates/world/2016_01_17_13_world.sql new file mode 100644 index 00000000000..163aa3fb659 --- /dev/null +++ b/sql/updates/world/2016_01_17_13_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature` WHERE `guid`=66270; +UPDATE `creature` SET `position_x`=-3047.323, `position_y`=4081.128, `position_z`=2.707369, `orientation`=5.484657, `spawndist`=10, `MovementType`=1 WHERE `guid`=66343; diff --git a/sql/updates/world/2016_01_17_14_world.sql b/sql/updates/world/2016_01_17_14_world.sql new file mode 100644 index 00000000000..c8b9405abff --- /dev/null +++ b/sql/updates/world/2016_01_17_14_world.sql @@ -0,0 +1,203 @@ +-- Delete all existing spawns +DELETE FROM `creature` WHERE `guid` IN (97259, 97261, 97258, 97257, 97256, 97255, 131106, 109804, 109803, 109802); + +-- Respawn all spawns +SET @CGUID:=134849; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+31; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `curhealth`) VALUES +(@CGUID+0 , 27284, 571, 3970.129, -831.1373, 123.1972, 1.419617, 120, 10, 0), -- 27284 (Area: 4177) (possible waypoints or random movement) +(@CGUID+1 , 27284, 571, 3892.15, -898.545, 116.7031, 4.747295, 120, 0, 0), -- 27284 (Area: 0) (Auras: 51307 - 51307) +(@CGUID+2 , 27284, 571, 3877.338, -886.6799, 119.6563, 5.410521, 120, 0, 0), -- 27284 (Area: 0) (Auras: 51307 - 51307) +(@CGUID+3 , 27284, 571, 3981.821, -915.338, 103.8165, 0.4941546, 120, 10, 0), -- 27284 (Area: 4178) (possible waypoints or random movement) +(@CGUID+4 , 27284, 571, 4063.601, -863.5172, 112.0916, 3.294994, 120, 10, 0), -- 27284 (Area: 0) (possible waypoints or random movement) +(@CGUID+5 , 27284, 571, 4029.796, -817.8798, 122.6137, 5.148721, 120, 10, 0), -- 27284 (Area: 0) (possible waypoints or random movement) +(@CGUID+6 , 27284, 571, 4020.966, -913.8099, 107.1895, 1.902651, 120, 0, 0), -- 27284 (Area: 0) +(@CGUID+7 , 27401, 571, 4012.309, -778.3416, 119.4081, 5.117236, 120, 10, 0), -- 27401 (Area: 4177) (Auras: ) (possible waypoints or random movement) +(@CGUID+8 , 27401, 571, 3957.39, -879.4473, 120.6337, 1.665177, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+9 , 27401, 571, 3979.763, -878.6928, 118.7674, 2.167667, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+10, 27401, 571, 3891.449, -871.9622, 110.0855, 4.131083, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+11, 27401, 571, 3908.99, -867.735, 108.25, 0.07704493, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+12, 27401, 571, 4005.749, -911.3463, 107.528, 3.572126, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+13, 27401, 571, 4018.18, -838.5659, 120.1189, 3.396627, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+14, 27401, 571, 3997.235, -935.1, 104.7279, 0.895307, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+15, 27401, 571, 4046.337, -872.1385, 115.5023, 2.777797, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+16, 27401, 571, 4040.803, -824.1927, 119.995, 3.689994, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+17, 27401, 571, 4079.794, -860.7454, 111.5424, 3.844261, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+18, 27401, 571, 4112.891, -862.1273, 114.5041, 5.726786, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+19, 27401, 571, 3962.095, -841.9584, 121.1146, 1.314913, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+20, 27401, 571, 3972.828, -817.3924, 124.1117, 1.684451, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+21, 27401, 571, 3927.054, -862.1707, 121.9197, 5.969274, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+22, 27401, 571, 3983.165, -884.7412, 117.6653, 3.801475, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+23, 27401, 571, 4000.266, -806.4115, 124.4378, 2.8901, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+24, 27401, 571, 3996.695, -804.8523, 124.5836, 5.710121, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+25, 27401, 571, 4029.536, -842.3114, 117.1135, 5.811058, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+26, 27401, 571, 4063.478, -903.8126, 115.2312, 3.785855, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+27, 27401, 571, 3971.025, -913.7602, 104.5964, 1.58825, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+28, 27401, 571, 3992.506, -939.1702, 105.5502, 4.213991, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+29, 27401, 571, 3930.066, -870.2675, 104.4508, 0.4872836, 120, 10, 0), -- 27401 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+30, 27401, 571, 3961.272, -872.5833, 104.2002, 2.95032, 120, 0, 0), -- 27401 (Area: 0) (Auras: ) +(@CGUID+31, 27401, 571, 3912.686, -865.0364, 120.8479, 6.199958, 120, 0, 0); -- 27401 (Area: 0) (Auras: ) + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134849; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3962.255,`position_y`=-845.7626,`position_z`=120.7226 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,3962.255,-845.7626,120.7226,0,0,0,0,100,0), -- 17:07:32 +(@PATH,2,3964.674,-842.7882,121.4607,0,0,0,0,100,0), -- 17:07:33 +(@PATH,3,3967.174,-837.5382,122.2107,0,0,0,0,100,0), -- 17:07:33 +(@PATH,4,3971.408,-823.0021,124.1822,0,0,0,0,100,0), -- 17:07:39 +(@PATH,5,3972.536,-818.4142,124.181,0,0,0,0,100,0), -- 17:07:44 +(@PATH,6,3974.286,-811.9142,124.181,0,0,0,0,100,0), -- 17:07:44 +(@PATH,7,3977.374,-807.4382,123.8934,0,0,0,0,100,0), -- 17:07:49 +(@PATH,8,3990.374,-797.4382,122.8934,0,0,0,0,100,0), -- 17:07:49 +(@PATH,9,3996.358,-796.3887,122.3552,0,0,0,0,100,0), -- 17:07:58 +(@PATH,10,4002.608,-795.8887,121.8552,0,0,0,0,100,0), -- 17:07:58 +(@PATH,11,4005.141,-794.809,121.2954,0,0,0,0,100,0), -- 17:08:19 +(@PATH,12,3991.292,-796.7651,122.3158,0,0,0,0,100,0), -- 17:08:19 +(@PATH,13,3989.065,-798.5057,122.8027,0,0,0,0,100,0), -- 17:08:23 +(@PATH,14,3977.315,-807.5057,123.8027,0,0,0,0,100,0), -- 17:08:23 +(@PATH,15,3973.799,-814.1797,124.0833,0,0,0,0,100,0), -- 17:08:32 +(@PATH,16,3972.049,-819.9297,124.0833,0,0,0,0,100,0), -- 17:08:32 +(@PATH,17,3971.736,-820.819,124.0339,0,0,0,0,100,0), -- 17:08:37 +(@PATH,18,3970.236,-831.069,123.5339,0,0,0,0,100,0), -- 17:08:37 +(@PATH,19,3967.212,-837.6317,122.1643,0,0,0,0,100,0), -- 17:08:41 +(@PATH,20,3964.712,-842.6317,121.4143,0,0,0,0,100,0), -- 17:08:41 +(@PATH,21,3955.197,-848.4968,121.6359,0,0,0,0,100,0), -- 17:08:48 +(@PATH,22,3950.197,-850.4968,122.3859,0,0,0,0,100,0), -- 17:08:48 +(@PATH,23,3946.476,-852.2645,122.539,0,0,0,0,100,0), -- 17:08:54 +(@PATH,24,3938.226,-855.0145,122.289,0,0,0,0,100,0), -- 17:08:54 +(@PATH,25,3935.217,-855.6635,122.2252,0,0,0,0,100,0), -- 17:08:59 +(@PATH,26,3928.967,-856.4135,121.7252,0,0,0,0,100,0), -- 17:08:59 +(@PATH,27,3935.146,-855.8206,122.0987,0,0,0,0,100,0), -- 17:09:05 +(@PATH,28,3938.241,-854.9574,122.219,0,0,0,0,100,0), -- 17:09:07 +(@PATH,29,3946.491,-852.2074,122.719,0,0,0,0,100,0), -- 17:09:07 +(@PATH,30,3954.914,-848.747,121.6653,0,0,0,0,100,0); -- 17:09:13 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134854; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4008.271,`position_y`=-870.0803,`position_z`=117.5745 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,4008.271,-870.0803,117.5745,0,0,0,0,100,0), -- 16:58:23 +(@PATH,2,3996.876,-880.48,118.3026,0,0,0,0,100,0), -- 16:58:29 +(@PATH,3,3991.834,-882.1507,118.5546,0,0,0,0,100,0), -- 16:58:32 +(@PATH,4,3961.252,-886.0806,119.2003,0,0,0,0,100,0), -- 16:58:43 +(@PATH,5,3958.834,-887.8701,119.2766,0,0,0,0,100,0), -- 16:58:47 +(@PATH,6,3958.712,-888.809,119.2599,0,0,0,0,100,0), -- 16:58:48 +(@PATH,7,3983.712,-886.309,118.0099,0,0,0,0,100,0), -- 16:58:48 +(@PATH,8,3990.516,-884.9421,118.4627,0,0,0,0,100,0), -- 16:58:59 +(@PATH,9,4001.527,-882.609,118.6914,0,0,0,0,100,0), -- 16:59:05 +(@PATH,10,4009.196,-881.325,118.3849,0,0,0,0,100,0), -- 16:59:09 +(@PATH,11,4017.301,-863.9352,116.9195,0,0,0,0,100,0), -- 16:59:16 +(@PATH,12,4023.301,-849.1852,116.9195,0,0,0,0,100,0), -- 16:59:16 +(@PATH,13,4025.668,-847.6936,116.7459,0,0,0,0,100,0), -- 16:59:23 +(@PATH,14,4036.918,-842.1936,116.7459,0,0,0,0,100,0), -- 16:59:23 +(@PATH,15,4041.683,-837.2839,117.6779,0,0,0,0,100,0), -- 16:59:31 +(@PATH,16,4031.176,-820.0336,121.8801,0,0,0,0,100,0), -- 16:59:47 +(@PATH,17,4027.651,-834.1048,118.0815,0,0,0,0,100,0), -- 16:59:47 +(@PATH,18,4023.714,-843.688,117.5524,0,0,0,0,100,0), -- 16:59:50 +(@PATH,19,4020.757,-848.9363,117.5502,0,0,0,0,100,0), -- 16:59:55 +(@PATH,20,4010.505,-867.1548,117.3328,0,0,0,0,100,0); -- 17:00:03 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134855; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3998.09,`position_y`=-941.3831,`position_z`=105.5378 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,3998.09,-941.3831,105.5378,0,0,0,0,100,0), -- 16:58:00 +(@PATH,2,3982.87,-921.863,104.2338,0,0,0,0,100,0), -- 16:58:00 +(@PATH,3,3980.532,-918.3081,104.4937,0,0,0,0,100,0), -- 16:58:01 +(@PATH,4,3980.812,-915.6993,104.2544,0,0,0,0,100,0), -- 16:58:03 +(@PATH,5,3993.312,-909.1993,106.0044,0,0,0,0,100,0), -- 16:58:03 +(@PATH,6,4001.392,-906.8644,107.0495,0,0,0,0,100,0), -- 16:58:10 +(@PATH,7,4005.606,-907.3997,107.3568,0,0,0,0,100,0), -- 16:58:13 +(@PATH,8,4018.356,-914.8997,106.8568,0,0,0,0,100,0), -- 16:58:13 +(@PATH,9,4019.2,-915.515,107.0822,0,0,0,0,100,0), -- 16:58:21 +(@PATH,10,4016.712,-901.4606,107.2446,0,0,0,0,100,0), -- 16:58:23 +(@PATH,11,4006.091,-900.8485,107.6517,0,0,0,0,100,0), -- 16:58:28 +(@PATH,12,3999.341,-903.3485,107.4017,0,0,0,0,100,0), -- 16:58:28 +(@PATH,13,3990.741,-907.1246,106.0392,0,0,0,0,100,0), -- 16:58:38 +(@PATH,14,3981.241,-911.3746,104.0392,0,0,0,0,100,0), -- 16:58:38 +(@PATH,15,3998.09,-941.3831,105.5378,0,0,0,0,100,0); -- 16:59:21 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134852; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3954.649,`position_y`=-896.4279,`position_z`=104.172 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,3954.649,-896.4279,104.172,0,0,0,0,100,0), -- 16:57:59 +(@PATH,2,3956.389,-893.2208,104.3171,0,0,0,0,100,0), -- 16:58:01 +(@PATH,3,3950.639,-880.2208,104.8171,0,0,0,0,100,0), -- 16:58:01 +(@PATH,4,3948.071,-877.5638,104.6277,0,0,0,0,100,0), -- 16:58:09 +(@PATH,5,3934.321,-870.3138,103.8777,0,0,0,0,100,0), -- 16:58:09 +(@PATH,6,3933.527,-870.0614,103.9755,0,0,0,0,100,0), -- 16:58:16 +(@PATH,7,3922.027,-870.3114,105.9755,0,0,0,0,100,0), -- 16:58:16 +(@PATH,8,3917.903,-870.4968,106.363,0,0,0,0,100,0), -- 16:58:22 +(@PATH,9,3905.903,-870.4968,108.363,0,0,0,0,100,0), -- 16:58:22 +(@PATH,10,3897.389,-869.1989,109.0091,0,0,0,0,100,0), -- 16:58:28 +(@PATH,11,3895.139,-868.6989,109.0091,0,0,0,0,100,0), -- 16:58:28 +(@PATH,12,3893.163,-868.3932,109.3621,0,0,0,0,100,0), -- 16:58:33 +(@PATH,13,3903.502,-871.1569,108.7203,0,0,0,0,100,0), -- 16:58:34 +(@PATH,14,3918.319,-872.118,105.7782,0,0,0,0,100,0), -- 16:58:49 +(@PATH,15,3935.749,-871.7728,103.4062,0,0,0,0,100,0), -- 16:58:49 +(@PATH,16,3937.464,-872.5975,104.0017,0,0,0,0,100,0), -- 16:58:51 +(@PATH,17,3946.714,-877.3475,104.5017,0,0,0,0,100,0), -- 16:58:51 +(@PATH,18,3953.698,-875.124,104.5628,0,0,0,0,100,0), -- 16:58:57 +(@PATH,19,3959.198,-868.874,104.0628,0,0,0,0,100,0), -- 16:58:57 +(@PATH,20,3964.888,-870.4577,104.2536,0,0,0,0,100,0), -- 16:59:04 +(@PATH,21,3960.319,-875.5621,104.8488,0,0,0,0,100,0), -- 16:59:07 +(@PATH,22,3955.069,-879.8121,104.8488,0,0,0,0,100,0), -- 16:59:07 +(@PATH,23,3953.761,-883.5623,104.9101,0,0,0,0,100,0), -- 16:59:13 +(@PATH,24,3954.511,-894.0623,104.4101,0,0,0,0,100,0); -- 16:59:13 + +-- Pathing for Risen Wintergarde Defender Entry: 27284 'TDB FORMAT' +SET @NPC := 134853; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=4070.011,`position_y`=-911.9304,`position_z`=115.397 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,4070.011,-911.9304,115.397,0,0,0,0,100,0), -- 17:00:27 +(@PATH,2,4063.844,-904.7043,115.3745,0,0,0,0,100,0), -- 17:00:29 +(@PATH,3,4058.64,-895.9709,115.1423,0,0,0,0,100,0), -- 17:00:34 +(@PATH,4,4057.89,-894.7209,115.1423,0,0,0,0,100,0), -- 17:00:34 +(@PATH,5,4055.97,-891.5008,115.2825,0,0,0,0,100,0), -- 17:00:38 +(@PATH,6,4052.97,-881.5008,114.5325,0,0,0,0,100,0), -- 17:00:38 +(@PATH,7,4052.165,-878.6388,114.2091,0,0,0,0,100,0), -- 17:00:44 +(@PATH,8,4051.415,-864.6388,113.4591,0,0,0,0,100,0), -- 17:00:44 +(@PATH,9,4054.136,-862.9764,112.8409,0,0,0,0,100,0), -- 17:00:50 +(@PATH,10,4066.636,-860.9764,112.3409,0,0,0,0,100,0), -- 17:00:50 +(@PATH,11,4072.034,-859.8044,112.1062,0,0,0,0,100,0), -- 17:00:57 +(@PATH,12,4086.284,-857.0544,112.1062,0,0,0,0,100,0), -- 17:00:57 +(@PATH,13,4091.908,-853.9102,112.7256,0,0,0,0,100,0), -- 17:01:05 +(@PATH,14,4101.408,-844.1602,113.7256,0,0,0,0,100,0), -- 17:01:05 +(@PATH,15,4105.021,-846.8843,114.2492,0,0,0,0,100,0), -- 17:01:14 +(@PATH,16,4106.521,-848.6343,114.2492,0,0,0,0,100,0), -- 17:01:14 +(@PATH,17,4109.933,-852.9023,114.737,0,0,0,0,100,0), -- 17:01:18 +(@PATH,18,4111.266,-854.6176,115.0273,0,0,0,0,100,0), -- 17:01:19 +(@PATH,19,4108.093,-862.4123,113.6716,0,0,0,0,100,0), -- 17:01:22 +(@PATH,20,4093.593,-861.4123,113.6716,0,0,0,0,100,0), -- 17:01:22 +(@PATH,21,4087.883,-860.7225,112.5768,0,0,0,0,100,0), -- 17:01:30 +(@PATH,22,4084.479,-860.3036,112.2872,0,0,0,0,100,0), -- 17:01:32 +(@PATH,23,4063.229,-863.3036,112.5372,0,0,0,0,100,0), -- 17:01:32 +(@PATH,24,4059.42,-867.1846,112.8684,0,0,0,0,100,0), -- 17:01:43 +(@PATH,25,4058.17,-873.9346,113.6184,0,0,0,0,100,0), -- 17:01:43 +(@PATH,26,4058.563,-877.7594,113.9066,0,0,0,0,100,0), -- 17:01:47 +(@PATH,27,4060.313,-890.0094,114.1566,0,0,0,0,100,0), -- 17:01:47 +(@PATH,28,4065.274,-896.5776,114.7585,0,0,0,0,100,0), -- 17:01:54 +(@PATH,29,4071.021,-903.6585,115.7979,0,0,0,0,100,0), -- 17:02:00 +(@PATH,30,4073.021,-911.4085,115.0479,0,0,0,0,100,0); -- 17:02:00 diff --git a/sql/updates/world/2016_01_17_15_world.sql b/sql/updates/world/2016_01_17_15_world.sql new file mode 100644 index 00000000000..da949d7100d --- /dev/null +++ b/sql/updates/world/2016_01_17_15_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_text` SET `TextRange`=3 WHERE `entry`=32871; diff --git a/sql/updates/world/2016_01_18_00_world.sql b/sql/updates/world/2016_01_18_00_world.sql new file mode 100644 index 00000000000..85f41cfc0c5 --- /dev/null +++ b/sql/updates/world/2016_01_18_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=21126 AND `source_type`=0 AND `id` IN (4,5); diff --git a/sql/updates/world/2016_01_18_01_world.sql b/sql/updates/world/2016_01_18_01_world.sql new file mode 100644 index 00000000000..9768ecda6c0 --- /dev/null +++ b/sql/updates/world/2016_01_18_01_world.sql @@ -0,0 +1,8 @@ +UPDATE `creature` SET `MovementType`=1 WHERE `guid` IN (134870, 134856, 134857, 134859, 134861, 134862, 134863, 134864, 134865, 134866, 134868, 134871, 134878, 134872, 134873, 134874, 134875); +UPDATE `creature` SET `spawndist`=0 WHERE `guid`=131180; + +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26853 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26881 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=20234 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26876 AND `source_type`=0 AND `id`=2 AND `link`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE `entryorguid`=26602 AND `source_type`=0 AND `id`=2 AND `link`=0; diff --git a/sql/updates/world/2016_01_18_02_world.sql b/sql/updates/world/2016_01_18_02_world.sql new file mode 100644 index 00000000000..ec9a8748cc8 --- /dev/null +++ b/sql/updates/world/2016_01_18_02_world.sql @@ -0,0 +1,39 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(27450,27355) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(2735500) AND `source_type`=9; + +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(27450,0,0,1,8,0,100,0,48790,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Neltharions Flame Control Bunny - On Spellhit (Neltharions Flame) - Store Targetlist'), +(27450,0,1,2,61,0,100,0,48790,0,0,0,33,27450,0,0,0,0,0,7,0,0,0,0,0,0,0,'Neltharions Flame Control Bunny - On Spellhit (Neltharions Flame) - Give Kill Credit'), +(27450,0,2,3,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,27449,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Set Data 1 1 on Neltharions Flame Fire Bunny'), +(27450,0,3,4,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,27355,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Set Data 1 1 on Rothin the Decaying'), +(27450,0,4,0,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,9,27355,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Send Targetlist to Rothin the Decaying'), +(27355,0,0,0,25,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Reset - Set Phase 0'), +(27355,0,1,2,4,0,100,0,0,0,0,0,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Agro - Cast Shadowbolt'), +(27355,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Linked with Previous Event - Set Phase 1'), +(27355,0,3,0,9,1,100,0,0,40,3400,4800,11,9613,64,0,0,0,0,7,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Range (Phase 1) - Cast Shadow Bolt'), +(27355,0,4,0,0,0,100,0,12000,17000,15000,20000,11,51337,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - IC - On Range (Phase 1) - Cast Shadow Flame'), +(27355,0,5,0,2,0,100,1,0,30,9500,11000,11,51512,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Less than 30% HP - Cast Aegis of Neltharion'), +(27355,0,6,0,6,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - On Death - Say'), +(27355,0,7,0,1,0,100,0,10000,10000,10000,10000,11,48685,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - OOC - Cast Imbue Power'), +(27355,0,8,0,25,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - On Reset - Set Passive'), +(27355,0,9,0,38,0,100,0,1,1,30000,30000,80,2735500,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Data Set 1 1 - Run Script'), +(2735500,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Script - Face Target'), +(2735500,9,1,0,0,0,100,0,0,0,0,0,28,48685,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Script - Remove Aura Imbue Power'), +(2735500,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - Script - Say'), +(2735500,9,3,0,0,0,100,0,7000,7000,0,0,28,48695,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - Script - Remove Aura Imbue Power Shield State'), +(2735500,9,4,0,0,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying - Script - Set Aggresive'), +(2735500,9,5,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Rothin the Decaying <Cult of the Damned> - script - Say'), +(2735500,9,6,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Rothin the Decaying - Script - Attack Target'); + +DELETE FROM `creature_template_addon` WHERE `entry`=27355; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(27355, 0, 0, 0x0, 0x1, 0, '48695'); -- -- 27355 - 48695 - 48695 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=48685; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=27355; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48685, 0, 0, 31, 0, 3, 27418, 0, 0, 0, 0, '', 'Imbue Power targets Rothins Spell Bunny'), +(13, 1, 48685, 0, 1, 31, 0, 3, 26475, 0, 0, 0, 0, '', 'Imbue Power targets Magmawyrm'), +(22, 10, 27355, 0, 0, 36, 1, 0, 0, 0, 0, 0, 0, '', 'Only execute SAI if Rothin the Decaying alive'), +(22, 2, 27355, 0, 0, 1, 1, 48695, 0, 0, 1, 0, 0, '', 'Only execute SAI if Rothin the Decaying does not have aura Imbue Power Shield State'); diff --git a/sql/updates/world/2016_01_18_03_world.sql b/sql/updates/world/2016_01_18_03_world.sql new file mode 100644 index 00000000000..4b8eb4ae0c9 --- /dev/null +++ b/sql/updates/world/2016_01_18_03_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature_text` WHERE `entry` = 11856; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(11856, 0, 0, "Let's go before they find out I'm free!", 12, 0, 100, 1, 0, 0, 8327, 0, 'Kaya SAY_START'), +(11856, 1, 0, "Look out! We're under attack!", 12, 0, 100, 5, 0, 0, 8328, 0, 'Kaya SAY_AMBUSH'), +(11856, 2, 0, "Thank you for helping me. I know my way back from here.", 12, 0, 100, 3, 0, 0, 8329, 0, 'Kaya SAY_END'); diff --git a/sql/updates/world/2016_01_18_04_world.sql b/sql/updates/world/2016_01_18_04_world.sql new file mode 100644 index 00000000000..28ab2d96731 --- /dev/null +++ b/sql/updates/world/2016_01_18_04_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `creature` WHERE id=27535; +DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (27761); +INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `minion`, `description`, `summontype`) VALUES (27761, 27535,1, "Fordragon Battle Steed", 7); +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=27761; diff --git a/sql/updates/world/2016_01_18_05_world.sql b/sql/updates/world/2016_01_18_05_world.sql new file mode 100644 index 00000000000..0d28cd17642 --- /dev/null +++ b/sql/updates/world/2016_01_18_05_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature` SET `MovementType`= 1 WHERE `guid`= 134869 AND `id`= 27401; +DELETE FROM `creature_addon` WHERE `guid` IN (97255,97256,97257,97258,97259,97261,131106); diff --git a/sql/updates/world/2016_01_18_06_world.sql b/sql/updates/world/2016_01_18_06_world.sql new file mode 100644 index 00000000000..f8b90c15f54 --- /dev/null +++ b/sql/updates/world/2016_01_18_06_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `disenchant_loot_template` SET `MinCount`=2,`MaxCount`=3 WHERE `Entry` IN (15,34) AND `Item`=34054; +UPDATE `disenchant_loot_template` SET `MinCount`=4,`MaxCount`=7 WHERE `Entry` IN (16,35) AND `Item`=34054; diff --git a/sql/updates/world/2016_01_19_00_world.sql b/sql/updates/world/2016_01_19_00_world.sql new file mode 100644 index 00000000000..f210b95c13a --- /dev/null +++ b/sql/updates/world/2016_01_19_00_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=11142; +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`) VALUES +(11142, 5, 66303, 0), +(11142, 16, 404, 0); diff --git a/sql/updates/world/2016_01_19_01_world.sql b/sql/updates/world/2016_01_19_01_world.sql new file mode 100644 index 00000000000..a10bc7e278f --- /dev/null +++ b/sql/updates/world/2016_01_19_01_world.sql @@ -0,0 +1,28 @@ +-- +DELETE FROM `gossip_menu` WHERE `entry` IN (7482, 7483); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(7482, 9067), +(7483, 9068); + +DELETE FROM `npc_text` WHERE `ID` IN (9068); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `Probability0`, `em0_0`, `BroadcastTextID0`) VALUES +(9068, 'How did you learn about the ore? Not even the Baron knew...$B$BTake the cursed things. They''ve brought me nothing but misfortune anyway. I hid them IN the stables just off the courtyard.$B$B<A low growl begins TO emanate FROM the back of Landen''s throat.>', '', 0, 1, 20, 14393); + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=7482); +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 +(7482,0,0,'Listen to me, human. I care nothing for your plight, but you have something I require. Tell me where to find the bloodforged ingots.',14392,1,1,7483,0,0,0,'',0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7482; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,7482,0,0,9,9692,0,0,0,'', 'gossip option on Landen Stilwell requires The Path of the Adept taken'); + +UPDATE `creature_template` SET `npcflag`=1,`gossip_menu_id` =7482, `AIName`='SmartAI', `flags_extra`=0 WHERE `entry` =17822; + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=17822; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=1782200; +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 +(17822,0,0,0,64,0,100,1,0,0,0,0,80,1782200,2,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - on gossip hello - Actionlist'), +(1782200,9,0,0,0,0,100,0,20000,20000,0,0,11,31310,0,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - Action list - cast Landen Stilwell Transform'), +(1782200,9,1,0,0,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - Action list - set faction'), +(1782200,9,2,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,'Landen Stilwell - Action list - start attack'), +(17822,0,1,0,0,0,100,1,0,0,0,0,11,31310,0,0,0,0,0,1,0,0,0,0,0,0,0,'Landen Stilwell - IC - cast Landen Stilwell Transform'); diff --git a/sql/updates/world/2016_01_19_02_world.sql b/sql/updates/world/2016_01_19_02_world.sql new file mode 100644 index 00000000000..7c71156b248 --- /dev/null +++ b/sql/updates/world/2016_01_19_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `BaseAttackTime` = 1200 WHERE `entry` = 15516; diff --git a/sql/updates/world/2016_01_19_03_world.sql b/sql/updates/world/2016_01_19_03_world.sql new file mode 100644 index 00000000000..0d559ace044 --- /dev/null +++ b/sql/updates/world/2016_01_19_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `InhabitType` = 5 WHERE `entry` = 14517; diff --git a/sql/updates/world/2016_01_19_04_world.sql b/sql/updates/world/2016_01_19_04_world.sql new file mode 100644 index 00000000000..f4fe95f5539 --- /dev/null +++ b/sql/updates/world/2016_01_19_04_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `gameobject` WHERE `guid`=7230 AND `id`=175946; +DELETE FROM `gameobject` WHERE `guid`=250 AND `id`=175946; +UPDATE `gameobject` SET `orientation`=5.323256 WHERE `guid`=67867; +UPDATE `gameobject_template` SET `faction`=114, `flags`=32 WHERE `entry`=176965; +UPDATE `gameobject_template` SET `faction`=14 WHERE `entry`=177807; diff --git a/sql/updates/world/2016_01_19_05_world.sql b/sql/updates/world/2016_01_19_05_world.sql new file mode 100644 index 00000000000..5afd9e2b8a5 --- /dev/null +++ b/sql/updates/world/2016_01_19_05_world.sql @@ -0,0 +1 @@ +DELETE FROM `creature_text` WHERE `entry` IN (17900,17901) AND `BroadcastTextId`=8329; diff --git a/sql/updates/world/2016_01_19_06_world.sql b/sql/updates/world/2016_01_19_06_world.sql new file mode 100644 index 00000000000..cece0c623bf --- /dev/null +++ b/sql/updates/world/2016_01_19_06_world.sql @@ -0,0 +1,97 @@ +-- gothik the harvester rework +-- creature (13 entries) +SET @CGUID = 127618; -- PR NOTE: This needs to match the value set in boss_gothik.cpp for the CGUID_TRIGGER const + +-- boss messages +DELETE FROM `creature_text` WHERE `entry`=16060; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`probability`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(16060,0,0,"Foolishly you have sought your own demise.",14,100,8807,13030,3,"Gothik SAY_INTRO_1"), +(16060,1,0,"Brazenly you have disregarded powers beyond your understanding.",14,100,0,13031,3,"Gothik SAY_INTRO_2"), +(16060,2,0,"You have fought hard to invade the realm of the harvester.",14,100,0,13032,3,"Gothik SAY_INTRO_3"), +(16060,3,0,"Now there is only one way out- to walk the lonely path of the damned.",14,100,0,13033,3,"Gothik SAY_INTRO_4"), +(16060,4,0,"I have waited long enough. Now you face the harvester of souls.",14,100,8808,13028,3,"Gothik SAY_PHASE_TWO"), +(16060,5,0,"I... am... undone.",14,100,8805,13026,3,"Gothik SAY_DEATH"), +(16060,6,0,"Death is the only escape!",14,20,8806,13027,3,"Gothik SAY_KILL"), +(16060,7,0,"%s teleports into the fray!",41,100,0,32306,3,"Gothik EMOTE_PHASE_TWO"), +(16060,8,0,"The central gate opens!",41,100,0,32307,3,"Gothik EMOTE_GATE_OPENED"); + +-- minion AI +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_livingtrainee" WHERE `entry`=16124; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_livingknight" WHERE `entry`=16125; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_livingrider" WHERE `entry`=16126; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectraltrainee" WHERE `entry`=16127; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectralknight" WHERE `entry`=16148; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectralrider" WHERE `entry`=16150; +UPDATE `creature_template` SET `ScriptName`="npc_gothik_minion_spectralhorse" WHERE `entry`=16149; + +-- minion difficulty spell entries +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (55604,27825,27831,27989,56408,27993,55606,27994,55648); +INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`) VALUES +(55604,55604,55645), -- death plague +(27831,27831,55638), -- shadow bolt volley +(27989,27989,56407), -- arcane explosion +(55606,55606,55608), -- unholy aura +(27994,27994,55646), -- drain life +(55648,55648,27995); -- unholy frenzy + +-- rider damage aura + visual aura +DELETE FROM `creature_template_addon` WHERE `entry` IN (16126,29986,16148,29990,16150,29988); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`auras`) VALUES +(16126,25278,"55606"), +(29986,25278,"55608"), +(16148, 0,"10848"), +(29990, 0,"10848"), +(16150, 0,"55606 10848"), +(29988, 0,"55608 10848"); + +-- trigger AI +UPDATE `creature_template` SET `ScriptName`="npc_gothik_trigger",`InhabitType`=7 WHERE `entry`=16137; +-- re-do spawn locations for triggers +DELETE FROM `creature` WHERE `id`=16137; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`movementtype`) VALUES +(@CGUID+00,16137,533,3,1,2643.731,-3399.681,284.1829,0,0,0,0), -- living side soul trigger (south) +(@CGUID+01,16137,533,3,1,2739.995,-3399.779,284.2946,0,0,0,0), -- living side soul trigger (north) +(@CGUID+02,16137,533,3,1,2643.731,-3321.727,284.2327,0,0,0,0), -- spectral side soul trigger (south) +(@CGUID+03,16137,533,3,1,2739.995,-3321.727,284.2316,0,0,0,0), -- spectral side soul trigger (north) +(@CGUID+04,16137,533,3,1,2692.161,-3430.746,268.6462,0,0,0,0), -- living side spawn trigger (center back) +(@CGUID+05,16137,533,3,1,2714.562,-3430.61 ,268.6462,0,0,0,0), -- living side spawn trigger (north) +(@CGUID+06,16137,533,3,1,2692.213,-3428.783,268.6462,0,0,0,0), -- living side spawn trigger (center front) +(@CGUID+07,16137,533,3,1,2669.581,-3428.859,268.6462,0,0,0,0), -- living side spawn trigger (south) +(@CGUID+08,16137,533,3,1,2733.457,-3349.388,267.7677,0,0,0,0), -- spectral side spawn trigger (northeast) +(@CGUID+09,16137,533,3,1,2725.818,-3309.567,267.7686,0,0,0,0), -- spectral side spawn trigger (northwest) +(@CGUID+10,16137,533,3,1,2700.269,-3322.354,267.7678,0,0,0,0), -- spectral side spawn trigger (center) +(@CGUID+11,16137,533,3,1,2664.872,-3340.749,267.7674,0,0,0,0), -- spectral side spawn trigger (southeast) +(@CGUID+12,16137,533,3,1,2683.886,-3304.213,267.768 ,0,0,0,0); -- spectral side spawn trigger (southwest) + +-- make visuals target proper triggers +-- to anchor 1: 27892 (Trainee), 27928 (DK), 27935 (Rider) +-- to anchor 2: 27893 (Trainee), 27929 (DK), 27936 (Rider) +-- anchor -> skull: 27915 (Trainee), 27931 (DK), 27937 (Rider) +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (27892,27928,27935,27893,27929,27936,27915,27931,27937); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionTarget`,`ElseGroup`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`Comment`) VALUES +(13,1,27892,31,0,0,3,16137,@CGUID+0,"To Anchor 1 - Target Anchor Living South"), +(13,1,27892,31,0,1,3,16137,@CGUID+1,"To Anchor 1 - Target Anchor Living North"), +(13,1,27928,31,0,0,3,16137,@CGUID+0,"To Anchor 1 - Target Anchor Living South"), +(13,1,27928,31,0,1,3,16137,@CGUID+1,"To Anchor 1 - Target Anchor Living North"), +(13,1,27935,31,0,0,3,16137,@CGUID+0,"To Anchor 1 - Target Anchor Living South"), +(13,1,27935,31,0,1,3,16137,@CGUID+1,"To Anchor 1 - Target Anchor Living North"), + +(13,1,27893,31,0,0,3,16137,@CGUID+2,"To Anchor 2 - Target Anchor Spectral South"), +(13,1,27893,31,0,1,3,16137,@CGUID+3,"To Anchor 2 - Target Anchor Spectral North"), +(13,1,27929,31,0,0,3,16137,@CGUID+2,"To Anchor 2 - Target Anchor Spectral South"), +(13,1,27929,31,0,1,3,16137,@CGUID+3,"To Anchor 2 - Target Anchor Spectral North"), +(13,1,27936,31,0,0,3,16137,@CGUID+2,"To Anchor 2 - Target Anchor Spectral South"), +(13,1,27936,31,0,1,3,16137,@CGUID+3,"To Anchor 2 - Target Anchor Spectral North"); + +-- disable LoS check for visuals to ensure they always work +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (27892,27928,27935,27893,27929,27936,27915,27931,27937); +INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`comment`) VALUES +(0,27892,64,"Gothik - To Anchor 1 - Ignore LoS"), +(0,27928,64,"Gothik - To Anchor 1 - Ignore LoS"), +(0,27935,64,"Gothik - To Anchor 1 - Ignore LoS"), +(0,27893,64,"Gothik - To Anchor 2 - Ignore LoS"), +(0,27929,64,"Gothik - To Anchor 2 - Ignore LoS"), +(0,27936,64,"Gothik - To Anchor 2 - Ignore LoS"), +(0,27915,64,"Gothik - Anchor To Skulls - Ignore LoS"), +(0,27931,64,"Gothik - Anchor To Skulls - Ignore LoS"), +(0,27937,64,"Gothik - Anchor To Skulls - Ignore LoS"); diff --git a/sql/updates/world/2016_01_19_07_world.sql b/sql/updates/world/2016_01_19_07_world.sql new file mode 100644 index 00000000000..e1a72398a5f --- /dev/null +++ b/sql/updates/world/2016_01_19_07_world.sql @@ -0,0 +1,23 @@ +-- four horsemen rewrite +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_baron' WHERE `entry`=30549; +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_thane' WHERE `entry`=16064; +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_lady' WHERE `entry`=16065; +UPDATE `creature_template` SET `ScriptName`='boss_four_horsemen_sir' WHERE `entry`=16063; + +-- add ragecast texts +DELETE FROM `creature_text` WHERE `entry` IN (16064,16065,16063,30549) AND `groupid`=7; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`probability`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(16063,7,0,"%s casts Condemnation on everyone!",41,100,33088,3,"zeliek EMOTE_RAGECAST"), +(16065,7,0,"%s casts Unyielding Pain on everyone!",41,100,33087,3,"blaumeux EMOTE_RAGECAST"); +-- slay text probability to DB +UPDATE `creature_text` SET `probability`=30 WHERE `entry` IN (16064,16065,16063,30549) AND `groupid`=3; + +-- difficulty based spell ids +DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (28882,28884,57374,28863,57376,28883); +INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`) VALUES +(28882,28882,57369), -- Rivendare: Unholy Shadow +(28884,28884,57467), -- Korth'azz: Meteor +(57374,57374,57464), -- Blaumeux: Shadow Bolt +(28863,28863,57463), -- Blaumeux: Void Zone +(57376,57376,57465), -- Zeliek: Holy Bolt +(28883,28883,57466); -- Zeliek: Holy Wrath diff --git a/sql/updates/world/2016_01_19_08_world.sql b/sql/updates/world/2016_01_19_08_world.sql new file mode 100644 index 00000000000..d078c059201 --- /dev/null +++ b/sql/updates/world/2016_01_19_08_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `npcflag`=3, `gossip_menu_id`=140 WHERE `entry`=1139; diff --git a/sql/updates/world/2016_01_20_00_world.sql b/sql/updates/world/2016_01_20_00_world.sql new file mode 100644 index 00000000000..26ce069edd8 --- /dev/null +++ b/sql/updates/world/2016_01_20_00_world.sql @@ -0,0 +1,70 @@ +DELETE FROM gossip_menu_option WHERE `menu_id` IN (11013, 11014, 11015, 11016, 11017, 11018); +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 +(11013, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer +(11013, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Light's Hammer + +(11014, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned +(11014, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Oratory of the Damned + +(11015, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls +(11015, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Rampart of Skulls + +(11016, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise +(11016, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Deathbringer's Rise + +(11017, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire +(11017, 6, 0, 'Teleport to Sindragosa''s Lair.', 37728, 1, 1, 0, 0, 0, 0, '', 0), -- Upper Spire + +(11018, 0, 0, 'Teleport to Light''s Hammer.', 37671, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 1, 0, 'Teleport to the Oratory of the Damned.', 37722, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 3, 0, 'Teleport to the Rampart of Skulls.', 37723, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 4, 0, 'Teleport to the Deathbringer''s Rise.', 37724, 1, 1, 0, 0, 0, 0, '', 0), -- Sindragosa's Lair +(11018, 5, 0, 'Teleport to the Upper Spire.', 37725, 1, 1, 0, 0, 0, 0, '', 0); -- Sindragosa's Lair + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (11013, 11014, 11015, 11016, 11017, 11018); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,11013,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11013,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11013,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11013,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11013,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11014,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11014,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11014,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11014,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11015,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11015,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11015,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11015,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11016,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11016,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11016,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'), +(15,11016,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11017,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11017,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11017,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11017,6,0,0,13,0,10,3,2,0,0,0,'','Show option ''Teleport to Sindragosa''s Lair.'' only if BossState DATA_VALITHRIA_DREAMWALKER is DONE'), + +(15,11018,1,0,0,13,0,0,3,2,0,0,0,'','Show option ''Teleport to the Oratory of the Damned.'' only if BossState DATA_LORD_MARROWGAR is DONE'), +(15,11018,3,0,0,13,0,1,3,2,0,0,0,'','Show option ''Teleport to the Rampart of Skulls.'' only if BossState DATA_LADY_DEATHWHISPER is DONE'), +(15,11018,4,0,0,13,0,2,3,2,0,0,0,'','Show option ''Teleport to the Deathbringer''s Rise.'' only if BossState DATA_ICECROWN_GUNSHIP_BATTLE is DONE'), +(15,11018,5,0,0,13,0,41,3,0,0,0,0,'','Show option ''Teleport to the Upper Spire.'' only if DATA_UPPERSPIRE_TELE_ACT is DONE'); diff --git a/sql/updates/world/2016_01_20_01_world.sql b/sql/updates/world/2016_01_20_01_world.sql new file mode 100644 index 00000000000..b1c6e0de756 --- /dev/null +++ b/sql/updates/world/2016_01_20_01_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `gossip_menu` WHERE `entry` IN (9578) AND `text_id`=12927; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(9578, 12927); diff --git a/sql/updates/world/2016_01_20_02_world.sql b/sql/updates/world/2016_01_20_02_world.sql new file mode 100644 index 00000000000..d026c3cb478 --- /dev/null +++ b/sql/updates/world/2016_01_20_02_world.sql @@ -0,0 +1,475 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=12869; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(12869, 12869, 0, 0, 2), +(12869, 12853, 10, 90, 2), +(12869, 12854, 10, 270, 2); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=12866; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(12866, 12866, 0, 0, 2), +(12866, 12851, 10, 90, 2), +(12866, 12852, 10, 270, 2); + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13415; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13415, 13415, 0, 0, 2), +(13415, 13414, 3, 90, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13415; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=467.9448,`position_y`=847.3433,`position_z`=15.00103 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,467.9448,847.3433,15.00103,0,0,1,0,100,0), -- 20:18:04 +(@PATH,2,469.2407,849.0333,14.97786,0,0,1,0,100,0), -- 20:18:07 +(@PATH,3,473.5281,853.7736,15.31754,0,0,1,0,100,0), -- 20:18:07 +(@PATH,4,474.0281,857.5236,15.31754,0,0,1,0,100,0), -- 20:18:07 +(@PATH,5,473.7495,860.6138,15.416,0,0,1,0,100,0), -- 20:18:10 +(@PATH,6,472.7495,861.8638,15.416,0,0,1,0,100,0), -- 20:18:10 +(@PATH,7,471.7495,864.1138,15.166,0,0,1,0,100,0), -- 20:18:10 +(@PATH,8,467.3445,873.2086,15.48424,0,0,1,0,100,0), -- 20:18:12 +(@PATH,9,466.7931,879.0881,15.64043,0,0,1,0,100,0), -- 20:18:15 +(@PATH,10,465.5614,888.2678,15.55727,0,0,1,0,100,0), -- 20:18:17 +(@PATH,11,465.6077,896.3718,15.43029,0,0,1,0,100,0), -- 20:18:20 +(@PATH,12,467.8163,900.2317,15.73285,0,0,1,0,100,0), -- 20:18:21 +(@PATH,13,468.6377,905.9084,15.83779,0,0,1,0,100,0), -- 20:18:22 +(@PATH,14,466.0126,916.0297,15.82569,0,0,1,0,100,0), -- 20:18:24 +(@PATH,15,470.3526,931.8629,14.75142,0,0,1,0,100,0), -- 20:18:27 +(@PATH,16,469.243,921.0674,15.69238,0,0,1,0,100,0), -- 20:18:33 +(@PATH,17,466.0515,931.413,15.39575,0,0,1,0,100,0), -- 20:18:37 +(@PATH,18,466.0515,916.163,15.89575,0,0,1,0,100,0), -- 20:18:37 +(@PATH,19,466.9939,913.4012,15.84451,0,0,1,0,100,0), -- 20:18:44 +(@PATH,20,468.8083,905.5721,15.84772,0,0,1,0,100,0), -- 20:18:46 +(@PATH,21,465.8907,896.822,15.64862,0,0,1,0,100,0), -- 20:18:48 +(@PATH,22,465.9131,888.7125,15.57837,0,0,1,0,100,0), -- 20:18:50 +(@PATH,23,466.5535,879.3544,15.68201,0,0,1,0,100,0), -- 20:18:52 +(@PATH,24,468.5858,869.7411,15.54825,0,0,1,0,100,0), -- 20:18:55 +(@PATH,25,472.7863,862.353,15.26673,0,0,1,0,100,0), -- 20:18:57 +(@PATH,26,473.7863,860.603,15.51673,0,0,1,0,100,0), -- 20:18:57 +(@PATH,27,473.6846,860.4615,15.38147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,28,474.4346,859.4615,15.38147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,29,474.1846,858.2115,15.38147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,30,473.6846,854.2115,15.13147,0,0,1,0,100,0), -- 20:18:58 +(@PATH,31,473.1513,852.6404,15.02536,0,0,1,0,100,0); -- 20:19:01 +-- 0x1C16F446801658C0006A5B000A1D4854 .go 467.9448 847.3433 15.00103 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13418; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13418, 13418, 0, 0, 2), +(13418, 13416, 3, 90, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13418; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=277.868,`position_y`=842.4459,`position_z`=-23.75307 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,277.868,842.4459,-23.75307,0,0,1,0,100,0), -- 20:20:58 +(@PATH,2,277.4133,846.7463,-23.75651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,3,278.9133,848.4963,-23.75651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,4,280.4133,850.2463,-23.75651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,5,282.6633,852.9963,-23.50651,0,0,1,0,100,0), -- 20:21:00 +(@PATH,6,283.827,860.8285,-23.04886,0,0,1,0,100,0), -- 20:21:01 +(@PATH,7,284.327,862.8285,-23.04886,0,0,1,0,100,0), -- 20:21:01 +(@PATH,8,282.827,867.8285,-23.79886,0,0,1,0,100,0), -- 20:21:01 +(@PATH,9,281.3427,869.1567,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,10,277.5927,871.6567,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,11,277.0927,875.9067,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,12,276.0927,884.1567,-23.76081,0,0,1,0,100,0), -- 20:21:02 +(@PATH,13,275.7303,886.521,-23.90997,0,0,1,0,100,0), -- 20:21:04 +(@PATH,14,277.0383,899.6908,-30.63255,0,0,1,0,100,0), -- 20:21:05 +(@PATH,15,280.329,915.5177,-38.46265,0,0,1,0,100,0), -- 20:21:06 +(@PATH,16,281.5613,931.75,-46.90573,0,0,1,0,100,0), -- 20:21:07 +(@PATH,17,277.2371,957.6002,-59.79856,0,0,1,0,100,0), -- 20:21:09 +(@PATH,18,276.8787,969.0604,-59.80925,0,0,1,0,100,0), -- 20:21:11 +(@PATH,19,280.0755,977.5538,-60.08774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,20,283.3255,979.3038,-60.08774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,21,284.8255,980.0538,-60.08774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,22,289.5755,980.3038,-60.33774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,23,292.3255,980.3038,-60.33774,0,0,1,0,100,0), -- 20:21:12 +(@PATH,24,295.7121,979.2697,-60.03576,0,0,1,0,100,0), -- 20:21:13 +(@PATH,25,299.2121,976.2697,-60.03576,0,0,1,0,100,0), -- 20:21:13 +(@PATH,26,295.9117,979.6497,-60.04585,0,0,1,0,100,0), -- 20:21:16 +(@PATH,27,292.6617,980.3997,-60.04585,0,0,1,0,100,0), -- 20:21:16 +(@PATH,28,289.9117,980.3997,-60.04585,0,0,1,0,100,0), -- 20:21:16 +(@PATH,29,285.0618,980.2185,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,30,283.3118,979.2185,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,31,280.0618,977.4685,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,32,278.8118,976.9685,-60.09282,0,0,1,0,100,0), -- 20:21:17 +(@PATH,33,276.8872,969.0083,-59.83573,0,0,1,0,100,0), -- 20:21:18 +(@PATH,34,277.1372,958.0083,-59.83573,0,0,1,0,100,0), -- 20:21:18 +(@PATH,35,281.6861,931.6771,-46.47077,0,0,1,0,100,0), -- 20:21:22 +(@PATH,36,280.2155,915.3389,-38.22446,0,0,1,0,100,0), -- 20:21:23 +(@PATH,37,276.9022,899.6358,-30.47937,0,0,1,0,100,0), -- 20:21:24 +(@PATH,38,275.9023,884.4814,-23.95735,0,0,1,0,100,0), -- 20:21:26 +(@PATH,39,276.1523,882.4814,-23.95735,0,0,1,0,100,0), -- 20:21:26 +(@PATH,40,276.9797,876.0508,-23.88462,0,0,1,0,100,0), -- 20:21:27 +(@PATH,41,277.4797,871.5508,-23.88462,0,0,1,0,100,0), -- 20:21:27 +(@PATH,42,281.2297,869.0508,-23.88462,0,0,1,0,100,0), -- 20:21:27 +(@PATH,43,282.8904,867.748,-23.63595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,44,284.3904,863.248,-23.13595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,45,283.8904,860.998,-23.13595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,46,282.8904,853.748,-23.13595,0,0,1,0,100,0), -- 20:21:28 +(@PATH,47,280.6286,850.2665,-24.00388,0,0,1,0,100,0), -- 20:21:29 +(@PATH,48,278.8786,848.5165,-23.75388,0,0,1,0,100,0), -- 20:21:29 +(@PATH,49,277.3786,846.7665,-23.75388,0,0,1,0,100,0); -- 20:21:29 +-- 0x1C16F446801658C0006A5B000B1D4854 .go 277.868 842.4459 -23.75307 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13774; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13774, 13774, 0, 0, 2), +(13774, 13429, 3, 270, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13774; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=226.3641,`position_y`=842.9598,`position_z`=-23.60787 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,226.3641,842.9598,-23.60787,0,0,1,0,100,0), -- 20:18:44 +(@PATH,2,224.6499,848.3411,-23.63753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,3,222.3999,850.3411,-23.63753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,4,219.3999,852.8411,-23.13753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,5,220.1499,858.5911,-23.13753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,6,220.6499,863.3411,-23.13753,0,0,1,0,100,0), -- 20:18:46 +(@PATH,7,220.7801,865.7321,-23.06377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,8,223.5301,867.7321,-23.31377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,9,226.2801,869.7321,-23.81377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,10,229.0301,872.2321,-24.31377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,11,230.5301,873.4821,-24.81377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,12,231.5301,874.2321,-25.56377,0,0,1,0,100,0), -- 20:18:48 +(@PATH,13,234.6127,879.7501,-25.39395,0,0,1,0,100,0), -- 20:18:49 +(@PATH,14,235.3627,886.7501,-25.39395,0,0,1,0,100,0), -- 20:18:49 +(@PATH,15,235.054,896.0424,-30.38491,0,0,1,0,100,0), -- 20:18:50 +(@PATH,16,235.666,933.9497,-49.77283,0,0,1,0,100,0), -- 20:18:54 +(@PATH,17,235.166,951.4497,-58.52283,0,0,1,0,100,0), -- 20:18:54 +(@PATH,18,239.472,955.8605,-61.06985,0,0,1,0,100,0), -- 20:18:56 +(@PATH,19,241.722,957.8605,-62.31985,0,0,1,0,100,0), -- 20:18:56 +(@PATH,20,245.0305,960.8606,-62.1322,0,0,1,0,100,0), -- 20:18:57 +(@PATH,21,241.0371,985.8208,-62.71188,0,0,1,0,100,0), -- 20:18:58 +(@PATH,22,237.0147,1001.326,-62.45633,0,0,1,0,100,0), -- 20:19:00 +(@PATH,23,236.5147,1005.076,-62.45633,0,0,1,0,100,0), -- 20:19:00 +(@PATH,24,230.5381,1024.512,-61.63638,0,0,1,0,100,0), -- 20:19:02 +(@PATH,25,228.5381,1026.512,-60.88638,0,0,1,0,100,0), -- 20:19:02 +(@PATH,26,225.485,1029.62,-60.43474,0,0,1,0,100,0), -- 20:19:03 +(@PATH,27,223.485,1032.12,-60.43474,0,0,1,0,100,0), -- 20:19:03 +(@PATH,28,220.485,1035.37,-59.68474,0,0,1,0,100,0), -- 20:19:03 +(@PATH,29,220.5529,1045.221,-59.55603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,30,224.0529,1048.471,-59.80603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,31,225.0529,1049.221,-60.30603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,32,226.3029,1050.721,-60.55603,0,0,1,0,100,0), -- 20:19:05 +(@PATH,33,228.6076,1053.052,-60.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,34,229.8576,1054.552,-60.5348,0,0,1,0,100,0), -- 20:19:06 +(@PATH,35,230.8576,1055.552,-61.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,36,233.3576,1058.052,-62.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,37,230.8576,1061.052,-61.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,38,229.8576,1062.302,-60.2848,0,0,1,0,100,0), -- 20:19:06 +(@PATH,39,227.7166,1065.36,-60.65356,0,0,1,0,100,0), -- 20:19:07 +(@PATH,40,227.7166,1066.86,-60.65356,0,0,1,0,100,0), -- 20:19:07 +(@PATH,41,229.6661,1062.701,-60.48591,0,0,1,0,100,0), -- 20:19:10 +(@PATH,42,230.9161,1061.201,-61.48591,0,0,1,0,100,0), -- 20:19:10 +(@PATH,43,233.2057,1058.173,-62.12091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,44,230.7057,1055.173,-61.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,45,229.9557,1054.423,-60.62091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,46,228.7057,1052.923,-60.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,47,226.2057,1050.923,-60.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,48,224.9557,1049.423,-60.37091,0,0,1,0,100,0), -- 20:19:12 +(@PATH,49,224.1507,1048.499,-59.69673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,50,220.6507,1045.249,-59.69673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,51,220.4007,1035.749,-59.69673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,52,223.1507,1032.499,-59.94673,0,0,1,0,100,0), -- 20:19:13 +(@PATH,53,225.6915,1029.523,-60.42624,0,0,1,0,100,0), -- 20:19:14 +(@PATH,54,228.1915,1026.773,-60.92624,0,0,1,0,100,0), -- 20:19:14 +(@PATH,55,230.4415,1024.773,-61.42624,0,0,1,0,100,0), -- 20:19:14 +(@PATH,56,231.6957,1023.582,-61.96358,0,0,1,0,100,0), -- 20:19:16 +(@PATH,57,236.1957,1005.332,-62.21358,0,0,1,0,100,0), -- 20:19:16 +(@PATH,58,236.6957,1001.582,-62.21358,0,0,1,0,100,0), -- 20:19:16 +(@PATH,59,239.3251,989.6144,-62.72815,0,0,1,0,100,0), -- 20:19:18 +(@PATH,60,239.3251,989.1144,-62.72815,0,0,1,0,100,0), -- 20:19:18 +(@PATH,61,241.0751,985.1144,-62.72815,0,0,1,0,100,0), -- 20:19:18 +(@PATH,62,244.6287,965.7533,-62.47226,0,0,1,0,100,0), -- 20:19:19 +(@PATH,63,242.1768,958.4319,-62.1866,0,0,1,0,100,0), -- 20:19:21 +(@PATH,64,239.1768,956.1819,-61.1866,0,0,1,0,100,0), -- 20:19:21 +(@PATH,65,235.3233,952.653,-59.28426,0,0,1,0,100,0), -- 20:19:22 +(@PATH,66,236.0733,933.903,-49.78426,0,0,1,0,100,0), -- 20:19:22 +(@PATH,67,235.6809,889.4034,-27.06503,0,0,1,0,100,0), -- 20:19:25 +(@PATH,68,235.3604,887.6078,-26.10506,0,0,1,0,100,0), -- 20:19:28 +(@PATH,69,234.6104,879.8578,-25.60506,0,0,1,0,100,0), -- 20:19:28 +(@PATH,70,231.5102,874.4667,-25.5617,0,0,1,0,100,0), -- 20:19:29 +(@PATH,71,229.0102,872.4667,-24.3117,0,0,1,0,100,0), -- 20:19:29 +(@PATH,72,226.2602,869.9667,-23.8117,0,0,1,0,100,0), -- 20:19:29 +(@PATH,73,223.6137,867.7607,-23.35828,0,0,1,0,100,0), -- 20:19:30 +(@PATH,74,220.8637,865.5107,-23.10828,0,0,1,0,100,0), -- 20:19:30 +(@PATH,75,220.6137,863.5107,-23.10828,0,0,1,0,100,0), -- 20:19:30 +(@PATH,76,219.2268,853.074,-23.14473,0,0,1,0,100,0), -- 20:19:31 +(@PATH,77,221.9768,850.824,-23.39473,0,0,1,0,100,0), -- 20:19:31 +(@PATH,78,224.7268,848.324,-23.64473,0,0,1,0,100,0), -- 20:19:31 +(@PATH,79,225.7792,847.1718,-23.69841,0,0,1,0,100,0); -- 20:19:33 +-- 0x1C16F446801658C0006A5B000D1D4854 .go 226.3641 842.9598 -23.60787 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13411; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13411, 13411, 0, 0, 2), +(13411, 13410, 3, 90, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13411; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=341.5303,`position_y`=833.1406,`position_z`=3.273792 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,341.5303,833.1406,3.273792,0,0,1,0,100,0), -- 20:28:58 +(@PATH,2,348.7275,829.2892,1.651913,0,0,1,0,100,0), -- 20:29:00 +(@PATH,3,354.4775,827.0392,3.901913,0,0,1,0,100,0), -- 20:29:00 +(@PATH,4,359.5842,829.374,5.242831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,5,361.0842,829.874,5.742831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,6,364.5842,835.374,7.242831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,7,367.8342,835.374,8.242831,0,0,1,0,100,0), -- 20:29:01 +(@PATH,8,373.5842,835.124,10.74283,0,0,1,0,100,0), -- 20:29:01 +(@PATH,9,379.5842,835.124,12.49283,0,0,1,0,100,0), -- 20:29:01 +(@PATH,10,385.9604,833.4543,14.87675,0,0,1,0,100,0), -- 20:29:04 +(@PATH,11,389.4604,828.2043,16.12675,0,0,1,0,100,0), -- 20:29:04 +(@PATH,12,385.9604,833.4543,14.87675,0,0,1,0,100,0), -- 20:29:04 +(@PATH,13,379.3574,835.0835,12.43179,0,0,1,0,100,0), -- 20:29:05 +(@PATH,14,373.6074,835.0835,10.93179,0,0,1,0,100,0), -- 20:29:05 +(@PATH,15,367.6338,835.3248,8.312333,0,0,1,0,100,0), -- 20:29:06 +(@PATH,16,364.6338,835.3248,7.062333,0,0,1,0,100,0), -- 20:29:06 +(@PATH,17,360.7854,829.9193,5.526537,0,0,1,0,100,0), -- 20:29:07 +(@PATH,18,359.5354,829.4193,5.276537,0,0,1,0,100,0), -- 20:29:07 +(@PATH,19,354.5487,827.0881,3.989071,0,0,1,0,100,0), -- 20:29:08 +(@PATH,20,348.5487,829.3381,1.739071,0,0,1,0,100,0); -- 20:29:08 +-- 0x1C16F446801658C0006A5B000E1D4854 .go 341.5303 833.1406 3.273792 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=13412; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(13412, 13412, 0, 0, 2), +(13412, 13413, 3, 270, 2); + +-- Pathing for Aqueous Spawn Entry: 22883 'TDB FORMAT' +SET @NPC := 13412; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=225.5994,`position_y`=787.1674,`position_z`=-24.18544 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,225.5994,787.1674,-24.18544,0,0,1,0,100,0), -- 20:21:40 +(@PATH,2,226.2546,784.0085,-23.94931,0,0,1,0,100,0), -- 20:21:42 +(@PATH,3,219.7546,774.2585,-23.44931,0,0,1,0,100,0), -- 20:21:42 +(@PATH,4,219.399,766.433,-23.47102,0,0,1,0,100,0), -- 20:21:44 +(@PATH,5,225.7847,743.8611,-23.80148,0,0,1,0,100,0), -- 20:21:45 +(@PATH,6,225.8589,730.2358,-15.95089,0,0,1,0,100,0), -- 20:21:46 +(@PATH,7,226.6089,726.4858,-13.95089,0,0,1,0,100,0), -- 20:21:46 +(@PATH,8,236.528,706.583,-4.811245,0,0,1,0,100,0), -- 20:21:50 +(@PATH,9,265.2675,707.3212,-4.301136,0,0,1,0,100,0), -- 20:21:51 +(@PATH,10,272.3554,719.12,-10.19584,0,0,1,0,100,0), -- 20:21:52 +(@PATH,11,275.1298,743.1734,-24.00938,0,0,1,0,100,0), -- 20:21:54 +(@PATH,12,279.3289,758.15,-23.90574,0,0,1,0,100,0), -- 20:21:56 +(@PATH,13,281.9902,760.6749,-23.69596,0,0,1,0,100,0), -- 20:21:57 +(@PATH,14,282.8818,767.9795,-23.45871,0,0,1,0,100,0), -- 20:21:58 +(@PATH,15,277.356,793.042,-24.15166,0,0,1,0,100,0), -- 20:22:00 +(@PATH,16,285.9649,799.7314,-23.8582,0,0,1,0,100,0), -- 20:22:01 +(@PATH,17,292.1205,799.7032,-22.67317,0,0,1,0,100,0), -- 20:22:02 +(@PATH,18,303.1205,795.2032,-17.17317,0,0,1,0,100,0), -- 20:22:02 +(@PATH,19,295.6266,798.3845,-20.68238,0,0,1,0,100,0), -- 20:22:04 +(@PATH,20,286.1266,799.6345,-23.93238,0,0,1,0,100,0), -- 20:22:04 +(@PATH,21,276.8643,782.9451,-23.92551,0,0,1,0,100,0), -- 20:22:07 +(@PATH,22,282.1143,770.6951,-23.42551,0,0,1,0,100,0), -- 20:22:07 +(@PATH,23,279.3628,758.2788,-24.0036,0,0,1,0,100,0), -- 20:22:09 +(@PATH,24,275.2263,743.7703,-24.04942,0,0,1,0,100,0), -- 20:22:10 +(@PATH,25,272.4308,719.3824,-10.38001,0,0,1,0,100,0), -- 20:22:12 +(@PATH,26,266.0668,708.079,-4.459149,0,0,1,0,100,0), -- 20:22:14 +(@PATH,27,258.0668,704.329,-4.959149,0,0,1,0,100,0), -- 20:22:14 +(@PATH,28,236.2906,706.6432,-3.633104,0,0,1,0,100,0), -- 20:22:16 +(@PATH,29,226.6268,726.214,-13.62222,0,0,1,0,100,0), -- 20:22:18 +(@PATH,30,225.8902,730.3877,-15.93307,0,0,1,0,100,0), -- 20:22:19 +(@PATH,31,226.0625,743.5709,-23.90323,0,0,1,0,100,0), -- 20:22:20 +(@PATH,32,220.6384,762.8275,-23.16604,0,0,1,0,100,0), -- 20:22:21 +(@PATH,33,218.6304,769.206,-23.46703,0,0,1,0,100,0), -- 20:22:23 +(@PATH,34,226.297,784.1191,-24.1624,0,0,1,0,100,0); -- 20:22:25 +-- 0x1C16F446801658C0006A5B000C1D4854 .go 225.5994 787.1674 -24.18544 + +-- Update spawn distance & movementype so they move around randomly +UPDATE `creature` SET `spawndist`=5, `MovementType`=1 WHERE `guid` IN (13393, 13395, 13399, 13396, 13236, 13268, 13398, 13255, 13316, 13397, 13408, 13401, 13407, 13403, 13402, 13409, 13406, 13404, 13405, 13400); + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53819; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=824.2386,`position_y`=922.0986,`position_z`=56.91497 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,824.2386,922.0986,56.91497,0,0,0,0,100,0), -- 20:24:16 +(@PATH,2,821.0174,923.827,56.86291,0,0,0,0,100,0), -- 20:24:21 +(@PATH,3,818.0731,927.4094,57.30012,0,0,0,0,100,0), -- 20:24:23 +(@PATH,4,814.8231,931.1594,56.80012,0,0,0,0,100,0), -- 20:24:23 +(@PATH,5,812.9963,933.0051,56.42346,0,0,0,0,100,0), -- 20:24:28 +(@PATH,6,812.416,948.0172,56.81141,0,0,0,0,100,0), -- 20:24:31 +(@PATH,7,813.5654,956.6572,55.9874,0,0,0,0,100,0), -- 20:24:35 +(@PATH,8,814.4669,959.6799,55.61625,0,0,0,0,100,0), -- 20:24:39 +(@PATH,9,815.8135,960.5793,55.61554,0,0,0,0,100,0), -- 20:24:44 +(@PATH,10,813.7318,955.5559,56.19109,0,0,0,0,100,0), -- 20:24:47 +(@PATH,11,812.7902,950.8799,56.58345,0,0,0,0,100,0), -- 20:24:50 +(@PATH,12,812.5013,941.1736,56.22784,0,0,0,0,100,0), -- 20:24:54 +(@PATH,13,816.401,926.7815,57.39321,0,0,0,0,100,0), -- 20:24:57 +(@PATH,14,818.651,925.7815,57.39321,0,0,0,0,100,0); -- 20:24:57 +-- 0x1C16F44680167D00006A5B00001D4972 .go 824.2386 922.0986 56.91497 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=53817; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(53817, 53817, 0, 0, 2), +(53817, 53818, 4, 270, 2); + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53817; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=779.7964,`position_y`=907.3997,`position_z`=55.31417 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,779.7964,907.3997,55.31417,0,0,0,0,100,0), -- 20:24:46 +(@PATH,2,787.9648,919.118,56.01221,0,0,0,0,100,0), -- 20:24:51 +(@PATH,3,793.1609,922.2444,56.78314,0,0,0,0,100,0), -- 20:24:55 +(@PATH,4,795.3989,923.1378,56.98447,0,0,0,0,100,0), -- 20:24:57 +(@PATH,5,801.3021,923.3855,57.17341,0,0,0,0,100,0), -- 20:25:00 +(@PATH,6,808.4121,919.6089,57.23282,0,0,0,0,100,0), -- 20:25:04 +(@PATH,7,812.0118,913.3118,57.18176,0,0,0,0,100,0), -- 20:25:06 +(@PATH,8,812.204,913.6752,57.22612,0,0,0,0,100,0), -- 20:25:12 +(@PATH,9,808.2915,919.7905,57.18939,0,0,0,0,100,0), -- 20:25:14 +(@PATH,10,801.1031,923.2393,57.11441,0,0,0,0,100,0), -- 20:25:18 +(@PATH,11,790.0347,920.629,56.37698,0,0,0,0,100,0), -- 20:25:21 +(@PATH,12,786.2445,917.2216,55.7047,0,0,0,0,100,0), -- 20:25:23 +(@PATH,13,783.3309,914.0374,55.27817,0,0,0,0,100,0); -- 20:25:27 +-- 0x1C16F44680167D00006A5B00009D4972 .go 779.7964 907.3997 55.31417 + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53815; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=614.9688,`position_y`=905.1718,`position_z`=59.02773 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,614.9688,905.1718,59.02773,0,0,0,0,100,0), -- 20:27:39 +(@PATH,2,602.5994,900.3304,59.40689,0,0,0,0,100,0), -- 20:27:41 +(@PATH,3,601.3251,900.2347,59.64486,0,0,0,0,100,0), -- 20:27:45 +(@PATH,4,596.3672,905.3165,59.73195,0,0,0,0,100,0), -- 20:27:47 +(@PATH,5,594.7749,909.9604,59.21187,0,0,0,0,100,0), -- 20:27:49 +(@PATH,6,598.7663,913.3591,58.69057,0,0,0,0,100,0), -- 20:27:53 +(@PATH,7,609.4606,912.4673,58.62482,0,0,0,0,100,0), -- 20:27:57 +(@PATH,8,615.0436,905.1978,58.98429,0,0,0,0,100,0); -- 20:28:00 +-- 0x1C16F44680167D00006A5B00019D4973 .go 614.9688 905.1718 59.02773 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=53820; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(53820, 53820, 0, 0, 2), +(53820, 53821, 4, 270, 2); + +-- Pathing for Bonechewer Taskmaster Entry: 23028 'TDB FORMAT' +SET @NPC := 53820; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=633.2257,`position_y`=963.4147,`position_z`=55.95343 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,633.2257,963.4147,55.95343,0,0,0,0,100,0), -- 20:24:38 +(@PATH,2,626.0544,963.9803,56.37569,0,0,0,0,100,0), -- 20:24:42 +(@PATH,3,620.5211,966.0339,56.25259,0,0,0,0,100,0), -- 20:24:43 +(@PATH,4,620.7354,966.1735,56.31302,0,0,0,0,100,0), -- 20:24:49 +(@PATH,5,626.1029,963.9597,56.25856,0,0,0,0,100,0), -- 20:24:52 +(@PATH,6,639.0172,964.6981,55.65588,0,0,0,0,100,0), -- 20:24:55 +(@PATH,7,640.4229,965.3899,55.41632,0,0,0,0,100,0), -- 20:24:58 +(@PATH,8,640.1735,965.0356,55.36687,0,0,0,0,100,0), -- 20:25:03 +(@PATH,9,634.595,963.6308,56.07304,0,0,0,0,100,0); -- 20:25:05 +-- 0x1C16F44680167D00006A5B00001D4973 .go 633.2257 963.4147 55.95343 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=52890; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(52890, 52890, 0, 0, 2), +(52890, 52889, 4, 270, 2); + +-- Pathing for Dragonmaw Wyrmcaller Entry: 22960 'TDB FORMAT' +SET @NPC := 52890; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=648.1636,`position_y`=938.5795,`position_z`=55.75506 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,648.1636,938.5795,55.75506,0,0,0,0,100,0), -- 20:22:53 +(@PATH,2,645.2552,922.6402,57.29848,0,0,0,0,100,0), -- 20:22:58 +(@PATH,3,645.6837,916.9199,58.23938,0,0,0,0,100,0), -- 20:23:03 +(@PATH,4,646.1837,910.1699,58.73938,0,0,0,0,100,0), -- 20:23:03 +(@PATH,5,645.2875,920.4247,58.00103,0,0,0,0,100,0), -- 20:23:11 +(@PATH,6,645.5131,925.1226,56.93448,0,0,0,0,100,0), -- 20:23:15 +(@PATH,7,645.7631,930.8726,56.43448,0,0,0,0,100,0), -- 20:23:15 +(@PATH,8,650.084,943.375,55.52758,0,0,0,0,100,0); -- 20:23:21 +-- 0x1C16F44680166C00006A5B00031D4972 .go 648.1636 938.5795 55.75506 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=52887; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(52887, 52887, 0, 0, 2), +(52887, 52888, 4, 270, 2); + +-- Pathing for Dragonmaw Wyrmcaller Entry: 22960 'TDB FORMAT' +SET @NPC := 52887; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=785.6938,`position_y`=775.3997,`position_z`=66.39993 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,785.6938,775.3997,66.39993,0,0,0,0,100,0), -- 20:24:19 +(@PATH,2,785.8984,794.7227,65.27033,0,0,0,0,100,0), -- 20:24:27 +(@PATH,3,786.6484,798.7227,64.77033,0,0,0,0,100,0), -- 20:24:27 +(@PATH,4,787.1109,818.1139,62.89856,0,0,0,0,100,0), -- 20:24:34 +(@PATH,5,787.1109,821.1139,62.39856,0,0,0,0,100,0), -- 20:24:34 +(@PATH,6,787.1893,815.1113,63.54066,0,0,0,0,100,0), -- 20:24:44 +(@PATH,7,787.1893,811.3613,64.04066,0,0,0,0,100,0), -- 20:24:44 +(@PATH,8,785.7648,793.4683,65.52825,0,0,0,0,100,0), -- 20:24:51 +(@PATH,9,785.2648,789.4683,66.27825,0,0,0,0,100,0), -- 20:24:51 +(@PATH,10,787.0689,764.1604,68.09256,0,0,0,0,100,0); -- 20:25:00 +-- 0x1C16F44680166C00006A5B00021D4972 .go 785.6938 775.3997 66.39993 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=52873; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(52873, 52873, 0, 0, 2), +(52873, 52874, 4, 270, 2); + +-- Pathing for Dragonmaw Wyrmcaller Entry: 22960 'TDB FORMAT' +SET @NPC := 52873; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=703.7258,`position_y`=793.4444,`position_z`=63.46073 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,703.7258,793.4444,63.46073,0,0,0,0,100,0), -- 20:22:58 +(@PATH,2,707.7258,805.4444,62.96073,0,0,0,0,100,0), -- 20:22:58 +(@PATH,3,707.654,812.1962,61.59881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,4,706.654,814.9462,60.84881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,5,705.904,817.9462,60.09881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,6,705.404,820.6962,59.59881,0,0,0,0,100,0), -- 20:23:08 +(@PATH,7,704.5902,823.67,59.79628,0,0,0,0,100,0), -- 20:23:15 +(@PATH,8,704.8102,841.6521,58.77011,0,0,0,0,100,0), -- 20:23:20 +(@PATH,9,704.6913,842.5567,58.75265,0,0,0,0,100,0), -- 20:23:27 +(@PATH,10,704.126,829.2064,60.07757,0,0,0,0,100,0), -- 20:23:31 +(@PATH,11,707.3738,813.0848,61.42086,0,0,0,0,100,0), -- 20:23:36 +(@PATH,12,706.2325,801.4998,63.37791,0,0,0,0,100,0), -- 20:23:42 +(@PATH,13,702.9825,791.2498,63.87791,0,0,0,0,100,0), -- 20:23:42 +(@PATH,14,700.8631,770.6361,65.44987,0,0,0,0,100,0), -- 20:23:52 +(@PATH,15,700.8631,765.6361,65.94987,0,0,0,0,100,0), -- 20:23:52 +(@PATH,16,700.9891,782.0386,64.53194,0,0,0,0,100,0); -- 20:24:04 +-- 0x1C16F44680166C00006A5B00011D4972 .go 703.7258 793.4444 63.46073 diff --git a/sql/updates/world/2016_01_23_00_world.sql b/sql/updates/world/2016_01_23_00_world.sql new file mode 100644 index 00000000000..02eaa7c370d --- /dev/null +++ b/sql/updates/world/2016_01_23_00_world.sql @@ -0,0 +1,43 @@ +DELETE FROM `creature_formations` WHERE `leaderGUID`=63381; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(63381, 63381, 0, 0, 1), +(63381, 63380, 2, 270, 2); + +-- Pathing for Blade of Argus Entry: 17659 'TDB FORMAT' +SET @NPC := 63381; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2393.32,`position_y`=-12009.38,`position_z`=26.83788 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-2393.32,-12009.38,26.83788,0,0,0,0,100,0), -- 09:35:02 +(@PATH,2,-2430.895,-12030.52,28.6322,0,0,0,0,100,0), -- 09:35:35 +(@PATH,3,-2449.131,-12041.39,30.04015,0,0,0,0,100,0), -- 09:35:47 +(@PATH,4,-2469.279,-12052.41,30.91039,0,0,0,0,100,0), -- 09:35:58 +(@PATH,5,-2485.917,-12057.62,31.67413,0,0,0,0,100,0), -- 09:36:06 +(@PATH,6,-2499.339,-12060.41,32.19662,0,0,0,0,100,0), -- 09:36:16 +(@PATH,7,-2551.131,-12097.43,31.56079,0,0,0,0,100,0), -- 09:36:26 +(@PATH,8,-2561.849,-12106.37,30.36333,0,0,0,0,100,0), -- 09:36:45 +(@PATH,9,-2594.441,-12132.8,25.2879,0,0,0,0,100,0), -- 09:36:59 +(@PATH,10,-2614.055,-12144.08,22.40907,0,0,0,0,100,0), -- 09:37:10 +(@PATH,11,-2646.337,-12163.92,17.16356,0,0,0,0,100,0), -- 09:37:24 +(@PATH,12,-2662.804,-12174.26,14.88417,0,0,0,0,100,0), -- 09:37:33 +(@PATH,13,-2684.956,-12188.63,12.24028,0,0,0,0,100,0), -- 09:37:43 +(@PATH,14,-2717.39,-12205.54,9.461565,0,0,0,0,100,0), -- 09:37:57 +(@PATH,15,-2734.083,-12209.19,8.946226,0,0,0,0,100,0), -- 09:38:09 +(@PATH,16,-2734.196,-12209.07,8.88302,0,0,0,0,100,0), -- 09:38:21 +(@PATH,17,-2716.481,-12205.85,9.632504,0,0,0,0,100,0), -- 09:38:31 +(@PATH,18,-2690.927,-12193.18,11.25666,0,0,0,0,100,0), -- 09:38:43 +(@PATH,19,-2673.976,-12180.86,13.79457,0,0,0,0,100,0), -- 09:38:55 +(@PATH,20,-2653.271,-12168.26,16.31552,0,0,0,0,100,0), -- 09:39:06 +(@PATH,21,-2634.485,-12156.3,19.4272,0,0,0,0,100,0), -- 09:39:16 +(@PATH,22,-2600.122,-12135.83,24.54786,0,0,0,0,100,0), -- 09:39:29 +(@PATH,23,-2580.325,-12122.89,27.64962,0,0,0,0,100,0), -- 09:39:40 +(@PATH,24,-2535.282,-12085.34,32.13941,0,0,0,0,100,0), -- 09:39:54 +(@PATH,25,-2520.165,-12073.53,32.51933,0,0,0,0,100,0), -- 09:40:14 +(@PATH,26,-2475.724,-12055.97,31.22906,0,0,0,0,100,0), -- 09:40:24 +(@PATH,27,-2463.655,-12049.68,30.5184,0,0,0,0,100,0), -- 09:40:33 +(@PATH,28,-2435.532,-12033.4,29.11832,0,0,0,0,100,0), -- 09:40:42 +(@PATH,29,-2407.538,-12018.4,27.76891,0,0,0,0,100,0), -- 09:40:53 +(@PATH,30,-2393.296,-12009.36,26.8369,0,0,0,0,100,0); -- 09:41:05 diff --git a/sql/updates/world/2016_01_24_00_world.sql b/sql/updates/world/2016_01_24_00_world.sql new file mode 100644 index 00000000000..a28b3fa25b8 --- /dev/null +++ b/sql/updates/world/2016_01_24_00_world.sql @@ -0,0 +1,62 @@ +-- +SET @guid:=134881; +DELETE FROM `creature` WHERE `guid` BETWEEN @guid+0 AND @guid+53; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@guid+0, 18927, 571, 0, 0, 1, 1, 18800, 0, 5740.71, 686.122, 643.896, 3.82227, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+1, 18927, 571, 0, 0, 1, 1, 18801, 0, 5739.36, 684.622, 644.191, 0.872665, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+2, 18927, 571, 0, 0, 1, 1, 18800, 0, 5664.31, 666.273, 652.064, 1.39626, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+3, 18927, 571, 0, 0, 1, 1, 18801, 0, 5664.37, 668.047, 652.051, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+4, 18927, 0, 0, 0, 1, 1, 18800, 0, -8364.87207, 617.860, 95.345, 2.580013, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+5, 18927, 0, 0, 0, 1, 1, 18801, 0, -8367.4511, 619.1992, 95.2811, 5.804225, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+6, 19169, 530, 0, 0, 1, 1, 18785, 0, 9375.07, -7157.06, 9.25588, 1.6057, 5, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+7, 19169, 530, 0, 0, 1, 1, 18793, 0, 9374.67, -7155.09, 9.33675, 4.95674, 5, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+8, 19169, 530, 0, 0, 1, 1, 18785, 0, 9689.33, -7345.39, 11.9144, 4.20624, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+9, 19169, 530, 0, 0, 1, 1, 18793, 0, 9687.96, -7346.09, 11.956, 1.50098, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+10, 19169, 530, 0, 0, 1, 1, 18785, 0, 9556.56, -7157.38, 14.2799, 6.10865, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+11, 19169, 530, 0, 0, 1, 1, 18793, 0, 9558.34, -7157.94, 14.3132, 2.63545, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+12, 19169, 530, 0, 0, 1, 1, 18785, 0, 9757.39, -7485.7, 13.6171, 4.76475, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+13, 19169, 530, 0, 0, 1, 1, 18793, 0, 9757.64, -7487.37, 13.6167, 1.55334, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+14, 19169, 571, 0, 0, 1, 1, 18785, 0, 5942.95, 629.234, 650.668, 1.5708, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+15, 19169, 571, 0, 0, 1, 1, 18793, 0, 5943.17, 630.894, 650.666, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+16, 19169, 571, 0, 0, 1, 1, 18785, 0, 5899.04, 532.766, 640.979, 4.90438, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+17, 19169, 571, 0, 0, 1, 1, 18793, 0, 5899.1, 530.898, 641.056, 1.67552, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+18, 19171, 530, 0, 0, 1, 1, 18795, 0, -4270.06, -11333.1, 5.57545, 4.67748, 120, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@guid+19, 19171, 530, 0, 0, 1, 1, 18794, 0, -4269.71, -11336.5, 5.80931, 1.69297, 120, 0, 0, 1, 0, 0, 3, 0, 0, 0), +(@guid+20, 19175, 1, 0, 0, 1, 1, 18804, 0, 1609.47, -4323.21, 2.33176, 3.34811, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+21, 19175, 1, 0, 0, 1, 1, 18805, 0, 1605.95, -4324.2, 2.19915, 0.0101724, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+22, 19177, 1, 0, 0, 1, 1, 18808, 0, 1748.94, -4497.53, 28.793, 5.47104, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+23, 19177, 1, 0, 0, 1, 1, 18808, 0, 1752.58, -4499.43, 28.2911, 2.89886, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+24, 19178, 0, 0, 0, 1, 1, 18810, 0, 1629.95, 219.238, -43.1027, 1.91079, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+25, 20102, 0, 0, 0, 1, 1, 19342, 0, -14313.5, 508.853, 8.69121, 4.27606, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+26, 20102, 0, 0, 0, 1, 1, 19339, 0, -14314, 507.109, 8.68829, 1.22173, 180, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+27, 20102, 1, 0, 0, 1, 1, 19342, 0, -1030.97, -3678.41, 23.2479, 1.62316, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+28, 20102, 1, 0, 0, 1, 1, 19339, 0, -1031.03, -3676.2, 23.1851, 4.69494, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+29, 20102, 1, 0, 0, 1, 1, 19342, 0, -924.656, -3715.91, 9.13173, 5.06145, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+30, 20102, 1, 0, 0, 1, 1, 19339, 0, -924.099, -3718, 9.18514, 1.69297, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+31, 20102, 1, 0, 0, 1, 1, 19342, 0, 6791.34, -4747.01, 701.617, 2.21657, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+32, 20102, 1, 0, 0, 1, 1, 19339, 0, -7144.12, -3830.95, 8.50543, 3.26377, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+33, 20102, 1, 0, 0, 1, 1, 19342, 0, -7147.06, -3830.22, 8.51396, 6.05629, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+34, 20102, 1, 0, 0, 1, 1, 19339, 0, -7217.57, -3735.16, 8.45314, 2.28638, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+35, 20102, 1, 0, 0, 1, 1, 19342, 0, -7219.66, -3731.91, 8.4635, 5.13127, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+36, 20102, 1, 0, 0, 1, 1, 19339, 0, -7053.62, -3777.21, 10.2047, 5.25344, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+37, 20102, 1, 0, 0, 1, 1, 19342, 0, -7053, -3779.9, 10.1478, 1.53589, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+38, 20102, 530, 0, 0, 1, 1, 19339, 0, -1818.99, 5305.67, -12.3448, 4.03171, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+39, 20102, 530, 0, 0, 1, 1, 19342, 0, -1821.12, 5303.35, -12.3448, 0.767945, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+40, 20102, 530, 0, 0, 1, 1, 19339, 0, -1748.08, 5493.86, -12.3448, 4.2586, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+41, 20102, 530, 0, 0, 1, 1, 19342, 0, -1747.9, 5492.11, -12.3448, 1.3439, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+42, 20102, 530, 0, 0, 1, 1, 19339, 0, -1978.82, 5365.21, -12.3448, 3.63029, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+43, 20102, 530, 0, 0, 1, 1, 19342, 0, -1980.72, 5364.88, -12.3225, 0.226893, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+44, 20102, 530, 0, 0, 1, 1, 19339, 0, -1875.93, 5376.2, -12.3448, 0.820305, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+45, 20102, 530, 0, 0, 1, 1, 19342, 0, -1875.06, 5378.04, -12.3448, 4.36332, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+46, 20102, 530, 0, 0, 1, 1, 19339, 0, -2175.76, 5414.62, 50.3112, 5.60251, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+47, 20102, 530, 0, 0, 1, 1, 19342, 0, -2174.14, 5413.06, 50.3112, 2.56563, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+48, 20102, 530, 0, 0, 1, 1, 19339, 0, -1809.92, 5418.64, -12.3448, 5.55015, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+49, 20102, 530, 0, 0, 1, 1, 19342, 0, -1808.36, 5417.01, -12.3448, 2.32129, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+50, 20102, 530, 0, 0, 1, 1, 19339, 0, -1917.81, 5441.85, -12.3448, 2.35619, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+51, 20102, 530, 0, 0, 1, 1, 19342, 0, -1920.17, 5443.52, -12.3448, 5.86431, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+52, 20102, 530, 0, 0, 1, 1, 19339, 0, -1883.61, 5769.28, 129.641, 4.15388, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@guid+53, 20102, 530, 0, 0, 1, 1, 19342, 0, -1884.14, 5766.55, 129.641, 1.309, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0); + +SET @Event=2; +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @guid+0 AND @guid+53 AND `eventEntry`=@Event; +INSERT INTO `game_event_creature` SELECT @Event, creature.guid FROM `creature` WHERE creature.guid BETWEEN @guid+0 AND @guid+53; diff --git a/sql/updates/world/2016_01_26_00_world.sql b/sql/updates/world/2016_01_26_00_world.sql new file mode 100644 index 00000000000..71fe8dc21e3 --- /dev/null +++ b/sql/updates/world/2016_01_26_00_world.sql @@ -0,0 +1,11 @@ +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28931; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(28931, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Data Set 1 1 - Set Unit Flags'), +(28931, 0, 1, 6, 7, 0, 100, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Evade - Set Unit Flags'), +(28931, 0, 2, 0, 8, 0, 100, 0, 61492, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Despawn Blightblood) - Despawn'), +(28931, 0, 3, 7, 54, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Just Summoned - Set Phase 1'), +(28931, 0, 4, 0, 4, 0, 100, 1, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Agro - Set Phase 2'), +(28931, 0, 5, 6, 8, 0, 100, 0, 53103, 0, 30000, 30000, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Charm Blightblood Troll) - Set Phase 2'), +(28931, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Spellhit (Charm Blightblood Troll) - Set Aggresie'), +(28931, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Blightblood Troll - On Just Summoned - Set Passive'), +(28931, 0, 8, 0, 1, 2, 100, 1, 0, 0, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 29100, 10, 0, 0, 0, 0, 0, 'Blightblood Troll - OOC (Phase 2) - Set Data 3 3 on Totally Generic Bunny (JSB)'); diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index f72c1430370..1f3b78a8d56 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -27,6 +27,7 @@ #include <vector> #include <list> #include <map> +#include <ctime> // Searcher for map of structs template<typename T, class S> struct Finder diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 3b7c489e018..f250a79ea25 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -80,7 +80,7 @@ class CreatureAI : public UnitAI Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN); bool CheckBoundary(Position* who = nullptr) const; - void SetBoundary(CreatureBoundary const* boundary) { _boundary = boundary; CheckInRoom(); } + void SetBoundary(CreatureBoundary const* boundary) { _boundary = boundary; me->DoImmediateBoundaryCheck(); } public: enum EvadeReason { diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 69a0f684a84..808491495a9 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2305,6 +2305,31 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } break; } + case SMART_ACTION_RANDOM_SOUND: + { + std::vector<uint32> sounds; + std::copy_if(e.action.randomSound.sounds.begin(), e.action.randomSound.sounds.end(), + std::back_inserter(sounds), [](uint32 sound) { return sound != 0; }); + + bool onlySelf = e.action.randomSound.onlySelf != 0; + + if (ObjectList* targets = GetTargets(e, unit)) + { + for (WorldObject* const obj : *targets) + { + if (IsUnit(obj)) + { + uint32 sound = Trinity::Containers::SelectRandomContainerElement(sounds); + obj->PlayDirectSound(sound, onlySelf ? obj->ToPlayer() : nullptr); + TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: %s (%s), sound: %u, onlyself: %s", + obj->GetName().c_str(), obj->GetGUID().ToString().c_str(), sound, onlySelf ? "true" : "false"); + } + } + + delete targets; + break; + } + } default: TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); break; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index d56983924b4..977847e60c9 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -827,6 +827,21 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) if (e.action.randomEmote.emote6 && !IsEmoteValid(e, e.action.randomEmote.emote6)) return false; break; + case SMART_ACTION_RANDOM_SOUND: + { + if (std::all_of(e.action.randomSound.sounds.begin(), e.action.randomSound.sounds.end(), [](uint32 sound) { return sound == 0; })) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u does not have any non-zero sound", + e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); + return false; + } + + for (uint32 sound : e.action.randomSound.sounds) + if (sound && !IsSoundValid(e, sound)) + return false; + + break; + } case SMART_ACTION_CAST: { if (!IsSpellValid(e, e.action.cast.spell)) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 91ee0a1d1e0..c0ea648462d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -43,6 +43,16 @@ struct WayPoint float z; }; +enum eSmartAI +{ + SMART_EVENT_PARAM_COUNT = 4, + SMART_ACTION_PARAM_COUNT = 6, + SMART_SUMMON_COUNTER = 0xFFFFFF, + SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF, + SMART_RANDOM_POINT = 0xFFFFFE, + SMART_ESCORT_TARGETS = 0xFFFFFF +}; + enum SMART_EVENT_PHASE { SMART_EVENT_PHASE_ALWAYS = 0, @@ -540,8 +550,9 @@ enum SMART_ACTION SMART_ACTION_GAME_EVENT_START = 112, // GameEventId SMART_ACTION_START_CLOSEST_WAYPOINT = 113, // wp1, wp2, wp3, wp4, wp5, wp6, wp7 SMART_ACTION_RISE_UP = 114, // distance + SMART_ACTION_RANDOM_SOUND = 115, // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf - SMART_ACTION_END = 115 + SMART_ACTION_END = 116 }; struct SmartAction @@ -1017,6 +1028,12 @@ struct SmartAction uint32 wp6; } closestWaypointFromList; + struct + { + std::array<uint32, SMART_ACTION_PARAM_COUNT - 1> sounds; + uint32 onlySelf; + } randomSound; + //! Note for any new future actions //! All parameters must have type uint32 @@ -1180,16 +1197,6 @@ struct SmartTarget }; }; -enum eSmartAI -{ - SMART_EVENT_PARAM_COUNT = 4, - SMART_ACTION_PARAM_COUNT = 6, - SMART_SUMMON_COUNTER = 0xFFFFFF, - SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF, - SMART_RANDOM_POINT = 0xFFFFFE, - SMART_ESCORT_TARGETS = 0xFFFFFF -}; - enum SmartScriptType { SMART_SCRIPT_TYPE_CREATURE = 0, //done diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index cff02234ab6..52e0deaf86f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -365,7 +365,7 @@ bool BattlegroundIC::SetupBattleground() // setting correct factions for Keep Cannons for (uint8 i = BG_IC_NPC_KEEP_CANNON_1; i <= BG_IC_NPC_KEEP_CANNON_12; ++i) GetBGCreature(i)->setFaction(BG_IC_Factions[0]); - for (uint8 i = BG_IC_NPC_KEEP_CANNON_13; i <= BG_IC_NPC_KEEP_CANNON_25; ++i) + for (uint8 i = BG_IC_NPC_KEEP_CANNON_13; i <= BG_IC_NPC_KEEP_CANNON_24; ++i) GetBGCreature(i)->setFaction(BG_IC_Factions[1]); // correcting spawn time for keeps bombs diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index 72e9990b7c1..44666819feb 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -390,7 +390,6 @@ enum BG_IC_NPCs BG_IC_NPC_KEEP_CANNON_22, BG_IC_NPC_KEEP_CANNON_23, BG_IC_NPC_KEEP_CANNON_24, - BG_IC_NPC_KEEP_CANNON_25, BG_IC_NPC_SIEGE_ENGINE_A, BG_IC_NPC_SIEGE_ENGINE_H, @@ -444,7 +443,7 @@ enum BannersTypes enum BG_IC_MaxSpawns { MAX_NORMAL_GAMEOBJECTS_SPAWNS = BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR03+1, - MAX_NORMAL_NPCS_SPAWNS = BG_IC_NPC_KEEP_CANNON_25+1, + MAX_NORMAL_NPCS_SPAWNS = BG_IC_NPC_KEEP_CANNON_24+1, MAX_WORKSHOP_SPAWNS = 10, MAX_DOCKS_SPAWNS = 12, MAX_SPIRIT_GUIDES_SPAWNS = 7, @@ -506,9 +505,8 @@ const ICNpc BG_IC_NpcSpawnlocs[MAX_NORMAL_NPCS_SPAWNS] = {BG_IC_NPC_KEEP_CANNON_20, NPC_KEEP_CANNON, TEAM_HORDE, 1137.72f, -688.517f, 88.4023f, 3.9619f}, // 30 {BG_IC_NPC_KEEP_CANNON_21, NPC_KEEP_CANNON, TEAM_HORDE, 1135.29f, -840.878f, 88.0252f, 2.30383f}, // 31 {BG_IC_NPC_KEEP_CANNON_22, NPC_KEEP_CANNON, TEAM_HORDE, 1144.33f, -833.309f, 87.9268f, 2.14675f}, // 32 - {BG_IC_NPC_KEEP_CANNON_23, NPC_KEEP_CANNON, TEAM_HORDE, 1135.29f, -840.878f, 88.0252f, 2.30383f}, // 33 - {BG_IC_NPC_KEEP_CANNON_24, NPC_KEEP_CANNON, TEAM_HORDE, 1142.59f, -691.946f, 87.9756f, 3.9619f}, // 34 - {BG_IC_NPC_KEEP_CANNON_25, NPC_KEEP_CANNON, TEAM_HORDE, 1166.13f, -858.391f, 87.9653f, 5.63741f} // 35 + {BG_IC_NPC_KEEP_CANNON_23, NPC_KEEP_CANNON, TEAM_HORDE, 1142.59f, -691.946f, 87.9756f, 3.9619f}, // 33 + {BG_IC_NPC_KEEP_CANNON_24, NPC_KEEP_CANNON, TEAM_HORDE, 1166.13f, -858.391f, 87.9653f, 5.63741f} // 34 }; const Position BG_IC_WorkshopVehicles[5] = diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 3e67f709816..31320e4d65e 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2739,7 +2739,7 @@ bool Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target) } } if (shouldDelay) - shouldDelay = (!focusSpell->IsTriggered() && !focusSpell->GetCastTime()); + shouldDelay = !(focusSpell->IsTriggered() || focusSpell->GetCastTime() || focusSpell->GetSpellInfo()->IsChanneled()); } } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index b0318ed33e2..3ee1ba7db7b 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -605,6 +605,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject float GetRespawnRadius() const { return m_respawnradius; } void SetRespawnRadius(float dist) { m_respawnradius = dist; } + void DoImmediateBoundaryCheck() { m_boundaryCheckTime = 0; } uint32 GetCombatPulseDelay() const { return m_combatPulseDelay; } void SetCombatPulseDelay(uint32 delay) // (secs) interval at which the creature pulses the entire zone into combat (only works in dungeons) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 24ddcd358ea..30ba95eb174 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -157,6 +157,28 @@ ProcEventInfo::ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, _damageInfo(damageInfo), _healInfo(healInfo) { } +SpellInfo const* ProcEventInfo::GetSpellInfo() const +{ + if (_spell) + return _spell->GetSpellInfo(); + if (_damageInfo) + return _damageInfo->GetSpellInfo(); + if (_healInfo) + return _healInfo->GetSpellInfo(); + return nullptr; +} + +SpellSchoolMask ProcEventInfo::GetSchoolMask() const +{ + if (_spell) + return _spell->GetSpellInfo()->GetSchoolMask(); + if (_damageInfo) + return _damageInfo->GetSchoolMask(); + if (_healInfo) + return _healInfo->GetSchoolMask(); + return SPELL_SCHOOL_MASK_NONE; +} + Unit::Unit(bool isWorldObject) : WorldObject(isWorldObject), m_movedPlayer(NULL), m_lastSanctuaryTime(0), IsAIEnabled(false), NeedChangeAI(false), LastCharmerGUID(), @@ -6365,54 +6387,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } case SPELLFAMILY_PALADIN: { - // Light's Beacon - Beacon of Light - if (dummySpell->Id == 53651) - { - if (!victim || !procSpell) - return false; - triggered_spell_id = 0; - Unit* beaconTarget = NULL; - if (GetTypeId() != TYPEID_PLAYER) - { - beaconTarget = triggeredByAura->GetBase()->GetCaster(); - if (!beaconTarget || beaconTarget == this || !(beaconTarget->GetAura(53563, victim->GetGUID()))) - return false; - basepoints0 = int32(damage); - triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654; - } - else - { // Check Party/Raid Group - if (Group* group = ToPlayer()->GetGroup()) - { - for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) - { - if (Player* member = itr->GetSource()) - { - // check if it was heal by paladin which cast this beacon of light - if (member->GetAura(53563, victim->GetGUID())) - { - // do not proc when target of beacon of light is healed - if (member == this) - return false; - - beaconTarget = member; - basepoints0 = int32(damage); - triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654; - break; - } - } - } - } - } - - if (triggered_spell_id && beaconTarget) - { - victim->CastCustomSpell(beaconTarget, triggered_spell_id, &basepoints0, NULL, NULL, true); - return true; - } - - return false; - } // Judgements of the Wise if (dummySpell->SpellIconID == 3017) { @@ -7125,9 +7099,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere float chance = 100.0f / procSpell->Effects[effIndex].ChainTarget; if (!roll_chance_f(chance)) return false; - - // Remove cooldown (Chain Lightning - has Category Recovery time) - GetSpellHistory()->ResetCooldown(spellId); } CastSpell(victim, spellId, true, castItem, triggeredByAura); @@ -14187,8 +14158,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u Unit* actionTarget = !isVictim ? target : this; DamageInfo damageInfo = DamageInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL, SPELL_DIRECT_DAMAGE); - HealInfo healInfo = HealInfo(damage); - ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, &healInfo); + HealInfo healInfo = HealInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL); + ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, nullptr, &damageInfo, &healInfo); ProcTriggeredList procTriggered; // Fill procTriggered list diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index c64667feeca..8572c791d67 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -863,22 +863,30 @@ public: class HealInfo { private: - uint32 m_heal; - uint32 m_absorb; + Unit* const _healer; + Unit* const _target; + uint32 _heal; + uint32 _absorb; + SpellInfo const* const _spellInfo; + SpellSchoolMask const _schoolMask; + public: - explicit HealInfo(uint32 heal) - : m_heal(heal) - { - m_absorb = 0; - } + explicit HealInfo(Unit* healer, Unit* target, uint32 heal, SpellInfo const* spellInfo, SpellSchoolMask schoolMask) + : _healer(healer), _target(target), _heal(heal), _absorb(0), _spellInfo(spellInfo), _schoolMask(schoolMask) { } + void AbsorbHeal(uint32 amount) { amount = std::min(amount, GetHeal()); - m_absorb += amount; - m_heal -= amount; + _absorb += amount; + _heal -= amount; } - uint32 GetHeal() const { return m_heal; } + Unit* GetHealer() const { return _healer; } + Unit* GetTarget() const { return _target; } + uint32 GetHeal() const { return _heal; } + uint32 GetAbsorb() const { return _absorb; } + SpellInfo const* GetSpellInfo() const { return _spellInfo; }; + SpellSchoolMask GetSchoolMask() const { return _schoolMask; }; }; class ProcEventInfo @@ -897,14 +905,8 @@ public: uint32 GetSpellPhaseMask() const { return _spellPhaseMask; } uint32 GetHitMask() const { return _hitMask; } - SpellInfo const* GetSpellInfo() const { return NULL; } - SpellInfo const* EnsureSpellInfo() const - { - SpellInfo const* spellInfo = GetSpellInfo(); - ASSERT(spellInfo); - return spellInfo; - } - SpellSchoolMask GetSchoolMask() const { return SPELL_SCHOOL_MASK_NONE; } + SpellInfo const* GetSpellInfo() const; + SpellSchoolMask GetSchoolMask() const; DamageInfo* GetDamageInfo() const { return _damageInfo; } HealInfo* GetHealInfo() const { return _healInfo; } diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index eb6d9a187d6..1575b50098f 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -30,6 +30,12 @@ #include "WorldSession.h" #include "Opcodes.h" +BossBoundaryData::~BossBoundaryData() +{ + for (const_iterator it = begin(); it != end(); ++it) + delete it->Boundary; +} + void InstanceScript::SaveToDB() { std::string data = GetSaveData(); @@ -99,8 +105,8 @@ void InstanceScript::SetHeaders(std::string const& dataHeaders) void InstanceScript::LoadBossBoundaries(const BossBoundaryData& data) { for (BossBoundaryEntry const& entry : data) - if (entry.bossId < bosses.size()) - bosses[entry.bossId].boundary.insert(entry.boundary); + if (entry.BossId < bosses.size()) + bosses[entry.BossId].boundary.insert(entry.Boundary); } void InstanceScript::LoadMinionData(const MinionData* data) diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 8285eaa7346..ce83061e162 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -75,10 +75,23 @@ struct DoorData struct BossBoundaryEntry { - uint32 const bossId; - AreaBoundary const* const boundary; + uint32 BossId; + AreaBoundary const* Boundary; +}; + +struct BossBoundaryData +{ + typedef std::vector<BossBoundaryEntry> StorageType; + typedef StorageType::const_iterator const_iterator; + + BossBoundaryData(std::initializer_list<BossBoundaryEntry> data) : _data(data) { } + ~BossBoundaryData(); + const_iterator begin() const { return _data.begin(); } + const_iterator end() const { return _data.end(); } + + private: + StorageType _data; }; -typedef std::list<BossBoundaryEntry> BossBoundaryData; struct MinionData { diff --git a/src/server/game/Maps/AreaBoundary.h b/src/server/game/Maps/AreaBoundary.h index 7df72c3dc12..a134b783ca6 100644 --- a/src/server/game/Maps/AreaBoundary.h +++ b/src/server/game/Maps/AreaBoundary.h @@ -32,15 +32,16 @@ class AreaBoundary BOUNDARY_PARALLELOGRAM, BOUNDARY_Z_RANGE, }; + virtual ~AreaBoundary() { } BoundaryType GetBoundaryType() const { return m_boundaryType; } bool IsWithinBoundary(const Position* pos) const { return (IsWithinBoundaryArea(pos) != m_isInvertedBoundary); } struct DoublePosition : Position { double d_positionX, d_positionY, d_positionZ; - DoublePosition(double x = 0, double y = 0, double z = 0, float o = 0) - : Position((float)x, (float)y, (float)z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { } - DoublePosition(float x = 0, float y = 0, float z = 0, float o = 0) + DoublePosition(double x = 0.0, double y = 0.0, double z = 0.0, float o = 0.0f) + : Position(x, y, z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { } + DoublePosition(float x, float y = 0.0f, float z = 0.0f, float o = 0.0f) : Position(x, y, z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { } DoublePosition(const Position& pos) : DoublePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()) { } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index a4e7f61d83c..6a10d113553 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1103,18 +1103,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (apply) { - // Remove cooldown of spells triggered on stance change - they may share cooldown with stance spell if (spellId) - { - target->GetSpellHistory()->ResetCooldown(spellId); target->CastSpell(target, spellId, true, NULL, this); - } if (spellId2) - { - target->GetSpellHistory()->ResetCooldown(spellId2); target->CastSpell(target, spellId2, true, NULL, this); - } if (target->GetTypeId() == TYPEID_PLAYER) { diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 84bff4a69d6..63fe148dd93 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4701,7 +4701,7 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_NOT_READY; } - if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry)) + if (!m_caster->GetSpellHistory()->IsReady(m_spellInfo, m_castItemEntry, IsIgnoringCooldowns())) { if (m_triggeredByAuraSpell) return SPELL_FAILED_DONT_REPORT; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 40bd4e3c263..f961654f279 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -877,11 +877,6 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage); } - // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->GetCategory() == spellInfo->GetCategory()) - m_caster->GetSpellHistory()->ResetCooldown(spellInfo->Id); - // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); } @@ -930,11 +925,6 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) values.AddSpellMod(SPELLVALUE_BASE_POINT2, damage); } - // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->GetCategory() == spellInfo->GetCategory()) - m_caster->GetSpellHistory()->ResetCooldown(spellInfo->Id); - // original caster guid only for GO cast m_caster->CastSpell(targets, spellInfo, &values, TRIGGERED_FULL_MASK, NULL, NULL, m_originalCasterGUID); } diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp index ac08f681933..adf5fc47c77 100644 --- a/src/server/game/Spells/SpellHistory.cpp +++ b/src/server/game/Spells/SpellHistory.cpp @@ -182,13 +182,13 @@ void SpellHistory::HandleCooldowns(SpellInfo const* spellInfo, uint32 itemID, Sp StartCooldown(spellInfo, itemID, spell); } -bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/) const +bool SpellHistory::IsReady(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { if (spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE) if (IsSchoolLocked(spellInfo->GetSchoolMask())) return false; - if (HasCooldown(spellInfo->Id, itemId)) + if (HasCooldown(spellInfo->Id, itemId, ignoreCategoryCooldown)) return false; return true; @@ -465,11 +465,14 @@ void SpellHistory::ResetAllCooldowns() _spellCooldowns.clear(); } -bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/) const +bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { if (_spellCooldowns.count(spellInfo->Id) != 0) return true; + if (ignoreCategoryCooldown) + return false; + uint32 category = 0; GetCooldownDurations(spellInfo, itemId, nullptr, &category, nullptr); if (!category) @@ -478,9 +481,9 @@ bool SpellHistory::HasCooldown(SpellInfo const* spellInfo, uint32 itemId /*= 0*/ return _categoryCooldowns.count(category) != 0; } -bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/) const +bool SpellHistory::HasCooldown(uint32 spellId, uint32 itemId /*= 0*/, bool ignoreCategoryCooldown /*= false*/) const { - return HasCooldown(sSpellMgr->EnsureSpellInfo(spellId), itemId); + return HasCooldown(sSpellMgr->EnsureSpellInfo(spellId), itemId, ignoreCategoryCooldown); } uint32 SpellHistory::GetRemainingCooldown(SpellInfo const* spellInfo) const diff --git a/src/server/game/Spells/SpellHistory.h b/src/server/game/Spells/SpellHistory.h index 00c790a670d..f0a53fe130d 100644 --- a/src/server/game/Spells/SpellHistory.h +++ b/src/server/game/Spells/SpellHistory.h @@ -62,7 +62,7 @@ public: void HandleCooldowns(SpellInfo const* spellInfo, Item const* item, Spell* spell = nullptr); void HandleCooldowns(SpellInfo const* spellInfo, uint32 itemID, Spell* spell = nullptr); - bool IsReady(SpellInfo const* spellInfo, uint32 itemId = 0) const; + bool IsReady(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; template<class OwnerType> void WritePacket(WorldPacket& packet) const; @@ -105,8 +105,8 @@ public: } void ResetAllCooldowns(); - bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0) const; - bool HasCooldown(uint32 spellId, uint32 itemId = 0) const; + bool HasCooldown(SpellInfo const* spellInfo, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; + bool HasCooldown(uint32 spellId, uint32 itemId = 0, bool ignoreCategoryCooldown = false) const; uint32 GetRemainingCooldown(SpellInfo const* spellInfo) const; // School lockouts diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index e96ed8c6799..e0b9bf53b63 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -969,10 +969,12 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE // check spell family name/flags (if set) for spells if (eventInfo.GetTypeMask() & (PERIODIC_PROC_FLAG_MASK | SPELL_PROC_FLAG_MASK | PROC_FLAG_DONE_TRAP_ACTIVATION)) { - if (procEntry.spellFamilyName && eventInfo.GetSpellInfo() && (procEntry.spellFamilyName != eventInfo.EnsureSpellInfo()->SpellFamilyName)) + SpellInfo const* eventSpellInfo = eventInfo.GetSpellInfo(); + + if (procEntry.spellFamilyName && eventSpellInfo && (procEntry.spellFamilyName != eventSpellInfo->SpellFamilyName)) return false; - if (procEntry.spellFamilyMask && eventInfo.GetSpellInfo() && !(procEntry.spellFamilyMask & eventInfo.EnsureSpellInfo()->SpellFamilyFlags)) + if (procEntry.spellFamilyMask && eventSpellInfo && !(procEntry.spellFamilyMask & eventSpellInfo->SpellFamilyFlags)) return false; } @@ -3332,6 +3334,8 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Attributes |= SPELL_ATTR0_PASSIVE; break; case 17364: // Stormstrike + case 48278: // Paralyze + case 53651: // Light's Beacon spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; break; case 51798: // Brewfest - Relay Race - Intro - Quest Complete @@ -3565,7 +3569,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AreaGroupId = 0; // originally, these require area 4522, which is... outside of Icecrown Citadel break; case 70602: // Corruption - case 48278: // Paralyze spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; break; case 70715: // Column of Frost (visual marker) diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 269e115189a..d5ed2421efc 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -77,7 +77,7 @@ public: Talk(SAY_RESPAWN); } - bool CheckInRoom() + bool CheckInRoom() override { if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 93583364ef6..238942c15f6 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -78,7 +78,7 @@ public: Talk(SAY_BUFF); } - bool CheckInRoom() + bool CheckInRoom() override { if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h index 39c9d9a79a7..9fce132ea7e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h @@ -59,7 +59,7 @@ enum CreatureIds enum GameObjectIds { GO_BLACK_DRAGON_EGG = 177807, - GO_BOSSGATE01 = 175946, + GO_PORTCULLIS = 176965, GO_DRAKE_RIDER_PORTCULLIS = 175185, GO_ALTERAC_VALLEY_GATE = 180424, GO_GATE = 185483, diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 83b2b45851c..a4241b16f8d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -22,7 +22,7 @@ DoorData const doorData[] = { - { GO_BOSSGATE01, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, + { GO_PORTCULLIS, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, { GO_DRAKE_RIDER_PORTCULLIS, DATA_VAELASTRAZ_THE_CORRUPT, DOOR_TYPE_PASSAGE }, { GO_ALTERAC_VALLEY_GATE, DATA_BROODLORD_LASHLAYER, DOOR_TYPE_PASSAGE }, { GO_GATE, DATA_FIREMAW, DOOR_TYPE_PASSAGE }, diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index e5ac2676ad0..b1a0f0217c4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -22,12 +22,11 @@ #include "Player.h" #include "TemporarySummon.h" -AreaBoundary const* const mainBoundary = new CircleBoundary(Position(563.26f, 139.6f), 75.0); BossBoundaryData const boundaries = { - { BOSS_BEASTS, mainBoundary }, - { BOSS_JARAXXUS, mainBoundary }, - { BOSS_CRUSADERS, mainBoundary }, - { BOSS_VALKIRIES, mainBoundary }, + { BOSS_BEASTS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, + { BOSS_JARAXXUS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, + { BOSS_CRUSADERS, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, + { BOSS_VALKIRIES, new CircleBoundary(Position(563.26f, 139.6f), 75.0) }, { BOSS_ANUBARAK, new EllipseBoundary(Position(746.0f, 135.0f), 100.0, 75.0) } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 9bdbce81dbf..ac094588d35 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -265,7 +265,7 @@ class boss_sindragosa : public CreatureScript { if (!instance->CheckRequiredBosses(DATA_SINDRAGOSA, victim->ToPlayer())) { - EnterEvadeMode(); + EnterEvadeMode(EVADE_REASON_SEQUENCE_BREAK); instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT); return; } @@ -276,6 +276,13 @@ class boss_sindragosa : public CreatureScript Talk(SAY_AGGRO); } + void EnterEvadeMode(EvadeReason why) override + { + if (_isInAirPhase && why == EVADE_REASON_BOUNDARY) + return; + BossAI::EnterEvadeMode(why); + } + void JustReachedHome() override { BossAI::JustReachedHome(); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h index 2af8e7f3643..5a5b7aefc02 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h @@ -115,7 +115,7 @@ enum DataTypes DATA_ARTHAS_PLATFORM = 38, DATA_TERENAS_MENETHIL = 39, DATA_ENEMY_GUNSHIP = 40, - DATA_UPPERSPIRE_TELE_ACT = 41, + DATA_UPPERSPIRE_TELE_ACT = 41, /// also used by conditions DATA_BLOOD_QUEEN_LANA_THEL_COUNCIL = 42 }; @@ -569,14 +569,10 @@ class spell_trigger_spell_from_caster : public SpellScriptLoader TriggerCastFlags _triggerFlags; }; -template<class AI> -CreatureAI* GetIcecrownCitadelAI(Creature* creature) +template<class AI, class T> +inline AI* GetIcecrownCitadelAI(T* obj) { - if (InstanceMap* instance = creature->GetMap()->ToInstanceMap()) - if (instance->GetInstanceScript()) - if (instance->GetScriptId() == sObjectMgr->GetScriptId(ICCScriptName)) - return new AI(creature); - return NULL; + return GetInstanceAI<AI>(obj, ICCScriptName); } #endif // ICECROWN_CITADEL_H_ diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp index 7723a37094c..8b5e03203e1 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp @@ -15,6 +15,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "GameObjectAI.h" #include "InstanceScript.h" #include "Player.h" #include "ScriptedGossip.h" @@ -22,57 +23,55 @@ #include "Spell.h" #include "icecrown_citadel.h" -#define GOSSIP_SENDER_ICC_PORT 631 +static std::vector<uint32> const TeleportSpells = +{ + LIGHT_S_HAMMER_TELEPORT, // 0 + ORATORY_OF_THE_DAMNED_TELEPORT, // 1 + 0, // 2 + RAMPART_OF_SKULLS_TELEPORT, // 3 + DEATHBRINGER_S_RISE_TELEPORT, // 4 + UPPER_SPIRE_TELEPORT, // 5 + SINDRAGOSA_S_LAIR_TELEPORT // 6 +}; class icecrown_citadel_teleport : public GameObjectScript { + static_assert(DATA_UPPERSPIRE_TELE_ACT == 41, "icecrown_citadel.h DATA_UPPERSPIRE_TELE_ACT set to value != 41, gossip condition of the teleporters won't work as intended."); + public: icecrown_citadel_teleport() : GameObjectScript("icecrown_citadel_teleport") { } - bool OnGossipHello(Player* player, GameObject* go) override + struct icecrown_citadel_teleportAI : public GameObjectAI { - if (InstanceScript* instance = go->GetInstanceScript()) + icecrown_citadel_teleportAI(GameObject* go) : GameObjectAI(go) { - if (instance->GetBossState(DATA_LORD_MARROWGAR) == DONE) - { - if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_LIGHTSHAMMER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Light's Hammer.", GOSSIP_SENDER_ICC_PORT, LIGHT_S_HAMMER_TELEPORT); - if (go->GetEntry() != GO_SCOURGE_TRANSPORTER_ORATORY) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT); - } - if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_RAMPART) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT); - if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_DEATHBRINGER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT); - if (instance->GetData(DATA_UPPERSPIRE_TELE_ACT) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_UPPERSPIRE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT); - /// @todo Gauntlet event before Sindragosa - if (instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == DONE && go->GetEntry() != GO_SCOURGE_TRANSPORTER_SINDRAGOSA) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to Sindragosa's Lair", GOSSIP_SENDER_ICC_PORT, SINDRAGOSA_S_LAIR_TELEPORT); } - player->SEND_GOSSIP_MENU(player->GetGossipTextId(go), go->GetGUID()); - return true; - } + bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override + { + if (gossipListId >= TeleportSpells.size()) + return false; - bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 sender, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - player->CLOSE_GOSSIP_MENU(); - SpellInfo const* spell = sSpellMgr->GetSpellInfo(action); - if (!spell) - return false; + player->PlayerTalkClass->ClearMenus(); + player->CLOSE_GOSSIP_MENU(); + SpellInfo const* spell = sSpellMgr->GetSpellInfo(TeleportSpells[gossipListId]); + if (!spell) + return false; - if (player->IsInCombat()) - { - Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT); - return true; - } + if (player->IsInCombat()) + { + Spell::SendCastResult(player, spell, 0, SPELL_FAILED_AFFECTING_COMBAT); + return true; + } - if (sender == GOSSIP_SENDER_ICC_PORT) player->CastSpell(player, spell, true); + return true; + } + }; - return true; + GameObjectAI* GetAI(GameObject* go) const override + { + return GetIcecrownCitadelAI<icecrown_citadel_teleportAI>(go); } }; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 3e7de89edd9..a7a89f44d81 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -15,382 +15,681 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellAuraEffects.h" #include "naxxramas.h" -enum Horsemen +enum Horseman { - HORSEMEN_THANE, - HORSEMEN_LADY, - HORSEMEN_BARON, - HORSEMEN_SIR, + THANE = DATA_THANE, + LADY = DATA_LADY, + BARON = DATA_BARON, + SIR = DATA_SIR, }; +static const std::vector<Horseman> horsemen = { THANE, LADY, BARON, SIR }; // for iterating enum Spells { - SPELL_MARK_DAMAGE = 28836 + /* all */ + SPELL_MARK_DAMAGE = 28836, + SPELL_BERSERK = 26662, + SPELL_ENCOUNTER_CREDIT = 59450, + + /* baron */ + SPELL_BARON_MARK = 28834, + SPELL_UNHOLY_SHADOW = 28882, + + /* thane */ + SPELL_THANE_MARK = 28832, + SPELL_METEOR = 28884, + + /* lady */ + SPELL_SHADOW_BOLT = 57374, + SPELL_LADY_MARK = 28833, + SPELL_VOID_ZONE = 28863, + SPELL_UNYIELDING_PAIN = 57381, + + /* sir */ + SPELL_HOLY_BOLT = 57376, + SPELL_SIR_MARK = 28835, + SPELL_HOLY_WRATH = 28883, + SPELL_CONDEMNATION = 57377 }; -enum Events +enum Actions { - EVENT_NONE, - EVENT_MARK, - EVENT_CAST, - EVENT_BERSERK, + ACTION_BEGIN_MOVEMENT = 1, + ACTION_BEGIN_FIGHTING +}; + +enum HorsemenData +{ + DATA_HORSEMEN_IS_TIMED_KILL = Data::DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT, // inherit from naxxramas.h - this needs to be the first entry to ensure that there are no conflicts + DATA_MOVEMENT_FINISHED, + DATA_DEATH_TIME }; -const Position WaypointPositions[12] = +enum Events { - // Thane waypoints - {2542.3f, -2984.1f, 241.49f, 5.362f}, - {2547.6f, -2999.4f, 241.34f, 5.049f}, - {2542.9f, -3015.0f, 241.35f, 4.654f}, - // Lady waypoints - {2498.3f, -2961.8f, 241.28f, 3.267f}, - {2487.7f, -2959.2f, 241.28f, 2.890f}, - {2469.4f, -2947.6f, 241.28f, 2.576f}, - // Baron waypoints - {2553.8f, -2968.4f, 241.33f, 5.757f}, - {2564.3f, -2972.5f, 241.33f, 5.890f}, - {2583.9f, -2971.67f, 241.35f, 0.008f}, - // Sir waypoints - {2534.5f, -2921.7f, 241.53f, 1.363f}, - {2523.5f, -2902.8f, 241.28f, 2.095f}, - {2517.8f, -2896.6f, 241.28f, 2.315f}, + /* all */ + EVENT_BERSERK = 1, + EVENT_MARK, + + /* rivendare */ + EVENT_UNHOLYSHADOW, + + /* thane */ + EVENT_METEOR, + + /* lady */ + EVENT_VOIDZONE, + + /* sir */ + EVENT_HOLYWRATH }; -const uint32 NPC_HORSEMEN[] = {16064, 16065, 30549, 16063}; -const uint32 SPELL_MARK[] = {28832, 28833, 28834, 28835}; -#define SPELL_PRIMARY(i) RAID_MODE(SPELL_PRIMARY_N[i], SPELL_PRIMARY_H[i]) -const uint32 SPELL_PRIMARY_N[] = {28884, 28863, 28882, 28883}; -const uint32 SPELL_PRIMARY_H[] = {57467, 57463, 57369, 57466}; -#define SPELL_SECONDARY(i) RAID_MODE(SPELL_SECONDARY_N[i], SPELL_SECONDARY_H[i]) -const uint32 SPELL_SECONDARY_N[]= {0, 57374, 0, 57376}; -const uint32 SPELL_SECONDARY_H[]= {0, 57464, 0, 57465}; -const uint32 SPELL_PUNISH[] = {0, 57381, 0, 57377}; -#define SPELL_BERSERK 26662 - -enum FourHorsemen +enum Yells { SAY_AGGRO = 0, - SAY_TAUNT = 1, SAY_SPECIAL = 2, SAY_SLAY = 3, - SAY_DEATH = 4 -}; + SAY_DEATH = 4, -class boss_four_horsemen : public CreatureScript -{ -public: - boss_four_horsemen() : CreatureScript("boss_four_horsemen") { } + EMOTE_RAGECAST = 7 +}; - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI<boss_four_horsemenAI>(creature); - } +static const Position baronPath[3] = { { 2552.427f, -2969.737f, 241.3021f },{ 2566.759f, -2972.535f, 241.3217f },{ 2584.32f, -2971.96f, 241.3489f } }; +static const Position thanePath[3] = { { 2540.095f, -2983.192f, 241.3344f },{ 2546.005f, -2999.826f, 241.3665f },{ 2542.697f, -3014.055f, 241.3371f } }; +static const Position ladyPath[3] = { { 2507.94f, -2961.444f, 242.4557f },{ 2488.763f, -2960.007f, 241.2757f },{ 2468.26f, -2947.499f, 241.2753f } }; +static const Position sirPath[3] = { { 2533.141f, -2922.14f, 241.2764f },{ 2525.254f, -2905.907f, 241.2761f },{ 2517.636f, -2897.253f, 241.2758f } }; - struct boss_four_horsemenAI : public BossAI - { - boss_four_horsemenAI(Creature* creature) : BossAI(creature, BOSS_HORSEMEN) +struct boss_four_horsemen_baseAI : public BossAI +{ + public: + Creature* getHorsemanHandle(Horseman who) const { - Initialize(); - id = Horsemen(0); - for (uint8 i = 0; i < 4; ++i) - if (me->GetEntry() == NPC_HORSEMEN[i]) - id = Horsemen(i); - caster = (id == HORSEMEN_LADY || id == HORSEMEN_SIR); + if (_which == who) + return me; + else + return ObjectAccessor::GetCreature(*me, instance->GetGuidData(who)); } - - void Initialize() + boss_four_horsemen_baseAI(Creature* creature, Horseman which, Position const* initialPath) : + BossAI(creature, BOSS_HORSEMEN), _which(which), _initialPath(initialPath), _myMovementFinished(false), _nextMovement(0), _timeDied(0), _ourMovementFinished(false) { - uiEventStarterGUID.Clear(); - nextWP = 0; - punishTimer = 2000; - nextMovementStarted = false; - movementCompleted = false; - movementStarted = false; - encounterActionAttack = false; - encounterActionReset = false; - doDelayPunish = false; + if (!me->IsAlive() && instance->GetBossState(BOSS_HORSEMEN) != DONE) + me->SetRespawnTime(10); } - Horsemen id; - ObjectGuid uiEventStarterGUID; - uint8 nextWP; - uint32 punishTimer; - bool caster; - bool nextMovementStarted; - bool movementCompleted; - bool movementStarted; - bool encounterActionAttack; - bool encounterActionReset; - bool doDelayPunish; - - void Reset() override + uint32 GetData(uint32 type) const override { - if (!encounterActionReset) - DoEncounteraction(NULL, false, true, false); - - instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED); - - me->SetReactState(REACT_AGGRESSIVE); - Initialize(); - _Reset(); + switch (type) + { + case DATA_MOVEMENT_FINISHED: + return _myMovementFinished ? 1 : 0; + case DATA_DEATH_TIME: + return _timeDied; + case DATA_HORSEMEN_IS_TIMED_KILL: + { + uint32 minTime = 0, maxTime = 0; + for (Horseman boss : horsemen) + if (Creature* cBoss = getHorsemanHandle(boss)) + { + uint32 deathTime = cBoss->AI()->GetData(DATA_DEATH_TIME); + if (!deathTime) + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman %s is reporting not dead", cBoss->GetName().c_str()); + return 0; + } + if (!minTime || deathTime < minTime) + minTime = deathTime; + if (!maxTime || deathTime > maxTime) + maxTime = deathTime; + } + else + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Checking for achievement credit but horseman with id %u is not present", uint32(boss)); + return 0; + } + return (getMSTimeDiff(minTime, maxTime) <= 15 * IN_MILLISECONDS) ? 1 : 0; + } + default: + return 0; + } } - bool DoEncounteraction(Unit* who, bool attack, bool reset, bool checkAllDead) + void DoAction(int32 action) override { - Creature* Thane = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_THANE)); - Creature* Lady = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_LADY)); - Creature* Baron = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_BARON)); - Creature* Sir = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SIR)); + switch (action) + { + case ACTION_BEGIN_MOVEMENT: + me->GetMotionMaster()->MovePoint(1, _initialPath[0], true); + break; + case ACTION_BEGIN_FIGHTING: + if (_ourMovementFinished) + break; + me->SetCombatPulseDelay(5); + BeginFighting(); + _ourMovementFinished = true; + break; + } + } - if (Thane && Lady && Baron && Sir) + void CheckIsMovementFinished() + { + for (Horseman boss : horsemen) { - if (attack && who) + if (Creature* cBoss = getHorsemanHandle(boss)) { - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->encounterActionAttack = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->encounterActionAttack = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->encounterActionAttack = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->encounterActionAttack = true; - - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->AttackStart(who); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->AttackStart(who); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->AttackStart(who); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->AttackStart(who); + if (cBoss->IsAlive() && !cBoss->AI()->GetData(DATA_MOVEMENT_FINISHED)) + return; } - - if (reset) + else { - if (instance->GetBossState(BOSS_HORSEMEN) != NOT_STARTED) - { - if (!Thane->IsAlive()) - Thane->Respawn(); - - if (!Lady->IsAlive()) - Lady->Respawn(); + TC_LOG_WARN("scripts", "FourHorsemenAI: Checking if movement is finished but horseman with id %u is not present", uint32(boss)); + ResetEncounter(); + return; + } + } - if (!Baron->IsAlive()) - Baron->Respawn(); + for (Horseman boss : horsemen) + if (Creature* cBoss = getHorsemanHandle(boss)) + cBoss->AI()->DoAction(ACTION_BEGIN_FIGHTING); + } - if (!Sir->IsAlive()) - Sir->Respawn(); + void BeginEncounter() + { + if (instance->GetBossState(BOSS_HORSEMEN) == IN_PROGRESS) + return; + if (!instance->CheckRequiredBosses(BOSS_HORSEMEN)) + { + ResetEncounter(); + return; + } + instance->SetBossState(BOSS_HORSEMEN, IN_PROGRESS); + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + if (players.isEmpty()) // sanity check + ResetEncounter(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->encounterActionReset = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->encounterActionReset = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->encounterActionReset = true; - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->encounterActionReset = true; + for (Horseman boss : horsemen) + { + if (Creature* cBoss = getHorsemanHandle(boss)) + { + if (!cBoss->IsAlive()) + { + ResetEncounter(); + return; + } + cBoss->SetReactState(REACT_PASSIVE); + cBoss->AttackStop(); // clear initial target that was set on enter combat + cBoss->setActive(true); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Thane->AI())->EnterEvadeMode(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Lady->AI())->EnterEvadeMode(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Baron->AI())->EnterEvadeMode(); - ENSURE_AI(boss_four_horsemen::boss_four_horsemenAI, Sir->AI())->EnterEvadeMode(); + for (Map::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it) + { + if (Player* player = it->GetSource()) + { + if (player->IsGameMaster()) + continue; + + if (player->IsAlive()) + { + cBoss->AddThreat(player, 0.0f); + cBoss->SetInCombatWith(player); + player->SetInCombatWith(cBoss); + } + } } - } - if (checkAllDead) - return !Thane->IsAlive() && !Lady->IsAlive() && !Baron->IsAlive() && !Sir->IsAlive(); + /* Why do the Four Horsemen run to opposite corners of the room when engaged? * + * They saw all the mobs leading up to them being AoE'd down and made a judgment call. */ + cBoss->AI()->DoAction(ACTION_BEGIN_MOVEMENT); + } + else + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter starting but horseman with id %u is not present", uint32(boss)); + ResetEncounter(); + return; + } } - return false; } - void BeginFourHorsemenMovement() + void ResetEncounter() { - movementStarted = true; - me->SetReactState(REACT_PASSIVE); - me->SetWalk(false); - me->SetSpeed(MOVE_RUN, me->GetSpeedRate(MOVE_RUN), true); - - switch (id) + if (instance->GetBossState(BOSS_HORSEMEN) == NOT_STARTED || instance->GetBossState(BOSS_HORSEMEN) == DONE) + return; + instance->SetBossState(BOSS_HORSEMEN, NOT_STARTED); + for (Horseman boss : horsemen) { - case HORSEMEN_THANE: - me->GetMotionMaster()->MovePoint(0, WaypointPositions[0]); - break; - case HORSEMEN_LADY: - me->GetMotionMaster()->MovePoint(3, WaypointPositions[3]); - break; - case HORSEMEN_BARON: - me->GetMotionMaster()->MovePoint(6, WaypointPositions[6]); - break; - case HORSEMEN_SIR: - me->GetMotionMaster()->MovePoint(9, WaypointPositions[9]); - break; + if (Creature* cBoss = getHorsemanHandle(boss)) + { + cBoss->DespawnOrUnsummon(0); + cBoss->SetRespawnTime(15); + } + else + { + TC_LOG_WARN("scripts", "FourHorsemenAI: Encounter resetting but horseman with id %u is not present", uint32(boss)); + } } } - void MovementInform(uint32 type, uint32 point) override + void EncounterCleared() { - if (type != POINT_MOTION_TYPE) + if (instance->GetBossState(BOSS_HORSEMEN) == DONE) return; + instance->SetBossState(BOSS_HORSEMEN, DONE); + //instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ENCOUNTER_CREDIT); + DoCastAOE(SPELL_ENCOUNTER_CREDIT, true); + } - if (point == 2 || point == 5 || point == 8 || point == 11) - { - movementCompleted = true; - me->SetReactState(REACT_AGGRESSIVE); + void EnterCombat(Unit* /*who*/) override + { + if (instance->GetBossState(BOSS_HORSEMEN) != NOT_STARTED) // another horseman already did it + return; + Talk(SAY_AGGRO); + BeginEncounter(); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + ResetEncounter(); + } + + void Reset() override + { + if (!me->IsAlive()) + return; + _myMovementFinished = false; + _nextMovement = 0; + _timeDied = 0; + _ourMovementFinished = false; + me->SetReactState(REACT_AGGRESSIVE); + SetCombatMovement(false); + me->SetCombatPulseDelay(0); + me->ResetLootMode(); + events.Reset(); + summons.DespawnAll(); + } + + void KilledUnit(Unit* victim) override + { + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_SLAY, victim); + } - Unit* eventStarter = ObjectAccessor::GetUnit(*me, uiEventStarterGUID); + void JustDied(Unit* /*killer*/) override + { + if (instance->GetBossState(BOSS_HORSEMEN) != IN_PROGRESS) // necessary in case a horseman gets one-shot + { + BeginEncounter(); + return; + } - if (eventStarter && me->IsValidAttackTarget(eventStarter)) - AttackStart(eventStarter); - else if (!UpdateVictim()) + Talk(SAY_DEATH); + _timeDied = getMSTime(); + for (Horseman boss : horsemen) + { + if (Creature* cBoss = getHorsemanHandle(boss)) { - EnterEvadeMode(); - return; + if (cBoss->IsAlive()) + { + // in case a horseman dies while moving (unlikely but possible especially in non-335 branch) + CheckIsMovementFinished(); + return; + } } - - if (caster) + else { - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MoveIdle(); + TC_LOG_WARN("scripts", "FourHorsemenAI: %s died but horseman with id %u is not present", me->GetName().c_str(), uint32(boss)); + ResetEncounter(); } - - return; } - nextMovementStarted = false; - nextWP = point + 1; + EncounterCleared(); } - // switch to "who" if nearer than current target. - void SelectNearestTarget(Unit* who) + void MovementInform(uint32 type, uint32 i) override { - if (me->GetVictim() && me->GetDistanceOrder(who, me->GetVictim()) && me->IsValidAttackTarget(who)) + if (type != POINT_MOTION_TYPE) + return; + if (i < 3) + _nextMovement = i; // delay to next updateai to prevent it from instantly expiring + else { - me->getThreatManager().modifyThreatPercent(me->GetVictim(), -100); - me->AddThreat(who, 1000000.0f); + _myMovementFinished = true; + CheckIsMovementFinished(); } } - void MoveInLineOfSight(Unit* who) override - + void UpdateAI(uint32 diff) override { - BossAI::MoveInLineOfSight(who); - if (caster) - SelectNearestTarget(who); + if (_nextMovement) + { + me->GetMotionMaster()->MovePoint(_nextMovement + 1, _initialPath[_nextMovement], true); + _nextMovement = 0; + } + _UpdateAI(diff); } - void AttackStart(Unit* who) override + virtual void BeginFighting() = 0; + virtual void _UpdateAI(uint32 /*diff*/) = 0; + + private: + const Horseman _which; + const Position* _initialPath; + bool _myMovementFinished; + uint8 _nextMovement; + uint32 _timeDied; + protected: + bool _ourMovementFinished; +}; + +class boss_four_horsemen_baron : public CreatureScript +{ + public: + boss_four_horsemen_baron() : CreatureScript("boss_four_horsemen_baron") { } + + struct boss_four_horsemen_baronAI : public boss_four_horsemen_baseAI { - if (!movementCompleted && !movementStarted) + boss_four_horsemen_baronAI(Creature* creature) : boss_four_horsemen_baseAI(creature, BARON, baronPath) { } + void BeginFighting() override { - uiEventStarterGUID = who->GetGUID(); - BeginFourHorsemenMovement(); + SetCombatMovement(true); + me->SetReactState(REACT_AGGRESSIVE); + ThreatManager& threat = me->getThreatManager(); + if (threat.isThreatListEmpty()) + { + if (Unit* nearest = me->SelectNearestPlayer(5000.0f)) + { + me->AddThreat(nearest, 1.0f); + AttackStart(nearest); + } + else + ResetEncounter(); + } + else + AttackStart(threat.getHostilTarget()); - if (!encounterActionAttack) - DoEncounteraction(who, true, false, false); + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_UNHOLYSHADOW, urandms(3,7)); } - else if (movementCompleted && movementStarted) + + void _UpdateAI(uint32 diff) override { - if (caster) - me->Attack(who, false); - else - BossAI::AttackStart(who); + if (!_ourMovementFinished || !UpdateVictim()) + return; + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_BARON_MARK, true); + events.ScheduleEvent(EVENT_MARK, 12 * IN_MILLISECONDS); + break; + case EVENT_UNHOLYSHADOW: + DoCastVictim(SPELL_UNHOLY_SHADOW); + events.ScheduleEvent(EVENT_UNHOLYSHADOW, urandms(10,30)); + break; + } + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + DoMeleeAttackIfReady(); } - } - void KilledUnit(Unit* /*victim*/) override + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override + { + if (spell->Id == SPELL_UNHOLY_SHADOW) + Talk(SAY_SPECIAL); + } + }; + + CreatureAI* GetAI(Creature* creature) const override { - if (!(rand32() % 5)) - Talk(SAY_SLAY); + return GetInstanceAI<boss_four_horsemen_baronAI>(creature); } +}; - void JustDied(Unit* /*killer*/) override - { - events.Reset(); - summons.DespawnAll(); +class boss_four_horsemen_thane : public CreatureScript +{ + public: + boss_four_horsemen_thane() : CreatureScript("boss_four_horsemen_thane") { } - instance->SetData(DATA_HORSEMEN0 + id, DONE); + struct boss_four_horsemen_thaneAI : public boss_four_horsemen_baseAI + { + boss_four_horsemen_thaneAI(Creature* creature) : boss_four_horsemen_baseAI(creature, THANE, thanePath), _shouldSay(true) { } + void BeginFighting() override + { + SetCombatMovement(true); + me->SetReactState(REACT_AGGRESSIVE); + ThreatManager& threat = me->getThreatManager(); + if (threat.isThreatListEmpty()) + { + if (Unit* nearest = me->SelectNearestPlayer(5000.0f)) + { + me->AddThreat(nearest, 1.0f); + AttackStart(nearest); + } + else + ResetEncounter(); + } + else + AttackStart(threat.getHostilTarget()); - if (DoEncounteraction(NULL, false, false, true)) + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_METEOR, urandms(10,15)); + } + void _UpdateAI(uint32 diff) override { - instance->SetBossState(BOSS_HORSEMEN, DONE); - instance->SaveToDB(); + if (!_ourMovementFinished || !UpdateVictim()) + return; + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_THANE_MARK, true); + events.ScheduleEvent(EVENT_MARK, 12 * IN_MILLISECONDS); + break; + case EVENT_METEOR: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f, true)) + { + DoCast(target, SPELL_METEOR); + _shouldSay = true; + } + events.ScheduleEvent(EVENT_METEOR, urandms(13,17)); + break; + } + } - // Achievements related to the 4-horsemen are given through spell 59450 which does not exist. - // There is thus no way it can be given by casting the spell on the players. - instance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 59450); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + DoMeleeAttackIfReady(); } - Talk(SAY_DEATH); - } + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override + { + if (_shouldSay && spell->Id == SPELL_METEOR) + { + Talk(SAY_SPECIAL); + _shouldSay = false; + } + } - void EnterCombat(Unit* /*who*/) override - { - _EnterCombat(); - Talk(SAY_AGGRO); + private: + bool _shouldSay; // throttle to make sure we only talk on first target hit by meteor + }; - events.ScheduleEvent(EVENT_MARK, 15000); - events.ScheduleEvent(EVENT_CAST, 20000 + rand32() % 5000); - events.ScheduleEvent(EVENT_BERSERK, 15*100*1000); + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_four_horsemen_thaneAI>(creature); } +}; - void UpdateAI(uint32 diff) override +class boss_four_horsemen_lady : public CreatureScript +{ + public: + boss_four_horsemen_lady() : CreatureScript("boss_four_horsemen_lady") { } + + struct boss_four_horsemen_ladyAI : public boss_four_horsemen_baseAI { - if (nextWP && movementStarted && !movementCompleted && !nextMovementStarted) + boss_four_horsemen_ladyAI(Creature* creature) : boss_four_horsemen_baseAI(creature, LADY, ladyPath) { } + void BeginFighting() override { - nextMovementStarted = true; - me->GetMotionMaster()->MovePoint(nextWP, WaypointPositions[nextWP]); + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_VOIDZONE, urandms(5,10)); } - if (!UpdateVictim() || !CheckInRoom() || !movementCompleted) - return; + void _UpdateAI(uint32 diff) override + { + if (!me->IsInCombat()) + return; + if (!_ourMovementFinished) + return; + if (me->getThreatManager().isThreatListEmpty()) + { + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + return; + } - events.Update(diff); + events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_LADY_MARK, true); + events.ScheduleEvent(EVENT_MARK, 15 * IN_MILLISECONDS); + break; + case EVENT_VOIDZONE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f, true)) + { + DoCast(target, SPELL_VOID_ZONE, true); + Talk(SAY_SPECIAL); + } + events.ScheduleEvent(EVENT_VOIDZONE, urandms(12, 18)); + break; + } + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true)) + DoCast(target, SPELL_SHADOW_BOLT); + else + { + DoCastAOE(SPELL_UNYIELDING_PAIN); + Talk(EMOTE_RAGECAST); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_four_horsemen_ladyAI>(creature); + } +}; + +class boss_four_horsemen_sir : public CreatureScript +{ + public: + boss_four_horsemen_sir() : CreatureScript("boss_four_horsemen_sir") { } - while (uint32 eventId = events.ExecuteEvent()) + struct boss_four_horsemen_sirAI : public boss_four_horsemen_baseAI + { + boss_four_horsemen_sirAI(Creature* creature) : boss_four_horsemen_baseAI(creature, SIR, sirPath), _shouldSay(true) { } + void BeginFighting() override { - switch (eventId) + events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_MARK, 24 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_HOLYWRATH, urandms(13,18)); + } + + void _UpdateAI(uint32 diff) override + { + if (!me->IsInCombat()) + return; + if (!_ourMovementFinished) + return; + if (me->getThreatManager().isThreatListEmpty()) { - case EVENT_MARK: - if (!(rand32() % 5)) - Talk(SAY_SPECIAL); - DoCastAOE(SPELL_MARK[id]); - events.ScheduleEvent(EVENT_MARK, 15000); - break; - case EVENT_CAST: - if (!(rand32() % 5)) - Talk(SAY_TAUNT); + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + return; + } - if (caster) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f, true)) - DoCast(target, SPELL_PRIMARY(id)); - } - else - DoCastVictim(SPELL_PRIMARY(id)); + events.Update(diff); - events.ScheduleEvent(EVENT_CAST, 15000); - break; - case EVENT_BERSERK: - Talk(SAY_SPECIAL); - DoCast(me, EVENT_BERSERK); - break; + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_BERSERK: + DoCastAOE(SPELL_BERSERK, true); + break; + case EVENT_MARK: + DoCastAOE(SPELL_SIR_MARK, true); + events.ScheduleEvent(EVENT_MARK, 15 * IN_MILLISECONDS); + break; + case EVENT_HOLYWRATH: + if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true)) + { + DoCast(target, SPELL_HOLY_WRATH, true); + _shouldSay = true; + } + events.ScheduleEvent(EVENT_HOLYWRATH, urandms(10,18)); + break; + } + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0, 45.0f, true)) + DoCast(target, SPELL_HOLY_BOLT); + else + { + DoCastAOE(SPELL_CONDEMNATION); + Talk(EMOTE_RAGECAST); } } - if (punishTimer <= diff) + void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override { - if (doDelayPunish) + if (_shouldSay && spell->Id == SPELL_HOLY_WRATH) { - DoCastAOE(SPELL_PUNISH[id], true); - doDelayPunish = false; + Talk(SAY_SPECIAL); + _shouldSay = false; } - punishTimer = 2000; - } else punishTimer -= diff; + } - if (!caster) - DoMeleeAttackIfReady(); - else if ((!DoSpellAttackIfReady(SPELL_SECONDARY(id)) || !me->IsWithinLOSInMap(me->GetVictim())) && movementCompleted && !doDelayPunish) - doDelayPunish = true; - } - }; + private: + bool _shouldSay; // throttle to make sure we only talk on first target hit by holy wrath + }; + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<boss_four_horsemen_sirAI>(creature); + } }; class spell_four_horsemen_mark : public SpellScriptLoader @@ -450,6 +749,9 @@ class spell_four_horsemen_mark : public SpellScriptLoader void AddSC_boss_four_horsemen() { - new boss_four_horsemen(); + new boss_four_horsemen_baron(); + new boss_four_horsemen_thane(); + new boss_four_horsemen_lady(); + new boss_four_horsemen_sir(); new spell_four_horsemen_mark(); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index c9684cf10cf..81f1e071da0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -20,30 +20,70 @@ #include "SpellScript.h" #include "GridNotifiers.h" #include "CombatAI.h" +#include "AreaBoundary.h" #include "naxxramas.h" +/* Constants */ enum Yells { - SAY_SPEECH = 0, - SAY_KILL = 1, - SAY_DEATH = 2, - SAY_TELEPORT = 3 + SAY_INTRO_1 = 0, + SAY_INTRO_2 = 1, + SAY_INTRO_3 = 2, + SAY_INTRO_4 = 3, + SAY_PHASE_TWO = 4, + SAY_DEATH = 5, + SAY_KILL = 6, + + EMOTE_PHASE_TWO = 7, + EMOTE_GATE_OPENED = 8 }; -//Gothik enum Spells { + /* living trainee spells */ + SPELL_DEATH_PLAGUE = 55604, + + /* living knight spells */ + SPELL_SHADOW_MARK = 27825, + + /* living rider spells */ + SPELL_SHADOW_BOLT_VOLLEY = 27831, + + /* spectral trainee spells */ + SPELL_ARCANE_EXPLOSION = 27989, + + /* spectral knight spells */ + SPELL_WHIRLWIND = 56408, + + /* spectral rider spells */ + SPELL_DRAIN_LIFE = 27994, + SPELL_UNHOLY_FRENZY = 55648, + + /* spectral horse spells */ + SPELL_STOMP = 27993, + + /* gothik phase two spells */ SPELL_HARVEST_SOUL = 28679, SPELL_SHADOW_BOLT = 29317, - SPELL_INFORM_LIVE_TRAINEE = 27892, - SPELL_INFORM_LIVE_KNIGHT = 27928, - SPELL_INFORM_LIVE_RIDER = 27935, - SPELL_INFORM_DEAD_TRAINEE = 27915, - SPELL_INFORM_DEAD_KNIGHT = 27931, - SPELL_INFORM_DEAD_RIDER = 27937, - - SPELL_SHADOW_MARK = 27825 + + /* visual spells */ + SPELL_ANCHOR_1_TRAINEE = 27892, + SPELL_ANCHOR_1_DK = 27928, + SPELL_ANCHOR_1_RIDER = 27935, + + SPELL_ANCHOR_2_TRAINEE = 27893, + SPELL_ANCHOR_2_DK = 27929, + SPELL_ANCHOR_2_RIDER = 27936, + + SPELL_SKULLS_TRAINEE = 27915, + SPELL_SKULLS_DK = 27931, + SPELL_SKULLS_RIDER = 27937, + + /* teleport spells */ + SPELL_TELEPORT_DEAD = 28025, + SPELL_TELEPORT_LIVE = 28026 }; +#define SPELLHELPER_UNHOLY_FRENZY RAID_MODE<uint32>(SPELL_UNHOLY_FRENZY,27995) enum Creatures { @@ -53,108 +93,205 @@ enum Creatures NPC_DEAD_TRAINEE = 16127, NPC_DEAD_KNIGHT = 16148, NPC_DEAD_RIDER = 16150, - NPC_DEAD_HORSE = 16149 + NPC_DEAD_HORSE = 16149, + + NPC_TRIGGER = 16137 }; -struct Waves { uint32 entry, time, mode; }; -// wave setups are not the same in heroic and normal difficulty, -// mode is 0 only normal, 1 both and 2 only heroic -// but this is handled in DoGothikSummon function -const Waves waves[] = +enum Phases { - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_TRAINEE, 10000, 1}, - {NPC_LIVE_KNIGHT, 10000, 1}, - {NPC_LIVE_TRAINEE, 15000, 1}, - {NPC_LIVE_KNIGHT, 5000, 1}, - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_TRAINEE, 0, 1}, - {NPC_LIVE_KNIGHT, 10000, 1}, - {NPC_LIVE_TRAINEE, 10000, 2}, - {NPC_LIVE_RIDER, 10000, 0}, - {NPC_LIVE_RIDER, 5000, 2}, - {NPC_LIVE_TRAINEE, 5000, 0}, - {NPC_LIVE_TRAINEE, 15000, 2}, - {NPC_LIVE_KNIGHT, 15000, 0}, - {NPC_LIVE_TRAINEE, 0, 0}, - {NPC_LIVE_RIDER, 10000, 1}, - {NPC_LIVE_KNIGHT, 10000, 1}, - {NPC_LIVE_TRAINEE, 10000, 0}, - {NPC_LIVE_RIDER, 10000, 2}, - {NPC_LIVE_TRAINEE, 0, 2}, - {NPC_LIVE_RIDER, 5000, 1}, - {NPC_LIVE_TRAINEE, 0, 2}, - {NPC_LIVE_KNIGHT, 5000, 1}, - {NPC_LIVE_RIDER, 0, 2}, - {NPC_LIVE_TRAINEE, 20000, 1}, - {NPC_LIVE_RIDER, 0, 1}, - {NPC_LIVE_KNIGHT, 0, 1}, - {NPC_LIVE_TRAINEE, 25000, 2}, - {NPC_LIVE_TRAINEE, 15000, 0}, - {NPC_LIVE_TRAINEE, 25000, 0}, - {0, 0, 1}, + PHASE_ONE = 1, + PHASE_TWO = 2 }; -#define POS_Y_GATE -3360.78f -#define POS_Y_WEST -3285.0f -#define POS_Y_EAST -3434.0f -#define POS_X_NORTH 2750.49f -#define POS_X_SOUTH 2633.84f - -#define IN_LIVE_SIDE(who) (who->GetPositionY() < POS_Y_GATE) - enum Events { - EVENT_NONE, + EVENT_INTRO_2 = 1, + EVENT_INTRO_3, + EVENT_INTRO_4, + EVENT_PHASE_TWO, EVENT_SUMMON, + EVENT_DOORS_UNLOCK, + EVENT_TELEPORT, EVENT_HARVEST, EVENT_BOLT, - EVENT_TELEPORT -}; -enum Pos -{ - POS_LIVE = 6, - POS_DEAD = 5 + EVENT_RESUME_ATTACK }; -const Position PosSummonLive[POS_LIVE] = +enum Actions { - {2669.7f, -3428.76f, 268.56f, 1.6f}, - {2692.1f, -3428.76f, 268.56f, 1.6f}, - {2714.4f, -3428.76f, 268.56f, 1.6f}, - {2669.7f, -3431.67f, 268.56f, 1.6f}, - {2692.1f, -3431.67f, 268.56f, 1.6f}, - {2714.4f, -3431.67f, 268.56f, 1.6f}, + ACTION_GATE_OPENED = 1, + ACTION_MINION_EVADE, + ACTION_ACQUIRE_TARGET }; -const Position PosSummonDead[POS_DEAD] = + +/* Room side checking logic */ +static AreaBoundary* const livingSide = new RectangleBoundary(2633.84f, 2750.49f, -3434.0f, -3360.78f); +static AreaBoundary* const deadSide = new RectangleBoundary(2633.84f, 2750.49f, -3360.78f, -3285.0f); +enum Side { - {2725.1f, -3310.0f, 268.85f, 3.4f}, - {2699.3f, -3322.8f, 268.60f, 3.3f}, - {2733.1f, -3348.5f, 268.84f, 3.1f}, - {2682.8f, -3304.2f, 268.85f, 3.9f}, - {2664.8f, -3340.7f, 268.23f, 3.7f}, + SIDE_NONE = 0, + SIDE_LIVING, + SIDE_DEAD }; +inline static Side GetSide(Position const* who) +{ + if (livingSide->IsWithinBoundary(who)) + return SIDE_LIVING; + if (deadSide->IsWithinBoundary(who)) + return SIDE_DEAD; + return SIDE_NONE; +} +inline static bool IsOnSameSide(Position const* who, Position const* other) +{ + return (GetSide(who) == GetSide(other)); +} +static Player* FindEligibleTarget(Creature const* me, bool isGateOpen) +{ + Map::PlayerList const& players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it) + { + Player* player = it->GetSource(); + if (player && (isGateOpen || IsOnSameSide(me, player)) && me->CanSeeOrDetect(player) && me->IsValidAttackTarget(player) && player->isInAccessiblePlaceFor(me)) + { + return player; + } + } -float const PosGroundLiveSide[4] = {2691.2f, -3387.0f, 267.68f, 1.52f}; -float const PosGroundDeadSide[4] = {2693.5f, -3334.6f, 267.68f, 4.67f}; -float const PosPlatform[4] = {2640.5f, -3360.6f, 285.26f, 0.0f}; + return nullptr; +} -// Predicate function to check that the r efzr unit is NOT on the same side as the source. -struct NotOnSameSide : public std::unary_function<Unit*, bool> -{ - NotOnSameSide(Unit* source) : _onLiveSide(IN_LIVE_SIDE(source)) { } - bool operator() (Unit const* target) +/* Wave data */ +typedef std::pair<uint32, uint8> GothikWaveEntry; // (npcEntry, npcCount) +typedef std::set<GothikWaveEntry> GothikWave; +typedef std::pair<GothikWave, uint8> GothikWaveInfo; // (wave, secondsToNext) +typedef std::vector<GothikWaveInfo> GothikWaveData; +const GothikWaveData waves10 = +{ { - return (_onLiveSide != IN_LIVE_SIDE(target)); - } + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 15}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 2}, {NPC_LIVE_KNIGHT, 1}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 5}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 15}, + { + {{NPC_LIVE_TRAINEE, 2}, {NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 5}, + { + {{NPC_LIVE_KNIGHT, 1}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 20}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_KNIGHT, 1}, {NPC_LIVE_TRAINEE, 2}}, + 15}, + { + {{NPC_LIVE_TRAINEE, 2}}, + 0} +}; - private: - bool _onLiveSide; +const GothikWaveData waves25 = +{ + { + {{NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 15}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_TRAINEE, 3}, {NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 5}, + { + {{NPC_LIVE_TRAINEE, 3}}, + 15}, + { + {{NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_KNIGHT, 2}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}}, + 10}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_TRAINEE, 3}}, + 5}, + { + {{NPC_LIVE_KNIGHT, 1}, {NPC_LIVE_TRAINEE, 3}}, + 5}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_TRAINEE, 3}}, + 20}, + { + {{NPC_LIVE_RIDER, 1}, {NPC_LIVE_KNIGHT, 2}, {NPC_LIVE_TRAINEE, 3}}, + 0} }; + +// GUID of first trigger NPC (used as offset for guid checks) +// 0-1 are living side soul triggers, 2-3 are spectral side soul triggers, 4 is living rider spawn trigger, 5-7 are living other spawn trigger, 8-12 are skull pile triggers +const uint32 CGUID_TRIGGER = 127618; +/* Creature AI */ class boss_gothik : public CreatureScript { public: @@ -165,29 +302,18 @@ class boss_gothik : public CreatureScript boss_gothikAI(Creature* creature) : BossAI(creature, BOSS_GOTHIK) { Initialize(); - waveCount = 0; } void Initialize() { - mergedSides = false; - phaseTwo = false; - thirtyPercentReached = false; + _waveCount = 0; + _gateCanOpen = false; + _gateIsOpen = true; + _lastTeleportDead = false; } - uint32 waveCount; - bool mergedSides; - bool phaseTwo; - bool thirtyPercentReached; - - GuidVector LiveTriggerGUID; - GuidVector DeadTriggerGUID; - void Reset() override { - LiveTriggerGUID.clear(); - DeadTriggerGUID.clear(); - me->SetReactState(REACT_PASSIVE); instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); _Reset(); @@ -196,43 +322,29 @@ class boss_gothik : public CreatureScript void EnterCombat(Unit* /*who*/) override { - for (uint32 i = 0; i < POS_LIVE; ++i) - if (Creature* trigger = DoSummon(WORLD_TRIGGER, PosSummonLive[i])) - LiveTriggerGUID.push_back(trigger->GetGUID()); - for (uint32 i = 0; i < POS_DEAD; ++i) - if (Creature* trigger = DoSummon(WORLD_TRIGGER, PosSummonDead[i])) - DeadTriggerGUID.push_back(trigger->GetGUID()); - - if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD) - { - TC_LOG_ERROR("scripts", "Script Gothik: cannot summon triggers!"); - EnterEvadeMode(); - return; - } - _EnterCombat(); - waveCount = 0; - events.ScheduleEvent(EVENT_SUMMON, 30000); - DoTeleportTo(PosPlatform); - Talk(SAY_SPEECH); + events.SetPhase(PHASE_ONE); + events.ScheduleEvent(EVENT_SUMMON, 25 * IN_MILLISECONDS, 0, PHASE_ONE); + events.ScheduleEvent(EVENT_DOORS_UNLOCK, 205 * IN_MILLISECONDS, 0, PHASE_ONE); + events.ScheduleEvent(EVENT_PHASE_TWO, 270 * IN_MILLISECONDS, 0, PHASE_ONE); + Talk(SAY_INTRO_1); + events.ScheduleEvent(EVENT_INTRO_2, 4 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_INTRO_3, 9 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_INTRO_4, 14 * IN_MILLISECONDS); instance->SetData(DATA_GOTHIK_GATE, GO_STATE_READY); + _gateIsOpen = false; } void JustSummoned(Creature* summon) override { - if (summon->GetEntry() == WORLD_TRIGGER) - summon->setActive(true); - else if (!mergedSides) + summons.Summon(summon); + if (me->IsInCombat()) { - summon->AI()->DoAction(me->HasReactState(REACT_PASSIVE) ? 1 : 0); - summon->AI()->EnterEvadeMode(); + summon->AI()->DoAction(_gateIsOpen ? ACTION_GATE_OPENED : ACTION_ACQUIRE_TARGET); + summon->SetCombatPulseDelay(5); } else - { - summon->AI()->DoAction(0); - summon->AI()->DoZoneInCombat(); - } - summons.Summon(summon); + summon->DespawnOrUnsummon(); } void SummonedCreatureDespawn(Creature* summon) override @@ -240,256 +352,204 @@ class boss_gothik : public CreatureScript summons.Despawn(summon); } - void KilledUnit(Unit* /*victim*/) override + void KilledUnit(Unit* victim) override { - if (!(rand32() % 5)) + if (victim && victim->GetTypeId() == TYPEID_PLAYER) Talk(SAY_KILL); } void JustDied(Unit* /*killer*/) override { - LiveTriggerGUID.clear(); - DeadTriggerGUID.clear(); _JustDied(); Talk(SAY_DEATH); instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + _gateIsOpen = false; } - void DoGothikSummon(uint32 entry) + void OpenGate() { - if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) - { - switch (entry) - { - case NPC_LIVE_TRAINEE: - { - if (Creature* liveTrigger = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[0])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger, 1); - if (Creature* liveTrigger1 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[1])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger1, 1); - if (Creature* liveTrigger2 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[2])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger2, 1); - break; - } - case NPC_LIVE_KNIGHT: - { - if (Creature* liveTrigger3 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[3])) - DoSummon(NPC_LIVE_KNIGHT, liveTrigger3, 1); - if (Creature* liveTrigger5 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[5])) - DoSummon(NPC_LIVE_KNIGHT, liveTrigger5, 1); - break; - } - case NPC_LIVE_RIDER: - { - if (Creature* liveTrigger4 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_RIDER, liveTrigger4, 1); - break; - } - } - } - else - { - switch (entry) - { - case NPC_LIVE_TRAINEE: - { - if (Creature* liveTrigger = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger, 1); - if (Creature* liveTrigger2 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_TRAINEE, liveTrigger2, 1); - break; - } - case NPC_LIVE_KNIGHT: - { - if (Creature* liveTrigger5 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_KNIGHT, liveTrigger5, 1); - break; - } - case NPC_LIVE_RIDER: - { - if (Creature* liveTrigger4 = ObjectAccessor::GetCreature(*me, LiveTriggerGUID[4])) - DoSummon(NPC_LIVE_RIDER, liveTrigger4, 1); - break; - } - } - } - } - - bool CheckGroupSplitted() - { - bool checklife = false; - bool checkdead = false; - Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->GetSource() && i->GetSource()->IsAlive() && - i->GetSource()->GetPositionX() <= POS_X_NORTH && - i->GetSource()->GetPositionX() >= POS_X_SOUTH && - i->GetSource()->GetPositionY() <= POS_Y_GATE && - i->GetSource()->GetPositionY() >= POS_Y_EAST) - { - checklife = true; - } - else if (i->GetSource() && i->GetSource()->IsAlive() && - i->GetSource()->GetPositionX() <= POS_X_NORTH && - i->GetSource()->GetPositionX() >= POS_X_SOUTH && - i->GetSource()->GetPositionY() >= POS_Y_GATE && - i->GetSource()->GetPositionY() <= POS_Y_WEST) - { - checkdead = true; - } - - if (checklife && checkdead) - return true; - } - - return false; - } - - void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override - { - uint32 spellId = 0; - switch (spell->Id) - { - case SPELL_INFORM_LIVE_TRAINEE: spellId = SPELL_INFORM_DEAD_TRAINEE; break; - case SPELL_INFORM_LIVE_KNIGHT: spellId = SPELL_INFORM_DEAD_KNIGHT; break; - case SPELL_INFORM_LIVE_RIDER: spellId = SPELL_INFORM_DEAD_RIDER; break; - } - if (spellId && me->IsInCombat()) - { - me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST); - if (Creature* pRandomDeadTrigger = ObjectAccessor::GetCreature(*me, DeadTriggerGUID[rand32() % POS_DEAD])) - me->CastSpell(pRandomDeadTrigger, spellId, true); - } + if (_gateIsOpen) + return; + instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + Talk(EMOTE_GATE_OPENED); + _gateIsOpen = true; + + for (ObjectGuid summonGuid : summons) + if (Creature* summon = ObjectAccessor::GetCreature(*me, summonGuid)) + summon->AI()->DoAction(ACTION_GATE_OPENED); } void DamageTaken(Unit* /*who*/, uint32& damage) override { - if (!phaseTwo) + if (!events.IsInPhase(PHASE_TWO)) damage = 0; } - void SpellHitTarget(Unit* target, SpellInfo const* spell) override + void DoAction(int32 action) override { - if (!me->IsInCombat()) - return; - - switch (spell->Id) + switch (action) { - case SPELL_INFORM_DEAD_TRAINEE: - DoSummon(NPC_DEAD_TRAINEE, target, 0); - break; - case SPELL_INFORM_DEAD_KNIGHT: - DoSummon(NPC_DEAD_KNIGHT, target, 0); - break; - case SPELL_INFORM_DEAD_RIDER: - DoSummon(NPC_DEAD_RIDER, target, 1.0f); - DoSummon(NPC_DEAD_HORSE, target, 1.0f); + case ACTION_MINION_EVADE: + if (_gateIsOpen || me->getThreatManager().isThreatListEmpty()) + return EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + if (_gateCanOpen) + OpenGate(); break; } } + void EnterEvadeMode(EvadeReason why) override + { + BossAI::EnterEvadeMode(why); + Position const& home = me->GetHomePosition(); + me->NearTeleportTo(home.GetPositionX(), home.GetPositionY(), home.GetPositionZ(), home.GetOrientation()); + } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; - events.Update(diff); - - if (!thirtyPercentReached && HealthBelowPct(30) && phaseTwo) + if (me->HasReactState(REACT_AGGRESSIVE) && !_gateIsOpen && !IsOnSameSide(me, me->GetVictim())) { - thirtyPercentReached = true; - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); + // NBD: this should only happen in practice if there is nobody left alive on our side (we should open gate) + // thus we only do a cursory check to make sure (edge cases?) + if (Player* newTarget = FindEligibleTarget(me, _gateIsOpen)) + { + me->getThreatManager().resetAllAggro(); + me->AddThreat(newTarget, 1.0f); + AttackStart(newTarget); + } + else + OpenGate(); } - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + events.Update(diff); + + if (!_gateIsOpen && HealthBelowPct(30) && events.IsInPhase(PHASE_TWO)) + OpenGate(); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_SUMMON: - if (waves[waveCount].entry) + { + if (RAID_MODE(waves10,waves25).size() <= _waveCount) // bounds check { - if ((waves[waveCount].mode == 2) && (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)) - DoGothikSummon(waves[waveCount].entry); - else if ((waves[waveCount].mode == 0) && (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)) - DoGothikSummon(waves[waveCount].entry); - else if (waves[waveCount].mode == 1) - DoGothikSummon(waves[waveCount].entry); - - // if group is not splitted, open gate and merge both sides at ~ 2 minutes (wave 11) - if (waveCount == 11) + TC_LOG_INFO("scripts", "GothikAI: Wave count %d is out of range for difficulty %d.", _waveCount, GetDifficulty()); + break; + } + + std::list<Creature*> triggers; + me->GetCreatureListWithEntryInGrid(triggers, NPC_TRIGGER, 150.0f); + for (GothikWaveEntry entry : RAID_MODE(waves10, waves25)[_waveCount].first) + for (uint8 i = 0; i < entry.second; ++i) { - if (!CheckGroupSplitted()) + // GUID layout is as follows: + // CGUID+4: center (back of platform) - primary rider spawn + // CGUID+5: north (back of platform) - primary knight spawn + // CGUID+6: center (front of platform) - second spawn + // CGUID+7: south (front of platform) - primary trainee spawn + uint32 targetDBGuid; + switch (entry.first) { - instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE); - DummyEntryCheckPredicate pred; - summons.DoAction(0, pred); //! Magic numbers fail - summons.DoZoneInCombat(); - mergedSides = true; + case NPC_LIVE_RIDER: // only spawns from center (back) > north + targetDBGuid = (CGUID_TRIGGER + 4) + (i % 2); + break; + case NPC_LIVE_KNIGHT: // spawns north > center (front) > south + targetDBGuid = (CGUID_TRIGGER + 5) + (i % 3); + break; + case NPC_LIVE_TRAINEE: // spawns south > center (front) > north + targetDBGuid = (CGUID_TRIGGER + 7) - (i % 3); + break; + default: + targetDBGuid = 0; } + + for (Creature* trigger : triggers) + if (trigger && trigger->GetSpawnId() == targetDBGuid) + { + DoSummon(entry.first, trigger, 1.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; + } } - if (waves[waveCount].mode == 1) - events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time); - else if ((waves[waveCount].mode == 2) && (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)) - events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time); - else if ((waves[waveCount].mode == 0) && (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)) - events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time); - else - events.ScheduleEvent(EVENT_SUMMON, 0); + if (uint8 timeToNext = RAID_MODE(waves10, waves25)[_waveCount].second) + events.ScheduleEvent(EVENT_SUMMON, timeToNext * IN_MILLISECONDS, 0, PHASE_ONE); - ++waveCount; - } - else - { - phaseTwo = true; - Talk(SAY_TELEPORT); - DoTeleportTo(PosGroundLiveSide); - me->SetReactState(REACT_AGGRESSIVE); - DummyEntryCheckPredicate pred; - summons.DoAction(0, pred); //! Magic numbers fail - summons.DoZoneInCombat(); - events.ScheduleEvent(EVENT_BOLT, 1000); - events.ScheduleEvent(EVENT_HARVEST, urand(3000, 15000)); - events.ScheduleEvent(EVENT_TELEPORT, 20000); - } + ++_waveCount; break; - case EVENT_BOLT: - DoCastVictim(SPELL_SHADOW_BOLT); - events.ScheduleEvent(EVENT_BOLT, 1000); + } + case EVENT_DOORS_UNLOCK: + _gateCanOpen = true; + for (ObjectGuid summonGuid : summons) + if (Creature* summon = ObjectAccessor::GetCreature(*me, summonGuid)) + if (summon->IsAlive() && (!summon->IsInCombat() || summon->IsInEvadeMode())) + { + OpenGate(); + break; + } break; - case EVENT_HARVEST: - DoCastVictim(SPELL_HARVEST_SOUL, true); - events.ScheduleEvent(EVENT_HARVEST, urand(20000, 25000)); + case EVENT_PHASE_TWO: + events.SetPhase(PHASE_TWO); + events.ScheduleEvent(EVENT_TELEPORT, 20 * IN_MILLISECONDS, 0, PHASE_TWO); + events.ScheduleEvent(EVENT_HARVEST, 15 * IN_MILLISECONDS, 0, PHASE_TWO); + events.ScheduleEvent(EVENT_RESUME_ATTACK, 2 * IN_MILLISECONDS, 0, PHASE_TWO); + Talk(SAY_PHASE_TWO); + Talk(EMOTE_PHASE_TWO); + me->SetReactState(REACT_PASSIVE); + me->getThreatManager().resetAllAggro(); + DoCastAOE(SPELL_TELEPORT_LIVE); break; case EVENT_TELEPORT: - if (!thirtyPercentReached) + if (!HealthBelowPct(30)) { + me->CastStop(); me->AttackStop(); - if (IN_LIVE_SIDE(me)) - DoTeleportTo(PosGroundDeadSide); - else - DoTeleportTo(PosGroundLiveSide); - - me->getThreatManager().resetAggro(NotOnSameSide(me)); - if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0)) - { - me->getThreatManager().addThreat(target, 100.0f); - AttackStart(target); - } - - events.ScheduleEvent(EVENT_TELEPORT, 20000); + me->StopMoving(); + me->SetReactState(REACT_PASSIVE); + me->getThreatManager().resetAllAggro(); + DoCastAOE(_lastTeleportDead ? SPELL_TELEPORT_LIVE : SPELL_TELEPORT_DEAD); + _lastTeleportDead = !_lastTeleportDead; + + events.CancelEvent(EVENT_BOLT); + events.ScheduleEvent(EVENT_TELEPORT, 20 * IN_MILLISECONDS, 0, PHASE_TWO); + events.ScheduleEvent(EVENT_RESUME_ATTACK, 2 * IN_MILLISECONDS, 0, PHASE_TWO); } break; + + case EVENT_HARVEST: + DoCastAOE(SPELL_HARVEST_SOUL, true); // triggered allows this to go "through" shadow bolt + events.ScheduleEvent(EVENT_HARVEST, 15 * IN_MILLISECONDS, 0, PHASE_TWO); + break; + case EVENT_RESUME_ATTACK: + me->SetReactState(REACT_AGGRESSIVE); + events.ScheduleEvent(EVENT_BOLT, 0, 0, PHASE_TWO); + // return to the start of this method so victim side etc is re-evaluated + return UpdateAI(0u); // tail recursion for efficiency + case EVENT_BOLT: + DoCastVictim(SPELL_SHADOW_BOLT); + events.ScheduleEvent(EVENT_BOLT, 1 * IN_MILLISECONDS, 0, PHASE_TWO); + break; + case EVENT_INTRO_2: + Talk(SAY_INTRO_2); + break; + case EVENT_INTRO_3: + Talk(SAY_INTRO_3); + break; + case EVENT_INTRO_4: + Talk(SAY_INTRO_4); + break; } } - - if (!phaseTwo) - DoMeleeAttackIfReady(); } + + private: + uint32 _waveCount; + bool _gateCanOpen; + bool _gateIsOpen; + bool _lastTeleportDead; }; CreatureAI* GetAI(Creature* creature) const override @@ -498,86 +558,407 @@ class boss_gothik : public CreatureScript } }; -class npc_gothik_minion : public CreatureScript +struct npc_gothik_minion_baseAI : public ScriptedAI { public: - npc_gothik_minion() : CreatureScript("npc_gothik_minion") { } + npc_gothik_minion_baseAI(Creature* creature, uint32 deathNotify=0) : ScriptedAI(creature), _deathNotify(deathNotify), _gateIsOpen(false) { } + + void JustDied(Unit* /*killer*/) override + { + if (_deathNotify) + DoCastAOE(_deathNotify, true); + } + + inline bool isOnSameSide(Unit const* who) const + { + return IsOnSameSide(me, who); + } - struct npc_gothik_minionAI : public CombatAI + void DamageTaken(Unit* attacker, uint32 &damage) override + { // do not allow minions to take damage before the gate is opened + if (!_gateIsOpen && !isOnSameSide(attacker)) + damage = 0; + } + + void DoAction(int32 action) override { - npc_gothik_minionAI(Creature* creature) : CombatAI(creature) + switch (action) { - liveSide = IN_LIVE_SIDE(me); - gateClose = false; + case ACTION_GATE_OPENED: + _gateIsOpen = true; + // intentional missing break + case ACTION_ACQUIRE_TARGET: + if (Player* target = FindEligibleTarget(me, _gateIsOpen)) + { + me->AddThreat(target, 1.0f); + AttackStart(target); + } + else + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + break; + } + } + + void EnterEvadeMode(EvadeReason why) override + { + ScriptedAI::EnterEvadeMode(why); + + if (InstanceScript* instance = me->GetInstanceScript()) + if (Creature* gothik = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_GOTHIK))) + gothik->AI()->DoAction(ACTION_MINION_EVADE); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + if (!_gateIsOpen && !isOnSameSide(me->GetVictim())) + { // reset threat, then try to find someone on same side as us to attack + if (Player* newTarget = FindEligibleTarget(me, _gateIsOpen)) + { + me->RemoveAurasByType(SPELL_AURA_MOD_TAUNT); + me->getThreatManager().resetAllAggro(); + me->AddThreat(newTarget, 1.0f); + AttackStart(newTarget); + } + else + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); } - bool liveSide; - bool gateClose; + _UpdateAI(diff); + } + + virtual void _UpdateAI(uint32 diff) { ScriptedAI::UpdateAI(diff); }; - bool isOnSameSide(Unit const* who) const + private: + uint32 _deathNotify; + bool _gateIsOpen; +}; + +class npc_gothik_minion_livingtrainee : public CreatureScript +{ + public: + npc_gothik_minion_livingtrainee() : CreatureScript("npc_gothik_minion_livingtrainee") { } + + struct npc_gothik_minion_livingtraineeAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_livingtraineeAI(Creature* creature) : npc_gothik_minion_baseAI(creature, SPELL_ANCHOR_1_TRAINEE), _deathPlagueTimer(urandms(5,20)) { } + + void _UpdateAI(uint32 diff) { - return (liveSide == IN_LIVE_SIDE(who)); + if (diff < _deathPlagueTimer) + _deathPlagueTimer -= diff; + else + { + DoCastAOE(SPELL_DEATH_PLAGUE); + _deathPlagueTimer = urandms(5, 20); + } + DoMeleeAttackIfReady(); } + uint32 _deathPlagueTimer; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_livingtraineeAI>(creature); + } +}; + +class npc_gothik_minion_livingknight : public CreatureScript +{ + public: + npc_gothik_minion_livingknight() : CreatureScript("npc_gothik_minion_livingknight") { } - void DoAction(int32 param) override + struct npc_gothik_minion_livingknightAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_livingknightAI(Creature* creature) : npc_gothik_minion_baseAI(creature, SPELL_ANCHOR_1_DK), _whirlwindTimer(urandms(5,10)) { } + + void _UpdateAI(uint32 diff) { - gateClose = param != 0; + if (diff < _whirlwindTimer) + _whirlwindTimer -= diff; + else + { + DoCastAOE(SPELL_SHADOW_MARK); + _whirlwindTimer = urandms(15, 20); + } + DoMeleeAttackIfReady(); } + uint32 _whirlwindTimer; + }; - void DamageTaken(Unit* attacker, uint32 &damage) override + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_livingknightAI>(creature); + } +}; + +class npc_gothik_minion_livingrider : public CreatureScript +{ + public: + npc_gothik_minion_livingrider() : CreatureScript("npc_gothik_minion_livingrider") { } + + struct npc_gothik_minion_livingriderAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_livingriderAI(Creature* creature) : npc_gothik_minion_baseAI(creature, SPELL_ANCHOR_1_RIDER), _boltVolleyTimer(urandms(5,10)) { } + + void _UpdateAI(uint32 diff) { - if (gateClose && !isOnSameSide(attacker)) - damage = 0; + if (diff < _boltVolleyTimer) + _boltVolleyTimer -= diff; + else + { + DoCastAOE(SPELL_SHADOW_BOLT_VOLLEY); + _boltVolleyTimer = urandms(10, 15); + } + if (!me->HasUnitState(UNIT_STATE_CASTING)) + DoMeleeAttackIfReady(); } + uint32 _boltVolleyTimer; + }; - void JustDied(Unit* /*killer*/) override + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_livingriderAI>(creature); + } +}; + +class npc_gothik_minion_spectraltrainee : public CreatureScript +{ + public: + npc_gothik_minion_spectraltrainee() : CreatureScript("npc_gothik_minion_spectraltrainee") { } + + struct npc_gothik_minion_spectraltraineeAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectraltraineeAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _explosionTimer(2 * IN_MILLISECONDS) { } + + void _UpdateAI(uint32 diff) + { + if (diff < _explosionTimer) + _explosionTimer -= diff; + else { - if (me->IsSummon()) - if (Unit* owner = me->ToTempSummon()->GetSummoner()) - CombatAI::JustDied(owner); + DoCastAOE(SPELL_ARCANE_EXPLOSION); + _explosionTimer = 2 * IN_MILLISECONDS; } + DoMeleeAttackIfReady(); + } + uint32 _explosionTimer; + }; - void EnterEvadeMode(EvadeReason why) override + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectraltraineeAI>(creature); + } +}; + +class npc_gothik_minion_spectralknight : public CreatureScript +{ + public: + npc_gothik_minion_spectralknight() : CreatureScript("npc_gothik_minion_spectralknight") { } + + struct npc_gothik_minion_spectralknightAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectralknightAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _whirlwindTimer(urandms(15,25)) { } + + void _UpdateAI(uint32 diff) + { + if (diff < _whirlwindTimer) + _whirlwindTimer -= diff; + else { - if (!gateClose) - { - CombatAI::EnterEvadeMode(why); - return; - } + DoCastAOE(SPELL_WHIRLWIND); + _whirlwindTimer = urandms(20, 25); + } + DoMeleeAttackIfReady(); + } + uint32 _whirlwindTimer; + }; - if (!_EnterEvadeMode()) - return; + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectralknightAI>(creature); + } +}; + +class npc_gothik_minion_spectralrider : public CreatureScript +{ + public: + npc_gothik_minion_spectralrider() : CreatureScript("npc_gothik_minion_spectralrider") { } + + struct npc_gothik_minion_spectralriderAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectralriderAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _frenzyTimer(urandms(2,5)), _drainTimer(urandms(8,12)) { } - Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + void _UpdateAI(uint32 diff) + { + if (diff < _frenzyTimer) + _frenzyTimer -= diff; + else if (me->HasUnitState(UNIT_STATE_CASTING)) + _frenzyTimer = 0; + else + { // target priority: knight > other rider > horse > gothik + std::list<Creature*> potentialTargets = DoFindFriendlyMissingBuff(30.0, SPELLHELPER_UNHOLY_FRENZY); + Creature *knightTarget = nullptr, *riderTarget = nullptr, *horseTarget = nullptr, *gothikTarget = nullptr; + for (Creature* pTarget : potentialTargets) { - if (i->GetSource() && i->GetSource()->IsAlive() && isOnSameSide(i->GetSource())) + switch (pTarget->GetEntry()) { - AttackStart(i->GetSource()); - return; + case NPC_DEAD_KNIGHT: + knightTarget = pTarget; + break; + case NPC_DEAD_RIDER: + riderTarget = pTarget; + break; + case NPC_DEAD_HORSE: + horseTarget = pTarget; + break; + case NPC_GOTHIK: + gothikTarget = pTarget; + break; } + if (knightTarget) + break; } + Creature* target = knightTarget ? knightTarget : riderTarget ? riderTarget : horseTarget ? horseTarget : gothikTarget ? gothikTarget : nullptr; + if (target) + DoCast(target, SPELL_UNHOLY_FRENZY); + _frenzyTimer = 20 * IN_MILLISECONDS; + } - me->GetMotionMaster()->MoveIdle(); - Reset(); + if (diff < _drainTimer) + _drainTimer -= diff; + else + { + DoCastVictim(SPELL_DRAIN_LIFE); + _drainTimer = urandms(10,15); } - void UpdateAI(uint32 diff) override + if (!me->HasUnitState(UNIT_STATE_CASTING)) + DoMeleeAttackIfReady(); + } + uint32 _frenzyTimer, _drainTimer; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectralriderAI>(creature); + } +}; + +class npc_gothik_minion_spectralhorse : public CreatureScript +{ + public: + npc_gothik_minion_spectralhorse() : CreatureScript("npc_gothik_minion_spectralhorse") { } + + struct npc_gothik_minion_spectralhorseAI : public npc_gothik_minion_baseAI + { + npc_gothik_minion_spectralhorseAI(Creature* creature) : npc_gothik_minion_baseAI(creature), _stompTimer(urandms(10,15)) { } + + void _UpdateAI(uint32 diff) + { + if (diff < _stompTimer) + _stompTimer -= diff; + else { - if (gateClose && (!isOnSameSide(me) || (me->GetVictim() && !isOnSameSide(me->GetVictim())))) - { - EnterEvadeMode(EVADE_REASON_OTHER); - return; - } + DoCastAOE(SPELL_STOMP); + _stompTimer = urandms(14, 18); + } + DoMeleeAttackIfReady(); + } + uint32 _stompTimer; + }; - CombatAI::UpdateAI(diff); + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_minion_spectralhorseAI>(creature); + } +}; + +class npc_gothik_trigger : public CreatureScript +{ +public: + npc_gothik_trigger() : CreatureScript("npc_gothik_trigger") { } + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_gothik_triggerAI>(creature); + } + + struct npc_gothik_triggerAI : public ScriptedAI + { + npc_gothik_triggerAI(Creature* creature) : ScriptedAI(creature) { creature->SetDisableGravity(true); } + + void EnterEvadeMode(EvadeReason /*why*/) override { } + void UpdateAI(uint32 /*diff*/) override { } + void EnterCombat(Unit* /*who*/) override { } + void DamageTaken(Unit* /*who*/, uint32& damage) override { damage = 0; } + + Creature* SelectRandomSkullPile() + { + std::list<Creature*> triggers; + me->GetCreatureListWithEntryInGrid(triggers, NPC_TRIGGER, 150.0f); + uint32 targetDBGuid = CGUID_TRIGGER + urand(8, 12); // CGUID+8 to CGUID+12 are the triggers for the skull piles on dead side + for (Creature* trigger : triggers) + if (trigger && trigger->GetSpawnId() == targetDBGuid) + return trigger; + + return nullptr; + } + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override + { + if (!spell) + return; + + switch (spell->Id) + { + case SPELL_ANCHOR_1_TRAINEE: + DoCastAOE(SPELL_ANCHOR_2_TRAINEE, true); + break; + case SPELL_ANCHOR_1_DK: + DoCastAOE(SPELL_ANCHOR_2_DK, true); + break; + case SPELL_ANCHOR_1_RIDER: + DoCastAOE(SPELL_ANCHOR_2_RIDER, true); + break; + case SPELL_ANCHOR_2_TRAINEE: + if (Creature* target = SelectRandomSkullPile()) + DoCast(target, SPELL_SKULLS_TRAINEE, true); + break; + case SPELL_ANCHOR_2_DK: + if (Creature* target = SelectRandomSkullPile()) + DoCast(target, SPELL_SKULLS_DK, true); + break; + case SPELL_ANCHOR_2_RIDER: + if (Creature* target = SelectRandomSkullPile()) + DoCast(target, SPELL_SKULLS_RIDER, true); + break; + case SPELL_SKULLS_TRAINEE: + DoSummon(NPC_DEAD_TRAINEE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; + case SPELL_SKULLS_DK: + DoSummon(NPC_DEAD_KNIGHT, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; + case SPELL_SKULLS_RIDER: + DoSummon(NPC_DEAD_RIDER, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + DoSummon(NPC_DEAD_HORSE, me, 0.0f, 15 * IN_MILLISECONDS, TEMPSUMMON_CORPSE_TIMED_DESPAWN); + break; } - }; + } - CreatureAI* GetAI(Creature* creature) const override + // dead side summons are "owned" by gothik + void JustSummoned(Creature* summon) override + { + if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK))) + gothik->AI()->JustSummoned(summon); + } + void SummonedCreatureDespawn(Creature* summon) override { - return new npc_gothik_minionAI(creature); + if (Creature* gothik = ObjectAccessor::GetCreature(*me, me->GetInstanceScript()->GetGuidData(DATA_GOTHIK))) + gothik->AI()->SummonedCreatureDespawn(summon); } + }; }; class spell_gothik_shadow_bolt_volley : public SpellScriptLoader @@ -609,6 +990,13 @@ class spell_gothik_shadow_bolt_volley : public SpellScriptLoader void AddSC_boss_gothik() { new boss_gothik(); - new npc_gothik_minion(); + new npc_gothik_minion_livingtrainee(); + new npc_gothik_minion_livingknight(); + new npc_gothik_minion_livingrider(); + new npc_gothik_minion_spectraltrainee(); + new npc_gothik_minion_spectralknight(); + new npc_gothik_minion_spectralrider(); + new npc_gothik_minion_spectralhorse(); + new npc_gothik_trigger(); new spell_gothik_shadow_bolt_volley(); } diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 916bc3d0438..c8a4eb7fbc8 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -91,15 +91,6 @@ DoorData const doorData[] = { 0, 0, DOOR_TYPE_ROOM } }; -MinionData const minionData[] = -{ - { NPC_SIR, BOSS_HORSEMEN }, - { NPC_THANE, BOSS_HORSEMEN }, - { NPC_LADY, BOSS_HORSEMEN }, - { NPC_BARON, BOSS_HORSEMEN }, - { 0, 0, } -}; - ObjectData const objectData[] = { { GO_NAXX_PORTAL_ARACHNID, DATA_NAXX_PORTAL_ARACHNID }, @@ -152,11 +143,8 @@ class instance_naxxramas : public InstanceMapScript SetBossNumber(EncounterCount); LoadBossBoundaries(boundaries); LoadDoorData(doorData); - LoadMinionData(minionData); LoadObjectData(nullptr, objectData); - minHorsemenDiedTime = 0; - maxHorsemenDiedTime = 0; AbominationCount = 0; hadAnubRekhanGreet = false; hadFaerlinaGreet = false; @@ -179,6 +167,9 @@ class instance_naxxramas : public InstanceMapScript case NPC_RAZUVIOUS: RazuviousGUID = creature->GetGUID(); break; + case NPC_GOTHIK: + GothikGUID = creature->GetGUID(); + break; case NPC_THANE: ThaneGUID = creature->GetGUID(); break; @@ -215,13 +206,6 @@ class instance_naxxramas : public InstanceMapScript default: break; } - - AddMinion(creature, true); - } - - void OnCreatureRemove(Creature* creature) override - { - AddMinion(creature, false); } void ProcessEvent(WorldObject* /*source*/, uint32 eventId) override @@ -351,25 +335,6 @@ class instance_naxxramas : public InstanceMapScript if (GameObject* gate = instance->GetGameObject(GothikGateGUID)) gate->SetGoState(GOState(value)); break; - case DATA_HORSEMEN0: - case DATA_HORSEMEN1: - case DATA_HORSEMEN2: - case DATA_HORSEMEN3: - if (value == NOT_STARTED) - { - minHorsemenDiedTime = 0; - maxHorsemenDiedTime = 0; - } - else if (value == DONE) - { - time_t now = time(NULL); - - if (minHorsemenDiedTime == 0) - minHorsemenDiedTime = now; - - maxHorsemenDiedTime = now; - } - break; case DATA_ABOMINATION_KILLED: AbominationCount = value; break; @@ -416,6 +381,8 @@ class instance_naxxramas : public InstanceMapScript return FaerlinaGUID; case DATA_RAZUVIOUS: return RazuviousGUID; + case DATA_GOTHIK: + return GothikGUID; case DATA_THANE: return ThaneGUID; case DATA_LADY: @@ -648,13 +615,13 @@ class instance_naxxramas : public InstanceMapScript { switch (criteria_id) { - case 7600: // Criteria for achievement 2176: And They Would All Go Down Together 15sec of each other 10-man - if (Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_10MAN_NORMAL && (maxHorsemenDiedTime - minHorsemenDiedTime) < 15) - return true; - return false; - case 7601: // Criteria for achievement 2177: And They Would All Go Down Together 15sec of each other 25-man - if (Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_25MAN_NORMAL && (maxHorsemenDiedTime - minHorsemenDiedTime) < 15) - return true; + // And They Would All Go Down Together (kill 4HM within 15sec of each other) + case 7600: // 25-man + case 7601: // 10-man + if (criteria_id + instance->GetSpawnMode() == 7601) + return false; + if (Creature* baron = instance->GetCreature(BaronGUID)) // it doesn't matter which one we use, really + return (baron->AI()->GetData(DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT) == 1u); return false; // Difficulty checks are done on DB. // Criteria for achievement 2186: The Immortal (25-man) @@ -693,6 +660,7 @@ class instance_naxxramas : public InstanceMapScript // Instructor Razuvious ObjectGuid RazuviousGUID; // Gothik the Harvester + ObjectGuid GothikGUID; ObjectGuid GothikGateGUID; // The Four Horsemen ObjectGuid ThaneGUID; @@ -700,8 +668,6 @@ class instance_naxxramas : public InstanceMapScript ObjectGuid BaronGUID; ObjectGuid SirGUID; ObjectGuid HorsemenChestGUID; - time_t minHorsemenDiedTime; - time_t maxHorsemenDiedTime; /* The Construct Quarter */ // Thaddius diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index c14ff31bb94..c0caa86e93f 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -50,10 +50,7 @@ enum Data DATA_HAD_FAERLINA_GREET, DATA_HAD_THADDIUS_GREET, - DATA_HORSEMEN0, - DATA_HORSEMEN1, - DATA_HORSEMEN2, - DATA_HORSEMEN3, + DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT, DATA_ABOMINATION_KILLED, DATA_NAXX_PORTAL_ARACHNID, @@ -67,6 +64,7 @@ enum Data64 DATA_ANUBREKHAN, DATA_FAERLINA, DATA_RAZUVIOUS, + DATA_GOTHIK, DATA_THANE, DATA_LADY, DATA_BARON, @@ -89,6 +87,7 @@ enum CreaturesIds NPC_ANUBREKHAN = 15956, NPC_FAERLINA = 15953, NPC_RAZUVIOUS = 16061, + NPC_GOTHIK = 16060, NPC_THANE = 16064, NPC_LADY = 16065, NPC_BARON = 30549, diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp index 48bbb7bad4a..6f38cce0e5b 100644 --- a/src/server/scripts/Outland/zone_zangarmarsh.cpp +++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp @@ -48,8 +48,6 @@ EndContentData */ enum AshyenAndKeleth { - GOSSIP_REWARD_BLESS = 0, - NPC_ASHYEN = 17900, NPC_KELETH = 17901, @@ -117,7 +115,6 @@ public: if (spell) { creature->CastSpell(player, spell, true); - creature->AI()->Talk(GOSSIP_REWARD_BLESS); } } @@ -145,7 +142,6 @@ public: if (spell) { creature->CastSpell(player, spell, true); - creature->AI()->Talk(GOSSIP_REWARD_BLESS); } } player->CLOSE_GOSSIP_MENU(); diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp index fee47aa1fa2..37584bda2ae 100644 --- a/src/server/scripts/Pet/pet_mage.cpp +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -178,6 +178,9 @@ class npc_pet_mage_mirror_image : public CreatureScript void UpdateAI(uint32 diff) override { Unit* owner = me->GetCharmerOrOwner(); + if (!owner) + return; + Unit* target = owner->getAttackerForHelper(); events.Update(diff); @@ -192,9 +195,6 @@ class npc_pet_mage_mirror_image : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - if (!owner) - return; - // assign target if image doesnt have any or the target is not actual if (!target || me->GetVictim() != target) { diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 9f6b4947328..8bd4b3eb070 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -43,6 +43,12 @@ enum PaladinSpells SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PRIEST = 37880, SPELL_PALADIN_BLESSING_OF_LOWER_CITY_SHAMAN = 37881, + SPELL_PALADIN_BEACON_OF_LIGHT = 53563, + SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1 = 53652, + SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_2 = 53653, + SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3 = 53654, + SPELL_PALADIN_HOLY_LIGHT = 635, + SPELL_PALADIN_DIVINE_STORM = 53385, SPELL_PALADIN_DIVINE_STORM_DUMMY = 54171, SPELL_PALADIN_DIVINE_STORM_HEAL = 54172, @@ -1153,6 +1159,68 @@ class spell_pal_lay_on_hands : public SpellScriptLoader } }; +// 53651 - Light's Beacon - Beacon of Light +class spell_pal_light_s_beacon : public SpellScriptLoader +{ + public: + spell_pal_light_s_beacon() : SpellScriptLoader("spell_pal_light_s_beacon") { } + + class spell_pal_light_s_beacon_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_light_s_beacon_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_2) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3) + || !sSpellMgr->GetSpellInfo(SPELL_PALADIN_HOLY_LIGHT)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (GetTarget()->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, eventInfo.GetActor()->GetGUID())) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + SpellInfo const* procSpell = eventInfo.GetSpellInfo(); + if (!procSpell) + return; + + uint32 healSpellId = procSpell->IsRankOf(sSpellMgr->EnsureSpellInfo(SPELL_PALADIN_HOLY_LIGHT)) ? SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_1 : SPELL_PALADIN_BEACON_OF_LIGHT_HEAL_3; + uint32 heal = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()); + + Unit* beaconTarget = GetCaster(); + if (!beaconTarget || !beaconTarget->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, eventInfo.GetActor()->GetGUID())) + return; + + /// @todo: caster must be the healed unit to perform distance checks correctly + /// but that will break animation on clientside + /// caster in spell packets must be the healing unit + eventInfo.GetActor()->CastCustomSpell(healSpellId, SPELLVALUE_BASE_POINT0, heal, beaconTarget, true); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_pal_light_s_beacon_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_pal_light_s_beacon_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_pal_light_s_beacon_AuraScript(); + } +}; + // 31789 - Righteous Defense class spell_pal_righteous_defense : public SpellScriptLoader { @@ -1338,6 +1406,7 @@ void AddSC_paladin_spell_scripts() new spell_pal_judgement("spell_pal_judgement_of_wisdom", SPELL_PALADIN_JUDGEMENT_OF_WISDOM); new spell_pal_judgement_of_command(); new spell_pal_lay_on_hands(); + new spell_pal_light_s_beacon(); new spell_pal_righteous_defense(); new spell_pal_sacred_shield(); new spell_pal_seal_of_righteousness(); |