diff --git a/conf/dist/config.sh b/conf/dist/config.sh index 2b82e919e..d04f474c9 100644 --- a/conf/dist/config.sh +++ b/conf/dist/config.sh @@ -70,8 +70,8 @@ CTYPE=${CTYPE:-Release} # compile scripts CSCRIPTS=${CSCRIPTS:-static} -# compile scripts -CMODULES=${CMODULES:-none} +# compile modules +CMODULES=${CMODULES:-static} # compile unit tests CBUILD_TESTING=OFF diff --git a/data/sql/updates/db_world/2022_06_04_00.sql b/data/sql/updates/db_world/2022_06_04_00.sql new file mode 100644 index 000000000..7eafc43ca --- /dev/null +++ b/data/sql/updates/db_world/2022_06_04_00.sql @@ -0,0 +1,582 @@ +-- DB update 2022_06_03_01 -> 2022_06_04_00 +/* Set correct movement flags for Buzzard creatures */ +UPDATE `creature_template_movement` SET `Ground` = 2 WHERE `CreatureId` IN (2830, 2829); + +/* Buzzard - GUID 7006 */ + + +SET @NPC := 7006; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6811.91, `position_y` = -3616.86, `position_z` = 247.556, `orientation` = 2.74597 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6809.25, -3596.17, 243.167, 100.0, 0, 2), +(@PATH, 2, -6797.86, -3589.94, 241.792, 100.0, 0, 2), +(@PATH, 3, -6758.9, -3579.09, 243.121, 100.0, 0, 2), +(@PATH, 4, -6745.04, -3555.24, 245.206, 100.0, 5000, 2), +(@PATH, 5, -6770.95, -3532.25, 245.837, 100.0, 0, 2), +(@PATH, 6, -6797.96, -3506.01, 242.788, 100.0, 0, 2), +(@PATH, 7, -6799.65, -3463.84, 241.792, 100.0, 0, 2), +(@PATH, 8, -6760.58, -3444.72, 241.988, 100.0, 0, 2), +(@PATH, 9, -6735.39, -3412.09, 241.792, 100.0, 0, 2), +(@PATH, 10, -6720.83, -3385.17, 241.785, 100.0, 0, 2), +(@PATH, 11, -6697.01, -3374.81, 243.211, 100.0, 0, 2), +(@PATH, 12, -6720.83, -3385.17, 241.785, 100.0, 0, 2), +(@PATH, 13, -6735.39, -3412.09, 241.792, 100.0, 0, 2), +(@PATH, 14, -6760.58, -3444.72, 241.988, 100.0, 0, 2), +(@PATH, 15, -6799.65, -3463.84, 241.792, 100.0, 0, 2), +(@PATH, 16, -6797.96, -3506.01, 242.788, 100.0, 0, 2), +(@PATH, 17, -6770.95, -3532.25, 245.837, 100.0, 0, 2), +(@PATH, 18, -6745.04, -3555.24, 245.206, 100.0, 0, 2), +(@PATH, 19, -6758.9, -3579.09, 243.121, 100.0, 0, 2), +(@PATH, 20, -6797.86, -3589.94, 241.792, 100.0, 0, 2), +(@PATH, 21, -6809.25, -3596.17, 243.167, 100.0, 0, 2), +(@PATH, 22, -6814.66, -3615.71, 247.226, 100.0, 0, 2); + +/* Buzzard - GUID 7137 */ + + +SET @NPC := 7137; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -7112.69, `position_y` = -3521.0, `position_z` = 246.566, `orientation` = 5.30948 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -7077.76, -3543.48, 241.898, 100.0, 0, 2), +(@PATH, 2, -7045.7, -3551.22, 243.829, 100.0, 0, 2), +(@PATH, 3, -7015.01, -3551.6, 243.641, 100.0, 0, 2), +(@PATH, 4, -6982.05, -3518.47, 242.542, 100.0, 0, 2), +(@PATH, 5, -6968.26, -3491.34, 241.792, 100.0, 0, 2), +(@PATH, 6, -6940.34, -3458.93, 241.792, 100.0, 0, 2), +(@PATH, 7, -6921.61, -3465.03, 242.421, 100.0, 0, 2), +(@PATH, 8, -6878.95, -3466.98, 244.479, 100.0, 0, 2), +(@PATH, 9, -6851.05, -3453.28, 244.063, 100.0, 0, 2), +(@PATH, 10, -6826.14, -3458.7, 244.067, 100.0, 0, 2), +(@PATH, 11, -6784.65, -3464.25, 241.792, 100.0, 0, 2), +(@PATH, 12, -6754.12, -3479.79, 242.417, 100.0, 0, 2), +(@PATH, 13, -6715.67, -3483.13, 241.924, 100.0, 0, 2), +(@PATH, 14, -6686.95, -3487.32, 252.35699999999997, 100.0, 0, 2), +(@PATH, 15, -6715.67, -3483.13, 241.799, 100.0, 0, 2), +(@PATH, 16, -6754.12, -3479.79, 242.417, 100.0, 0, 2), +(@PATH, 17, -6784.65, -3464.25, 241.792, 100.0, 0, 2), +(@PATH, 18, -6826.14, -3458.7, 244.067, 100.0, 0, 2), +(@PATH, 19, -6851.05, -3453.28, 244.063, 100.0, 0, 2), +(@PATH, 20, -6878.95, -3466.98, 244.479, 100.0, 0, 2), +(@PATH, 21, -6921.61, -3465.03, 242.421, 100.0, 0, 2), +(@PATH, 22, -6940.34, -3458.93, 241.792, 100.0, 0, 2), +(@PATH, 23, -6968.26, -3491.34, 241.792, 100.0, 0, 2), +(@PATH, 24, -6982.05, -3518.47, 242.542, 100.0, 0, 2), +(@PATH, 25, -7015.01, -3551.6, 243.641, 100.0, 0, 2), +(@PATH, 26, -7045.7, -3551.22, 243.829, 100.0, 0, 2), +(@PATH, 27, -7077.76, -3543.48, 241.898, 100.0, 0, 2), +(@PATH, 28, -7107.82, -3528.15, 245.41, 100.0, 0, 2); + +/* Shadowforge Surveyor - GUID 7220 */ + + +SET @NPC := 7220; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -6144.04, -3081.53, 225.98, 100.0, 0), +(@PATH, 2, -6146.38, -3077.72, 225.765, 100.0, 0), +(@PATH, 3, -6149.53, -3071.44, 226.486, 100.0, 0), +(@PATH, 4, -6152.11, -3068.48, 226.113, 100.0, 0), +(@PATH, 5, -6154.74, -3063.19, 225.002, 100.0, 0), +(@PATH, 6, -6155.24, -3055.54, 224.84, 100.0, 0), +(@PATH, 7, -6154.36, -3048.77, 224.491, 100.0, 0), +(@PATH, 8, -6150.64, -3042.61, 224.529, 100.0, 0), +(@PATH, 9, -6144.75, -3037.45, 224.996, 100.0, 0), +(@PATH, 10, -6137.22, -3033.51, 223.743, 100.0, 0), +(@PATH, 11, -6144.75, -3037.45, 224.996, 100.0, 0), +(@PATH, 12, -6150.64, -3042.61, 224.529, 100.0, 0), +(@PATH, 13, -6154.36, -3048.77, 224.491, 100.0, 0), +(@PATH, 14, -6155.24, -3055.54, 224.84, 100.0, 0), +(@PATH, 15, -6154.85, -3062.72, 224.862, 100.0, 0), +(@PATH, 16, -6152.16, -3068.39, 226.126, 100.0, 0), +(@PATH, 17, -6149.53, -3071.44, 226.486, 100.0, 0), +(@PATH, 18, -6146.38, -3077.72, 225.765, 100.0, 0), +(@PATH, 19, -6144.04, -3081.53, 225.98, 100.0, 0), +(@PATH, 20, -6141.79, -3087.05, 225.732, 100.0, 0); + +/* Shadowforge Digger - GUID 7224 */ + + +SET @NPC := 7224; +SET @PATH := @NPC * 10; + +UPDATE `creature_addon` set `path_id` = @PATH WHERE `guid` = @NPC; +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -6154.46, -3053.13, 224.826, 100.0, 0), +(@PATH, 2, -6154.06, -3046.47, 224.652, 100.0, 0), +(@PATH, 3, -6155.4, -3043.88, 224.422, 2.28, 45000), +(@PATH, 4, -6155.82, -3055.49, 224.807, 100.0, 0), +(@PATH, 5, -6153.58, -3059.57, 224.93, 100.0, 0), +(@PATH, 6, -6151.7, -3060.31, 225.245, 0.471239, 45000); + +/* Buzzard - GUID 7251 */ + + +SET @NPC := 7251; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6883.96, `position_y` = -3329.96, `position_z` = 248.58, `orientation` = 0.251015 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6888.0, -3356.21, 243.799, 100.0, 0, 2), +(@PATH, 2, -6901.86, -3377.27, 242.131, 100.0, 0, 2), +(@PATH, 3, -6933.3, -3395.66, 242.587, 100.0, 0, 2), +(@PATH, 4, -6933.27, -3431.34, 242.621, 100.0, 0, 2), +(@PATH, 5, -6924.07, -3460.16, 242.376, 100.0, 0, 2), +(@PATH, 6, -6951.56, -3493.01, 241.917, 100.0, 0, 2), +(@PATH, 7, -6944.84, -3526.17, 241.792, 100.0, 0, 2), +(@PATH, 8, -6926.08, -3562.52, 241.907, 100.0, 0, 2), +(@PATH, 9, -6915.77, -3598.79, 242.975, 100.0, 0, 2), +(@PATH, 10, -6951.36, -3628.01, 241.792, 100.0, 0, 2), +(@PATH, 11, -6934.38, -3651.09, 246.249, 100.0, 0, 2), +(@PATH, 12, -6951.36, -3628.01, 241.792, 100.0, 0, 2), +(@PATH, 13, -6915.77, -3598.79, 242.975, 100.0, 0, 2), +(@PATH, 14, -6926.08, -3562.52, 241.907, 100.0, 0, 2), +(@PATH, 15, -6944.84, -3526.17, 241.792, 100.0, 0, 2), +(@PATH, 16, -6951.56, -3493.01, 241.917, 100.0, 0, 2), +(@PATH, 17, -6924.07, -3460.16, 242.376, 100.0, 0, 2), +(@PATH, 18, -6933.27, -3431.34, 242.621, 100.0, 0, 2), +(@PATH, 19, -6933.3, -3395.66, 242.587, 100.0, 0, 2), +(@PATH, 20, -6901.86, -3377.27, 242.131, 100.0, 0, 2), +(@PATH, 21, -6888.0, -3356.21, 243.799, 100.0, 0, 2), +(@PATH, 22, -6879.02, -3328.7, 247.92, 100.0, 0, 2); + +/* Buzzard - GUID 7252 */ + + +SET @NPC := 7252; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6947.38, `position_y` = -3311.41, `position_z` = 260.875, `orientation` = 4.50295 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6932.46, -3343.0, 243.987, 100.0, 0, 2), +(@PATH, 2, -6936.72, -3372.14, 241.792, 100.0, 0, 2), +(@PATH, 3, -6936.86, -3388.97, 242.167, 100.0, 0, 2), +(@PATH, 4, -6957.8, -3415.2, 241.792, 100.0, 0, 2), +(@PATH, 5, -6981.07, -3437.66, 241.792, 100.0, 0, 2), +(@PATH, 6, -7012.01, -3448.14, 242.167, 100.0, 0, 2), +(@PATH, 7, -7034.03, -3482.56, 241.762, 100.0, 0, 2), +(@PATH, 8, -7041.37, -3520.53, 243.426, 100.0, 0, 2), +(@PATH, 9, -7044.2, -3550.63, 244.01, 100.0, 0, 2), +(@PATH, 10, -7085.11, -3563.21, 241.792, 100.0, 0, 2), +(@PATH, 11, -7098.92, -3597.39, 244.899, 100.0, 0, 2), +(@PATH, 12, -7085.11, -3563.21, 241.792, 100.0, 0, 2), +(@PATH, 13, -7044.2, -3550.63, 244.01, 100.0, 0, 2), +(@PATH, 14, -7041.37, -3520.53, 243.426, 100.0, 0, 2), +(@PATH, 15, -7034.03, -3482.56, 241.762, 100.0, 0, 2), +(@PATH, 16, -7012.01, -3448.14, 242.167, 100.0, 0, 2), +(@PATH, 17, -6981.07, -3437.66, 241.792, 100.0, 0, 2), +(@PATH, 18, -6957.8, -3415.2, 241.792, 100.0, 0, 2), +(@PATH, 19, -6936.86, -3388.97, 242.167, 100.0, 0, 2), +(@PATH, 20, -6936.72, -3372.14, 241.792, 100.0, 0, 2), +(@PATH, 21, -6932.46, -3343.0, 243.987, 100.0, 0, 2), +(@PATH, 22, -6946.19, -3315.67, 258.952, 100.0, 0, 2); + +/* Buzzard - GUID 7253 */ + + +SET @NPC := 7253; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -7181.01, `position_y` = -3326.08, `position_z` = 247.645, `orientation` = 0.822118 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -7147.13, -3335.6, 244.256, 100.0, 0, 2), +(@PATH, 2, -7120.95, -3360.97, 242.911, 100.0, 0, 2), +(@PATH, 3, -7112.48, -3395.7, 241.918, 100.0, 0, 2), +(@PATH, 4, -7093.57, -3428.64, 242.185, 100.0, 0, 2), +(@PATH, 5, -7063.82, -3436.23, 245.298, 100.0, 0, 2), +(@PATH, 6, -7031.27, -3456.35, 243.157, 100.0, 0, 2), +(@PATH, 7, -6998.35, -3486.11, 241.792, 100.0, 0, 2), +(@PATH, 8, -6992.29, -3516.26, 243.167, 100.0, 0, 2), +(@PATH, 9, -6970.74, -3551.4, 241.866, 100.0, 0, 2), +(@PATH, 10, -6947.52, -3554.22, 242.042, 100.0, 0, 2), +(@PATH, 11, -6919.98, -3577.41, 242.47, 100.0, 0, 2), +(@PATH, 12, -6901.67, -3608.33, 242.993, 100.0, 0, 2), +(@PATH, 13, -6891.81, -3634.18, 246.06, 100.0, 0, 2), +(@PATH, 14, -6901.67, -3608.33, 242.993, 100.0, 0, 2), +(@PATH, 15, -6919.98, -3577.41, 242.47, 100.0, 0, 2), +(@PATH, 16, -6947.52, -3554.22, 242.042, 100.0, 0, 2), +(@PATH, 17, -6970.74, -3551.4, 241.866, 100.0, 0, 2), +(@PATH, 18, -6992.29, -3516.26, 243.167, 100.0, 0, 2), +(@PATH, 19, -6998.35, -3486.11, 241.792, 100.0, 0, 2), +(@PATH, 20, -7031.27, -3456.35, 243.157, 100.0, 0, 2), +(@PATH, 21, -7063.82, -3436.23, 245.298, 100.0, 0, 2), +(@PATH, 22, -7093.57, -3428.64, 242.185, 100.0, 0, 2), +(@PATH, 23, -7112.48, -3395.7, 241.918, 100.0, 0, 2), +(@PATH, 24, -7120.95, -3360.97, 242.911, 100.0, 0, 2), +(@PATH, 25, -7147.13, -3335.6, 244.256, 100.0, 0, 2), +(@PATH, 26, -7177.73, -3322.53, 246.539, 100.0, 0, 2); + +/* Starving Buzzard - GUID 7561 */ + + +SET @NPC := 7561; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6388.68, `position_y` = -3576.89, `position_z` = 269.532, `orientation` = 4.08407 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6371.3, -3594.98, 247.97, 100.0, 0, 2), +(@PATH, 2, -6354.91, -3614.21, 242.14, 100.0, 0, 2), +(@PATH, 3, -6362.36, -3647.93, 242.31, 100.0, 0, 2), +(@PATH, 4, -6388.21, -3641.88, 242.295, 100.0, 0, 2), +(@PATH, 5, -6408.34, -3626.71, 250.96, 100.0, 0, 2), +(@PATH, 6, -6429.45, -3627.02, 257.59, 100.0, 0, 2), +(@PATH, 7, -6445.15, -3633.09, 254.014, 100.0, 0, 2), +(@PATH, 8, -6473.49, -3647.55, 244.618, 100.0, 0, 2), +(@PATH, 9, -6480.76, -3664.51, 247.527, 100.0, 0, 2), +(@PATH, 10, -6473.28, -3676.01, 252.08100000000002, 100.0, 0, 2), +(@PATH, 11, -6471.78, -3685.61, 256.946, 100.0, 0, 2), +(@PATH, 12, -6478.87, -3700.13, 265.363, 100.0, 0, 2), +(@PATH, 13, -6488.8, -3703.67, 270.987, 100.0, 0, 2), +(@PATH, 14, -6504.08, -3706.28, 273.873, 100.0, 0, 2), +(@PATH, 15, -6526.79, -3698.45, 272.456, 100.0, 0, 2), +(@PATH, 16, -6504.11, -3706.28, 273.991, 100.0, 0, 2), +(@PATH, 17, -6488.8, -3703.67, 270.987, 100.0, 0, 2), +(@PATH, 18, -6478.87, -3700.13, 265.363, 100.0, 0, 2), +(@PATH, 19, -6471.78, -3685.61, 256.946, 100.0, 0, 2), +(@PATH, 20, -6473.28, -3676.01, 252.08100000000002, 100.0, 0, 2), +(@PATH, 21, -6480.76, -3664.51, 247.527, 100.0, 0, 2), +(@PATH, 22, -6473.49, -3647.55, 244.618, 100.0, 0, 2), +(@PATH, 23, -6445.15, -3633.09, 254.014, 100.0, 0, 2), +(@PATH, 24, -6429.45, -3627.02, 257.59, 100.0, 0, 2), +(@PATH, 25, -6408.34, -3626.71, 250.96, 100.0, 0, 2), +(@PATH, 26, -6388.21, -3641.88, 242.295, 100.0, 0, 2), +(@PATH, 27, -6362.36, -3647.93, 242.31, 100.0, 0, 2), +(@PATH, 28, -6354.91, -3614.21, 242.14, 100.0, 0, 2), +(@PATH, 29, -6371.3, -3594.98, 247.97, 100.0, 0, 2), +(@PATH, 30, -6395.35, -3586.23, 270.905, 100.0, 0, 2); + +/* Starving Buzzard - GUID 7607 */ + + +SET @NPC := 7607; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6547.11, `position_y` = -3590.26, `position_z` = 263.315, `orientation` = 5.2796 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6546.91, -3612.78, 252.546, 100.0, 0, 2), +(@PATH, 2, -6567.01, -3630.33, 242.39, 100.0, 0, 2), +(@PATH, 3, -6596.16, -3615.76, 241.792, 100.0, 0, 2), +(@PATH, 4, -6621.69, -3592.92, 242.001, 100.0, 0, 2), +(@PATH, 5, -6643.48, -3599.43, 241.792, 100.0, 0, 2), +(@PATH, 6, -6653.5, -3629.29, 242.042, 100.0, 0, 2), +(@PATH, 7, -6665.13, -3654.09, 252.755, 100.0, 0, 2), +(@PATH, 8, -6655.26, -3666.55, 258.265, 100.0, 0, 2), +(@PATH, 9, -6648.55, -3671.17, 262.686, 100.0, 0, 2), +(@PATH, 10, -6634.89, -3676.32, 264.832, 100.0, 0, 2), +(@PATH, 11, -6615.17, -3681.26, 265.56, 100.0, 0, 2), +(@PATH, 12, -6593.81, -3698.81, 268.281, 100.0, 0, 2), +(@PATH, 13, -6571.59, -3703.16, 273.226, 100.0, 0, 2), +(@PATH, 14, -6547.1, -3700.65, 272.422, 100.0, 0, 2), +(@PATH, 15, -6571.59, -3703.16, 273.226, 100.0, 0, 2), +(@PATH, 16, -6593.81, -3698.81, 268.281, 100.0, 0, 2), +(@PATH, 17, -6615.17, -3681.26, 265.56, 100.0, 0, 2), +(@PATH, 18, -6634.89, -3676.32, 264.832, 100.0, 0, 2), +(@PATH, 19, -6648.55, -3671.17, 262.686, 100.0, 0, 2), +(@PATH, 20, -6655.26, -3666.55, 258.265, 100.0, 0, 2), +(@PATH, 21, -6665.13, -3654.09, 252.755, 100.0, 0, 2), +(@PATH, 22, -6653.5, -3629.29, 242.042, 100.0, 0, 2), +(@PATH, 23, -6643.48, -3599.43, 241.792, 100.0, 0, 2), +(@PATH, 24, -6621.69, -3592.92, 242.001, 100.0, 0, 2), +(@PATH, 25, -6596.16, -3615.76, 241.792, 100.0, 0, 2), +(@PATH, 26, -6567.01, -3630.33, 242.39, 100.0, 0, 2), +(@PATH, 27, -6546.91, -3612.78, 252.546, 100.0, 0, 2), +(@PATH, 28, -6545.3, -3593.11, 262.506, 100.0, 0, 2); + +/* Buzzard - GUID 7614 */ + + +SET @NPC := 7614; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6787.12, `position_y` = -3653.08, `position_z` = 247.035, `orientation` = 2.40914 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6772.58, -3640.43, 243.189, 100.0, 0, 2), +(@PATH, 2, -6754.54, -3631.1, 241.749, 100.0, 0, 2), +(@PATH, 3, -6755.22, -3618.73, 241.749, 100.0, 0, 2), +(@PATH, 4, -6752.14, -3604.26, 242.05, 100.0, 0, 2), +(@PATH, 5, -6737.61, -3596.97, 242.547, 100.0, 0, 2), +(@PATH, 6, -6721.14, -3587.47, 242.711, 100.0, 0, 2), +(@PATH, 7, -6716.05, -3564.79, 243.176, 100.0, 0, 2), +(@PATH, 8, -6688.82, -3544.26, 242.138, 100.0, 0, 2), +(@PATH, 9, -6661.65, -3516.61, 247.939, 100.0, 0, 2), +(@PATH, 10, -6658.14, -3483.01, 257.019, 100.0, 0, 2), +(@PATH, 11, -6648.16, -3458.14, 261.122, 100.0, 0, 2), +(@PATH, 12, -6658.12, -3412.55, 258.497, 100.0, 0, 2), +(@PATH, 13, -6648.16, -3458.14, 261.122, 100.0, 0, 2), +(@PATH, 14, -6658.14, -3483.01, 257.019, 100.0, 0, 2), +(@PATH, 15, -6661.65, -3516.61, 247.939, 100.0, 0, 2), +(@PATH, 16, -6688.82, -3544.26, 242.138, 100.0, 0, 2), +(@PATH, 17, -6715.98, -3564.71, 243.138, 100.0, 0, 2), +(@PATH, 18, -6721.04, -3587.42, 242.62, 100.0, 0, 2), +(@PATH, 19, -6737.61, -3596.97, 242.547, 100.0, 0, 2), +(@PATH, 20, -6752.14, -3604.26, 242.05, 100.0, 0, 2), +(@PATH, 21, -6755.22, -3618.73, 241.749, 100.0, 0, 2), +(@PATH, 22, -6754.54, -3631.1, 241.749, 100.0, 0, 2), +(@PATH, 23, -6772.58, -3640.43, 243.189, 100.0, 0, 2), +(@PATH, 24, -6787.63, -3652.62, 247.154, 100.0, 0, 2); + +/* Starving Buzzard - GUID 7705 */ + + +SET @NPC := 7705; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6344.17, `position_y` = -3295.69, `position_z` = 262.754, `orientation` = 4.18879 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6337.79, -3317.69, 249.862, 100.0, 0, 2), +(@PATH, 2, -6348.75, -3332.36, 242.44, 100.0, 0, 2), +(@PATH, 3, -6344.74, -3365.74, 241.792, 100.0, 0, 2), +(@PATH, 4, -6317.13, -3396.21, 240.141, 100.0, 0, 2), +(@PATH, 5, -6285.82, -3419.93, 239.051, 100.0, 0, 2), +(@PATH, 6, -6253.66, -3436.98, 237.79, 100.0, 0, 2), +(@PATH, 7, -6237.7, -3458.54, 239.34, 100.0, 0, 2), +(@PATH, 8, -6251.97, -3473.62, 246.596, 100.0, 0, 2), +(@PATH, 9, -6270.89, -3486.68, 252.644, 100.0, 0, 2), +(@PATH, 10, -6294.5, -3496.35, 250.91, 100.0, 0, 2), +(@PATH, 11, -6313.64, -3498.86, 246.061, 100.0, 0, 2), +(@PATH, 12, -6342.42, -3506.43, 241.834, 100.0, 0, 2), +(@PATH, 13, -6357.96, -3521.32, 246.796, 100.0, 0, 2), +(@PATH, 14, -6371.56, -3543.19, 259.244, 100.0, 0, 2), +(@PATH, 15, -6357.96, -3521.32, 246.796, 100.0, 0, 2), +(@PATH, 16, -6342.42, -3506.43, 241.834, 100.0, 0, 2), +(@PATH, 17, -6313.64, -3498.86, 246.061, 100.0, 0, 2), +(@PATH, 18, -6294.5, -3496.35, 250.91, 100.0, 0, 2), +(@PATH, 19, -6270.89, -3486.68, 252.644, 100.0, 0, 2), +(@PATH, 20, -6251.97, -3473.62, 246.596, 100.0, 0, 2), +(@PATH, 21, -6237.7, -3458.54, 239.34, 100.0, 0, 2), +(@PATH, 22, -6253.66, -3436.98, 237.79, 100.0, 0, 2), +(@PATH, 23, -6285.82, -3419.93, 239.051, 100.0, 0, 2), +(@PATH, 24, -6317.13, -3396.21, 240.141, 100.0, 0, 2), +(@PATH, 25, -6344.74, -3365.74, 241.792, 100.0, 0, 2), +(@PATH, 26, -6348.75, -3332.36, 242.44, 100.0, 0, 2), +(@PATH, 27, -6337.79, -3317.69, 249.862, 100.0, 0, 2), +(@PATH, 28, -6348.47, -3296.53, 262.444, 100.0, 0, 2); + +/* Starving Buzzard - GUID 7706 */ + + +SET @NPC := 7706; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6293.02, `position_y` = -3540.83, `position_z` = 255.493, `orientation` = 6.0912 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6309.64, -3551.04, 250.121, 100.0, 0, 2), +(@PATH, 2, -6330.5, -3565.26, 242.258, 100.0, 0, 2), +(@PATH, 3, -6356.39, -3578.34, 244.417, 100.0, 0, 2), +(@PATH, 4, -6360.57, -3601.59, 241.869, 100.0, 0, 2), +(@PATH, 5, -6363.55, -3635.48, 241.792, 100.0, 0, 2), +(@PATH, 6, -6383.01, -3653.02, 243.271, 100.0, 0, 2), +(@PATH, 7, -6400.48, -3665.74, 243.501, 100.0, 0, 2), +(@PATH, 8, -6423.64, -3669.32, 243.821, 100.0, 0, 2), +(@PATH, 9, -6449.26, -3667.73, 243.82, 100.0, 0, 2), +(@PATH, 10, -6473.78, -3659.77, 245.28, 100.0, 0, 2), +(@PATH, 11, -6486.57, -3671.69, 252.15499999999997, 100.0, 0, 2), +(@PATH, 12, -6473.78, -3659.77, 245.28, 100.0, 0, 2), +(@PATH, 13, -6449.26, -3667.73, 243.82, 100.0, 0, 2), +(@PATH, 14, -6423.64, -3669.32, 243.821, 100.0, 0, 2), +(@PATH, 15, -6400.48, -3665.74, 243.501, 100.0, 0, 2), +(@PATH, 16, -6383.01, -3653.02, 243.271, 100.0, 0, 2), +(@PATH, 17, -6363.55, -3635.48, 241.792, 100.0, 0, 2), +(@PATH, 18, -6360.57, -3601.59, 241.869, 100.0, 0, 2), +(@PATH, 19, -6356.46, -3578.38, 244.332, 100.0, 0, 2), +(@PATH, 20, -6330.5, -3565.26, 242.258, 100.0, 0, 2), +(@PATH, 21, -6309.64, -3551.04, 250.121, 100.0, 0, 2), +(@PATH, 22, -6293.6, -3543.78, 254.57100000000003, 100.0, 0, 2); + +/* Starving Buzzard - GUID 7724 */ + + +SET @NPC := 7724; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6118.22, `position_y` = -3446.35, `position_z` = 263.376, `orientation` = 1.68663 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6135.86, -3430.15, 250.7, 100.0, 0, 2), +(@PATH, 2, -6152.67, -3417.56, 244.799, 100.0, 0, 2), +(@PATH, 3, -6165.62, -3391.81, 243.028, 100.0, 0, 2), +(@PATH, 4, -6181.44, -3386.96, 241.163, 100.0, 0, 2), +(@PATH, 5, -6213.01, -3381.29, 239.398, 100.0, 0, 2), +(@PATH, 6, -6245.12, -3387.58, 239.271, 100.0, 0, 2), +(@PATH, 7, -6266.66, -3407.41, 239.168, 100.0, 0, 2), +(@PATH, 8, -6278.52, -3423.51, 238.746, 100.0, 0, 2), +(@PATH, 9, -6314.57, -3442.77, 239.492, 100.0, 0, 2), +(@PATH, 10, -6337.46, -3462.88, 241.753, 100.0, 0, 2), +(@PATH, 11, -6347.84, -3477.28, 241.86, 100.0, 0, 2), +(@PATH, 12, -6338.71, -3515.47, 241.834, 100.0, 0, 2), +(@PATH, 13, -6333.27, -3534.63, 241.685, 100.0, 0, 2), +(@PATH, 14, -6307.21, -3550.54, 250.302, 100.0, 0, 2), +(@PATH, 15, -6286.62, -3543.03, 258.238, 100.0, 0, 2), +(@PATH, 16, -6307.21, -3550.54, 250.302, 100.0, 0, 2), +(@PATH, 17, -6333.27, -3534.63, 241.685, 100.0, 0, 2), +(@PATH, 18, -6338.71, -3515.47, 241.834, 100.0, 0, 2), +(@PATH, 19, -6347.84, -3477.28, 241.86, 100.0, 0, 2), +(@PATH, 20, -6337.46, -3462.88, 241.753, 100.0, 0, 2), +(@PATH, 21, -6314.57, -3442.77, 239.492, 100.0, 0, 2), +(@PATH, 22, -6278.52, -3423.51, 238.746, 100.0, 0, 2), +(@PATH, 23, -6266.66, -3407.41, 239.168, 100.0, 0, 2), +(@PATH, 24, -6245.12, -3387.58, 239.271, 100.0, 0, 2), +(@PATH, 25, -6213.01, -3381.29, 239.398, 100.0, 0, 2), +(@PATH, 26, -6181.51, -3386.97, 241.042, 100.0, 0, 2), +(@PATH, 27, -6165.62, -3391.81, 243.028, 100.0, 0, 2), +(@PATH, 28, -6152.73, -3417.5, 244.855, 100.0, 0, 2), +(@PATH, 29, -6135.91, -3430.1, 250.674, 100.0, 0, 2), +(@PATH, 30, -6118.29, -3445.71, 263.008, 100.0, 0, 2); + +/* Shadowforge Digger - GUID 7736 */ + + +SET @NPC := 7736; +SET @PATH := @NPC * 10; + +UPDATE `creature_addon` set `path_id` = @PATH WHERE `guid` = @NPC; +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -6116.14, -3006.02, 223.452, 100.0, 45000), +(@PATH, 2, -6123.77, -3009.48, 221.833, 2.9947, 45000); + +/* Starving Buzzard - GUID 7796 */ + + +SET @NPC := 7796; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6363.76, `position_y` = -3508.55, `position_z` = 246.23, `orientation` = 5.96903 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES +(@PATH, 1, -6368.26, -3466.82, 244.829, 100.0, 0, 2), +(@PATH, 2, -6362.57, -3443.06, 241.753, 100.0, 0, 2), +(@PATH, 3, -6345.93, -3416.62, 241.559, 100.0, 0, 2), +(@PATH, 4, -6313.67, -3401.18, 239.946, 100.0, 0, 2), +(@PATH, 5, -6285.39, -3406.43, 239.255, 100.0, 0, 2), +(@PATH, 6, -6257.33, -3442.1, 237.983, 100.0, 0, 2), +(@PATH, 7, -6238.56, -3451.22, 238.124, 100.0, 0, 2), +(@PATH, 8, -6210.24, -3438.81, 238.298, 100.0, 0, 2), +(@PATH, 9, -6198.03, -3408.55, 239.194, 100.0, 0, 2), +(@PATH, 10, -6192.33, -3386.96, 239.292, 100.0, 0, 2), +(@PATH, 11, -6174.5, -3369.47, 245.401, 100.0, 0, 2), +(@PATH, 12, -6149.01, -3369.75, 244.548, 100.0, 0, 2), +(@PATH, 13, -6174.5, -3369.47, 245.401, 100.0, 0, 2), +(@PATH, 14, -6192.33, -3386.96, 239.292, 100.0, 0, 2), +(@PATH, 15, -6198.03, -3408.55, 239.194, 100.0, 0, 2), +(@PATH, 16, -6210.24, -3438.81, 238.298, 100.0, 0, 2), +(@PATH, 17, -6238.56, -3451.22, 238.124, 100.0, 0, 2), +(@PATH, 18, -6257.33, -3442.1, 237.983, 100.0, 0, 2), +(@PATH, 19, -6285.39, -3406.43, 239.255, 100.0, 0, 2), +(@PATH, 20, -6313.67, -3401.18, 239.946, 100.0, 0, 2), +(@PATH, 21, -6345.93, -3416.62, 241.559, 100.0, 0, 2), +(@PATH, 22, -6362.57, -3443.06, 241.753, 100.0, 0, 2), +(@PATH, 23, -6368.25, -3466.71, 244.777, 100.0, 0, 2), +(@PATH, 24, -6360.65, -3507.1, 244.52, 100.0, 0, 2); + +/* Shadowforge Ruffian - GUID 9230 */ + + +SET @NPC := 9230; +SET @PATH := @NPC * 10; + +UPDATE `creature_addon` set `path_id` = @PATH WHERE `guid` = @NPC; +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -6071.02, -3133.92, 254.006, 100.0, 0), +(@PATH, 2, -6067.03, -3134.64, 253.744, 100.0, 0), +(@PATH, 3, -6069.15, -3137.9, 254.253, 100.0, 0), +(@PATH, 4, -6076.13, -3133.62, 253.989, 100.0, 0), +(@PATH, 5, -6080.28, -3131.97, 253.426, 100.0, 0), +(@PATH, 6, -6084.9, -3130.2, 253.631, 100.0, 0), +(@PATH, 7, -6088.52, -3124.03, 252.514, 100.0, 0), +(@PATH, 8, -6089.38, -3117.48, 251.538, 100.0, 0), +(@PATH, 9, -6089.48, -3111.04, 251.394, 100.0, 0), +(@PATH, 10, -6089.52, -3106.35, 250.837, 100.0, 0), +(@PATH, 11, -6089.07, -3114.42, 251.377, 100.0, 0), +(@PATH, 12, -6088.68, -3121.53, 252.032, 100.0, 0), +(@PATH, 13, -6087.68, -3126.75, 253.098, 100.0, 0), +(@PATH, 14, -6085.5, -3129.51, 253.555, 100.0, 0), +(@PATH, 15, -6080.6, -3130.18, 253.74, 100.0, 0), +(@PATH, 16, -6076.07, -3130.61, 254.185, 100.0, 0); diff --git a/data/sql/updates/db_world/2022_06_06_00.sql b/data/sql/updates/db_world/2022_06_06_00.sql new file mode 100644 index 000000000..5c7d7da86 --- /dev/null +++ b/data/sql/updates/db_world/2022_06_06_00.sql @@ -0,0 +1,3 @@ +-- DB update 2022_06_04_00 -> 2022_06_06_00 +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|256 WHERE `entry`=15082; diff --git a/data/sql/updates/db_world/2022_06_06_01.sql b/data/sql/updates/db_world/2022_06_06_01.sql new file mode 100644 index 000000000..0df184654 --- /dev/null +++ b/data/sql/updates/db_world/2022_06_06_01.sql @@ -0,0 +1,15 @@ +-- DB update 2022_06_06_00 -> 2022_06_06_01 +DELETE FROM `creature_loot_template` WHERE (`Entry` = 15204) AND (`Item` IN (20689, 20690, 20691)) OR (`Entry` = 15205) AND (`Item` IN (20686, 20687, 20688)) OR (`Entry` = 15305) AND (`Item` IN (20683, 20684, 20685))OR (`Item` IN (20680, 20681, 20682)); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(15203, 20680, 0, 33.3334, 0, 1, 3, 1, 1, 'Prince Skaldrenox - Abyssal Mail Pauldrons'), +(15203, 20681, 0, 33.3333, 0, 1, 3, 1, 1, 'Prince Skaldrenox - Abyssal Leather Bracers'), +(15203, 20682, 0, 33.3333, 0, 1, 3, 1, 1, 'Prince Skaldrenox - Elemental Focus Band'), +(15204, 20689, 0, 33.3333, 0, 1, 3, 1, 1, 'High Marshal Whirlaxis - Abyssal Leather Shoulders'), +(15204, 20690, 0, 33.3333, 0, 1, 3, 1, 1, 'High Marshal Whirlaxis - Abyssal Cloth Wristbands'), +(15204, 20691, 0, 33.3334, 0, 1, 3, 1, 1, 'High Marshal Whirlaxis - Windshear Cape'), +(15205, 20686, 0, 33.3334, 0, 1, 3, 1, 1, 'Baron Kazum - Abyssal Cloth Amice'), +(15205, 20687, 0, 33.3333, 0, 1, 3, 1, 1, 'Baron Kazum - Abyssal Plate Vambraces'), +(15205, 20688, 0, 33.3333, 0, 1, 3, 1, 1, 'Baron Kazum - Earthen Guard'), +(15305, 20683, 0, 33.3333, 0, 1, 3, 1, 1, 'Lord Skwol - Abyssal Plate Epaulets'), +(15305, 20684, 0, 33.3333, 0, 1, 3, 1, 1, 'Lord Skwol - Abyssal Mail Armguards'), +(15305, 20685, 0, 33.3334, 0, 1, 3, 1, 1, 'Lord Skwol - Wavefront Necklace'); diff --git a/data/sql/updates/db_world/2022_06_06_02.sql b/data/sql/updates/db_world/2022_06_06_02.sql new file mode 100644 index 000000000..13b1662d2 --- /dev/null +++ b/data/sql/updates/db_world/2022_06_06_02.sql @@ -0,0 +1,44 @@ +-- DB update 2022_06_06_01 -> 2022_06_06_02 +-- Flame Leviathan add mising Boss Emote (15 and above) +DELETE FROM `creature_text` WHERE `CreatureID` = 33113; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(33113, 0, 0, 'Hostile entities detected. Threat assessment protocol active. Primary target engaged. Time minus 30 seconds to re-evaluation.', 14, 0, 100, 0, 0, 15506, 33487, 0, 'Flame Leviathan SAY_AGGRO'), +(33113, 1, 0, 'Threat assessment routine modified. Current target threat level: 0. Acquiring new target.', 14, 0, 100, 0, 0, 15521, 33507, 0, 'Flame Leviathan SAY_SLAY'), +(33113, 2, 0, 'Total systems failure. Defense protocols breached. Leviathan unit shutting down.', 14, 0, 100, 0, 0, 15520, 33506, 0, 'Flame Leviathan SAY_DEATH'), +(33113, 3, 0, 'Threat re-evaluated. Target assessment complete. Changing course.', 14, 0, 100, 0, 0, 15507, 33488, 0, 'Flame Leviathan SAY_TARGET_1'), +(33113, 3, 1, 'Pursuit objective modified. Changing course.', 14, 0, 100, 0, 0, 15508, 33489, 0, 'Flame Leviathan SAY_TARGET_2'), +(33113, 3, 2, 'Hostile entity\'s stratagem predicted. Re-routing battle function. Changing course.', 14, 0, 100, 0, 0, 15509, 33490, 0, 'Flame Leviathan SAY_TARGET_3'), +(33113, 4, 0, 'Orbital countermeasures enabled.', 14, 0, 100, 0, 0, 15510, 33491, 0, 'Flame Leviathan SAY_HARDMODE'), +(33113, 5, 0, '*ALERT* Static defense system failure. Orbital countermeasures disabled.', 14, 0, 100, 0, 0, 15511, 33492, 0, 'Flame Leviathan SAY_TOWER_NONE'), +(33113, 6, 0, 'Hodir\'s Fury online. Acquiring target.', 14, 0, 100, 0, 0, 15512, 33493, 0, 'Flame Leviathan SAY_TOWER_FROST'), +(33113, 7, 0, 'Mimiron\'s Inferno online. Acquiring target.', 14, 0, 100, 0, 0, 15513, 33495, 0, 'Flame Leviathan SAY_TOWER_FLAME'), +(33113, 8, 0, 'Freya\'s Ward online. Acquiring target.', 14, 0, 100, 0, 0, 15514, 33497, 0, 'Flame Leviathan SAY_TOWER_NATURE'), +(33113, 9, 0, 'Thorim\'s Hammer online. Acquiring target.', 14, 0, 100, 0, 0, 15515, 33499, 0, 'Flame Leviathan SAY_TOWER_STORM'), +(33113, 10, 0, 'Unauthorized entity attempting circuit overload. Activating anti-personnel countermeasures.', 14, 0, 100, 0, 0, 15516, 33501, 0, 'Flame Leviathan SAY_PLAYER_RIDING'), +(33113, 11, 0, 'System malfunction. Diverting power to support systems.', 14, 0, 100, 0, 0, 15517, 33503, 0, 'Flame Leviathan SAY_OVERLOAD_1'), +(33113, 11, 1, 'Combat matrix overload. Powering doooow...', 14, 0, 100, 0, 0, 15518, 33504, 0, 'Flame Leviathan SAY_OVERLOAD_2'), +(33113, 11, 2, 'System restart required. Deactivating weapons systems.', 14, 0, 100, 0, 0, 15519, 33505, 0, 'Flame Leviathan SAY_OVERLOAD_3'), +(33113, 12, 0, '%s pursues $n.', 41, 0, 100, 0, 0, 0, 33502, 0, 'Flame Leviathan EMOTE_PURSUE'), +(33113, 13, 0, '%s\'s circuits overloaded.', 41, 0, 100, 0, 0, 0, 33304, 0, 'Flame Leviathan EMOTE_OVERLOAD'), +(33113, 14, 0, 'Automatic repair sequence initiated.', 41, 0, 100, 0, 0, 0, 33538, 0, 'Flame Leviathan EMOTE_REPAIR'), +(33113, 15, 0, '%s activates Hodir\'s Fury.', 41, 0, 100, 0, 0, 0, 33494, 0, 'Flame Leviathan EMOTE_FROST'), +(33113, 16, 0, '%s activates Mimiron\'s Inferno.', 41, 0, 100, 0, 0, 0, 33496, 0, 'Flame Leviathan EMOTE_FLAME'), +(33113, 17, 0, '%s activates Freya\'s Ward.', 41, 0, 100, 0, 0, 0, 33498, 0, 'Flame Leviathan EMOTE_NATURE'), +(33113, 18, 0, '%s activates Thorim\'s Hammer.', 41, 0, 100, 0, 0, 0, 33500, 0, 'Flame Leviathan EMOTE_STORM'), +(33113, 19, 0, '%s reactivated. Resuming combat functions.', 41, 0, 100, 0, 0, 0, 33305, 0, 'Flame Leviathan EMOTE_REACTIVATE'); + +-- Bronzebeard Radio remove equipment (floating pickaxe) +DELETE FROM `creature_equip_template` WHERE `CreatureID` = 34054; + +-- Bronzebeard Radio move hardcode to DB (previously empty) +DELETE FROM `creature_text` WHERE `CreatureID` = 34054; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(34054, 0, 0, 'You\'ve done it! You\'ve broken the defenses of Ulduar. In a few moments, we will be dropping in to...', 12, 0, 100, 0, 0, 15804, 34154, 3, 'Bronzebeard Radio SAY_FL_START_0'), +(34054, 1, 0, 'What is that? Be careful! Something\'s headed your way!', 12, 0, 100, 0, 0, 15805, 34155, 3, 'Bronzebeard Radio SAY_FL_START_1'), +(34054, 2, 0, 'Quicly! Evasive action! Evasive act--', 12, 0, 100, 0, 0, 15806, 34156, 3, 'Bronzebeard Radio SAY_FL_START_2'), +(34054, 3, 0, 'There are four generators powering the defense structures. If you sabotage the generators, the missile attacks will stop!', 12, 0, 100, 0, 0, 15796, 34147, 3, 'Bronzebeard Radio SAY_FL_GENERATORS'), +(34054, 4, 0, 'It appears you are near a repair station! Drive your vehicle onto the platform, and it should be automatically repaired.', 12, 0, 100, 0, 0, 15803, 34153, 3, 'Bronzebeard Radio SAY_STATIONS'), +(34054, 5, 0, 'Ah, the tower of Krolmir. It is said that the power of Thorim has been used only once... and that it turned an entire continent to dust.', 12, 0, 100, 0, 0, 15801, 34151, 3, 'Bronzebeard Radio SAY_TOWER_THORIM'), +(34054, 6, 0, 'This tower powers the Hammer of Hodir. It is said to have the power to turn entire armies to ice!', 12, 0, 100, 0, 0, 15797, 34148, 3, 'Bronzebeard Radio SAY_TOWER_HODIR'), +(34054, 7, 0, 'You\'re approaching the tower of Freya. It contains the power to turn barren wastelands into jungles teeming with life overnight.', 12, 0, 100, 0, 0, 15798, 34149, 3, 'Bronzebeard Radio SAY_TOWER_FREYA'), +(34054, 8, 0, 'This generator powers Mimiron\'s Gaze. In moments, it can turn earth to ash, stone to magma--we cannot let it reach full power!', 12, 0, 100, 0, 0, 15799, 34150, 3, 'Bronzebeard Radio SAY_TOWER_MIMIRON'); diff --git a/data/sql/updates/db_world/2022_06_06_03.sql b/data/sql/updates/db_world/2022_06_06_03.sql new file mode 100644 index 000000000..ca0a03121 --- /dev/null +++ b/data/sql/updates/db_world/2022_06_06_03.sql @@ -0,0 +1,3 @@ +-- DB update 2022_06_06_02 -> 2022_06_06_03 +-- +UPDATE `smart_scripts` SET `action_param2`=0 WHERE `entryorguid`=30105 AND `source_type`=0 AND `id`=1; diff --git a/data/sql/updates/db_world/2022_06_06_04.sql b/data/sql/updates/db_world/2022_06_06_04.sql new file mode 100644 index 000000000..d389f72cd --- /dev/null +++ b/data/sql/updates/db_world/2022_06_06_04.sql @@ -0,0 +1,10 @@ +-- DB update 2022_06_06_03 -> 2022_06_06_04 +-- +DELETE FROM `creature_text` WHERE `CreatureID` IN (11347, 11348) AND `GroupId` = 0; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration` ,`Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(11347, 0, 0, '%s dies.', 16, 0, 100, 0, 0, 0, 8251, 3, ''), +(11348, 0, 0, '%s dies.', 16, 0, 100, 0, 0, 0, 8251, 3, ''); + +DELETE FROM `creature_text` WHERE `CreatureID` = 14509 AND `GroupId` = 2; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration` ,`Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(14509, 2, 0, '%s dies.', 16, 0, 100, 0, 0, 0, 8251, 3, ''); diff --git a/data/sql/updates/db_world/2022_06_06_05.sql b/data/sql/updates/db_world/2022_06_06_05.sql new file mode 100644 index 000000000..ef719ec51 --- /dev/null +++ b/data/sql/updates/db_world/2022_06_06_05.sql @@ -0,0 +1,3 @@ +-- DB update 2022_06_06_04 -> 2022_06_06_05 +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|0x00400000 WHERE `entry`=14986; diff --git a/data/sql/updates/db_world/2022_06_08_00.sql b/data/sql/updates/db_world/2022_06_08_00.sql new file mode 100644 index 000000000..e83d566ab --- /dev/null +++ b/data/sql/updates/db_world/2022_06_08_00.sql @@ -0,0 +1,834 @@ +-- DB update 2022_06_06_05 -> 2022_06_08_00 +-- +/* Frostmane Troll Whelp - GUID 1311 */ + + +SET @NPC := 1311; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -6528.93, `position_y` = 401.96, `position_z` = 382.521, `orientation` = 0.949249 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -6528.93, 401.96, 382.521, 100.0, 0), +(@PATH, 2, -6531.52, 394.46, 381.74, 100.0, 0), +(@PATH, 3, -6537.66, 385.633, 381.193, 100.0, 0), +(@PATH, 4, -6538.54, 377.197, 381.4, 100.0, 0), +(@PATH, 5, -6530.65, 380.315, 382.223, 100.0, 0), +(@PATH, 6, -6524.32, 382.633, 382.528, 100.0, 0), +(@PATH, 7, -6518.64, 384.007, 383.915, 100.0, 0), +(@PATH, 8, -6510.7, 385.93, 384.638, 100.0, 0), +(@PATH, 9, -6498.4, 390.355, 384.936, 100.0, 0), +(@PATH, 10, -6507.72, 386.65, 385.012, 100.0, 0), +(@PATH, 11, -6516.47, 384.167, 384.138, 100.0, 0), +(@PATH, 12, -6523.69, 382.846, 382.742, 100.0, 0), +(@PATH, 13, -6531.98, 379.712, 382.186, 100.0, 0), +(@PATH, 14, -6538.37, 377.715, 381.373, 100.0, 0), +(@PATH, 15, -6539.57, 386.47, 381.676, 100.0, 0), +(@PATH, 16, -6533.17, 392.053, 381.583, 100.0, 0); + +/* Ironforge Guard - GUID 1748 */ + + +SET @NPC := 1748; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -4958.85, `position_y` = -997.529, `position_z` = 501.572, `orientation` = 0.977868 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -4942.37, -973.067, 501.552, 0.0, 0), +(@PATH, 2, -4922.72, -954.752, 501.57, 0.0, 0), +(@PATH, 3, -4896.28, -936.781, 501.492, 0.0, 0), +(@PATH, 4, -4872.0, -926.028, 501.515, 0.0, 0), +(@PATH, 5, -4872.0, -926.028, 501.515, 3.5488, 45000), +(@PATH, 6, -4905.08, -941.83, 501.56, 0.0, 0), +(@PATH, 7, -4929.3, -961.502, 501.57, 0.0, 0), +(@PATH, 8, -4958.95, -997.889, 501.481, 0.0, 0), +(@PATH, 9, -4958.95, -997.889, 501.481, 0.9884, 45000); + +/* High Priest Rohan - GUID 1777 */ + + +SET @NPC := 1777; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -4612.27, `position_y` = -909.098, `position_z` = 501.146, `orientation` = 4.32842 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -4612.25, -909.152, 501.062, 4.32842, 90000), +(@PATH, 2, -4603.22, -905.336, 502.767, 0.0, 0), +(@PATH, 3, -4602.8, -903.233, 502.767, 0.0, 0), +(@PATH, 4, -4607.16, -897.28, 502.767, 0.0, 0), +(@PATH, 5, -4607.16, -897.28, 502.767, 5.35816, 90000), +(@PATH, 6, -4601.63, -904.615, 502.767, 0.0, 0), +(@PATH, 7, -4602.05, -906.355, 502.767, 0.0, 0), +(@PATH, 8, -4608.62, -913.508, 501.061, 0.0, 0), +(@PATH, 9, -4610.18, -921.852, 501.068, 0.0, 0), +(@PATH, 10, -4607.63, -926.901, 501.071, 0.0, 0), +(@PATH, 11, -4607.63, -926.901, 501.071, 2.33874, 180000), +(@PATH, 12, -4612.25, -909.152, 501.062, 0.0, 0); + + +/* Roetten Stonehammer - GUID 1888 */ + + +SET @NPC := 1888; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -4681.39, `position_y` = -1266.61, `position_z` = 503.382, `orientation` = 2.35619 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -4686.15, -1255.14, 501.993, 0.0, 0), +(@PATH, 2, -4675.92, -1244.38, 501.993, 0.0, 0), +(@PATH, 3, -4667.5, -1245.78, 501.993, 0.0, 0), +(@PATH, 4, -4661.6, -1250.52, 503.382, 0.0, 0), +(@PATH, 5, -4661.6, -1250.52, 503.382, 2.03745, 60000), +(@PATH, 6, -4670.11, -1243.08, 501.993, 0.0, 0), +(@PATH, 7, -4681.15, -1244.8, 501.993, 0.0, 0), +(@PATH, 8, -4686.53, -1252.01, 501.993, 0.0, 0), +(@PATH, 9, -4685.42, -1262.68, 501.993, 0.0, 0), +(@PATH, 10, -4681.39, -1266.61, 503.382, 0.0, 0), +(@PATH, 11, -4681.39, -1266.61, 503.382, 2.03745, 60000); + +/* Gnomeregan Evacuee - GUID 2442 */ + + +SET @NPC := 2442; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5165.01, 635.986, 348.279, 100.0, 2000), +(@PATH, 2, -5176.52, 637.508, 348.279, 100.0, 0), +(@PATH, 3, -5180.35, 647.348, 348.279, 100.0, 0), +(@PATH, 4, -5176.56, 656.204, 348.279, 100.0, 0), +(@PATH, 5, -5163.17, 665.239, 348.932, 100.0, 0), +(@PATH, 6, -5159.09, 708.355, 369.766, 100.0, 0), +(@PATH, 7, -5165.51, 714.313, 369.766, 100.0, 0), +(@PATH, 8, -5171.31, 714.859, 369.766, 100.0, 0), +(@PATH, 9, -5175.11, 706.777, 369.766, 100.0, 0), +(@PATH, 10, -5182.93, 606.75, 408.966, 100.0, 0), +(@PATH, 11, -5180.14, 597.714, 408.496, 100.0, 0), +(@PATH, 12, -5174.19, 584.702, 404.797, 100.0, 0), +(@PATH, 13, -5148.45, 587.567, 416.345, 100.0, 3000); + +/* Gibblewilt - GUID 2470 */ + + +SET @NPC := 2470; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5068.52, 456.024, 410.131, 4.30862, 0), +(@PATH, 2, -5074.61, 458.308, 410.396, 3.00879, 0), +(@PATH, 3, -5081.69, 458.405, 408.17, 3.72546, 0), +(@PATH, 4, -5085.15, 449.702, 409.889, 5.68699, 0), +(@PATH, 5, -5074.26, 442.373, 410.967, 5.68503, 10000), +(@PATH, 6, -5085.2, 449.851, 409.845, 5.70859, 0), +(@PATH, 7, -5096.99, 463.844, 404.063, 2.40599, 10000), +(@PATH, 8, -5087.35, 455.114, 407.616, 5.84407, 0), +(@PATH, 9, -5081.69, 458.405, 408.17, 0.100844, 0), +(@PATH, 10, -5074.22, 458.364, 410.452, 0.175457, 0); + +/* Great Father Arctikus - GUID 2938 */ + + +SET @NPC := 2938; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5592.92, 677.581, 384.033, 0.369836, 0), +(@PATH, 2, -5600.41, 673.451, 383.062, 4.13975, 0), +(@PATH, 3, -5603.79, 663.913, 383.343, 4.70523, 0), +(@PATH, 4, -5600.97, 653.118, 384.407, 5.49849, 0), +(@PATH, 5, -5593.76, 645.6, 384.251, 2.21748, 20000), +(@PATH, 6, -5601.55, 654.102, 384.304, 5.37085, 0), +(@PATH, 7, -5603.73, 663.851, 383.358, 1.27893, 0), +(@PATH, 8, -5600.35, 673.342, 383.068, 0.522985, 0), +(@PATH, 9, -5591.76, 678.133, 384.23, 0.37965, 0), +(@PATH, 10, -5583.21, 681.232, 384.784, 0.389467, 0), +(@PATH, 11, -5579.47, 688.612, 383.054, 1.14149, 20000), +(@PATH, 12, -5583.21, 681.232, 384.784, 3.71563, 0); + +/* Frostmane Headhunter - GUID 2942 */ + + +SET @NPC := 2942; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5577.25, `position_y` = 700.46, `position_z` = 381.931, `orientation` = 3.12328 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5577.25, 700.46, 381.931, 100.0, 0), +(@PATH, 2, -5585.01, 708.591, 381.949, 100.0, 0), +(@PATH, 3, -5592.0, 712.784, 381.934, 100.0, 0), +(@PATH, 4, -5602.55, 718.777, 382.803, 100.0, 0), +(@PATH, 5, -5594.0, 713.588, 382.19, 100.0, 0), +(@PATH, 6, -5587.96, 709.834, 382.064, 100.0, 0), +(@PATH, 7, -5583.34, 706.095, 381.943, 100.0, 0), +(@PATH, 8, -5577.5, 700.577, 381.933, 100.0, 0), +(@PATH, 9, -5576.83, 694.027, 382.176, 100.0, 0), +(@PATH, 10, -5579.36, 687.62, 383.216, 100.0, 0), +(@PATH, 11, -5584.23, 681.69, 384.767, 100.0, 0), +(@PATH, 12, -5587.87, 678.992, 384.853, 100.0, 0), +(@PATH, 13, -5590.26, 677.712, 384.489, 100.0, 0), +(@PATH, 14, -5596.81, 675.263, 383.396, 100.0, 0), +(@PATH, 15, -5602.21, 669.229, 383.059, 100.0, 0), +(@PATH, 16, -5603.85, 662.869, 383.443, 100.0, 0), +(@PATH, 17, -5601.49, 654.376, 384.313, 100.0, 0), +(@PATH, 18, -5597.38, 649.613, 384.351, 100.0, 0), +(@PATH, 19, -5594.43, 646.472, 384.272, 100.0, 0), +(@PATH, 20, -5601.32, 653.812, 384.335, 100.0, 0), +(@PATH, 21, -5603.84, 662.74, 383.459, 100.0, 0), +(@PATH, 22, -5601.41, 671.24, 383.043, 100.0, 0), +(@PATH, 23, -5596.83, 674.907, 383.396, 100.0, 0), +(@PATH, 24, -5589.57, 678.627, 384.581, 100.0, 0), +(@PATH, 25, -5582.65, 683.741, 384.33, 100.0, 0), +(@PATH, 26, -5578.19, 692.47, 382.37, 100.0, 0); + +/* Frostmane Snowstrider - GUID 2947 */ + + +SET @NPC := 2947; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5546.03, `position_y` = 738.82, `position_z` = 385.222, `orientation` = 2.41982 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5546.03, 738.82, 385.222, 100.0, 0), +(@PATH, 2, -5539.86, 732.785, 385.999, 100.0, 0), +(@PATH, 3, -5535.38, 729.201, 387.988, 100.0, 0), +(@PATH, 4, -5529.31, 718.23, 390.967, 100.0, 0), +(@PATH, 5, -5528.62, 708.422, 393.078, 100.0, 0), +(@PATH, 6, -5531.43, 700.178, 394.781, 100.0, 0), +(@PATH, 7, -5534.25, 691.043, 396.589, 100.0, 0), +(@PATH, 8, -5537.04, 683.256, 397.741, 100.0, 0), +(@PATH, 9, -5533.79, 692.606, 396.268, 100.0, 0), +(@PATH, 10, -5529.48, 704.271, 394.017, 100.0, 0), +(@PATH, 11, -5527.69, 713.291, 392.18, 100.0, 0), +(@PATH, 12, -5529.17, 721.177, 390.416, 100.0, 0), +(@PATH, 13, -5534.22, 728.566, 388.28, 100.0, 0), +(@PATH, 14, -5540.0, 733.101, 385.949, 100.0, 0), +(@PATH, 15, -5545.22, 737.797, 385.304, 100.0, 0), +(@PATH, 16, -5554.19, 749.018, 384.436, 100.0, 0), +(@PATH, 17, -5561.87, 756.116, 383.703, 100.0, 0), +(@PATH, 18, -5569.84, 758.797, 383.349, 100.0, 0), +(@PATH, 19, -5578.21, 759.201, 383.616, 100.0, 0), +(@PATH, 20, -5585.1, 759.055, 384.322, 100.0, 0), +(@PATH, 21, -5596.88, 756.296, 385.322, 100.0, 0), +(@PATH, 22, -5603.58, 754.268, 385.485, 100.0, 0), +(@PATH, 23, -5610.61, 752.14, 386.286, 100.0, 0), +(@PATH, 24, -5619.16, 751.23, 386.073, 100.0, 0), +(@PATH, 25, -5626.79, 754.23, 386.583, 100.0, 0), +(@PATH, 26, -5619.98, 750.392, 385.832, 100.0, 0), +(@PATH, 27, -5610.77, 752.059, 386.309, 100.0, 0), +(@PATH, 28, -5603.11, 754.536, 385.458, 100.0, 0), +(@PATH, 29, -5598.01, 756.078, 385.329, 100.0, 0), +(@PATH, 30, -5586.29, 758.664, 384.464, 100.0, 0), +(@PATH, 31, -5577.01, 758.995, 383.548, 100.0, 0), +(@PATH, 32, -5566.79, 756.941, 383.457, 100.0, 0), +(@PATH, 33, -5560.0, 754.467, 383.881, 100.0, 0), +(@PATH, 34, -5549.91, 744.429, 384.671, 100.0, 0); + +/* Wendigo - GUID 3122 */ + + +SET @NPC := 3122; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5432.3, `position_y` = -134.6, `position_z` = 350.456, `orientation` = 4.36332 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5432.3, -134.6, 350.456, 100.0, 0), +(@PATH, 2, -5433.38, -143.261, 351.339, 100.0, 0), +(@PATH, 3, -5434.1, -153.954, 351.684, 100.0, 0), +(@PATH, 4, -5433.57, -145.358, 351.426, 100.0, 0), +(@PATH, 5, -5432.38, -134.58, 350.455, 100.0, 0), +(@PATH, 6, -5430.27, -124.66, 348.582, 100.0, 0), +(@PATH, 7, -5426.28, -118.403, 347.057, 100.0, 0), +(@PATH, 8, -5419.41, -114.086, 345.655, 100.0, 0), +(@PATH, 9, -5425.61, -117.898, 346.897, 100.0, 0), +(@PATH, 10, -5429.94, -125.822, 348.842, 100.0, 0), +(@PATH, 11, -5431.77, -131.171, 349.875, 100.0, 0); + +/* Wendigo - GUID 3139 */ + + +SET @NPC := 3139; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5401.76, `position_y` = -128.122, `position_z` = 367.779, `orientation` = 5.28835 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5401.76, -128.122, 367.779, 100.0, 0), +(@PATH, 2, -5397.15, -133.077, 367.889, 100.0, 0), +(@PATH, 3, -5393.43, -140.068, 367.868, 100.0, 0), +(@PATH, 4, -5391.8, -147.003, 367.704, 100.0, 0), +(@PATH, 5, -5390.86, -154.645, 367.061, 100.0, 0), +(@PATH, 6, -5390.79, -160.58, 367.624, 100.0, 0), +(@PATH, 7, -5391.51, -166.008, 368.767, 100.0, 0), +(@PATH, 8, -5392.28, -170.969, 369.525, 100.0, 0), +(@PATH, 9, -5390.91, -164.225, 368.239, 100.0, 0), +(@PATH, 10, -5391.26, -155.732, 367.063, 100.0, 0), +(@PATH, 11, -5392.36, -146.113, 367.866, 100.0, 0), +(@PATH, 12, -5394.55, -139.363, 368.009, 100.0, 0), +(@PATH, 13, -5397.07, -133.981, 367.915, 100.0, 0); + +/* Timber - GUID 3154 */ + + +SET @NPC := 3154; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5248.09, 117.958, 394.268, 1.82279, 0), +(@PATH, 2, -5248.79, 110.069, 393.106, 4.69539, 0), +(@PATH, 3, -5248.93, 99.99, 391.792, 4.97813, 0), +(@PATH, 4, -5244.47, 89.3014, 389.637, 5.15485, 0), +(@PATH, 5, -5233.49, 79.7149, 386.934, 5.64376, 0), +(@PATH, 6, -5215.74, 81.2445, 386.134, 0.348212, 0), +(@PATH, 7, -5201.64, 91.0505, 386.112, 0.707531, 0), +(@PATH, 8, -5196.96, 105.918, 386.112, 3.05587, 0), +(@PATH, 9, -5204.8, 116.565, 387.546, 3.1619, 0), +(@PATH, 10, -5217.0, 120.209, 391.652, 3.12263, 0), +(@PATH, 11, -5232.49, 121.31, 394.311, 3.00678, 0), +(@PATH, 12, -5241.29, 126.827, 394.337, 3.2267, 0), +(@PATH, 13, -5247.15, 123.429, 394.261, 3.93356, 0); + +/* Frostmane Headhunter - GUID 3183 */ + + +SET @NPC := 3183; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5316.35, `position_y` = -214.36, `position_z` = 440.956, `orientation` = 0.401843 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5316.35, -214.36, 440.956, 100.0, 10000), +(@PATH, 2, -5317.84, -227.109, 441.159, 100.0, 0), +(@PATH, 3, -5316.58, -241.649, 440.671, 100.0, 0), +(@PATH, 4, -5313.8, -246.102, 441.356, 100.0, 0), +(@PATH, 5, -5305.87, -249.811, 445.312, 100.0, 10000), +(@PATH, 6, -5315.7, -246.452, 440.862, 100.0, 0), +(@PATH, 7, -5328.45, -244.869, 441.42, 100.0, 0), +(@PATH, 8, -5333.17, -249.242, 441.86, 100.0, 0), +(@PATH, 9, -5336.32, -257.158, 440.763, 100.0, 0), +(@PATH, 10, -5337.47, -261.884, 440.921, 100.0, 0), +(@PATH, 11, -5341.95, -273.199, 447.284, 100.0, 0), +(@PATH, 12, -5342.88, -276.696, 448.13, 100.0, 10000), +(@PATH, 13, -5347.71, -272.985, 447.438, 100.0, 0), +(@PATH, 14, -5358.61, -267.936, 442.177, 100.0, 0), +(@PATH, 15, -5368.57, -261.721, 440.882, 100.0, 0), +(@PATH, 16, -5377.26, -254.669, 447.094, 100.0, 0), +(@PATH, 17, -5380.6, -251.679, 447.381, 100.0, 10000), +(@PATH, 18, -5376.77, -244.195, 445.711, 100.0, 0), +(@PATH, 19, -5373.59, -238.356, 440.872, 100.0, 0), +(@PATH, 20, -5370.4, -233.202, 441.196, 100.0, 0), +(@PATH, 21, -5367.44, -227.769, 443.147, 100.0, 0), +(@PATH, 22, -5363.78, -223.348, 442.605, 100.0, 0), +(@PATH, 23, -5359.4, -218.502, 441.407, 100.0, 0), +(@PATH, 24, -5352.2, -210.538, 445.269, 100.0, 0), +(@PATH, 25, -5346.5, -210.742, 443.416, 100.0, 0), +(@PATH, 26, -5340.82, -213.811, 441.643, 100.0, 0), +(@PATH, 27, -5332.99, -215.503, 440.9, 100.0, 0), +(@PATH, 28, -5322.48, -217.418, 440.77, 100.0, 0); + +/* Wendigo - GUID 3186 */ + + +SET @NPC := 3186; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5396.72, `position_y` = -269.959, `position_z` = 362.808, `orientation` = 0.560124 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5396.72, -269.959, 362.808, 100.0, 0), +(@PATH, 2, -5406.76, -273.025, 362.254, 100.0, 0), +(@PATH, 3, -5416.35, -273.843, 360.902, 100.0, 0), +(@PATH, 4, -5423.34, -273.987, 359.737, 100.0, 0), +(@PATH, 5, -5431.49, -273.724, 358.434, 100.0, 0), +(@PATH, 6, -5438.46, -273.045, 357.218, 100.0, 0), +(@PATH, 7, -5447.92, -271.071, 355.96, 100.0, 0), +(@PATH, 8, -5437.42, -273.181, 357.356, 100.0, 0), +(@PATH, 9, -5431.84, -273.568, 358.359, 100.0, 0), +(@PATH, 10, -5421.35, -273.87, 360.146, 100.0, 0), +(@PATH, 11, -5414.24, -273.794, 361.216, 100.0, 0), +(@PATH, 12, -5406.41, -272.245, 362.341, 100.0, 0), +(@PATH, 13, -5397.06, -270.431, 362.773, 100.0, 0), +(@PATH, 14, -5391.94, -266.715, 363.014, 100.0, 0), +(@PATH, 15, -5380.48, -256.786, 362.554, 100.0, 0), +(@PATH, 16, -5388.0, -263.463, 362.999, 100.0, 0); + +/* Wendigo - GUID 3187 */ + + +SET @NPC := 3187; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5425.7, `position_y` = -223.195, `position_z` = 371.936, `orientation` = 1.8675 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5425.7, -223.195, 371.936, 100.0, 0), +(@PATH, 2, -5425.14, -215.183, 372.811, 100.0, 0), +(@PATH, 3, -5422.18, -207.492, 372.707, 100.0, 0), +(@PATH, 4, -5416.92, -197.329, 371.838, 100.0, 0), +(@PATH, 5, -5411.03, -190.942, 371.379, 100.0, 0), +(@PATH, 6, -5404.22, -186.135, 370.564, 100.0, 0), +(@PATH, 7, -5413.76, -193.226, 371.659, 100.0, 0), +(@PATH, 8, -5419.89, -202.552, 372.247, 100.0, 0), +(@PATH, 9, -5424.82, -211.675, 372.844, 100.0, 0), +(@PATH, 10, -5425.13, -216.157, 372.689, 100.0, 0); + +/* Wendigo - GUID 3240 */ + + +SET @NPC := 3240; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5464.76, `position_y` = -246.758, `position_z` = 354.253, `orientation` = 2.74017 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5464.76, -246.758, 354.253, 100.0, 0), +(@PATH, 2, -5470.49, -242.217, 354.253, 100.0, 0), +(@PATH, 3, -5478.29, -238.068, 354.423, 100.0, 0), +(@PATH, 4, -5484.74, -235.35, 354.509, 100.0, 0), +(@PATH, 5, -5494.42, -231.274, 354.042, 100.0, 0), +(@PATH, 6, -5504.1, -227.198, 353.52, 100.0, 0), +(@PATH, 7, -5510.55, -224.48, 353.356, 100.0, 0), +(@PATH, 8, -5515.95, -222.701, 353.458, 100.0, 0), +(@PATH, 9, -5525.14, -223.195, 354.589, 100.0, 0), +(@PATH, 10, -5514.05, -223.276, 353.323, 100.0, 0), +(@PATH, 11, -5509.24, -224.293, 353.298, 100.0, 0), +(@PATH, 12, -5502.79, -227.016, 353.688, 100.0, 0), +(@PATH, 13, -5492.97, -231.373, 354.199, 100.0, 0), +(@PATH, 14, -5485.22, -234.873, 354.495, 100.0, 0), +(@PATH, 15, -5479.93, -237.388, 354.446, 100.0, 0), +(@PATH, 16, -5473.17, -240.281, 354.309, 100.0, 0), +(@PATH, 17, -5466.21, -245.116, 354.254, 100.0, 0), +(@PATH, 18, -5461.61, -251.304, 354.254, 100.0, 0), +(@PATH, 19, -5455.2, -261.391, 354.198, 100.0, 0), +(@PATH, 20, -5459.61, -254.523, 354.281, 100.0, 0); + +/* Wendigo - GUID 3572 */ + + +SET @NPC := 3572; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5554.56, `position_y` = -235.988, `position_z` = 362.897, `orientation` = 0.511921 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5554.56, -235.988, 362.897, 100.0, 0), +(@PATH, 2, -5549.19, -231.872, 361.206, 100.0, 0), +(@PATH, 3, -5542.18, -227.456, 358.47, 100.0, 0), +(@PATH, 4, -5540.6, -226.723, 357.754, 100.0, 0), +(@PATH, 5, -5546.54, -230.191, 360.312, 100.0, 0), +(@PATH, 6, -5553.38, -235.414, 362.598, 100.0, 0), +(@PATH, 7, -5557.68, -239.184, 364.141, 100.0, 0), +(@PATH, 8, -5562.09, -245.774, 365.837, 100.0, 0), +(@PATH, 9, -5563.85, -249.584, 366.56, 100.0, 0), +(@PATH, 10, -5566.19, -256.791, 367.423, 100.0, 0), +(@PATH, 11, -5567.13, -259.798, 367.933, 100.0, 0), +(@PATH, 12, -5570.49, -267.524, 367.335, 100.0, 0), +(@PATH, 13, -5576.32, -277.889, 366.222, 100.0, 0), +(@PATH, 14, -5570.46, -267.145, 367.366, 100.0, 0), +(@PATH, 15, -5567.09, -260.1, 367.98, 100.0, 0), +(@PATH, 16, -5564.38, -250.211, 366.634, 100.0, 0), +(@PATH, 17, -5560.83, -243.65, 365.272, 100.0, 0), +(@PATH, 18, -5559.09, -240.479, 364.555, 100.0, 0); + +/* Fluffy - GUID 4151 */ + + +SET @NPC := 4151; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5549.0, -1295.66, 400.267, 1.96547, 0), +(@PATH, 2, -5555.14, -1286.75, 400.705, 2.50936, 0), +(@PATH, 3, -5563.65, -1281.34, 401.378, 4.89108, 0), +(@PATH, 4, -5571.76, -1283.92, 401.595, 4.92446, 0), +(@PATH, 5, -5574.1, -1292.32, 401.575, 5.63917, 0), +(@PATH, 6, -5550.61, -1316.42, 398.663, 5.5135, 0), +(@PATH, 7, -5539.53, -1319.2, 399.05, 0.388779, 0), +(@PATH, 8, -5527.46, -1315.68, 401.761, 0.37307, 0), +(@PATH, 9, -5510.42, -1310.07, 402.876, 6.27534, 0), +(@PATH, 10, -5496.35, -1307.78, 404.306, 5.15811, 0), +(@PATH, 11, -5485.81, -1317.02, 403.623, 4.65349, 0), +(@PATH, 12, -5482.9, -1328.74, 403.128, 1.90657, 0), +(@PATH, 13, -5497.13, -1351.01, 403.118, 4.14299, 0), +(@PATH, 14, -5506.29, -1361.86, 401.173, 0.79327, 0), +(@PATH, 15, -5512.5, -1380.78, 401.059, 4.32364, 0), +(@PATH, 16, -5523.74, -1388.3, 400.524, 0.430028, 0), +(@PATH, 17, -5532.06, -1391.59, 401.022, 5.71575, 0), +(@PATH, 18, -5536.64, -1400.22, 402.253, 0.392711, 0), +(@PATH, 19, -5534.24, -1407.77, 402.474, 0.645999, 0), +(@PATH, 20, -5526.26, -1409.96, 402.421, 1.3293, 0), +(@PATH, 21, -5516.35, -1405.69, 402.985, 3.07288, 0), +(@PATH, 22, -5512.02, -1380.34, 401.147, 1.27628, 0), +(@PATH, 23, -5505.66, -1361.61, 401.475, 1.08975, 0), +(@PATH, 24, -5496.98, -1350.89, 403.125, 0.861984, 0), +(@PATH, 25, -5483.01, -1328.78, 403.113, 1.27432, 0), +(@PATH, 26, -5485.76, -1316.7, 403.664, 2.0931, 0), +(@PATH, 27, -5496.2, -1307.95, 404.289, 2.74694, 0), +(@PATH, 28, -5510.93, -1310.19, 402.859, 3.38507, 0), +(@PATH, 29, -5527.54, -1315.5, 401.787, 3.47539, 0), +(@PATH, 30, -5537.08, -1315.39, 399.541, 3.32028, 0), +(@PATH, 31, -5543.39, -1309.22, 398.204, 1.88497, 0); + + +DELETE FROM `creature_formations` WHERE `memberGUID` IN (4151, 4153); +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(4151, 4153, 4.80679, 183, 519, 0, 0), +(4151, 4151, 0, 0, 519, 0, 0); + +/* Rockjaw Skullthumper - GUID 4524 */ + + +SET @NPC := 4524; +SET @PATH := @NPC * 10; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5871.25, -1544.41, 372.448, 5.2547, 0), +(@PATH, 2, -5869.8, -1546.8, 372.373, 4.94055, 0), +(@PATH, 3, -5866.37, -1556.3, 366.145, 0.228153, 0), +(@PATH, 4, -5856.7, -1554.05, 358.833, 0.228153, 20000), +(@PATH, 5, -5866.48, -1556.24, 366.228, 1.85785, 0), +(@PATH, 6, -5869.95, -1546.57, 372.54, 1.94739, 0), +(@PATH, 7, -5872.4, -1542.05, 372.521, 2.02672, 0), +(@PATH, 8, -5874.47, -1532.95, 379.59, 1.76518, 0), +(@PATH, 9, -5871.17, -1523.61, 379.248, 4.41983, 30000), +(@PATH, 10, -5874.42, -1532.89, 379.63, 4.76776, 0), +(@PATH, 11, -5872.52, -1541.97, 372.526, 4.93505, 0); + +/* Rockjaw Bonesnapper - GUID 4542 */ + + +SET @NPC := 4542; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5627.38, `position_y` = -1692.46, `position_z` = 399.612, `orientation` = 3.53051 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5627.38, -1692.46, 399.612, 100.0, 0), +(@PATH, 2, -5638.73, -1696.96, 399.131, 100.0, 0), +(@PATH, 3, -5647.65, -1705.31, 399.371, 100.0, 0), +(@PATH, 4, -5657.91, -1717.19, 400.254, 100.0, 0), +(@PATH, 5, -5665.49, -1732.89, 399.89, 100.0, 0), +(@PATH, 6, -5669.03, -1748.15, 400.046, 100.0, 0), +(@PATH, 7, -5666.81, -1767.67, 400.051, 100.0, 0), +(@PATH, 8, -5659.9, -1784.91, 399.696, 100.0, 0), +(@PATH, 9, -5651.59, -1797.52, 400.324, 100.0, 0), +(@PATH, 10, -5639.94, -1807.93, 399.766, 100.0, 0), +(@PATH, 11, -5627.84, -1813.34, 400.785, 100.0, 0), +(@PATH, 12, -5613.26, -1816.92, 400.942, 100.0, 0), +(@PATH, 13, -5597.3, -1820.47, 399.603, 100.0, 0), +(@PATH, 14, -5583.48, -1822.52, 399.955, 100.0, 0), +(@PATH, 15, -5568.99, -1823.99, 400.865, 100.0, 0), +(@PATH, 16, -5556.21, -1825.28, 399.653, 100.0, 0), +(@PATH, 17, -5572.36, -1823.33, 400.954, 100.0, 0), +(@PATH, 18, -5590.66, -1821.89, 399.622, 100.0, 0), +(@PATH, 19, -5608.77, -1817.4, 400.73, 100.0, 0), +(@PATH, 20, -5624.46, -1812.85, 400.957, 100.0, 0), +(@PATH, 21, -5636.85, -1809.99, 399.598, 100.0, 0), +(@PATH, 22, -5646.51, -1801.62, 400.293, 100.0, 0), +(@PATH, 23, -5657.3, -1789.51, 399.926, 100.0, 0), +(@PATH, 24, -5661.29, -1773.99, 400.341, 100.0, 0), +(@PATH, 25, -5661.82, -1757.66, 399.919, 100.0, 0), +(@PATH, 26, -5660.06, -1746.28, 400.097, 100.0, 0), +(@PATH, 27, -5657.01, -1733.84, 399.839, 100.0, 0), +(@PATH, 28, -5653.79, -1722.66, 400.801, 100.0, 0), +(@PATH, 29, -5647.43, -1708.26, 399.427, 100.0, 0), +(@PATH, 30, -5638.97, -1697.98, 399.135, 100.0, 0); + +/* Rockjaw Bonesnapper - GUID 4545 */ + + +SET @NPC := 4545; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5596.2, `position_y` = -1683.52, `position_z` = 347.276, `orientation` = 6.25858 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5596.2, -1683.52, 347.276, 100.0, 0), +(@PATH, 2, -5600.28, -1681.07, 349.036, 100.0, 0), +(@PATH, 3, -5605.89, -1674.86, 350.655, 100.0, 0), +(@PATH, 4, -5611.91, -1679.3, 351.456, 100.0, 0), +(@PATH, 5, -5609.26, -1689.22, 353.038, 100.0, 0), +(@PATH, 6, -5605.37, -1700.32, 356.982, 100.0, 0), +(@PATH, 7, -5604.51, -1705.22, 358.703, 100.0, 0), +(@PATH, 8, -5609.27, -1706.74, 359.171, 100.0, 0), +(@PATH, 9, -5614.53, -1699.49, 360.345, 100.0, 0), +(@PATH, 10, -5618.3, -1691.87, 360.588, 100.0, 0), +(@PATH, 11, -5622.24, -1683.54, 362.224, 100.0, 0), +(@PATH, 12, -5624.64, -1673.57, 362.007, 100.0, 0), +(@PATH, 13, -5621.46, -1684.72, 362.087, 100.0, 0), +(@PATH, 14, -5618.48, -1691.23, 360.625, 100.0, 0), +(@PATH, 15, -5614.23, -1699.5, 360.307, 100.0, 0), +(@PATH, 16, -5609.8, -1705.37, 359.24, 100.0, 0), +(@PATH, 17, -5603.43, -1706.61, 359.209, 100.0, 0), +(@PATH, 18, -5605.95, -1698.77, 356.382, 100.0, 0), +(@PATH, 19, -5609.09, -1689.14, 353.042, 100.0, 0), +(@PATH, 20, -5610.99, -1683.02, 351.756, 100.0, 0), +(@PATH, 21, -5610.22, -1675.92, 350.97, 100.0, 0), +(@PATH, 22, -5606.03, -1675.62, 350.676, 100.0, 0), +(@PATH, 23, -5601.71, -1680.54, 349.575, 100.0, 0); + +/* Rockjaw Bonesnapper - GUID 4561 */ + + +SET @NPC := 4561; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5536.41, `position_y` = -1741.26, `position_z` = 339.58, `orientation` = 5.88313 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5536.41, -1741.26, 339.58, 100.0, 0), +(@PATH, 2, -5526.61, -1743.64, 337.832, 100.0, 0), +(@PATH, 3, -5537.32, -1740.91, 339.711, 100.0, 0), +(@PATH, 4, -5544.39, -1735.85, 340.927, 100.0, 0), +(@PATH, 5, -5549.2, -1731.98, 342.204, 100.0, 0), +(@PATH, 6, -5556.28, -1727.06, 342.399, 100.0, 0), +(@PATH, 7, -5559.88, -1724.29, 342.479, 100.0, 0), +(@PATH, 8, -5567.05, -1719.29, 342.412, 100.0, 0), +(@PATH, 9, -5578.9, -1711.0, 342.412, 100.0, 0), +(@PATH, 10, -5582.96, -1706.39, 343.26, 100.0, 0), +(@PATH, 11, -5587.52, -1700.34, 344.939, 100.0, 0), +(@PATH, 12, -5590.26, -1692.03, 345.397, 100.0, 0), +(@PATH, 13, -5587.14, -1699.73, 345.092, 100.0, 0), +(@PATH, 14, -5583.42, -1705.41, 343.509, 100.0, 0), +(@PATH, 15, -5578.63, -1710.94, 342.412, 100.0, 0), +(@PATH, 16, -5572.14, -1716.08, 342.412, 100.0, 0), +(@PATH, 17, -5565.77, -1720.81, 342.512, 100.0, 0), +(@PATH, 18, -5559.49, -1724.6, 342.479, 100.0, 0), +(@PATH, 19, -5548.53, -1732.52, 342.105, 100.0, 0), +(@PATH, 20, -5543.56, -1736.61, 340.74, 100.0, 0); + +/* Rockjaw Bonesnapper - GUID 4847 */ + + +SET @NPC := 4847; +SET @PATH := @NPC * 10; + +UPDATE `creature` SET `position_x` = -5569.31, `position_y` = -1765.96, `position_z` = 346.369, `orientation` = 3.44248 WHERE `guid` = @NPC; + +DELETE FROM `creature_addon` WHERE `guid` = @NPC; +INSERT INTO `creature_addon` (`guid`, `path_id`) VALUES (@NPC, @PATH); +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5569.31, -1765.96, 346.369, 100.0, 0), +(@PATH, 2, -5580.12, -1768.71, 348.96, 100.0, 0), +(@PATH, 3, -5591.17, -1770.6, 353.343, 100.0, 0), +(@PATH, 4, -5599.2, -1772.08, 356.385, 100.0, 0), +(@PATH, 5, -5587.93, -1770.32, 352.211, 100.0, 0), +(@PATH, 6, -5577.91, -1768.16, 348.083, 100.0, 0), +(@PATH, 7, -5569.47, -1765.65, 346.3, 100.0, 0), +(@PATH, 8, -5560.44, -1760.17, 342.953, 100.0, 0), +(@PATH, 9, -5552.35, -1754.22, 341.378, 100.0, 0), +(@PATH, 10, -5546.19, -1749.04, 340.797, 100.0, 0), +(@PATH, 11, -5540.59, -1742.04, 340.224, 100.0, 0), +(@PATH, 12, -5537.63, -1735.2, 340.318, 100.0, 0), +(@PATH, 13, -5534.81, -1727.29, 340.757, 100.0, 0), +(@PATH, 14, -5531.64, -1717.72, 341.291, 100.0, 0), +(@PATH, 15, -5533.11, -1710.31, 342.644, 100.0, 0), +(@PATH, 16, -5531.35, -1717.38, 341.3, 100.0, 0), +(@PATH, 17, -5533.43, -1726.32, 340.61, 100.0, 0), +(@PATH, 18, -5537.4, -1733.16, 340.365, 100.0, 0), +(@PATH, 19, -5543.9, -1742.4, 340.672, 100.0, 0), +(@PATH, 20, -5548.14, -1748.26, 340.921, 100.0, 0), +(@PATH, 21, -5551.7, -1752.42, 341.271, 100.0, 0), +(@PATH, 22, -5560.48, -1761.27, 343.182, 100.0, 0), +(@PATH, 23, -5563.01, -1763.52, 344.266, 100.0, 0); + +/* Dun Morogh Mountaineer - GUID 6367 */ + + +SET @NPC := 6367; +SET @PATH := @NPC * 10; + +UPDATE `creature_addon` set `path_id` = @PATH WHERE `guid` = @NPC; +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = @NPC; + +DELETE FROM `waypoint_data` where `id` = @PATH; +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES +(@PATH, 1, -5001.43, -2312.58, 405.708, 0.015327, 0), +(@PATH, 2, -4994.43, -2312.47, 406.455, 0.015327, 0), +(@PATH, 3, -4987.0, -2311.8, 407.207, 6.25846, 0), +(@PATH, 4, -4978.09, -2312.61, 408.019, 6.10059, 0), +(@PATH, 5, -4966.22, -2315.96, 408.735, 5.94273, 0), +(@PATH, 6, -4958.98, -2320.9, 408.616, 5.54689, 0), +(@PATH, 7, -4951.2, -2327.95, 408.28, 5.54689, 0), +(@PATH, 8, -4943.42, -2335.0, 408.244, 5.54689, 0), +(@PATH, 9, -4937.18, -2339.43, 408.51, 5.78486, 0), +(@PATH, 10, -4928.8, -2343.15, 408.622, 5.98043, 0), +(@PATH, 11, -4921.01, -2345.13, 408.622, 6.09824, 0), +(@PATH, 12, -4910.69, -2347.06, 408.622, 6.09824, 0), +(@PATH, 13, -4903.19, -2349.92, 408.622, 5.70475, 0), +(@PATH, 14, -4911.04, -2346.58, 408.622, 2.84983, 0), +(@PATH, 15, -4917.76, -2345.17, 408.622, 3.00769, 0), +(@PATH, 16, -4928.5, -2343.13, 408.622, 2.84983, 0), +(@PATH, 17, -4934.95, -2340.75, 408.576, 2.73202, 0), +(@PATH, 18, -4944.53, -2335.04, 408.248, 2.53645, 0), +(@PATH, 19, -4951.1, -2328.78, 408.236, 2.34089, 0), +(@PATH, 20, -4957.91, -2322.43, 408.503, 2.4587, 0), +(@PATH, 21, -4963.34, -2318.01, 408.755, 2.4587, 0), +(@PATH, 22, -4972.36, -2313.44, 408.536, 2.85218, 0), +(@PATH, 23, -4979.42, -2311.96, 407.865, 3.01005, 0), +(@PATH, 24, -4992.02, -2312.32, 406.72, 3.28572, 0), +(@PATH, 25, -5002.32, -2313.53, 405.659, 3.20797, 0), +(@PATH, 26, -5013.18, -2312.1, 403.958, 2.81448, 0), +(@PATH, 27, -5019.8, -2308.56, 402.841, 2.50111, 0), +(@PATH, 28, -5027.78, -2300.47, 402.106, 2.26549, 0), +(@PATH, 29, -5034.5, -2292.4, 401.445, 2.26549, 0), +(@PATH, 30, -5039.68, -2287.59, 400.961, 2.50111, 0), +(@PATH, 31, -5048.81, -2282.12, 400.678, 2.77678, 0), +(@PATH, 32, -5059.3, -2278.6, 400.615, 3.05246, 0), +(@PATH, 33, -5072.53, -2278.86, 400.209, 3.25038, 0), +(@PATH, 34, -5080.73, -2280.5, 400.045, 3.4483, 0), +(@PATH, 35, -5089.7, -2283.8, 400.084, 3.56611, 0), +(@PATH, 36, -5099.56, -2289.5, 400.108, 3.72397, 0), +(@PATH, 37, -5108.33, -2295.28, 399.991, 3.72397, 0), +(@PATH, 38, -5119.27, -2305.02, 399.972, 3.9219, 0), +(@PATH, 39, -5125.72, -2309.44, 400.112, 3.56847, 0), +(@PATH, 40, -5137.37, -2312.98, 400.492, 3.34698, 0), +(@PATH, 41, -5146.26, -2314.14, 400.426, 3.19147, 0), +(@PATH, 42, -5156.74, -2314.67, 400.248, 3.19147, 0), +(@PATH, 43, -5168.25, -2314.5, 399.933, 2.99591, 0), +(@PATH, 44, -5178.92, -2311.86, 399.793, 2.72024, 0), +(@PATH, 45, -5184.51, -2307.65, 400.036, 2.32911, 0), +(@PATH, 46, -5187.81, -2301.88, 400.243, 1.93562, 0), +(@PATH, 47, -5191.47, -2294.36, 400.4, 2.13119, 0), +(@PATH, 48, -5198.22, -2287.34, 400.809, 2.40686, 0), +(@PATH, 49, -5192.27, -2293.99, 400.429, 5.20995, 0), +(@PATH, 50, -5187.26, -2303.21, 400.204, 5.20995, 0), +(@PATH, 51, -5182.48, -2309.11, 399.947, 5.56102, 0), +(@PATH, 52, -5176.64, -2312.85, 399.767, 5.83434, 0), +(@PATH, 53, -5168.76, -2314.9, 399.93, 6.22783, 0), +(@PATH, 54, -5153.5, -2314.91, 400.295, 0.06245, 0), +(@PATH, 55, -5140.6, -2313.82, 400.486, 0.102505, 0), +(@PATH, 56, -5134.87, -2312.79, 400.437, 0.220315, 0), +(@PATH, 57, -5127.18, -2310.48, 400.163, 0.375824, 0), +(@PATH, 58, -5120.43, -2306.3, 399.967, 0.731609, 0), +(@PATH, 59, -5112.62, -2299.29, 400.099, 0.731609, 0), +(@PATH, 60, -5105.76, -2293.91, 399.938, 0.576101, 0), +(@PATH, 61, -5099.89, -2290.1, 400.098, 0.576101, 0), +(@PATH, 62, -5091.38, -2284.57, 400.086, 0.576101, 0), +(@PATH, 63, -5080.73, -2279.57, 400.027, 0.222671, 0), +(@PATH, 64, -5068.14, -2278.18, 400.317, 0.027107, 0), +(@PATH, 65, -5052.9, -2279.86, 400.657, 6.11473, 0), +(@PATH, 66, -5046.31, -2282.43, 400.701, 5.69532, 0), +(@PATH, 67, -5036.54, -2289.96, 401.198, 5.57752, 0), +(@PATH, 68, -5029.26, -2297.66, 402.041, 5.41965, 0), +(@PATH, 69, -5025.51, -2302.71, 402.198, 5.30184, 0), +(@PATH, 70, -5020.02, -2309.3, 402.874, 5.53746, 0), +(@PATH, 71, -5012.95, -2312.65, 404.048, 6.12651, 0); diff --git a/data/sql/updates/db_world/2022_06_08_01.sql b/data/sql/updates/db_world/2022_06_08_01.sql new file mode 100644 index 000000000..e5b27668c --- /dev/null +++ b/data/sql/updates/db_world/2022_06_08_01.sql @@ -0,0 +1,4 @@ +-- DB update 2022_06_08_00 -> 2022_06_08_01 +DELETE FROM `item_loot_template` WHERE (`Entry` = 11024) AND (`Item` IN (785, 2449, 2450, 3356, 3357, 3820, 3821, 4625, 8838, 8839, 8846, 49209)); +INSERT INTO `item_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(11024, 49209, 0, 63, 0, 1, 1, 1, 3, 'Evergreen Herb Casing - Mutated Morrowgrain'); diff --git a/data/sql/updates/db_world/2022_06_08_02.sql b/data/sql/updates/db_world/2022_06_08_02.sql new file mode 100644 index 000000000..c251eeb06 --- /dev/null +++ b/data/sql/updates/db_world/2022_06_08_02.sql @@ -0,0 +1,4 @@ +-- DB update 2022_06_08_01 -> 2022_06_08_02 +-- (Quest)Mystery of the Infinite NPC: "Future You", remove SAI (unused) +UPDATE `creature_template` SET `AIName` = '' WHERE `entry` = 27899; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 27899 AND `source_type` = 0; diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 59cef401c..28561f5a7 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -386,6 +386,8 @@ public: void ModifyThreatPercentTemp(Unit* victim, int32 percent, Milliseconds duration); + void ResetFaction() { SetFaction(GetCreatureTemplate()->faction); } + protected: bool CreateFromProto(ObjectGuid::LowType guidlow, uint32 Entry, uint32 vehId, const CreatureData* data = nullptr); bool InitEntry(uint32 entry, const CreatureData* data = nullptr); diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 8b7c15658..513b3789e 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -701,8 +701,8 @@ void GameObject::Update(uint32 diff) // search unfriendly creature if (owner && goInfo->trap.autoCloseTime != -1) // hunter trap { - Acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck checker(this, owner, radius); - Acore::UnitSearcher searcher(this, target, checker); + Acore::NearestAttackableNoTotemUnitInObjectRangeCheck checker(this, owner, radius); + Acore::UnitSearcher searcher(this, target, checker); Cell::VisitAllObjects(this, searcher, radius); } else // environmental trap diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 67de69654..945d1a2f2 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2949,7 +2949,15 @@ template T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& bas return; } - totalflat += mod->value; + int32 flatValue = mod->value; + + // SPELL_MOD_THREAT - divide by 100 (in packets we send threat * 100) + if (mod->op == SPELLMOD_THREAT) + { + flatValue /= 100; + } + + totalflat += flatValue; } else if (mod->type == SPELLMOD_PCT) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 03c16e216..2be2a68d1 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12422,7 +12422,7 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) { SpellInfo const* immuneSpellInfo = sSpellMgr->GetSpellInfo(itr->spellId); if (((itr->type & spellInfo->GetSchoolMask()) == spellInfo->GetSchoolMask()) - && !(immuneSpellInfo && immuneSpellInfo->IsPositive()) && !spellInfo->IsPositive() + && (!immuneSpellInfo || immuneSpellInfo->IsPositive()) && !spellInfo->IsPositive() && !spellInfo->CanPierceImmuneAura(immuneSpellInfo)) return true; } diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 654f0aa27..eba4476d7 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -898,6 +898,47 @@ namespace Acore float i_range; }; + class NearestAttackableNoTotemUnitInObjectRangeCheck + { + public: + NearestAttackableNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* owner, float range) : i_obj(obj), i_owner(owner), i_range(range) {} + + bool operator()(Unit* u) + { + if (!u->IsAlive()) + { + return false; + } + + if (u->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET) + { + return false; + } + + if (u->GetTypeId() == TYPEID_UNIT && u->ToCreature()->IsTotem()) + { + return false; + } + + if (!u->isTargetableForAttack(false, i_owner)) + { + return false; + } + + if (!i_obj->IsWithinDistInMap(u, i_range) || !i_owner->IsValidAttackTarget(u) || !i_obj->IsWithinLOSInMap(u)) + { + return false; + } + + return true; + } + + private: + WorldObject const* i_obj; + Unit const* i_owner; + float i_range; + }; + class AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck { public: @@ -1037,8 +1078,19 @@ namespace Acore bool operator()(Unit* u) { // Check contains checks for: live, non-selectable, non-attackable flags, flight check and GM check, ignore totems - if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->IsTotem()) - return false; + if (Creature* creature = u->ToCreature()) + { + if (creature->IsTotem()) + { + return false; + } + + if (creature->IsAvoidingAOE()) + { + return false; + } + + } if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range)) return true; diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index 5f62e542c..59ea2cd8a 100644 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -26,6 +26,7 @@ #define MIN_QUIET_DISTANCE 28.0f #define MAX_QUIET_DISTANCE 43.0f +#define MIN_PATH_LENGTH 2.0f template void FleeingMovementGenerator::DoInitialize(T* owner) @@ -144,6 +145,20 @@ void FleeingMovementGenerator::SetTargetLocation(T* owner) return; } + // Same position - recheck + if (_path->getPathLength() < MIN_PATH_LENGTH) + { + if (_fleeTargetGUID) + { + ++_shortPathsCount; + } + + _timer.Reset(100); + return; + } + + _shortPathsCount = 0; + Movement::MoveSplineInit init(owner); init.MovebyPath(_path->GetPath()); init.SetWalk(false); @@ -154,8 +169,13 @@ void FleeingMovementGenerator::SetTargetLocation(T* owner) template void FleeingMovementGenerator::GetPoint(T* owner, Position& position) { - float casterDistance, casterAngle; - if (Unit* fleeTarget = ObjectAccessor::GetUnit(*owner, _fleeTargetGUID)) + float casterDistance = 0.f; + float casterAngle = 0.f; + Unit* fleeTarget = nullptr; + if (_shortPathsCount < 5) + fleeTarget = ObjectAccessor::GetUnit(*owner, _fleeTargetGUID); + + if (fleeTarget) { casterDistance = fleeTarget->GetDistance(owner); if (casterDistance > 0.2f) @@ -173,7 +193,8 @@ void FleeingMovementGenerator::GetPoint(T* owner, Position& position) casterAngle = frand(0.0f, 2.0f * float(M_PI)); } - float distance, angle; + float distance = 0.f; + float angle = 0.f; if (casterDistance < MIN_QUIET_DISTANCE) { distance = frand(0.4f, 1.3f) * (MIN_QUIET_DISTANCE - casterDistance); diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h index dfd59a255..064597f36 100644 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h @@ -24,7 +24,7 @@ template class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator > { public: - explicit FleeingMovementGenerator(ObjectGuid fleeTargetGUID) : _path(nullptr), _fleeTargetGUID(fleeTargetGUID), _timer(0), _interrupt(false) {} + explicit FleeingMovementGenerator(ObjectGuid fleeTargetGUID) : _path(nullptr), _fleeTargetGUID(fleeTargetGUID), _timer(0), _interrupt(false), _shortPathsCount(0) { } MovementGeneratorType GetMovementGeneratorType() override { return FLEEING_MOTION_TYPE; } @@ -41,6 +41,7 @@ class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovem ObjectGuid _fleeTargetGUID; TimeTracker _timer; bool _interrupt; + uint8 _shortPathsCount; }; class TimedFleeingMovementGenerator : public FleeingMovementGenerator diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9758eeebc..44df83ab6 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5892,31 +5892,27 @@ SpellCastResult Spell::CheckCast(bool strict) if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT)) { - WorldObject* losCenter = nullptr; + bool castedByGameobject = false; uint32 losChecks = LINEOFSIGHT_ALL_CHECKS; if (m_originalCasterGUID.IsGameObject()) { - losCenter = m_caster->GetMap()->GetGameObject(m_originalCasterGUID); + castedByGameobject = m_caster->GetMap()->GetGameObject(m_originalCasterGUID) != nullptr; } else if (m_caster->GetEntry() == WORLD_TRIGGER) { if (TempSummon* tempSummon = m_caster->ToTempSummon()) { - losCenter = tempSummon->GetSummonerGameObject(); + castedByGameobject = tempSummon->GetSummonerGameObject() != nullptr; } } - if (losCenter) + if (castedByGameobject) { // If spell casted by gameobject then ignore M2 models losChecks &= ~LINEOFSIGHT_CHECK_GOBJECT_M2; } - else - { - losCenter = m_caster; - } - if (!losCenter->IsWithinLOS(x, y, z, VMAP::ModelIgnoreFlags::M2, LineOfSightChecks((losChecks)))) + if (!m_caster->IsWithinLOS(x, y, z, VMAP::ModelIgnoreFlags::M2, LineOfSightChecks((losChecks)))) { return SPELL_FAILED_LINE_OF_SIGHT; } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 7e8d14e30..1da9bb2bd 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -244,7 +244,8 @@ public: enum MograineEvents { EVENT_SPELL_CRUSADER_STRIKE = 1, - EVENT_SPELL_HAMMER_OF_JUSTICE = 2 + EVENT_SPELL_HAMMER_OF_JUSTICE = 2, + EVENT_PULL_CATHEDRAL = 3 }; enum WhitemaneEvents @@ -285,6 +286,8 @@ enum Says SAY_WH_RESURRECT = 2, }; +float const CATHEDRAL_PULL_RANGE = 80.0f; // Distance from the Cathedral doors to where Mograine is standing + class npc_mograine : public CreatureScript { public: @@ -357,6 +360,22 @@ public: } } + void PullCathedral() // CallForHelp will ignore any npcs without LOS + { + std::list creatureList; + GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_MONK, CATHEDRAL_PULL_RANGE); + GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_ABBOT, CATHEDRAL_PULL_RANGE); + GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_CHAMPION, CATHEDRAL_PULL_RANGE); + GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_CENTURION, CATHEDRAL_PULL_RANGE); + GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_WIZARD, CATHEDRAL_PULL_RANGE); + GetCreatureListWithEntryInGrid(creatureList, me, NPC_SCARLET_CHAPLAIN, CATHEDRAL_PULL_RANGE); + for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) + { + if (Creature* creature = *itr) + creature->AI()->AttackStart(me->GetVictim()); + } + } + void Reset() override { //Incase wipe during phase that mograine fake death @@ -392,8 +411,8 @@ public: void EnterCombat(Unit* /*who*/) override { Talk(SAY_MO_AGGRO); - me->CallForHelp(150.0f); me->CastSpell(me, SPELL_RETRIBUTION_AURA, true); + events.ScheduleEvent(EVENT_PULL_CATHEDRAL, 1000); // Has to be done via event, otherwise mob aggroing Mograine DOES NOT aggro the room events.ScheduleEvent(EVENT_SPELL_CRUSADER_STRIKE, urand(1000, 5000)); events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, urand(6000, 11000)); } @@ -496,6 +515,9 @@ public: me->CastSpell(me->GetVictim(), SPELL_HAMMER_OF_JUSTICE, true); events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 60000); break; + case EVENT_PULL_CATHEDRAL: + PullCathedral(); + break; } } DoMeleeAttackIfReady(); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp index 83e25a6c7..b75928c48 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp @@ -30,7 +30,8 @@ enum Spells { SPELL_FROSTBREATH = 16099, SPELL_MASSIVEGEYSER = 22421, - SPELL_SLAM = 24326 + SPELL_SLAM = 24326, + SPELL_THRASH = 3417 // Triggers 3391 }; enum Events @@ -40,7 +41,7 @@ enum Events EVENT_SLAM = 3 }; -class boss_gahzranka : public CreatureScript // gahzranka +class boss_gahzranka : public CreatureScript { public: boss_gahzranka() : CreatureScript("boss_gahzranka") { } @@ -62,9 +63,10 @@ public: void EnterCombat(Unit* /*who*/) override { _EnterCombat(); + me->AddAura(SPELL_THRASH, me); events.ScheduleEvent(EVENT_FROSTBREATH, 8000); events.ScheduleEvent(EVENT_MASSIVEGEYSER, 25000); - events.ScheduleEvent(EVENT_SLAM, 17000); + events.ScheduleEvent(EVENT_SLAM, 15000); } void UpdateAI(uint32 diff) override @@ -82,11 +84,11 @@ public: switch (eventId) { case EVENT_FROSTBREATH: - DoCastVictim(SPELL_FROSTBREATH, true); - events.ScheduleEvent(EVENT_FROSTBREATH, urand(7000, 11000)); + DoCastVictim(SPELL_FROSTBREATH); + events.ScheduleEvent(EVENT_FROSTBREATH, urand(8000, 20000)); break; case EVENT_MASSIVEGEYSER: - DoCastVictim(SPELL_MASSIVEGEYSER, true); + DoCastVictim(SPELL_MASSIVEGEYSER); events.ScheduleEvent(EVENT_MASSIVEGEYSER, urand(22000, 32000)); break; case EVENT_SLAM: diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index 74be364eb..0c7fef454 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -29,13 +29,16 @@ EndScriptData */ enum Spells { SPELL_AVATAR = 24646, // Enrage Spell - SPELL_GROUND_TREMOR = 6524 + SPELL_GROUND_TREMOR = 6524, + SPELL_ENTANGLING_ROOTS = 24648 }; enum Events { EVENT_AVATAR = 1, - EVENT_GROUND_TREMOR = 2 + EVENT_GROUND_TREMOR = 2, + EVENT_START_PURSUIT = 3, + EVENT_ENTANGLING_ROOTS = 4 }; class boss_grilek : public CreatureScript // grilek @@ -45,23 +48,16 @@ public: struct boss_grilekAI : public BossAI { - boss_grilekAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { } - - void Reset() override + boss_grilekAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { - _Reset(); - } - - void JustDied(Unit* /*killer*/) override - { - _JustDied(); } void EnterCombat(Unit* /*who*/) override { _EnterCombat(); - events.ScheduleEvent(EVENT_AVATAR, urand(15000, 25000)); - events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(15000, 25000)); + events.ScheduleEvent(EVENT_AVATAR, 20s, 30s); + events.ScheduleEvent(EVENT_GROUND_TREMOR, 15s, 25s); + events.ScheduleEvent(EVENT_ENTANGLING_ROOTS, 5s, 15s); } void UpdateAI(uint32 diff) override @@ -80,19 +76,21 @@ public: { case EVENT_AVATAR: DoCast(me, SPELL_AVATAR); - if (Unit* victim = me->GetVictim()) - { - if (DoGetThreat(victim)) - DoModifyThreatPercent(victim, -50); - } - - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1)) - AttackStart(target); - events.ScheduleEvent(EVENT_AVATAR, urand(25000, 35000)); + DoResetThreat(); + me->SetReactState(REACT_PASSIVE); + events.ScheduleEvent(EVENT_START_PURSUIT, 2s); + events.ScheduleEvent(EVENT_AVATAR, 45s, 50s); break; case EVENT_GROUND_TREMOR: DoCastVictim(SPELL_GROUND_TREMOR, true); - events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(12000, 16000)); + events.ScheduleEvent(EVENT_GROUND_TREMOR, 12s, 16s); + break; + case EVENT_START_PURSUIT: + me->SetReactState(REACT_AGGRESSIVE); + break; + case EVENT_ENTANGLING_ROOTS: + DoCastVictim(SPELL_ENTANGLING_ROOTS); + events.ScheduleEvent(EVENT_ENTANGLING_ROOTS, 10s, 20s); break; default: break; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index 41fec401c..2eb62367a 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -34,15 +34,15 @@ enum Say enum Spells { SPELL_BRAINWASHTOTEM = 24262, - SPELL_POWERFULLHEALINGWARD = 24309, // HACKED Totem summoned by script because the spell totems will not cast. + SPELL_POWERFULLHEALINGWARD = 24309, SPELL_HEX = 24053, SPELL_DELUSIONSOFJINDO = 24306, - SPELL_SHADEOFJINDO = 24308, // HACKED //Healing Ward Spell - SPELL_HEAL = 38588, // HACKED Totems are not working right. Right heal spell ID is 24311 but this spell is not casting... + SPELL_HEAL = 24311, //Shade of Jindo Spell - SPELL_SHADOWSHOCK = 19460, - SPELL_INVISIBLE = 24699 + SPELL_SHADEOFJINDO_PASSIVE = 24307, + SPELL_SHADEOFJINDO_VISUAL = 24313, + SPELL_SHADOWSHOCK = 19460 }; enum Events @@ -104,9 +104,8 @@ public: DoCast(me, SPELL_BRAINWASHTOTEM); events.ScheduleEvent(EVENT_BRAINWASHTOTEM, urand(18000, 26000)); break; - case EVENT_POWERFULLHEALINGWARD: // HACK - //DoCast(me, SPELL_POWERFULLHEALINGWARD); - me->SummonCreature(14987, me->GetPositionX() + 3, me->GetPositionY() - 2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + case EVENT_POWERFULLHEALINGWARD: + DoCastSelf(SPELL_POWERFULLHEALINGWARD, true); events.ScheduleEvent(EVENT_POWERFULLHEALINGWARD, urand(14000, 20000)); break; case EVENT_HEX: @@ -251,7 +250,8 @@ public: void Reset() override { ShadowShock_Timer = 1000; - DoCast(me, SPELL_INVISIBLE, true); + DoCastSelf(SPELL_SHADEOFJINDO_PASSIVE, true); + DoCastSelf(SPELL_SHADEOFJINDO_VISUAL, true); } void EnterCombat(Unit* /*who*/) override { } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 58c0a87fc..e049edcc5 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -15,34 +15,32 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Thekal -SD%Complete: 95 -SDComment: Almost finished. -SDCategory: Zul'Gurub -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "TaskScheduler.h" #include "zulgurub.h" enum Says { SAY_AGGRO = 0, - SAY_DEATH = 1 + SAY_DEATH = 1, + + EMOTE_ZEALOT_DIES = 0, + EMOTE_THEKAL_DIES = 2 }; enum Spells { - SPELL_MORTALCLEAVE = 22859, // Phase 1 - SPELL_SILENCE = 22666, // Phase 1 - SPELL_TIGER_FORM = 24169, // Phase 1 - SPELL_RESURRECT = 24173, // Phase 1 // Not used in script. - SPELL_FRENZY = 8269, // Phase 2 - SPELL_FORCEPUNCH = 24189, // Phase 2 - SPELL_CHARGE = 24193, // Phase 2 - SPELL_ENRAGE = 8269, // Phase 2 - SPELL_SUMMONTIGERS = 24183, // Phase 2 + SPELL_MORTALCLEAVE = 22859, + SPELL_SILENCE = 22666, + SPELL_TIGER_FORM = 24169, + SPELL_RESURRECT = 24173, + SPELL_FRENZY = 8269, + SPELL_FORCEPUNCH = 24189, + SPELL_CHARGE = 24193, + SPELL_ENRAGE = 8269, + SPELL_SUMMONTIGERS = 24183, + // Zealot Lor'Khan Spells SPELL_SHIELD = 20545, SPELL_BLOODLUST = 24185, @@ -56,23 +54,9 @@ enum Spells SPELL_BLIND = 21060 }; -enum Events +enum Actions { - EVENT_MORTALCLEAVE = 1, // Phase 1 - EVENT_SILENCE = 2, // Phase 1 - EVENT_CHECK_TIMER = 3, // Phase 1 - EVENT_RESURRECT_TIMER = 4, // Phase 1 - EVENT_FRENZY = 5, // Phase 2 - EVENT_FORCEPUNCH = 6, // Phase 2 - EVENT_SPELL_CHARGE = 7, // Phase 2 - EVENT_ENRAGE = 8, // Phase 2 - EVENT_SUMMONTIGERS = 9 // Phase 2 -}; - -enum Phases -{ - PHASE_ONE = 1, - PHASE_TWO = 2 + ACTION_RESSURRECT = 1 }; class boss_thekal : public CreatureScript @@ -82,170 +66,240 @@ public: struct boss_thekalAI : public BossAI { - boss_thekalAI(Creature* creature) : BossAI(creature, DATA_THEKAL) { } + boss_thekalAI(Creature* creature) : BossAI(creature, DATA_THEKAL) + { + Initialize(); + } bool Enraged; bool WasDead; - void Reset() override + void Initialize() { - if (events.IsInPhase(PHASE_TWO)) - me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 35.0f, false); // hack - _Reset(); Enraged = false; WasDead = false; + _lorkhanDied = false; + _zathDied = false; + } + + void Reset() override + { + _Reset(); + Initialize(); + + me->SetStandState(UNIT_STAND_STATE_STAND); + me->SetReactState(REACT_AGGRESSIVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (Creature* zealot = instance->GetCreature(DATA_LORKHAN)) + { + zealot->AI()->Reset(); + zealot->ResetFaction(); + } + + if (Creature* zealot = instance->GetCreature(DATA_ZATH)) + { + zealot->AI()->Reset(); + zealot->ResetFaction(); + } + + // TODO: do this in formations, once a flag is added to prevent leaders from respawning as well. + std::list creatureList; + GetCreatureListWithEntryInGrid(creatureList, me, NPC_ZULGURUB_TIGER, 15.0f); + + if (_catGuids.empty()) + { + for (Creature* creature : creatureList) + { + _catGuids.push_back(creature->GetGUID()); + if (!creature->IsAlive()) + { + creature->Respawn(true); + } + } + } + else + { + for (ObjectGuid guid : _catGuids) + { + if (Creature* creature = ObjectAccessor::GetCreature(*me, guid)) + { + if (!creature->IsAlive()) + { + creature->Respawn(true); + } + } + } + } + + _scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); } void JustDied(Unit* /*killer*/) override { _JustDied(); Talk(SAY_DEATH); + + if (Creature* zealot = instance->GetCreature(DATA_LORKHAN)) + { + zealot->Kill(zealot, zealot); + } + + if (Creature* zealot = instance->GetCreature(DATA_ZATH)) + { + zealot->Kill(zealot, zealot); + } } void EnterCombat(Unit* /*who*/) override { _EnterCombat(); - events.ScheduleEvent(EVENT_MORTALCLEAVE, 4000, 0, PHASE_ONE); // Phase 1 - events.ScheduleEvent(EVENT_SILENCE, 9000, 0, PHASE_ONE); // Phase 1 - events.ScheduleEvent(EVENT_CHECK_TIMER, 10000, 0, PHASE_ONE); // Phase 1 - events.ScheduleEvent(EVENT_RESURRECT_TIMER, 10000, 0, PHASE_ONE); // Phase 1 - Talk(SAY_AGGRO); + + _scheduler.CancelAll(); + _scheduler.Schedule(4s, [this](TaskContext context) { + DoCastVictim(SPELL_MORTALCLEAVE); + context.Repeat(15s, 20s); + }).Schedule(9s, [this](TaskContext context) { + DoCastVictim(SPELL_SILENCE); + context.Repeat(20s, 25s); + }).Schedule(16s, [this](TaskContext context) { + DoCastSelf(SPELL_BLOODLUST); + context.Repeat(20s, 28s); + }); } - void JustReachedHome() override + void SetData(uint32 /*type*/, uint32 data) override { - instance->SetBossState(DATA_THEKAL, NOT_STARTED); + UpdateZealotStatus(data, true); + CheckPhaseTransition(); + + _scheduler.Schedule(10s, [this, data](TaskContext /*context*/) { + if ((!_lorkhanDied || !_zathDied) && !WasDead) + { + ReviveZealot(data); + } + }); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override + { + if (!WasDead && damage >= me->GetHealth()) + { + damage = me->GetHealth() - 1; + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetReactState(REACT_PASSIVE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->AttackStop(); + WasDead = true; + CheckPhaseTransition(); + Talk(EMOTE_THEKAL_DIES); + } + + if (!Enraged && me->HealthBelowPctDamaged(20, damage) && me->GetEntry() != NPC_HIGH_PRIEST_THEKAL) + { + DoCastSelf(SPELL_ENRAGE); + Enraged = true; + } + } + + void DoAction(int32 action) override + { + if (action == ACTION_RESSURRECT) + { + me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->ResetFaction(); + me->SetReactState(REACT_AGGRESSIVE); + me->SetFullHealth(); + WasDead = false; + } } void UpdateAI(uint32 diff) override { - if (!UpdateVictim()) + if (me->GetReactState() != REACT_PASSIVE && !UpdateVictim()) return; - events.Update(diff); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_MORTALCLEAVE: - DoCastVictim(SPELL_MORTALCLEAVE, true); - events.ScheduleEvent(EVENT_MORTALCLEAVE, urand(15000, 20000), 0, PHASE_ONE); - break; - case EVENT_SILENCE: - DoCastVictim(SPELL_SILENCE, true); - events.ScheduleEvent(EVENT_SILENCE, urand(20000, 25000), 0, PHASE_ONE); - break; - case EVENT_RESURRECT_TIMER: - //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. - if (WasDead) - { - DoCast(me, SPELL_TIGER_FORM); // SPELL_AURA_TRANSFORM - me->SetObjectScale(2.00f); - me->SetStandState(UNIT_STAND_STATE_STAND); - me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - /* - const CreatureTemplate* cinfo = me->GetCreatureTemplate(); - me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40))); - me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); - me->UpdateDamagePhysical(BASE_ATTACK); - */ - me->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_PCT, 40.0f, true); // hack - DoResetThreat(); - events.ScheduleEvent(EVENT_FRENZY, 30000, 0, PHASE_TWO); // Phase 2 - events.ScheduleEvent(EVENT_FORCEPUNCH, 4000, 0, PHASE_TWO); // Phase 2 - events.ScheduleEvent(EVENT_SPELL_CHARGE, 12000, 0, PHASE_TWO); // Phase 2 - events.ScheduleEvent(EVENT_ENRAGE, 32000, 0, PHASE_TWO); // Phase 2 - events.ScheduleEvent(EVENT_SUMMONTIGERS, 25000, 0, PHASE_TWO); // Phase 2 - events.SetPhase(PHASE_TWO); - } - events.ScheduleEvent(EVENT_RESURRECT_TIMER, 10000, 0, PHASE_ONE); - break; - case EVENT_CHECK_TIMER: - //Check_Timer for the death of LorKhan and Zath. - if (!WasDead) - { - if (instance->GetBossState(DATA_LORKHAN) == SPECIAL) - { - //Resurrect LorKhan - if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_LORKHAN))) - { - pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pLorKhan->SetFaction(FACTION_MONSTER); - pLorKhan->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->SetFullHealth(); - instance->SetData(DATA_LORKHAN, DONE); - } - } - - if (instance->GetBossState(DATA_ZATH) == SPECIAL) - { - //Resurrect Zath - if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH))) - { - pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pZath->SetFaction(FACTION_MONSTER); - pZath->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - pZath->SetFullHealth(); - instance->SetBossState(DATA_ZATH, DONE); - } - } - } - events.ScheduleEvent(EVENT_CHECK_TIMER, 5000, 0, PHASE_ONE); - break; - case EVENT_FRENZY: - DoCast(me, SPELL_FRENZY); - events.ScheduleEvent(EVENT_FRENZY, 30000, 0, PHASE_TWO); - break; - case EVENT_FORCEPUNCH: - DoCastVictim(SPELL_FORCEPUNCH, true); - events.ScheduleEvent(EVENT_FORCEPUNCH, urand(16000, 21000), 0, PHASE_TWO); - break; - case EVENT_CHARGE: - if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) - { - DoCast(target, SPELL_CHARGE); - DoResetThreat(); - AttackStart(target); - } - events.ScheduleEvent(EVENT_CHARGE, urand(15000, 22000), 0, PHASE_TWO); - break; - case EVENT_ENRAGE: - if (HealthBelowPct(11) && !Enraged) - { - DoCast(me, SPELL_ENRAGE); - Enraged = true; - } - events.ScheduleEvent(EVENT_ENRAGE, 30000); - break; - case EVENT_SUMMONTIGERS: - DoCastVictim(SPELL_SUMMONTIGERS, true); - events.ScheduleEvent(EVENT_SUMMONTIGERS, urand(10000, 14000), 0, PHASE_TWO); - break; - default: - break; - } - - if (me->IsFullHealth() && WasDead) - WasDead = false; - - if ((events.IsInPhase(PHASE_ONE)) && !WasDead && !HealthAbovePct(5)) - { - me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); - me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); - me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_SLEEP); - me->AttackStop(); - instance->SetBossState(DATA_THEKAL, SPECIAL); - WasDead = true; - } - } - DoMeleeAttackIfReady(); + _scheduler.Update(diff, + std::bind(&BossAI::DoMeleeAttackIfReady, this)); } + + void ReviveZealot(uint32 zealotData) + { + if (Creature* zealot = instance->GetCreature(zealotData)) + { + zealot->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + zealot->ResetFaction(); + zealot->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + zealot->SetReactState(REACT_AGGRESSIVE); + zealot->SetFullHealth(); + UpdateZealotStatus(zealotData, false); + } + } + + void UpdateZealotStatus(uint32 data, bool dead) + { + if (data == DATA_LORKHAN) + { + _lorkhanDied = dead; + } + else if (data == DATA_ZATH) + { + _zathDied = dead; + } + } + + void CheckPhaseTransition() + { + if (WasDead && _lorkhanDied && _zathDied) + { + _scheduler.Schedule(3s, [this](TaskContext /*context*/) { + Talk(SAY_AGGRO); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + DoResetThreat(); + + _scheduler.Schedule(6s, [this](TaskContext /*context*/) { + DoCastSelf(SPELL_TIGER_FORM); + me->SetReactState(REACT_AGGRESSIVE); + + _scheduler.Schedule(30s, [this](TaskContext context) { + DoCastSelf(SPELL_FRENZY); + context.Repeat(); + }).Schedule(4s, [this](TaskContext context) { + DoCastVictim(SPELL_FORCEPUNCH); + context.Repeat(16s, 21s); + }).Schedule(12s, [this](TaskContext context) { + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) + { + DoCast(target, SPELL_CHARGE); + DoResetThreat(); + AttackStart(target); + } + context.Repeat(15s, 22s); + }).Schedule(25s, [this](TaskContext context) { + DoCastVictim(SPELL_SUMMONTIGERS, true); + context.Repeat(10s, 14s); + }); + }); + }); + } + else + { + _scheduler.Schedule(10s, [this](TaskContext /*context*/) { + DoAction(ACTION_RESSURRECT); + }); + } + } + + private: + TaskScheduler _scheduler; + GuidVector _catGuids; + bool _lorkhanDied; + bool _zathDied; }; CreatureAI* GetAI(Creature* creature) const override @@ -254,7 +308,6 @@ public: } }; -//Zealot Lor'Khan class npc_zealot_lorkhan : public CreatureScript { public: @@ -267,138 +320,86 @@ public: instance = creature->GetInstanceScript(); } - uint32 Shield_Timer; - uint32 BloodLust_Timer; - uint32 GreaterHeal_Timer; - uint32 Disarm_Timer; - uint32 Check_Timer; - - bool FakeDeath; - InstanceScript* instance; void Reset() override { - Shield_Timer = 1000; - BloodLust_Timer = 16000; - GreaterHeal_Timer = 32000; - Disarm_Timer = 6000; - Check_Timer = 10000; - - FakeDeath = false; - - instance->SetBossState(DATA_LORKHAN, NOT_STARTED); - me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetReactState(REACT_AGGRESSIVE); + + _scheduler.CancelAll(); + + _scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING) && !me->HasReactState(REACT_PASSIVE); + }); } void EnterCombat(Unit* /*who*/) override { + _scheduler.Schedule(1s, [this](TaskContext context) { + DoCastSelf(SPELL_SHIELD); + context.Repeat(1min); + }).Schedule(32s, [this](TaskContext context) { + Unit* thekal = instance->GetCreature(DATA_THEKAL); + Unit* zath = instance->GetCreature(DATA_ZATH); + + if (!thekal || !zath) + return; + + if ((me->GetHealthPct() <= thekal->GetHealthPct()) || (me->GetHealthPct() <= zath->GetHealthPct())) + { + DoCastSelf(SPELL_GREATERHEAL); + } + else if (zath->GetHealthPct() <= thekal->GetHealthPct()) + { + DoCast(zath, SPELL_GREATERHEAL); + } + else + { + DoCast(thekal, SPELL_GREATERHEAL); + } + + context.Repeat(15s, 20s); + }).Schedule(6s, [this](TaskContext context) { + DoCastVictim(SPELL_DISARM); + context.Repeat(15s, 25s); + }); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override + { + if (damage >= me->GetHealth() && me->HasReactState(REACT_AGGRESSIVE)) + { + Talk(EMOTE_ZEALOT_DIES); + me->RemoveAllAuras(); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->SetReactState(REACT_PASSIVE); + me->InterruptNonMeleeSpells(false); + me->AttackStop(); + + damage = 0; + + if (Creature* thekal = instance->GetCreature(DATA_THEKAL)) + { + thekal->AI()->SetData(ACTION_RESSURRECT, DATA_LORKHAN); + } + } } void UpdateAI(uint32 diff) override { - if (!UpdateVictim()) + if (me->GetReactState() != REACT_PASSIVE && !UpdateVictim()) return; - //Shield_Timer - if (Shield_Timer <= diff) - { - DoCast(me, SPELL_SHIELD); - Shield_Timer = 61000; - } - else Shield_Timer -= diff; - - //BloodLust_Timer - if (BloodLust_Timer <= diff) - { - DoCast(me, SPELL_BLOODLUST); - BloodLust_Timer = 20000 + rand() % 8000; - } - else BloodLust_Timer -= diff; - - //Casting Greaterheal to Thekal or Zath if they are in meele range. - if (GreaterHeal_Timer <= diff) - { - Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_THEKAL)); - Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH)); - - if (!pThekal || !pZath) - return; - - switch (urand(0, 1)) - { - case 0: - if (me->IsWithinMeleeRange(pThekal)) - DoCast(pThekal, SPELL_GREATERHEAL); - break; - case 1: - if (me->IsWithinMeleeRange(pZath)) - DoCast(pZath, SPELL_GREATERHEAL); - break; - } - - GreaterHeal_Timer = 15000 + rand() % 5000; - } - else GreaterHeal_Timer -= diff; - - //Disarm_Timer - if (Disarm_Timer <= diff) - { - DoCastVictim(SPELL_DISARM); - Disarm_Timer = 15000 + rand() % 10000; - } - else Disarm_Timer -= diff; - - //Check_Timer for the death of LorKhan and Zath. - if (!FakeDeath && Check_Timer <= diff) - { - if (instance->GetBossState(DATA_THEKAL) == SPECIAL) - { - //Resurrect Thekal - if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_THEKAL))) - { - pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pThekal->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - pThekal->SetFaction(FACTION_MONSTER); - pThekal->SetFullHealth(); - } - } - - if (instance->GetBossState(DATA_ZATH) == SPECIAL) - { - //Resurrect Zath - if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH))) - { - pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pZath->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - pZath->SetFaction(FACTION_MONSTER); - pZath->SetFullHealth(); - } - } - - Check_Timer = 5000; - } - else Check_Timer -= diff; - - if (!HealthAbovePct(5)) - { - me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); - me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); - me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_SLEEP); - me->SetFaction(FACTION_FRIENDLY); - me->AttackStop(); - - instance->SetBossState(DATA_LORKHAN, SPECIAL); - - FakeDeath = true; - } - - DoMeleeAttackIfReady(); + _scheduler.Update(diff, + std::bind(&ScriptedAI::DoMeleeAttackIfReady, this)); } + + private: + TaskScheduler _scheduler; }; CreatureAI* GetAI(Creature* creature) const override @@ -407,14 +408,10 @@ public: } }; -//Zealot Zath class npc_zealot_zath : public CreatureScript { public: - npc_zealot_zath() - : CreatureScript("npc_zealot_zath") - { - } + npc_zealot_zath() : CreatureScript("npc_zealot_zath") { } struct npc_zealot_zathAI : public ScriptedAI { @@ -423,135 +420,82 @@ public: instance = creature->GetInstanceScript(); } - uint32 SweepingStrikes_Timer; - uint32 SinisterStrike_Timer; - uint32 Gouge_Timer; - uint32 Kick_Timer; - uint32 Blind_Timer; - uint32 Check_Timer; - - bool FakeDeath; - InstanceScript* instance; void Reset() override { - SweepingStrikes_Timer = 13000; - SinisterStrike_Timer = 8000; - Gouge_Timer = 25000; - Kick_Timer = 18000; - Blind_Timer = 5000; - Check_Timer = 10000; - - FakeDeath = false; - - instance->SetBossState(DATA_ZATH, NOT_STARTED); - me->SetStandState(UNIT_STAND_STATE_STAND); me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetReactState(REACT_AGGRESSIVE); + + _scheduler.CancelAll(); + + _scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING) && !me->HasReactState(REACT_PASSIVE); + }); } void EnterCombat(Unit* /*who*/) override { + _scheduler.Schedule(13s, [this](TaskContext context) { + DoCastSelf(SPELL_SWEEPINGSTRIKES); + context.Repeat(1min); + }).Schedule(16s, [this](TaskContext context) { + DoCastSelf(SPELL_BLOODLUST); + context.Repeat(22s, 26s); + }).Schedule(8s, [this](TaskContext context) { + DoCastVictim(SPELL_SINISTERSTRIKE); + context.Repeat(8s, 16s); + }).Schedule(25s, [this](TaskContext context) { + DoCastVictim(SPELL_GOUGE); + + if (DoGetThreat(me->GetVictim())) + { + DoModifyThreatPercent(me->GetVictim(), -100); + } + + context.Repeat(17s, 27s); + }).Schedule(18s, [this](TaskContext context) { + DoCastVictim(SPELL_KICK); + context.Repeat(15s, 25s); + }).Schedule(5s, [this](TaskContext context) { + DoCastVictim(SPELL_BLIND); + context.Repeat(10s, 20s); + }); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override + { + if (damage >= me->GetHealth() && me->HasReactState(REACT_AGGRESSIVE)) + { + Talk(EMOTE_ZEALOT_DIES); + me->RemoveAllAuras(); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetStandState(UNIT_STAND_STATE_SLEEP); + me->SetReactState(REACT_PASSIVE); + me->AttackStop(); + + damage = 0; + + if (Creature* thekal = instance->GetCreature(DATA_THEKAL)) + { + thekal->AI()->SetData(ACTION_RESSURRECT, DATA_ZATH); + } + } } void UpdateAI(uint32 diff) override { - if (!UpdateVictim()) + if (me->GetReactState() != REACT_PASSIVE && !UpdateVictim()) return; - //SweepingStrikes_Timer - if (SweepingStrikes_Timer <= diff) - { - DoCastVictim(SPELL_SWEEPINGSTRIKES); - SweepingStrikes_Timer = 22000 + rand() % 4000; - } - else SweepingStrikes_Timer -= diff; - - //SinisterStrike_Timer - if (SinisterStrike_Timer <= diff) - { - DoCastVictim(SPELL_SINISTERSTRIKE); - SinisterStrike_Timer = 8000 + rand() % 8000; - } - else SinisterStrike_Timer -= diff; - - //Gouge_Timer - if (Gouge_Timer <= diff) - { - DoCastVictim(SPELL_GOUGE); - - if (DoGetThreat(me->GetVictim())) - DoModifyThreatPercent(me->GetVictim(), -100); - - Gouge_Timer = 17000 + rand() % 10000; - } - else Gouge_Timer -= diff; - - //Kick_Timer - if (Kick_Timer <= diff) - { - DoCastVictim(SPELL_KICK); - Kick_Timer = 15000 + rand() % 10000; - } - else Kick_Timer -= diff; - - //Blind_Timer - if (Blind_Timer <= diff) - { - DoCastVictim(SPELL_BLIND); - Blind_Timer = 10000 + rand() % 10000; - } - else Blind_Timer -= diff; - - //Check_Timer for the death of LorKhan and Zath. - if (!FakeDeath && Check_Timer <= diff) - { - if (instance->GetBossState(DATA_LORKHAN) == SPECIAL) - { - //Resurrect LorKhan - if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_LORKHAN))) - { - pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pLorKhan->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->SetFaction(FACTION_MONSTER); - pLorKhan->SetFullHealth(); - } - } - - if (instance->GetBossState(DATA_THEKAL) == SPECIAL) - { - //Resurrect Thekal - if (Unit* pThekal = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_THEKAL))) - { - pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - pThekal->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - pThekal->SetFaction(FACTION_MONSTER); - pThekal->SetFullHealth(); - } - } - - Check_Timer = 5000; - } - else Check_Timer -= diff; - - if (!HealthAbovePct(5)) - { - me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); - me->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE); - me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); - me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - me->SetStandState(UNIT_STAND_STATE_SLEEP); - me->SetFaction(FACTION_FRIENDLY); - me->AttackStop(); - - instance->SetBossState(DATA_ZATH, SPECIAL); - - FakeDeath = true; - } - - DoMeleeAttackIfReady(); + _scheduler.Update(diff, + std::bind(&ScriptedAI::DoMeleeAttackIfReady, this)); } + + private: + TaskScheduler _scheduler; }; CreatureAI* GetAI(Creature* creature) const override diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index 91c7bd67f..eee9e00cb 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -29,7 +29,14 @@ EndScriptData */ DoorData const doorData[] = { { GO_FORCEFIELD, DATA_ARLOKK, DOOR_TYPE_ROOM }, - { 0, 0, DOOR_TYPE_ROOM } // END + { 0, 0, DOOR_TYPE_ROOM } +}; + +ObjectData const creatureData[] = +{ + { NPC_HIGH_PRIEST_THEKAL, DATA_THEKAL }, + { NPC_ZEALOT_LORKHAN, DATA_LORKHAN }, + { NPC_ZEALOT_ZATH, DATA_ZATH } }; class instance_zulgurub : public InstanceMapScript @@ -43,21 +50,15 @@ public: { SetBossNumber(EncounterCount); LoadDoorData(doorData); + LoadObjectData(creatureData, nullptr); } void OnCreatureCreate(Creature* creature) override { + InstanceScript::OnCreatureCreate(creature); + switch (creature->GetEntry()) { - case NPC_ZEALOT_LORKHAN: - _zealotLorkhanGUID = creature->GetGUID(); - break; - case NPC_ZEALOT_ZATH: - _zealotZathGUID = creature->GetGUID(); - break; - case NPC_HIGH_PRIEST_THEKAL: - _highPriestTekalGUID = creature->GetGUID(); - break; case NPC_JINDO_THE_HEXXER: _jindoTheHexxerGUID = creature->GetGUID(); break; @@ -75,11 +76,10 @@ public: void OnGameObjectCreate(GameObject* go) override { + InstanceScript::OnGameObjectCreate(go); + switch (go->GetEntry()) { - case GO_FORCEFIELD: - AddDoor(go, true); - break; case GO_GONG_OF_BETHEKK: _goGongOfBethekkGUID = go->GetGUID(); if (GetBossState(DATA_ARLOKK) == DONE) @@ -92,28 +92,10 @@ public: } } - void OnGameObjectRemove(GameObject* go) override - { - switch (go->GetEntry()) - { - case GO_FORCEFIELD: - AddDoor(go, false); - break; - default: - break; - } - } - ObjectGuid GetGuidData(uint32 uiData) const override { switch (uiData) { - case DATA_LORKHAN: - return _zealotLorkhanGUID; - case DATA_ZATH: - return _zealotZathGUID; - case DATA_THEKAL: - return _highPriestTekalGUID; case DATA_JINDO: return _jindoTheHexxerGUID; case NPC_ARLOKK: @@ -170,12 +152,9 @@ public: OUT_LOAD_INST_DATA_COMPLETE; } private: - //If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too. - //Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for healfunction too. + // If all High Priest bosses were killed. Ohgan is added too. + // Jindo is needed for healfunction. - ObjectGuid _zealotLorkhanGUID; - ObjectGuid _zealotZathGUID; - ObjectGuid _highPriestTekalGUID; ObjectGuid _jindoTheHexxerGUID; ObjectGuid _vilebranchSpeakerGUID; ObjectGuid _arlokkGUID; diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h index 00a8e20cb..8c44120d1 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h +++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h @@ -58,7 +58,8 @@ enum CreatureIds NPC_OHGAN = 14988, // Mandokir Event NPC_VILEBRANCH_SPEAKER = 11391, // Mandokir Event NPC_CHAINED_SPIRT = 15117, // Mandokir Event - NPC_HAKKAR = 14834 + NPC_HAKKAR = 14834, + NPC_ZULGURUB_TIGER = 11361 }; enum GameobjectIds diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index 609e3d7b1..13ea19874 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -1045,9 +1045,9 @@ public: if (reportUse) { uint32 gossipId = me->GetGOInfo()->GetGossipMenuId(); - bool _twilightSetAura = (player->HasAura(AURA_TWILIGHT_SET, player->GetGUID()) ? true : false); - bool _medallionAura = (player->HasAura(AURA_MEDALLION, player->GetGUID()) ? true : false); - bool _ringAura = (player->HasAura(AURA_RING, player->GetGUID()) ? true : false); + bool _twilightSetAura = (player->HasAura(AURA_TWILIGHT_SET, player->GetGUID())); + bool _medallionAura = (player->HasAura(AURA_MEDALLION, player->GetGUID())); + bool _ringAura = (player->HasAura(AURA_RING, player->GetGUID())); switch (gossipId) { diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index 506e84d8c..376c1ec4d 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -34,157 +34,155 @@ enum LeviathanSpells { // Leviathan basic - SPELL_PURSUED = 62374, - SPELL_GATHERING_SPEED = 62375, - SPELL_BATTERING_RAM = 62376, - SPELL_FLAME_VENTS = 62396, - SPELL_MISSILE_BARRAGE = 62400, - SPELL_NAPALM_10 = 63666, - SPELL_NAPALM_25 = 65026, - SPELL_INVIS_AND_STEALTH_DETECT = 18950, - SPELL_TRANSITUS_SHIELD_IMPACT = 48387, + SPELL_PURSUED = 62374, + SPELL_GATHERING_SPEED = 62375, + SPELL_BATTERING_RAM = 62376, + SPELL_FLAME_VENTS = 62396, + SPELL_MISSILE_BARRAGE = 62400, + SPELL_NAPALM_10 = 63666, + SPELL_NAPALM_25 = 65026, + SPELL_INVIS_AND_STEALTH_DETECT = 18950, + SPELL_TRANSITUS_SHIELD_IMPACT = 48387, // Shutdown spells - SPELL_SYSTEMS_SHUTDOWN = 62475, - SPELL_OVERLOAD_CIRCUIT = 62399, + SPELL_SYSTEMS_SHUTDOWN = 62475, + SPELL_OVERLOAD_CIRCUIT = 62399, // hard mode - SPELL_TOWER_OF_STORMS = 65076, - SPELL_TOWER_OF_FLAMES = 65075, - SPELL_TOWER_OF_FROST = 65077, - SPELL_TOWER_OF_LIFE = 64482, + SPELL_TOWER_OF_STORMS = 65076, + SPELL_TOWER_OF_FLAMES = 65075, + SPELL_TOWER_OF_FROST = 65077, + SPELL_TOWER_OF_LIFE = 64482, - SPELL_HODIRS_FURY = 62533, - SPELL_FREYA_WARD = 62906, // removed spawn effect - SPELL_MIMIRONS_INFERNO = 62909, - SPELL_THORIMS_HAMMER = 62911, + SPELL_HODIRS_FURY = 62533, + SPELL_FREYA_WARD = 62906, // removed spawn effect + SPELL_MIMIRONS_INFERNO = 62909, + SPELL_THORIMS_HAMMER = 62911, - SPELL_FREYA_DUMMY_BLUE = 63294, - SPELL_FREYA_DUMMY_GREEN = 63295, - SPELL_FREYA_DUMMY_YELLOW = 63292, + SPELL_FREYA_DUMMY_BLUE = 63294, + SPELL_FREYA_DUMMY_GREEN = 63295, + SPELL_FREYA_DUMMY_YELLOW = 63292, // Leviathan turret spell - SPELL_SEARING_FLAME = 62402, + SPELL_SEARING_FLAME = 62402, // On turret Destory - SPELL_SMOKE_TRAIL = 63575, + SPELL_SMOKE_TRAIL = 63575, // Pool of tar blaze - SPELL_BLAZE = 62292, + SPELL_BLAZE = 62292, // Pyrite - SPELL_LIQUID_PYRITE = 62494, - SPELL_DUSTY_EXPLOSION = 63360, - SPELL_DUST_CLOUD_IMPACT = 54740, + SPELL_LIQUID_PYRITE = 62494, + SPELL_DUSTY_EXPLOSION = 63360, + SPELL_DUST_CLOUD_IMPACT = 54740, }; enum GosNpcs { - NPC_FLAME_LEVIATHAN_TURRET = 33139, - NPC_SEAT = 33114, - NPC_MECHANOLIFT = 33214, - NPC_LIQUID = 33189, + NPC_FLAME_LEVIATHAN_TURRET = 33139, + NPC_SEAT = 33114, + NPC_MECHANOLIFT = 33214, + NPC_LIQUID = 33189, // Starting event - NPC_ULDUAR_COLOSSUS = 33237, - NPC_BRANN_RADIO = 34054, - NPC_ULDUAR_GAUNTLET_GENERATOR = 33571, - NPC_DEFENDER_GENERATED = 33572, + NPC_ULDUAR_COLOSSUS = 33237, + NPC_BRANN_RADIO = 34054, + NPC_ULDUAR_GAUNTLET_GENERATOR = 33571, + NPC_DEFENDER_GENERATED = 33572, // Hard Mode - NPC_THORIM_HAMMER_TARGET = 33364, - NPC_THORIM_HAMMER = 33365, - NPC_FREYA_WARD_TARGET = 33366, - NPC_FREYA_WARD = 33367, - NPC_MIMIRONS_INFERNO_TARGET = 33369, - NPC_MIMIRONS_INFERNO = 33370, - NPC_HODIRS_FURY_TARGET = 33108, - NPC_HODIRS_FURY = 33212, + NPC_THORIM_HAMMER_TARGET = 33364, + NPC_THORIM_HAMMER = 33365, + NPC_FREYA_WARD_TARGET = 33366, + NPC_FREYA_WARD = 33367, + NPC_MIMIRONS_INFERNO_TARGET = 33369, + NPC_MIMIRONS_INFERNO = 33370, + NPC_HODIRS_FURY_TARGET = 33108, + NPC_HODIRS_FURY = 33212, }; enum Events { - EVENT_PURSUE = 1, - EVENT_MISSILE, - EVENT_VENT, - EVENT_SPEED, - EVENT_SUMMON, - EVENT_REINSTALL, - EVENT_HODIRS_FURY, - EVENT_FREYA, - EVENT_MIMIRONS_INFERNO, - EVENT_THORIMS_HAMMER, - EVENT_SOUND_BEGINNING, - EVENT_POSITION_CHECK, + EVENT_PURSUE = 1, + EVENT_MISSILE = 2, + EVENT_VENT = 3, + EVENT_SPEED = 4, + EVENT_SUMMON = 5, + EVENT_REINSTALL = 6, + EVENT_HODIRS_FURY = 7, + EVENT_FREYA = 8, + EVENT_MIMIRONS_INFERNO = 9, + EVENT_THORIMS_HAMMER = 10, + EVENT_SOUND_BEGINNING = 11, + EVENT_POSITION_CHECK = 12, }; enum Texts { - FLAME_LEVIATHAN_SAY_AGGRO = 0, - FLAME_LEVIATHAN_SAY_SLAY, - FLAME_LEVIATHAN_SAY_DEATH, - FLAME_LEVIATHAN_SAY_PURSUE, - FLAME_LEVIATHAN_SAY_HARDMODE, - FLAME_LEVIATHAN_SAY_TOWER_NONE, - FLAME_LEVIATHAN_SAY_TOWER_FROST, - FLAME_LEVIATHAN_SAY_TOWER_FLAME, - FLAME_LEVIATHAN_SAY_TOWER_NATURE, - FLAME_LEVIATHAN_SAY_TOWER_STORM, - FLAME_LEVIATHAN_SAY_PLAYER_RIDING, - FLAME_LEVIATHAN_SAY_OVERLOAD, - FLAME_LEVIATHAN_EMOTE_PURSUE, - FLAME_LEVIATHAN_EMOTE_OVERLOAD, - FLAME_LEVIATHAN_EMOTE_REPAIR -}; + FLAME_LEVIATHAN_SAY_AGGRO = 0, + FLAME_LEVIATHAN_SAY_SLAY = 1, + FLAME_LEVIATHAN_SAY_DEATH = 2, + FLAME_LEVIATHAN_SAY_PURSUE = 3, + FLAME_LEVIATHAN_SAY_HARDMODE = 4, + FLAME_LEVIATHAN_SAY_TOWER_NONE = 5, + FLAME_LEVIATHAN_SAY_TOWER_FROST = 6, + FLAME_LEVIATHAN_SAY_TOWER_FLAME = 7, + FLAME_LEVIATHAN_SAY_TOWER_NATURE = 8, + FLAME_LEVIATHAN_SAY_TOWER_STORM = 9, + FLAME_LEVIATHAN_SAY_PLAYER_RIDING = 10, + FLAME_LEVIATHAN_SAY_OVERLOAD = 11, + FLAME_LEVIATHAN_EMOTE_PURSUE = 12, + FLAME_LEVIATHAN_EMOTE_OVERLOAD = 13, + FLAME_LEVIATHAN_EMOTE_REPAIR = 14, + FLAME_LEVIATHAN_EMOTE_FROST = 15, + FLAME_LEVIATHAN_EMOTE_FLAME = 16, + FLAME_LEVIATHAN_EMOTE_NATURE = 17, + FLAME_LEVIATHAN_EMOTE_STORM = 18, + FLAME_LEVIATHAN_EMOTE_REACTIVATE = 19, -enum Sounds -{ - RSOUND_L0 = 15807, - RSOUND_L1 = 15804, - RSOUND_L2 = 15805, - RSOUND_L3 = 15806, - RSOUND_ENGAGE = 15794, - RSOUND_SILOS = 15795, - RSOUND_GENERATORS = 15796, - RSOUND_HODIR = 15797, - RSOUND_FREYA = 15798, - RSOUND_MIMIRON = 15799, - RSOUND_THORIM = 15801, - RSOUND_STATION = 15803, + // NPC_BRANN_RADIO + BRANN_RADIO_SAY_FL_START_0 = 0, + BRANN_RADIO_SAY_FL_START_1 = 1, + BRANN_RADIO_SAY_FL_START_2 = 2, + BRANN_RADIO_SAY_GENERATORS = 3, + BRANN_RADIO_SAY_STATIONS = 4, + BRANN_RADIO_SAY_TOWER_THORIM = 5, + BRANN_RADIO_SAY_TOWER_HODIR = 6, + BRANN_RADIO_SAY_TOWER_FREYA = 7, + BRANN_RADIO_SAY_TOWER_MIMIRON = 8, + + // Vehicle Repair - Said by a spell, BroadcastTextID, same as FLAME_LEVIATHAN_EMOTE_REPAIR + VEHICLE_EMOTE_REPAIR = 33538, }; enum Seats { - SEAT_PLAYER = 0, - SEAT_TURRET = 1, - SEAT_DEVICE = 2, - SEAT_CANNON = 7, + SEAT_PLAYER = 0, + SEAT_TURRET = 1, + SEAT_DEVICE = 2, + SEAT_CANNON = 7, }; enum Misc { - DATA_EVENT_STARTED = 1, - DATA_GET_TOWER_COUNT = 2, - DATA_GET_SHUTDOWN = 3, + DATA_EVENT_STARTED = 1, + DATA_GET_TOWER_COUNT = 2, + DATA_GET_SHUTDOWN = 3, - TOWER_OF_STORMS = 2, - TOWER_OF_FLAMES = 1, - TOWER_OF_FROST = 3, - TOWER_OF_LIFE = 0, + TOWER_OF_STORMS = 2, + TOWER_OF_FLAMES = 1, + TOWER_OF_FROST = 3, + TOWER_OF_LIFE = 0, - ACTION_START_NORGANNON_EVENT = 1, - ACTION_START_NORGANNON_BRANN = 2, - ACTION_START_BRANN_EVENT = 3, - ACTION_DESPAWN_ADDS = 4, - ACTION_DELAY_CANNON = 5, - ACTION_DESTROYED_TURRET = 6, + ACTION_START_NORGANNON_EVENT = 1, + ACTION_START_NORGANNON_BRANN = 2, + ACTION_START_BRANN_EVENT = 3, + ACTION_DESPAWN_ADDS = 4, + ACTION_DELAY_CANNON = 5, + ACTION_DESTROYED_TURRET = 6, }; -const Position homePos = {322.39f, -14.5f, 409.8f, 3.14f}; -/////////////////////////////////////////// -// -// BOSS CODE -// -/////////////////////////////////////////// +const Position homePos = {322.39f, -14.5f, 409.8f, 3.14f}; class boss_flame_leviathan : public CreatureScript { @@ -217,7 +215,7 @@ public: // Custom void BindPlayers(); - void RadioSay(const char* text, uint32 soundId); + void RadioSay(uint8 textid); void ActivateTowers(); void TurnGates(bool _start, bool _death); void TurnHealStations(bool _apply); @@ -357,18 +355,18 @@ public: _speakTimer += diff; if (_speakTimer <= 10000) { - RadioSay("You've done it! You've broken the defenses of Ulduar. In a few moments, we will be dropping in to...", RSOUND_L1); _speakTimer = 10000; + RadioSay(BRANN_RADIO_SAY_FL_START_0); } else if (_speakTimer > 16000 && _speakTimer < 20000) { _speakTimer = 20000; - RadioSay("What is that? Be careful! Something's headed your way!", RSOUND_L2); + RadioSay(BRANN_RADIO_SAY_FL_START_1); } else if (_speakTimer > 24000 && _speakTimer < 40000) { _speakTimer = 40000; - RadioSay("Quicly! Evasive action! Evasive act--", RSOUND_L3); + RadioSay(BRANN_RADIO_SAY_FL_START_2); } else if (_speakTimer > 41000 && _speakTimer < 60000) { @@ -443,27 +441,27 @@ public: if (Unit* seat = vehicle->GetPassenger(i)) if (seat->GetTypeId() == TYPEID_UNIT) seat->ToCreature()->AI()->EnterEvadeMode(); - me->TextEmote("Flame Leviathan reactivated. Resumming combat functions.", nullptr, true); + Talk(FLAME_LEVIATHAN_EMOTE_REACTIVATE); return; case EVENT_THORIMS_HAMMER: SummonTowerHelpers(TOWER_OF_STORMS); events.RepeatEvent(60000 + rand() % 60000); - me->TextEmote("Flame Leviathan activates Thorim's Hammer.", nullptr, true); + Talk(FLAME_LEVIATHAN_EMOTE_STORM); Talk(FLAME_LEVIATHAN_SAY_TOWER_STORM); return; case EVENT_FREYA: SummonTowerHelpers(TOWER_OF_LIFE); - me->TextEmote("Flame Leviathan activates Freya's Ward.", nullptr, true); + Talk(FLAME_LEVIATHAN_EMOTE_NATURE); Talk(FLAME_LEVIATHAN_SAY_TOWER_NATURE); return; case EVENT_MIMIRONS_INFERNO: SummonTowerHelpers(TOWER_OF_FLAMES); - me->TextEmote("Flame Leviathan activates Mimiron's Inferno.", nullptr, true); + Talk(FLAME_LEVIATHAN_EMOTE_FLAME); Talk(FLAME_LEVIATHAN_SAY_TOWER_FLAME); return; case EVENT_HODIRS_FURY: SummonTowerHelpers(TOWER_OF_FROST); - me->TextEmote("Flame Leviathan activates Hodir's Fury.", nullptr, true); + Talk(FLAME_LEVIATHAN_EMOTE_FROST); Talk(FLAME_LEVIATHAN_SAY_TOWER_FROST); return; } @@ -499,14 +497,11 @@ void boss_flame_leviathan::boss_flame_leviathanAI::BindPlayers() me->GetMap()->ToInstanceMap()->PermBindAllPlayers(); } -void boss_flame_leviathan::boss_flame_leviathanAI::RadioSay(const char* text, uint32 soundId) +void boss_flame_leviathan::boss_flame_leviathanAI::RadioSay(uint8 textid) { if (Creature* r = me->SummonCreature(NPC_BRANN_RADIO, me->GetPositionX() - 150, me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 5000)) { - WorldPacket data; - ChatHandler::BuildChatPacket(data, CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, r, nullptr, text); - r->SendMessageToSetInRange(&data, 200, true); - r->PlayDirectSound(soundId); + r->AI()->Talk(textid); } } @@ -1223,13 +1218,6 @@ public: me->SetReactState(REACT_AGGRESSIVE); } - void Say(const char* text) - { - WorldPacket data; - ChatHandler::BuildChatPacket(data, CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, me, nullptr, text); - me->SendMessageToSetInRange(&data, 100.0f, true); - } - void MoveInLineOfSight(Unit* who) override { if (!_lock) @@ -1242,8 +1230,7 @@ public: { if (me->GetDistance2d(who) <= 60.0f && who->GetPositionZ() > 430.0f) { - Say("This generator powers Mimiron's Gaze. In moments, it can turn earth to ash, stone to magma--we cannot let it reach full power!"); - me->PlayDirectSound(RSOUND_MIMIRON); + Talk(BRANN_RADIO_SAY_TOWER_MIMIRON); _lock = true; } } @@ -1252,8 +1239,7 @@ public: { if (me->GetDistance2d(who) <= 60.0f && who->GetPositionZ() < 380.0f) { - Say("You're approaching the tower of Freya. It contains the power to turn barren wastelands into jungles teeming with life overnight"); - me->PlayDirectSound(RSOUND_FREYA); + Talk(BRANN_RADIO_SAY_TOWER_FREYA); _lock = true; } } @@ -1262,8 +1248,7 @@ public: { if (me->GetDistance2d(who) <= 40.0f) { - Say("It appears you are near a repair station. Drive your vehicle on to the platform and it should be automatically repaired."); - me->PlayDirectSound(RSOUND_STATION); + Talk(BRANN_RADIO_SAY_STATIONS); _lock = true; } } @@ -1272,8 +1257,7 @@ public: { if (me->GetDistance2d(who) <= 40.0f) { - Say("This tower powers the hammer of Hodir. It is said to have the power to turn entire armies to ice!"); - me->PlayDirectSound(RSOUND_HODIR); + Talk(BRANN_RADIO_SAY_TOWER_HODIR); _lock = true; } } @@ -1282,8 +1266,7 @@ public: { if (me->GetDistance2d(who) <= 60.0f) { - Say("Aaaah, the tower of Krolmir. It is said that the power of Thorim has been used only once. And that it turned an entire continent to dust..."); - me->PlayDirectSound(RSOUND_THORIM); + Talk(BRANN_RADIO_SAY_TOWER_THORIM); _lock = true; } } @@ -1292,8 +1275,7 @@ public: { if (who->GetPositionX() >= -480.0f) { - Say("There are four generators powering the defense structures. If you sabotage the generators, the missile attacks will stop!"); - me->PlayDirectSound(RSOUND_GENERATORS); + Talk(BRANN_RADIO_SAY_GENERATORS); _lock = true; } } @@ -1533,7 +1515,7 @@ public: if (!driver) return; - driver->TextEmote("Automatic repair sequence initiated.", driver, true); + //driver->TextEmote(VEHICLE_EMOTE_REPAIR, driver, true); // No source // Actually should/could use basepoints (100) for this spell effect as percentage of health, but oh well. vehicle->GetBase()->SetFullHealth(); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp index 4667c032d..4eaa6de1d 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/ulduar.cpp @@ -25,6 +25,31 @@ #include "SpellScript.h" #include "Vehicle.h" +enum Texts +{ + // Freya + GOSSIP_MENU_FREYA = 10324, + NPC_TEXT_FREYA = 14332, + + // Hodir + GOSSIP_MENU_HODIR = 10335, + NPC_TEXT_HODIR = 14326, + + // Mimiron + GOSSIP_MENU_MIMIRON = 10336, + NPC_TEXT_MIMIRON = 14334, + + // Thorim + GOSSIP_MENU_THORIM = 10337, + NPC_TEXT_THORIM = 14333, + + // Confirm assistance + GOSSIP_MENU_CONFIRM = 10333, + NPC_TEXT_CONFIRM = 14325, + + SAY_KEEPER_SELECTED = 1, +}; + class npc_ulduar_keeper : public CreatureScript { public: @@ -32,45 +57,75 @@ public: bool OnGossipHello(Player* player, Creature* creature) override { - AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Lend us your aid, keeper. Together we shall defeat Yogg-Saron.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* /*player*/, Creature* creature, uint32 /*uiSender*/, uint32 /*uiAction*/) override - { - creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); - uint8 _keeper = 0; + uint32 gossipMenuId = 0; + uint32 gossipTextId = 0; switch (creature->GetEntry()) { case NPC_FREYA_GOSSIP: - creature->Yell("Eonar, your servant calls for your blessing!", LANG_UNIVERSAL); - creature->PlayDirectSound(15535); - _keeper = KEEPER_FREYA; + gossipMenuId = GOSSIP_MENU_FREYA; + gossipTextId = NPC_TEXT_FREYA; break; case NPC_HODIR_GOSSIP: - creature->Yell("The veil of winter will protect you, champions!", LANG_UNIVERSAL); - creature->PlayDirectSound(15559); - _keeper = KEEPER_HODIR; + gossipMenuId = GOSSIP_MENU_HODIR; + gossipTextId = NPC_TEXT_HODIR; break; case NPC_MIMIRON_GOSSIP: - creature->Yell("Combat matrix enhanced. Behold wonderous rapidity!", LANG_UNIVERSAL); - creature->PlayDirectSound(15630); - _keeper = KEEPER_MIMIRON; + gossipMenuId = GOSSIP_MENU_MIMIRON; + gossipTextId = NPC_TEXT_MIMIRON; break; case NPC_THORIM_GOSSIP: - creature->Yell("Golganneth, lend me your strengh! Grant my mortal allies the power of thunder!", LANG_UNIVERSAL); - creature->PlayDirectSound(15750); - _keeper = KEEPER_THORIM; + gossipMenuId = GOSSIP_MENU_THORIM; + gossipTextId = NPC_TEXT_THORIM; break; } - if (creature->GetInstanceScript()) - { - creature->GetInstanceScript()->SetData(TYPE_WATCHERS, _keeper); - creature->DespawnOrUnsummon(6000); - } + AddGossipItemFor(player, gossipMenuId, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + SendGossipMenuFor(player, gossipTextId, creature->GetGUID()); + return true; + } + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override + { + ClearGossipMenuFor(player); + uint8 _keeper = 0; + switch (action) + { + case GOSSIP_ACTION_INFO_DEF+1: + AddGossipItemFor(player, GOSSIP_MENU_CONFIRM, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + SendGossipMenuFor(player, NPC_TEXT_CONFIRM, creature); + break; + case GOSSIP_ACTION_INFO_DEF+2: + { + switch (creature->GetEntry()) + { + case NPC_FREYA_GOSSIP: + creature->AI()->Talk(SAY_KEEPER_SELECTED); + _keeper = KEEPER_FREYA; + break; + case NPC_HODIR_GOSSIP: + creature->AI()->Talk(SAY_KEEPER_SELECTED); + _keeper = KEEPER_HODIR; + break; + case NPC_MIMIRON_GOSSIP: + creature->AI()->Talk(SAY_KEEPER_SELECTED); + _keeper = KEEPER_MIMIRON; + break; + case NPC_THORIM_GOSSIP: + creature->AI()->Talk(SAY_KEEPER_SELECTED); + _keeper = KEEPER_THORIM; + break; + } + + creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); + CloseGossipMenuFor(player); + + if (creature->GetInstanceScript()) + { + creature->GetInstanceScript()->SetData(TYPE_WATCHERS, _keeper); + creature->DespawnOrUnsummon(6000); + } + } + } return true; } }; diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp index a75615c39..afeba1fc5 100644 --- a/src/server/scripts/Northrend/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/isle_of_conquest.cpp @@ -127,8 +127,13 @@ public: void JustDied(Unit* killer) override { - if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) - player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, me); + if (killer) + { + if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, me); + } + } } }; diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index 63692bec2..4aed88845 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -294,28 +294,52 @@ public: enum hourglass { - NPC_FUTURE_HOURGLASS = 27840, - NPC_FUTURE_YOU = 27899, + NPC_FUTURE_HOURGLASS = 27840, + NPC_FUTURE_YOU = 27899, - NPC_PAST_HOURGLASS = 32327, - NPC_PAST_YOU = 32331, + NPC_PAST_HOURGLASS = 32327, + NPC_PAST_YOU = 32331, - NPC_INFINITE_ASSAILANT = 27896, - NPC_INFINITE_CHRONO_MAGUS = 27898, - NPC_INFINITE_DESTROYER = 27897, - NPC_INFINITE_TIMERENDER = 27900, + NPC_INFINITE_ASSAILANT = 27896, + NPC_INFINITE_CHRONO_MAGUS = 27898, + NPC_INFINITE_DESTROYER = 27897, + NPC_INFINITE_TIMERENDER = 27900, + NPC_NOZDORMU = 27925, - SPELL_CLONE_CASTER = 49889, - SPELL_TELEPORT_EFFECT = 52096, + SPELL_NOZDORMU_INVIS = 50013, + SPELL_CLONE_CASTER = 49889, + SPELL_TELEPORT_EFFECT = 52096, - EVENT_START_EVENT = 1, - EVENT_FIGHT_1 = 2, - EVENT_FIGHT_2 = 3, - EVENT_CHECK_FINISH = 4, - EVENT_FINISH_EVENT = 5, + EVENT_START_EVENT = 1, + EVENT_FIGHT_1 = 2, + EVENT_FIGHT_2 = 3, + EVENT_CHECK_FINISH = 4, + EVENT_FINISH_EVENT = 5, - QUEST_MYSTERY_OF_THE_INFINITE = 12470, - QUEST_MYSTERY_OF_THE_INFINITE_REDUX = 13343, + QUEST_MYSTERY_OF_THE_INFINITE = 12470, + QUEST_MYSTERY_OF_THE_INFINITE_REDUX = 13343, +}; + +enum hourglassText +{ + // (All are whispers) Both NPC_PAST_YOU and NPC_FUTURE_YOU share the same creature_text GroupIDs + // Start + SAY_HOURGLASS_START_1 = 1, + SAY_HOURGLASS_START_2 = 2, + + // Random whispers during the fight + SAY_HOURGLASS_RANDOM_1 = 3, + SAY_HOURGLASS_RANDOM_2 = 4, + SAY_HOURGLASS_RANDOM_3 = 5, + SAY_HOURGLASS_RANDOM_4 = 6, + SAY_HOURGLASS_RANDOM_5 = 7, + SAY_HOURGLASS_RANDOM_6 = 8, + SAY_HOURGLASS_RANDOM_7 = 9, + SAY_HOURGLASS_RANDOM_8 = 10, + + // End + SAY_HOURGLASS_END_1 = 11, + SAY_HOURGLASS_END_2 = 12, }; class npc_hourglass_of_eternity : public CreatureScript @@ -332,24 +356,26 @@ public: { npc_hourglass_of_eternityAI(Creature* c) : ScriptedAI(c) {} - ObjectGuid summonerGUID; - ObjectGuid futureGUID; + ObjectGuid pGUID; + ObjectGuid copyGUID; EventMap events; uint8 count[3]; uint8 phase; + uint8 randomTalk; + uint8 lastRandomTalk; - bool IsFuture() { return me->GetEntry() == NPC_FUTURE_HOURGLASS; } + bool IsFuture() {return me->GetEntry() == NPC_FUTURE_HOURGLASS;} void InitializeAI() override { if (me->ToTempSummon()) if (Unit* summoner = me->ToTempSummon()->GetSummonerUnit()) { - summonerGUID = summoner->GetGUID(); + pGUID = summoner->GetGUID(); float x, y, z; me->GetNearPoint(summoner, x, y, z, me->GetCombatReach(), 0.0f, rand_norm() * 2 * M_PI); if (Creature* cr = summoner->SummonCreature((IsFuture() ? NPC_FUTURE_YOU : NPC_PAST_YOU), x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 210000)) { - futureGUID = cr->GetGUID(); + copyGUID = cr->GetGUID(); summoner->CastSpell(cr, SPELL_CLONE_CASTER, true); cr->SetFaction(summoner->GetFaction()); cr->SetReactState(REACT_AGGRESSIVE); @@ -365,27 +391,39 @@ public: events.ScheduleEvent(EVENT_START_EVENT, 4000); } - Player* getSummoner() { return ObjectAccessor::GetPlayer(*me, summonerGUID); } - Creature* getFuture() { return ObjectAccessor::GetCreature(*me, futureGUID); } + Player* GetPlayer() {return ObjectAccessor::GetPlayer(*me, pGUID);} + Creature* GetCopy() {return ObjectAccessor::GetCreature(*me, copyGUID);} uint32 randEntry() { return NPC_INFINITE_ASSAILANT + urand(0, 2); } + void ShowNozdormu() + { + if (Creature* cr = me->FindNearestCreature(NPC_NOZDORMU, 100.0f, true)) + cr->RemoveAura(SPELL_NOZDORMU_INVIS); + } + + void HideNozdormu() + { + if (Creature* cr = me->FindNearestCreature(NPC_NOZDORMU, 100.0f, true)) + cr->AddAura(SPELL_NOZDORMU_INVIS, cr); + } + void UpdateAI(uint32 diff) override { events.Update(diff); switch (events.ExecuteEvent()) { case EVENT_START_EVENT: - if (Creature* cr = getFuture()) - cr->Whisper(IsFuture() ? "Hey there, $N, don't be alarmed. It's me... you... from the future. I'm here to help." : "Whoa! You're me, but from the future! Hey, my equipment got an upgrade! Cool!", LANG_UNIVERSAL, getSummoner()); + if (Creature* cr = GetCopy()) + cr->AI()->Talk(SAY_HOURGLASS_START_1, GetPlayer()); events.ScheduleEvent(EVENT_FIGHT_1, 7000); break; case EVENT_FIGHT_1: - if (Creature* cr = getFuture()) - cr->Whisper(IsFuture() ? "Heads up... here they come. I'll help as much as I can. Let's just keep them off the hourglass!" : "Here come the Infinites! I've got to keep the hourglass safe. Can you help?", LANG_UNIVERSAL, getSummoner()); + if (Creature* cr = GetCopy()) + cr->AI()->Talk(SAY_HOURGLASS_START_2, GetPlayer()); events.ScheduleEvent(EVENT_FIGHT_2, 6000); break; case EVENT_FIGHT_2: @@ -433,57 +471,44 @@ public: return; } - if (Player* player = getSummoner()) + ShowNozdormu(); + if (Player* player = GetPlayer()) player->GroupEventHappens(IsFuture() ? QUEST_MYSTERY_OF_THE_INFINITE : QUEST_MYSTERY_OF_THE_INFINITE_REDUX, me); - me->Whisper(IsFuture() ? "Look, $N, the hourglass has revealed Nozdormu!" : "What the heck? Nozdormu is up there!", LANG_UNIVERSAL, getSummoner()); + if (Creature* cr = GetCopy()) + { + cr->SetFacingToObject(me->FindNearestCreature(NPC_NOZDORMU, 100.0f, true)); + cr->AI()->Talk(SAY_HOURGLASS_END_1, GetPlayer()); + } events.ScheduleEvent(EVENT_FINISH_EVENT, 6000); break; } case EVENT_FINISH_EVENT: { - me->Whisper(IsFuture() ? "Farewell, $N. Keep us alive and get some better equipment!" : "I feel like I'm being pulled away through time. Thanks for the help....", LANG_UNIVERSAL, getSummoner()); + HideNozdormu(); + if (Creature* cr = GetCopy()) + cr->AI()->Talk(SAY_HOURGLASS_END_2, GetPlayer()); me->DespawnOrUnsummon(500); - if (getFuture()) - getFuture()->DespawnOrUnsummon(500); + if (GetCopy()) + GetCopy()->DespawnOrUnsummon(500); break; } } } - void randomWhisper() + void randomWhisper() // Do not repeat the same line { - std::string text = ""; - switch(urand(0, IsFuture() ? 7 : 5)) + randomTalk = urand(SAY_HOURGLASS_RANDOM_1, SAY_HOURGLASS_RANDOM_8); // 3 to 10 + if (randomTalk == lastRandomTalk) { - case 0: - text = IsFuture() ? "What? Am I here alone. We both have a stake at this, you know!" : "This equipment looks cool and all, but couldn't we have done a little better? Are you even raiding?"; - break; - case 1: - text = IsFuture() ? "No matter what, you can't die, because would mean that I would cease to exist, right? But, I was here before when I was you. I'm so confused!" : "Chromie said that if I don't do this just right, I might wink out of existence. If I go, then you go!"; - break; - case 2: - text = IsFuture() ? "Sorry, but Chromie said that I couldn't reveal anything about your future to you. She said that if I did, I would cease to exist." : "I just want you to know that if we get through this alive, I'm making sure that we turn out better than you. No offense."; - break; - case 3: - text = IsFuture() ? "Look at you fight; no wonder I turned to drinking." : "Looks like I'm an underachiever."; - break; - case 4: - text = IsFuture() ? "Wow, I'd forgotten how inexperienced I used to be." : "Wait a minute! If you're here, then that means that in the not-so-distant future I'm going to be you helping me? Are we stuck in a time loop?!"; - break; - case 5: - text = IsFuture() ? "I can't believe that I used to wear that." : "I think I'm going to turn to drinking after this."; - break; - case 6: - text = "Listen. I'm not supposed to tell you this, but there's going to be this party that you're invited to. Whatever you do, DO NOT DRINK THE PUNCH!"; - break; - case 7: - text = "Wish I could remember how many of the Infinite Dragonflight were going to try to stop you. This fight was so long ago."; - break; + randomWhisper(); + } + else + { + if (Creature* cr = GetCopy()) + cr->AI()->Talk(randomTalk, GetPlayer()); + lastRandomTalk = randomTalk; } - - if (Creature* cr = getFuture()) - cr->Whisper(text, LANG_UNIVERSAL, getSummoner()); } }; }; @@ -516,7 +541,7 @@ public: void MoveInLineOfSight(Unit* who) override { - if (!me->GetVictim() && who->GetEntry() >= NPC_INFINITE_ASSAILANT && who->GetEntry() <= NPC_INFINITE_TIMERENDER) + if (!me->GetVictim() && !who->IsFlying() && who->GetEntry() >= NPC_INFINITE_ASSAILANT && who->GetEntry() <= NPC_INFINITE_TIMERENDER) AttackStart(who); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 50510a854..a3588b7d1 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -220,7 +220,9 @@ class spell_pal_sacred_shield_base : public AuraScript bool CheckProc(ProcEventInfo& eventInfo) { - return !(eventInfo.GetHitMask() & PROC_EX_INTERNAL_HOT) && eventInfo.GetDamageInfo() && eventInfo.GetDamageInfo()->GetDamage() > 0; + HealInfo* healinfo = eventInfo.GetHealInfo(); + DamageInfo* damageinfo = eventInfo.GetDamageInfo(); + return !(eventInfo.GetHitMask() & PROC_EX_INTERNAL_HOT) && ((healinfo && healinfo->GetHeal() > 0) || (damageinfo && damageinfo->GetDamage() > 0)); } void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) @@ -231,14 +233,14 @@ class spell_pal_sacred_shield_base : public AuraScript { Unit* caster = eventInfo.GetActor(); - DamageInfo* damageInfo = eventInfo.GetDamageInfo(); + HealInfo* healinfo = eventInfo.GetHealInfo(); - if (!damageInfo || !damageInfo->GetDamage()) + if (!healinfo || !healinfo->GetHeal()) { return; } - SpellInfo const* procSpell = damageInfo->GetSpellInfo(); + SpellInfo const* procSpell = healinfo->GetSpellInfo(); if (!procSpell) { return; @@ -247,12 +249,12 @@ class spell_pal_sacred_shield_base : public AuraScript if (caster && procSpell->SpellFamilyName == SPELLFAMILY_PALADIN && procSpell->SpellFamilyFlags.HasFlag(0x40000000) && caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_PALADIN, 3021, 0)) // need infusion of light { - int32 basepoints = int32(float(damageInfo->GetDamage()) / 12.0f); + int32 basepoints = int32(float(healinfo->GetHeal()) / 12.0f); // Item - Paladin T9 Holy 4P Bonus (Flash of Light) if (AuraEffect const* aurEffect = caster->GetAuraEffect(67191, EFFECT_0)) AddPct(basepoints, aurEffect->GetAmount()); - caster->CastCustomSpell(eventInfo.GetActionTarget(), 66922, &basepoints, nullptr, nullptr, true, 0, aurEff, caster->GetGUID()); + caster->CastCustomSpell(eventInfo.GetActionTarget(), 66922, &basepoints, nullptr, nullptr, true, nullptr, aurEff, caster->GetGUID()); return; }