mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(CORE/OPvP): Halaa Mechanics not working properly (#15634)
This commit is contained in:
225
data/sql/updates/pending_db_world/rev_1680005777631310400.sql
Normal file
225
data/sql/updates/pending_db_world/rev_1680005777631310400.sql
Normal file
@@ -0,0 +1,225 @@
|
||||
-- Fire Bomb (Halaa)
|
||||
DELETE FROM `spell_custom_attr` WHERE `spell_id` = 31961;
|
||||
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
|
||||
(31961, 2048);
|
||||
|
||||
-- NPC CREATURE
|
||||
SET @NPC := 12608;
|
||||
DELETE FROM `creature` WHERE `guid` IN (@NPC+1, @NPC+2, @NPC+3, @NPC+4, @NPC+5, @NPC+6, @NPC+7, @NPC+8, @NPC+9, @NPC+10, @NPC+11, @NPC+12, @NPC+13, @NPC+14, @NPC+15, @NPC+16, @NPC+17, @NPC+18, @NPC+19, @NPC+20, @NPC+21, @NPC+22, @NPC+23, @NPC+24, @NPC+25, @NPC+26, @NPC+27, @NPC+28, @NPC+29, @NPC+30, @NPC+31, @NPC+32, @NPC+33, @NPC+34, @NPC+35, @NPC+36, @NPC+37, @NPC+38, @NPC+39, @NPC+40);
|
||||
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
-- HORDE
|
||||
(@NPC+1, 18816, 0, 0, 530, 0, 0, 1, 1, 0, -1523.92, 7951.76, -17.6942, 3.51172, 300, 0, 0, 59130, 0, 0, 3, 4096, 0, "outdoorpvp_na_halaa_creatures", 0),
|
||||
(@NPC+2, 18821, 0, 0, 530, 0, 0, 1, 1, 0, -1527.75, 7952.46, -17.6948, 3.99317, 300, 0, 0, 70965, 2790, 0, 128, 4096, 0, "", 0),
|
||||
(@NPC+3, 21474, 0, 0, 530, 0, 0, 1, 1, 0, -1520.14, 7927.11, -20.2527, 3.39389, 300, 0, 0, 104790, 0, 0, 4224, 4096, 0, "", 0),
|
||||
(@NPC+4, 21484, 0, 0, 530, 0, 0, 1, 1, 0, -1524.84, 7930.34, -20.182, 3.6405, 300, 0, 0, 104790, 0, 0, 128, 4096, 0, "", 0),
|
||||
(@NPC+5, 21483, 0, 0, 530, 0, 0, 1, 1, 0, -1570.01, 7993.8, -22.4505, 5.02655, 300, 0, 0, 104790, 0, 0, 128, 4096, 0, "", 0),
|
||||
(@NPC+6, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1654.06, 8000.46, -26.59, 3.37, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+7, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1487.18, 7899.1, -19.53, 0.954, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+8, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1480.88, 7908.79, -19.19, 4.485, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+9, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1540.56, 7995.44, -20.45, 0.947, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+10, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1546.95, 8000.85, -20.72, 6.035, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+11, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1595.31, 7860.53, -21.51, 3.747, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+12, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1651.54, 7988.56, -26.5289, 2.98451, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+13, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1602.46, 7866.43, -22.1177, 4.74729, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+14, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1586.58, 7932.62, -24.76, 1.00684, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+15, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1545.57, 7935.83, -21.13, 3.448, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+16, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1585.73, 7994.68, -23.29, 4.439, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+17, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1578.2544, 7942.152, -22.726915, 3.317, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 1
|
||||
(@NPC+18, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1601.5521, 7950.475, -25.48774, 1.094, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 2
|
||||
(@NPC+19, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1611.6683, 7957.6304, -27.328438, 5.567, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 3
|
||||
(@NPC+20, 18192, 0, 0, 530, 0, 0, 1, 1, 0, -1593.7784, 7988.3916, -23.511473, 4.34587, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 4
|
||||
-- ALLIANCE
|
||||
(@NPC+21, 18817, 0, 0, 530, 0, 0, 1, 1, 0, -1591.18, 8020.39, -22.2042, 4.59022, 300, 0, 0, 59130, 0, 0, 3, 4096, 0, "", 0),
|
||||
(@NPC+22, 18822, 0, 0, 530, 0, 0, 1, 1, 0, -1588.00, 8019.00, -22.2042, 4.06662, 300, 0, 0, 70965, 2790, 0, 128, 4096, 0, "", 0),
|
||||
(@NPC+23, 21485, 0, 0, 530, 0, 0, 1, 1, 0, -1521.93, 7927.37, -20.2299, 3.24631, 300, 0, 0, 104790, 0, 0, 4224, 4096, 0, "", 0),
|
||||
(@NPC+24, 21487, 0, 0, 530, 0, 0, 1, 1, 0, -1540.33, 7971.95, -20.7186, 3.07178, 300, 0, 0, 104790, 0, 0, 128, 4096, 0, "", 0),
|
||||
(@NPC+25, 21488, 0, 0, 530, 0, 0, 1, 1, 0, -1570.01, 7993.8, -22.4505, 5.02655, 300, 0, 0, 104790, 0, 0, 128, 4096, 0, "", 0),
|
||||
(@NPC+26, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1654.06, 8000.46, -26.59, 3.37, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+27, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1487.18, 7899.1, -19.53, 0.954, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+28, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1480.88, 7908.79, -19.19, 4.485, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+29, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1540.56, 7995.44, -20.45, 0.947, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+30, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1546.95, 8000.85, -20.72, 6.035, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+31, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1595.31, 7860.53, -21.51, 3.747, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+32, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1651.54, 7988.56, -26.5289, 2.98451, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+33, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1602.46, 7866.43, -22.1177, 4.74729, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+34, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1586.58, 7932.62, -24.76, 1.00684, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+35, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1545.57, 7935.83, -21.13, 3.448, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+36, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1585.73, 7994.68, -23.29, 4.439, 3600, 0, 0, 1182800, 0, 0, 0, 4096, 0, "", 0),
|
||||
(@NPC+37, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1578.2544, 7942.152, -22.726915, 3.317, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 1
|
||||
(@NPC+38, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1601.5521, 7950.475, -25.48774, 1.094, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 2
|
||||
(@NPC+39, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1611.6683, 7957.6304, -27.328438, 5.567, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0), -- PATROL 3
|
||||
(@NPC+40, 18256, 0, 0, 530, 0, 0, 1, 1, 0, -1593.7784, 7988.3916, -23.511473, 4.34587, 3600, 0, 0, 1182800, 0, 2, 0, 4096, 0, "", 0); -- PATROL 4
|
||||
|
||||
-- HORDE
|
||||
SET @NPCPAT1 := @NPC+17;
|
||||
SET @PATH := @NPCPAT1 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT1;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT1,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1578.2544,7942.152,-22.726915,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1604.801,7950.809,-26.352486,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1618.2837,7972.56,-24.741226,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1620.6606,7986.165,-24.407974,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1627.0247,7987.222,-24.741226,NULL,7500,0,0,100,0),
|
||||
(@PATH,6,-1616.4249,7964.83,-26.525581,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1593.1031,7986.29,-23.556028,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1560.4299,7990.434,-21.372875,NULL,7500,0,0,100,0),
|
||||
(@PATH,9,-1563.902,7951.0166,-22.608301,NULL,0,0,0,100,0),
|
||||
(@PATH,10,-1544.69,7929.014,-21.267084,NULL,7500,0,0,100,0),
|
||||
(@PATH,11,-1525.14,7920.1685,-20.322586,NULL,0,0,0,100,0),
|
||||
(@PATH,12,-1548.2592,7915.58,-21.267084,NULL,0,0,0,100,0),
|
||||
(@PATH,13,-1561.5724,7908.538,-21.979242,NULL,0,0,0,100,0),
|
||||
(@PATH,14,-1567.437,7901.1885,-21.979645,NULL,7500,0,0,100,0),
|
||||
(@PATH,15,-1570.1881,7924.743,-22.589752,NULL,0,0,0,100,0);
|
||||
|
||||
SET @NPCPAT2 := @NPC+18;
|
||||
SET @PATH := @NPCPAT2 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT2;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT2,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1601.5521,7950.475,-25.48774,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1605.7198,7958.928,-25.589912,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1603.0267,7970.598,-24.292007,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1597.1958,7988.6084,-23.727415,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1563.0417,7984.9004,-21.805859,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-1552.0924,7971.6025,-21.340649,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1552.6584,7939.8413,-21.864893,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1559.9021,7927.2256,-21.687494,NULL,0,0,0,100,0),
|
||||
(@PATH,9,-1580.1727,7940.029,-23.01732,NULL,0,0,0,100,0);
|
||||
|
||||
SET @NPCPAT3 := @NPC+19;
|
||||
SET @PATH := @NPCPAT3 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT3;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT3,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1611.6683,7957.6304,-27.328438,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1618.0887,7983.4497,-24.41481,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1643.7819,7986.462,-25.064526,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1643.5465,7995.867,-25.810375,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1611.7173,7997.099,-24.491226,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-1583.7445,7990.3584,-23.042845,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1560.121,7988.5166,-21.37434,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1556.1189,7971.6978,-21.897045,NULL,0,0,0,100,0),
|
||||
(@PATH,9,-1549.7915,7950.7188,-21.270655,NULL,0,0,0,100,0),
|
||||
(@PATH,10,-1552.4308,7934.078,-21.739405,NULL,0,0,0,100,0),
|
||||
(@PATH,11,-1519.6771,7925.7915,-20.246414,NULL,0,0,0,100,0),
|
||||
(@PATH,12,-1500.88,7916.9707,-19.072586,NULL,0,0,0,100,0),
|
||||
(@PATH,13,-1509.5591,7915.889,-19.447586,NULL,0,0,0,100,0),
|
||||
(@PATH,14,-1538.3795,7922.952,-21.060053,NULL,0,0,0,100,0),
|
||||
(@PATH,15,-1562.6403,7908.5366,-21.892084,NULL,0,0,0,100,0),
|
||||
(@PATH,16,-1582.8197,7893.7847,-22.548172,NULL,0,0,0,100,0),
|
||||
(@PATH,17,-1598.5696,7887.1675,-24.116043,NULL,0,0,0,100,0),
|
||||
(@PATH,18,-1582.957,7910.1274,-24.712067,NULL,0,0,0,100,0),
|
||||
(@PATH,19,-1582.636,7940.633,-23.45592,NULL,0,0,0,100,0),
|
||||
(@PATH,20,-1604.9592,7940.441,-26.098213,NULL,0,0,0,100,0),
|
||||
(@PATH,21,-1631.5454,7947.5947,-35.980537,NULL,0,0,0,100,0);
|
||||
|
||||
SET @NPCPAT4 := @NPC+20;
|
||||
SET @PATH := @NPCPAT4 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT4;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT4,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1593.7784,7988.3916,-23.511473,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1559.4581,7970.869,-22.18391,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1554.2388,7945.5103,-22.054346,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1564.365,7929.291,-21.630976,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1586.477,7942.994,-24.06981,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-1614.7969,7949.1113,-29.484688,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1619.6309,7963.3203,-27.734688,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1607.4355,7971.2866,-24.57106,NULL,0,0,0,100,0);
|
||||
|
||||
-- ALLIANCE
|
||||
SET @NPCPAT5 := @NPC+37;
|
||||
SET @PATH := @NPCPAT5 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT5;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT5,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1578.2544,7942.152,-22.726915,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1604.801,7950.809,-26.352486,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1618.2837,7972.56,-24.741226,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1620.6606,7986.165,-24.407974,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1627.0247,7987.222,-24.741226,NULL,7500,0,0,100,0),
|
||||
(@PATH,6,-1616.4249,7964.83,-26.525581,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1593.1031,7986.29,-23.556028,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1560.4299,7990.434,-21.372875,NULL,7500,0,0,100,0),
|
||||
(@PATH,9,-1563.902,7951.0166,-22.608301,NULL,0,0,0,100,0),
|
||||
(@PATH,10,-1544.69,7929.014,-21.267084,NULL,7500,0,0,100,0),
|
||||
(@PATH,11,-1525.14,7920.1685,-20.322586,NULL,0,0,0,100,0),
|
||||
(@PATH,12,-1548.2592,7915.58,-21.267084,NULL,0,0,0,100,0),
|
||||
(@PATH,13,-1561.5724,7908.538,-21.979242,NULL,0,0,0,100,0),
|
||||
(@PATH,14,-1567.437,7901.1885,-21.979645,NULL,7500,0,0,100,0),
|
||||
(@PATH,15,-1570.1881,7924.743,-22.589752,NULL,0,0,0,100,0);
|
||||
|
||||
SET @NPCPAT6 := @NPC+38;
|
||||
SET @PATH := @NPCPAT6 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT6;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT6,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1601.5521,7950.475,-25.48774,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1605.7198,7958.928,-25.589912,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1603.0267,7970.598,-24.292007,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1597.1958,7988.6084,-23.727415,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1563.0417,7984.9004,-21.805859,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-1552.0924,7971.6025,-21.340649,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1552.6584,7939.8413,-21.864893,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1559.9021,7927.2256,-21.687494,NULL,0,0,0,100,0),
|
||||
(@PATH,9,-1580.1727,7940.029,-23.01732,NULL,0,0,0,100,0);
|
||||
|
||||
SET @NPCPAT7 := @NPC+39;
|
||||
SET @PATH := @NPCPAT7 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT7;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT7,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1611.6683,7957.6304,-27.328438,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1618.0887,7983.4497,-24.41481,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1643.7819,7986.462,-25.064526,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1643.5465,7995.867,-25.810375,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1611.7173,7997.099,-24.491226,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-1583.7445,7990.3584,-23.042845,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1560.121,7988.5166,-21.37434,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1556.1189,7971.6978,-21.897045,NULL,0,0,0,100,0),
|
||||
(@PATH,9,-1549.7915,7950.7188,-21.270655,NULL,0,0,0,100,0),
|
||||
(@PATH,10,-1552.4308,7934.078,-21.739405,NULL,0,0,0,100,0),
|
||||
(@PATH,11,-1519.6771,7925.7915,-20.246414,NULL,0,0,0,100,0),
|
||||
(@PATH,12,-1500.88,7916.9707,-19.072586,NULL,0,0,0,100,0),
|
||||
(@PATH,13,-1509.5591,7915.889,-19.447586,NULL,0,0,0,100,0),
|
||||
(@PATH,14,-1538.3795,7922.952,-21.060053,NULL,0,0,0,100,0),
|
||||
(@PATH,15,-1562.6403,7908.5366,-21.892084,NULL,0,0,0,100,0),
|
||||
(@PATH,16,-1582.8197,7893.7847,-22.548172,NULL,0,0,0,100,0),
|
||||
(@PATH,17,-1598.5696,7887.1675,-24.116043,NULL,0,0,0,100,0),
|
||||
(@PATH,18,-1582.957,7910.1274,-24.712067,NULL,0,0,0,100,0),
|
||||
(@PATH,19,-1582.636,7940.633,-23.45592,NULL,0,0,0,100,0),
|
||||
(@PATH,20,-1604.9592,7940.441,-26.098213,NULL,0,0,0,100,0),
|
||||
(@PATH,21,-1631.5454,7947.5947,-35.980537,NULL,0,0,0,100,0);
|
||||
|
||||
SET @NPCPAT8 := @NPC+40;
|
||||
SET @PATH := @NPCPAT8 * 10;
|
||||
DELETE FROM `creature_addon` WHERE `guid`=@NPCPAT8;
|
||||
INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPCPAT8,@PATH,0,0,1,0,0, '');
|
||||
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(@PATH,1,-1593.7784,7988.3916,-23.511473,NULL,0,0,0,100,0),
|
||||
(@PATH,2,-1559.4581,7970.869,-22.18391,NULL,0,0,0,100,0),
|
||||
(@PATH,3,-1554.2388,7945.5103,-22.054346,NULL,0,0,0,100,0),
|
||||
(@PATH,4,-1564.365,7929.291,-21.630976,NULL,0,0,0,100,0),
|
||||
(@PATH,5,-1586.477,7942.994,-24.06981,NULL,0,0,0,100,0),
|
||||
(@PATH,6,-1614.7969,7949.1113,-29.484688,NULL,0,0,0,100,0),
|
||||
(@PATH,7,-1619.6309,7963.3203,-27.734688,NULL,0,0,0,100,0),
|
||||
(@PATH,8,-1607.4355,7971.2866,-24.57106,NULL,0,0,0,100,0);
|
||||
|
||||
-- ACORE STRING
|
||||
SET @ENTRY := 10074;
|
||||
DELETE FROM `acore_string` WHERE `entry` = @ENTRY;
|
||||
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_esES`, `locale_esMX`) VALUES
|
||||
(@ENTRY, 'Halaa is defenseless!', '¡Halaa está indefenso!', '¡Halaa está indefenso!');
|
||||
|
||||
-- NPC MODEL ID
|
||||
UPDATE `creature_model_info` SET `DisplayID_Other_Gender` = 0 WHERE `DisplayID` IN (18254, 18255, 18256, 18257);
|
||||
UPDATE `gameobject` SET `phaseMask` = 2 WHERE `guid` IN (100343, 100342, 100341);
|
||||
@@ -1241,6 +1241,7 @@ enum AcoreStrings
|
||||
LANG_OPVP_NA_CAPTURE_A = 10026,
|
||||
LANG_OPVP_NA_LOSE_H = 10027,
|
||||
LANG_OPVP_NA_LOSE_A = 10028,
|
||||
LANG_OPVP_NA_DEFENSELESS = 10074,
|
||||
// opvp tf
|
||||
LANG_OPVP_TF_CAPTURE_H = 10029,
|
||||
LANG_OPVP_TF_CAPTURE_A = 10030,
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "OutdoorPvPNA.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "GameGraveyard.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
@@ -33,6 +35,43 @@ OutdoorPvPNA::OutdoorPvPNA()
|
||||
m_obj = nullptr;
|
||||
}
|
||||
|
||||
// SpawnIds from creatures
|
||||
HalaaNPCS halaaNPCHorde;
|
||||
HalaaNPCS halaaNPCAlly;
|
||||
|
||||
void OutdoorPvPNA::HandleKill(Player* killer, Unit* killed)
|
||||
{
|
||||
if (Group* group = killer->GetGroup())
|
||||
{
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
{
|
||||
Player* groupGuy = itr->GetSource();
|
||||
|
||||
if (!groupGuy)
|
||||
continue;
|
||||
|
||||
// skip if too far away
|
||||
if (!groupGuy->IsAtGroupRewardDistance(killed) && killer != groupGuy)
|
||||
continue;
|
||||
|
||||
// creature kills must be notified, even if not inside objective / not outdoor pvp active
|
||||
// player kills only count if active and inside objective
|
||||
if ((groupGuy->IsOutdoorPvPActive() && groupGuy->GetAreaId() == NA_HALAA_ZONE_ID) || killed->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
HandleKillImpl(groupGuy, killed);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// creature kills must be notified, even if not inside objective / not outdoor pvp active
|
||||
if (killer && ((killer->IsOutdoorPvPActive() && killer->ToPlayer()->GetAreaId() == NA_HALAA_ZONE_ID) || killed->GetTypeId() == TYPEID_UNIT))
|
||||
{
|
||||
HandleKillImpl(killer, killed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OutdoorPvPNA::HandleKillImpl(Player* player, Unit* killed)
|
||||
{
|
||||
if (killed->GetTypeId() == TYPEID_PLAYER && player->GetTeamId() != killed->ToPlayer()->GetTeamId())
|
||||
@@ -42,40 +81,36 @@ void OutdoorPvPNA::HandleKillImpl(Player* player, Unit* killed)
|
||||
}
|
||||
}
|
||||
|
||||
uint32 OPvPCapturePointNA::GetAliveGuardsCount()
|
||||
void UpdateCreatureHalaa(ObjectGuid::LowType spawnId, Map* map, float x, float y)
|
||||
{
|
||||
uint32 cnt = 0;
|
||||
for (auto itr = _creatures.begin(); itr != _creatures.end(); ++itr)
|
||||
CreatureData& data = sObjectMgr->NewOrExistCreatureData(spawnId);
|
||||
|
||||
sObjectMgr->AddCreatureToGrid(spawnId, &data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
if (!map->Instanceable() && !map->IsRemovalGrid(x, y))
|
||||
{
|
||||
switch (itr->first)
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->LoadCreatureFromDB(spawnId, map, true, false, true))
|
||||
{
|
||||
case NA_NPC_GUARD_01:
|
||||
case NA_NPC_GUARD_02:
|
||||
case NA_NPC_GUARD_03:
|
||||
case NA_NPC_GUARD_04:
|
||||
case NA_NPC_GUARD_05:
|
||||
case NA_NPC_GUARD_06:
|
||||
case NA_NPC_GUARD_07:
|
||||
case NA_NPC_GUARD_08:
|
||||
case NA_NPC_GUARD_09:
|
||||
case NA_NPC_GUARD_10:
|
||||
case NA_NPC_GUARD_11:
|
||||
case NA_NPC_GUARD_12:
|
||||
case NA_NPC_GUARD_13:
|
||||
case NA_NPC_GUARD_14:
|
||||
case NA_NPC_GUARD_15:
|
||||
{
|
||||
auto bounds = _pvp->GetMap()->GetCreatureBySpawnIdStore().equal_range(itr->second);
|
||||
for (auto itr2 = bounds.first; itr2 != bounds.second; ++itr2)
|
||||
if (itr2->second->IsAlive())
|
||||
++cnt;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
LOG_ERROR("sql.sql", "AddCreature: Cannot add creature spawnId {} to map", spawnId);
|
||||
delete creature;
|
||||
return;
|
||||
}
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
uint32 OPvPCapturePointNA::GetAliveGuardsCount()
|
||||
{
|
||||
uint32 count = 0;
|
||||
for (auto itr = _creatures.begin(); itr != _creatures.end(); ++itr)
|
||||
{
|
||||
auto bounds = _pvp->GetMap()->GetCreatureBySpawnIdStore().equal_range(itr->second);
|
||||
for (auto itr2 = bounds.first; itr2 != bounds.second; ++itr2)
|
||||
if (itr2->second->IsAlive() && (itr2->second->GetEntry() == NA_HALAANI_GUARD_A || itr2->second->GetEntry() == NA_HALAANI_GUARD_H))
|
||||
++count;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
TeamId OPvPCapturePointNA::GetControllingFaction() const
|
||||
@@ -83,23 +118,41 @@ TeamId OPvPCapturePointNA::GetControllingFaction() const
|
||||
return m_ControllingFaction;
|
||||
}
|
||||
|
||||
void OPvPCapturePointNA::SpawnNPCsForTeam(TeamId teamId)
|
||||
void OPvPCapturePointNA::DespawnCreatures(HalaaNPCS teamNPC)
|
||||
{
|
||||
const creature_type* creatures = nullptr;
|
||||
if (teamId == TEAM_ALLIANCE)
|
||||
creatures = AllianceControlNPCs;
|
||||
else if (teamId == TEAM_HORDE)
|
||||
creatures = HordeControlNPCs;
|
||||
else
|
||||
return;
|
||||
for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
|
||||
AddCreature(i, creatures[i].entry, creatures[i].map, creatures[i].x, creatures[i].y, creatures[i].z, creatures[i].o, 1000000);
|
||||
for (int i = 0; i < NA_HALAA_CREATURE_TEAM_SPAWN; i++)
|
||||
{
|
||||
ObjectGuid::LowType spawnId = teamNPC[i];
|
||||
auto bounds = _pvp->GetMap()->GetCreatureBySpawnIdStore().equal_range(spawnId);
|
||||
CreatureData const* data = sObjectMgr->GetCreatureData(spawnId);
|
||||
for (auto itr = bounds.first; itr != bounds.second;)
|
||||
{
|
||||
// can happen when closing the core
|
||||
Creature* c = itr->second;
|
||||
if (c)
|
||||
{
|
||||
++itr;
|
||||
c->AddObjectToRemoveList();
|
||||
sObjectMgr->RemoveCreatureFromGrid(spawnId, data);
|
||||
_creatures[i] = 0;
|
||||
_creatureTypes[_creatures[i]] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OPvPCapturePointNA::DeSpawnNPCs()
|
||||
void OPvPCapturePointNA::SpawnNPCsForTeam(HalaaNPCS teamNPC)
|
||||
{
|
||||
for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
|
||||
DelCreature(i);
|
||||
for (int i = 0; i < NA_HALAA_CREATURE_TEAM_SPAWN; i++)
|
||||
{
|
||||
ObjectGuid::LowType spawnId = teamNPC[i];
|
||||
const CreatureData* data = sObjectMgr->GetCreatureData(spawnId);
|
||||
if (data) {
|
||||
UpdateCreatureHalaa(spawnId, _pvp->GetMap(), data->posX, data->posY);
|
||||
_creatures[i] = spawnId;
|
||||
_creatureTypes[_creatures[i]] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OPvPCapturePointNA::SpawnGOsForTeam(TeamId teamId)
|
||||
@@ -126,7 +179,7 @@ void OPvPCapturePointNA::SpawnGOsForTeam(TeamId teamId)
|
||||
}
|
||||
}
|
||||
|
||||
void OPvPCapturePointNA::DeSpawnGOs()
|
||||
void OPvPCapturePointNA::DespawnGOs()
|
||||
{
|
||||
for (int i = 0; i < NA_CONTROL_GO_NUM; ++i)
|
||||
{
|
||||
@@ -142,16 +195,16 @@ void OPvPCapturePointNA::FactionTakeOver(TeamId teamId)
|
||||
sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_LOSE_A));
|
||||
else if (m_ControllingFaction == TEAM_HORDE)
|
||||
sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_LOSE_H));
|
||||
|
||||
DespawnCreatures(GetControllingFaction() == TEAM_HORDE ? halaaNPCHorde : halaaNPCAlly);
|
||||
m_ControllingFaction = teamId;
|
||||
if (m_ControllingFaction != TEAM_NEUTRAL)
|
||||
sGraveyard->AddGraveyardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, m_ControllingFaction, false);
|
||||
DeSpawnGOs();
|
||||
DeSpawnNPCs();
|
||||
DespawnGOs();
|
||||
SpawnGOsForTeam(teamId);
|
||||
SpawnNPCsForTeam(teamId);
|
||||
SpawnNPCsForTeam(GetControllingFaction() == TEAM_HORDE ? halaaNPCHorde : halaaNPCAlly);
|
||||
m_GuardsAlive = NA_GUARDS_MAX;
|
||||
m_capturable = false;
|
||||
m_canRecap = false;
|
||||
this->UpdateHalaaWorldState();
|
||||
if (teamId == TEAM_ALLIANCE)
|
||||
{
|
||||
@@ -205,7 +258,7 @@ void OPvPCapturePointNA::HandlePlayerLeave(Player* player)
|
||||
OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP* pvp) :
|
||||
OPvPCapturePoint(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFaction(TEAM_NEUTRAL),
|
||||
m_WyvernStateNorth(0), m_WyvernStateSouth(0), m_WyvernStateEast(0), m_WyvernStateWest(0),
|
||||
m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME)
|
||||
m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME), m_canRecap(true)
|
||||
{
|
||||
SetCapturePointData(182210, 530, -1572.57f, 7945.3f, -22.475f, 2.05949f, 0.0f, 0.0f, 0.857167f, 0.515038f);
|
||||
}
|
||||
@@ -223,6 +276,10 @@ bool OutdoorPvPNA::SetupOutdoorPvP()
|
||||
return false;
|
||||
AddCapturePoint(m_obj);
|
||||
|
||||
//Remove linked graveyard at the server start to avoid players spawning in halaa
|
||||
sGraveyard->RemoveGraveyardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, TEAM_ALLIANCE, false);
|
||||
sGraveyard->RemoveGraveyardLink(NA_HALAA_GRAVEYARD, NA_HALAA_GRAVEYARD_ZONE, TEAM_HORDE, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -335,6 +392,12 @@ bool OutdoorPvPNA::Update(uint32 diff)
|
||||
return m_obj->Update(diff);
|
||||
}
|
||||
|
||||
void FlagPlayerPvP(Player* player)
|
||||
{
|
||||
player->SetPlayerFlag(PLAYER_FLAGS_IN_PVP);
|
||||
player->UpdatePvP(true, true);
|
||||
}
|
||||
|
||||
bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameObject* /*go*/)
|
||||
{
|
||||
std::vector<uint32> nodes;
|
||||
@@ -346,32 +409,28 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameO
|
||||
nodes[0] = FlightPathStartNodes[NA_ROOST_N];
|
||||
nodes[1] = FlightPathEndNodes[NA_ROOST_N];
|
||||
player->ActivateTaxiPathTo(nodes);
|
||||
player->SetPlayerFlag(PLAYER_FLAGS_IN_PVP);
|
||||
player->UpdatePvP(true, true);
|
||||
FlagPlayerPvP(player);
|
||||
retval = true;
|
||||
break;
|
||||
case NA_SPELL_FLY_SOUTH:
|
||||
nodes[0] = FlightPathStartNodes[NA_ROOST_S];
|
||||
nodes[1] = FlightPathEndNodes[NA_ROOST_S];
|
||||
player->ActivateTaxiPathTo(nodes);
|
||||
player->SetPlayerFlag(PLAYER_FLAGS_IN_PVP);
|
||||
player->UpdatePvP(true, true);
|
||||
FlagPlayerPvP(player);
|
||||
retval = true;
|
||||
break;
|
||||
case NA_SPELL_FLY_WEST:
|
||||
nodes[0] = FlightPathStartNodes[NA_ROOST_W];
|
||||
nodes[1] = FlightPathEndNodes[NA_ROOST_W];
|
||||
player->ActivateTaxiPathTo(nodes);
|
||||
player->SetPlayerFlag(PLAYER_FLAGS_IN_PVP);
|
||||
player->UpdatePvP(true, true);
|
||||
FlagPlayerPvP(player);
|
||||
retval = true;
|
||||
break;
|
||||
case NA_SPELL_FLY_EAST:
|
||||
nodes[0] = FlightPathStartNodes[NA_ROOST_E];
|
||||
nodes[1] = FlightPathEndNodes[NA_ROOST_E];
|
||||
player->ActivateTaxiPathTo(nodes);
|
||||
player->SetPlayerFlag(PLAYER_FLAGS_IN_PVP);
|
||||
player->UpdatePvP(true, true);
|
||||
FlagPlayerPvP(player);
|
||||
retval = true;
|
||||
break;
|
||||
default:
|
||||
@@ -387,9 +446,8 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameO
|
||||
ItemPosCountVec dest;
|
||||
|
||||
int32 count = 10;
|
||||
uint32 itemid = 24538;
|
||||
// bomb id count
|
||||
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemid, count, &noSpaceForCount);
|
||||
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, NA_HALAA_BOMB, count, &noSpaceForCount);
|
||||
if (msg != EQUIP_ERR_OK) // convert to possible store amount
|
||||
count -= noSpaceForCount;
|
||||
|
||||
@@ -398,7 +456,7 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameO
|
||||
return true;
|
||||
}
|
||||
|
||||
Item* item = player->StoreNewItem(dest, itemid, true);
|
||||
Item* item = player->StoreNewItem(dest, NA_HALAA_BOMB, true);
|
||||
|
||||
if (count > 0 && item)
|
||||
{
|
||||
@@ -439,6 +497,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateSouth = WYVERN_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_S);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_DESTROYED_ROOST_N:
|
||||
del = NA_DESTROYED_ROOST_N;
|
||||
@@ -449,6 +508,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateNorth = WYVERN_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_N);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_DESTROYED_ROOST_W:
|
||||
del = NA_DESTROYED_ROOST_W;
|
||||
@@ -459,6 +519,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateWest = WYVERN_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_W);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_DESTROYED_ROOST_E:
|
||||
del = NA_DESTROYED_ROOST_E;
|
||||
@@ -469,6 +530,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateEast = WYVERN_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_E);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_BOMB_WAGON_S:
|
||||
del = NA_BOMB_WAGON_S;
|
||||
@@ -479,6 +541,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateSouth = WYVERN_NEU_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_S);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_BOMB_WAGON_N:
|
||||
del = NA_BOMB_WAGON_N;
|
||||
@@ -489,6 +552,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateNorth = WYVERN_NEU_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_N);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_BOMB_WAGON_W:
|
||||
del = NA_BOMB_WAGON_W;
|
||||
@@ -499,6 +563,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateWest = WYVERN_NEU_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_W);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
case NA_BOMB_WAGON_E:
|
||||
del = NA_BOMB_WAGON_E;
|
||||
@@ -509,6 +574,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
else
|
||||
m_WyvernStateEast = WYVERN_NEU_HORDE;
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_E);
|
||||
FlagPlayerPvP(player);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
@@ -534,12 +600,34 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go)
|
||||
|
||||
bool OPvPCapturePointNA::Update(uint32 diff)
|
||||
{
|
||||
// let the controlling faction advance in phase
|
||||
bool capturable = false;
|
||||
if (m_ControllingFaction == TEAM_ALLIANCE && _activePlayers[0].size() > _activePlayers[1].size())
|
||||
capturable = true;
|
||||
else if (m_ControllingFaction == TEAM_HORDE && _activePlayers[0].size() < _activePlayers[1].size())
|
||||
capturable = true;
|
||||
if (!_capturePoint)
|
||||
return false;
|
||||
|
||||
float radius = ((float)_capturePoint->GetGOInfo()->capturePoint.radius);
|
||||
|
||||
for (PlayerSet playerSet : _activePlayers)
|
||||
{
|
||||
for (ObjectGuid playerGuid : playerSet)
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
|
||||
if (!_capturePoint->IsWithinDistInMap(player, radius) || !player->IsOutdoorPvPActive())
|
||||
HandlePlayerLeave(player);
|
||||
}
|
||||
}
|
||||
|
||||
std::list<Player*> players;
|
||||
Acore::AnyPlayerInObjectRangeCheck checker(_capturePoint, radius);
|
||||
Acore::PlayerListSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(_capturePoint, players, checker);
|
||||
Cell::VisitWorldObjects(_capturePoint, searcher, radius);
|
||||
|
||||
for (Player* player : players)
|
||||
{
|
||||
if (player->IsOutdoorPvPActive())
|
||||
{
|
||||
if (_activePlayers[player->GetTeamId()].insert(player->GetGUID()).second)
|
||||
HandlePlayerEnter(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_GuardCheckTimer < diff)
|
||||
{
|
||||
@@ -549,26 +637,148 @@ bool OPvPCapturePointNA::Update(uint32 diff)
|
||||
{
|
||||
m_GuardsAlive = cnt;
|
||||
if (m_GuardsAlive == 0)
|
||||
{
|
||||
m_capturable = true;
|
||||
m_RespawnTimer = NA_RESPAWN_TIME;
|
||||
sWorld->SendZoneText(NA_HALAA_GRAVEYARD_ZONE, sObjectMgr->GetAcoreStringForDBCLocale(LANG_OPVP_NA_DEFENSELESS));
|
||||
}
|
||||
else
|
||||
m_capturable = false;
|
||||
// update the guard count for the players in zone
|
||||
_pvp->SendUpdateWorldState(NA_UI_GUARDS_LEFT, m_GuardsAlive);
|
||||
}
|
||||
}
|
||||
else m_GuardCheckTimer -= diff;
|
||||
|
||||
if (m_capturable || capturable)
|
||||
{
|
||||
if (m_capturable) {
|
||||
if (m_RespawnTimer < diff)
|
||||
{
|
||||
// if the guards have been killed, then the challenger has one hour to take over halaa.
|
||||
// in case they fail to do it, the guards are respawned, and they have to start again.
|
||||
if (m_ControllingFaction)
|
||||
FactionTakeOver(m_ControllingFaction);
|
||||
m_RespawnTimer = NA_RESPAWN_TIME;
|
||||
if (GetControllingFaction() == TEAM_ALLIANCE) {
|
||||
_state = OBJECTIVESTATE_ALLIANCE;
|
||||
_value = _maxValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_state = OBJECTIVESTATE_HORDE;
|
||||
_value = -_maxValue;
|
||||
}
|
||||
// we reset again the artkit, map icons, sliders and respawn Halaa for controller team
|
||||
SendChangePhase();
|
||||
ChangeState();
|
||||
FactionTakeOver(GetControllingFaction());
|
||||
return true;
|
||||
}
|
||||
else if (GetControllingFaction() != TEAM_NEUTRAL) // Don't decrease the respawn timer if the team is not HORDE or ALLIANCE
|
||||
m_RespawnTimer -= diff;
|
||||
|
||||
// get the difference of numbers
|
||||
float factDiff = ((float)_activePlayers[0].size() - (float)_activePlayers[1].size()) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL;
|
||||
if (!factDiff)
|
||||
return false;
|
||||
|
||||
float maxDiff = _maxSpeed * diff;
|
||||
|
||||
if (factDiff < 0)
|
||||
{
|
||||
// horde is in majority, but it's already horde-controlled -> no change
|
||||
if (_state == OBJECTIVESTATE_HORDE && _value <= -_maxValue)
|
||||
return false;
|
||||
|
||||
if (factDiff < -maxDiff)
|
||||
factDiff = -maxDiff;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ally is in majority, but it's already ally-controlled -> no change
|
||||
if (_state == OBJECTIVESTATE_ALLIANCE && _value >= _maxValue)
|
||||
return false;
|
||||
|
||||
if (factDiff > maxDiff)
|
||||
factDiff = maxDiff;
|
||||
}
|
||||
|
||||
float oldValue = _value;
|
||||
TeamId oldTeam = _team;
|
||||
|
||||
_oldState = _state;
|
||||
|
||||
_value += factDiff;
|
||||
|
||||
if (_value < -_minValue) // red
|
||||
{
|
||||
if (_value < -_maxValue) //check if the m_value is lower than max, that means horde capped point
|
||||
{
|
||||
_value = -_maxValue;
|
||||
_state = OBJECTIVESTATE_HORDE;
|
||||
_team = TEAM_HORDE;
|
||||
}
|
||||
else //then point is still in battle between teams
|
||||
{
|
||||
if (_oldState == OBJECTIVESTATE_NEUTRAL || _oldState == OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE || _oldState == OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE)
|
||||
{
|
||||
_state = OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_state = OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE;
|
||||
}
|
||||
}
|
||||
if (GetControllingFaction() == TEAM_ALLIANCE && !m_canRecap)
|
||||
{
|
||||
//When the point goes through neutral, the same faction can recapture again to respawn the guards, still need check blizzlike
|
||||
m_canRecap = true;
|
||||
DespawnGOs();
|
||||
DespawnCreatures(GetControllingFaction() == TEAM_HORDE ? halaaNPCHorde : halaaNPCAlly);
|
||||
}
|
||||
}
|
||||
else //blue
|
||||
{
|
||||
if (_value > _maxValue) //check if the m_value is bigger than max, that means alliance capped point
|
||||
{
|
||||
_value = _maxValue;
|
||||
_state = OBJECTIVESTATE_ALLIANCE;
|
||||
_team = TEAM_ALLIANCE;
|
||||
}
|
||||
else //then point is still in battle between teams
|
||||
{
|
||||
if (_oldState == OBJECTIVESTATE_NEUTRAL || _oldState == OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE || _oldState == OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE)
|
||||
{
|
||||
_state = OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
_state = OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE;
|
||||
}
|
||||
}
|
||||
if (GetControllingFaction() == TEAM_HORDE && !m_canRecap)
|
||||
{
|
||||
//When the point goes through neutral, the same faction can recapture again to respawn the guards, still need check blizzlike
|
||||
m_canRecap = true;
|
||||
DespawnGOs();
|
||||
DespawnCreatures(GetControllingFaction() == TEAM_HORDE ? halaaNPCHorde : halaaNPCAlly);
|
||||
}
|
||||
}
|
||||
|
||||
if (_value != oldValue)
|
||||
{
|
||||
SendChangePhase();
|
||||
}
|
||||
|
||||
if (_oldState != _state)
|
||||
{
|
||||
if (oldTeam != _team)
|
||||
{
|
||||
ChangeTeam(oldTeam);
|
||||
}
|
||||
ChangeState();
|
||||
return true;
|
||||
}
|
||||
else m_RespawnTimer -= diff;
|
||||
}
|
||||
return OPvPCapturePoint::Update(diff);
|
||||
else
|
||||
SendUpdateWorldState(NA_UI_TOWER_SLIDER_DISPLAY, 0); //Point is not capturable so we hide the slider
|
||||
return false;
|
||||
}
|
||||
|
||||
void OPvPCapturePointNA::ChangeState()
|
||||
@@ -581,12 +791,14 @@ void OPvPCapturePointNA::ChangeState()
|
||||
break;
|
||||
case OBJECTIVESTATE_ALLIANCE:
|
||||
m_HalaaState = HALAA_A;
|
||||
FactionTakeOver(TEAM_ALLIANCE);
|
||||
if(m_canRecap)
|
||||
FactionTakeOver(TEAM_ALLIANCE);
|
||||
artkit = 2;
|
||||
break;
|
||||
case OBJECTIVESTATE_HORDE:
|
||||
m_HalaaState = HALAA_H;
|
||||
FactionTakeOver(TEAM_HORDE);
|
||||
if (m_canRecap)
|
||||
FactionTakeOver(TEAM_HORDE);
|
||||
artkit = 1;
|
||||
break;
|
||||
case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
|
||||
@@ -665,10 +877,7 @@ void OPvPCapturePointNA::UpdateWyvernRoostWorldState(uint32 roost)
|
||||
class OutdoorPvP_nagrand : public OutdoorPvPScript
|
||||
{
|
||||
public:
|
||||
OutdoorPvP_nagrand()
|
||||
: OutdoorPvPScript("outdoorpvp_na")
|
||||
{
|
||||
}
|
||||
OutdoorPvP_nagrand() : OutdoorPvPScript("outdoorpvp_na") { }
|
||||
|
||||
OutdoorPvP* GetOutdoorPvP() const override
|
||||
{
|
||||
@@ -676,8 +885,47 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct outdoorpvp_na_halaa_creatures : public ScriptedAI
|
||||
{
|
||||
outdoorpvp_na_halaa_creatures(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (halaaNPCHorde.size() != NA_HALAA_CREATURE_TEAM_SPAWN && halaaNPCAlly.size() != NA_HALAA_CREATURE_TEAM_SPAWN)
|
||||
{
|
||||
std::list<Creature*> creatures;
|
||||
uint32 entry = 0;
|
||||
for (int i = 0; i < NA_HALAA_CREATURES; i++)
|
||||
{
|
||||
me->GetCreatureListWithEntryInGrid(creatures, PatrolCreatureEntry[i].idPatrol, 250);
|
||||
}
|
||||
|
||||
if (creatures.size() == NA_HALAA_MAX_CREATURE_SPAWN)
|
||||
{
|
||||
for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
|
||||
{
|
||||
Creature* const c = *itr;
|
||||
if (entry < NA_HALAA_CREATURE_TEAM_SPAWN)
|
||||
{
|
||||
halaaNPCHorde[entry] = c->GetSpawnId();
|
||||
}
|
||||
else
|
||||
{
|
||||
halaaNPCAlly[entry - NA_HALAA_CREATURE_TEAM_SPAWN] = c->GetSpawnId();
|
||||
}
|
||||
c->AddObjectToRemoveList();
|
||||
entry++;
|
||||
sObjectMgr->RemoveCreatureFromGrid(c->GetSpawnId(), c->GetCreatureData());
|
||||
}
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_outdoorpvp_na()
|
||||
{
|
||||
new OutdoorPvP_nagrand();
|
||||
RegisterCreatureAI(outdoorpvp_na_halaa_creatures);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,10 +40,14 @@ const uint32 NA_HALAA_GRAVEYARD = 993;
|
||||
|
||||
const uint32 NA_HALAA_GRAVEYARD_ZONE = 3518; // need to add zone id, not area id
|
||||
|
||||
uint32 const NA_HALAA_ZONE_ID = 3628; // halaa zone id
|
||||
|
||||
const uint32 NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating all guards
|
||||
|
||||
const uint32 NA_GUARD_CHECK_TIME = 500; // every half second
|
||||
|
||||
const uint32 NA_HALAA_BOMB = 24538; // Item id Bomb throwed in Halaa
|
||||
|
||||
enum OutdoorPvPNAWorldStates
|
||||
{
|
||||
NA_UI_HORDE_GUARDS_SHOW = 2503,
|
||||
@@ -116,6 +120,20 @@ enum FlightSpellsNA
|
||||
NA_SPELL_FLY_EAST = 32081
|
||||
};
|
||||
|
||||
//Npc ids from Halaa guards, Ally and Horde
|
||||
enum HalaaGuardsNA
|
||||
{
|
||||
NA_HALAANI_GUARD_A = 18256,
|
||||
NA_HALAANI_GUARD_H = 18192
|
||||
};
|
||||
|
||||
enum HalaaCreaturesSpawn
|
||||
{
|
||||
NA_HALAA_CREATURES = 12, //Quantity of creatures_templates contains HALAA
|
||||
NA_HALAA_CREATURE_TEAM_SPAWN = 20, //Number of creatures by team
|
||||
NA_HALAA_MAX_CREATURE_SPAWN = 40 //Number of creatures by both teams
|
||||
};
|
||||
|
||||
// spawned when the alliance is attacking, horde is in control
|
||||
const go_type HordeControlGOs[NA_CONTROL_GO_NUM] =
|
||||
{
|
||||
@@ -125,9 +143,9 @@ const go_type HordeControlGOs[NA_CONTROL_GO_NUM] =
|
||||
{182282, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //ALLY_ROOST_EAST
|
||||
|
||||
{182222, 530, -1825.4022f, 8039.2602f, -26.08f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //HORDE_BOMB_WAGON_SOUTH
|
||||
{182272, 530, -1515.37f, 8136.91f, -20.42f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //HORDE_BOMB_WAGON_WEST
|
||||
{182273, 530, -1377.95f, 7773.44f, -10.31f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //HORDE_BOMB_WAGON_NORTH
|
||||
{182274, 530, -1659.87f, 7733.15f, -15.75f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //HORDE_BOMB_WAGON_EAST
|
||||
{182272, 530, -1517.44f, 8140.24f, -20.17f, -2.8099f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //HORDE_BOMB_WAGON_WEST
|
||||
{182273, 530, -1389.53f, 7782.50f, -11.62f, -1.5184f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //HORDE_BOMB_WAGON_NORTH
|
||||
{182274, 530, -1662.28f, 7735.00f, -15.96f, 1.8845f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //HORDE_BOMB_WAGON_EAST
|
||||
|
||||
{182266, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //DESTROYED_ALLY_ROOST_SOUTH
|
||||
{182275, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //DESTROYED_ALLY_ROOST_WEST
|
||||
@@ -144,9 +162,9 @@ const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] =
|
||||
{182304, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //HORDE_ROOST_EAST
|
||||
|
||||
{182305, 530, -1825.4022f, 8039.2602f, -26.08f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //ALLY_BOMB_WAGON_SOUTH
|
||||
{182306, 530, -1515.37f, 8136.91f, -20.42f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //ALLY_BOMB_WAGON_WEST
|
||||
{182307, 530, -1377.95f, 7773.44f, -10.31f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //ALLY_BOMB_WAGON_NORTH
|
||||
{182308, 530, -1659.87f, 7733.15f, -15.75f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //ALLY_BOMB_WAGON_EAST
|
||||
{182306, 530, -1517.44f, 8140.24f, -20.17f, -2.8099f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //ALLY_BOMB_WAGON_WEST
|
||||
{182307, 530, -1389.53f, 7782.50f, -11.62f, -1.5184f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //ALLY_BOMB_WAGON_NORTH
|
||||
{182308, 530, -1662.28f, 7735.00f, -15.96f, 1.8845f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //ALLY_BOMB_WAGON_EAST
|
||||
|
||||
{182297, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //DESTROYED_HORDE_ROOST_SOUTH
|
||||
{182298, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //DESTROYED_HORDE_ROOST_WEST
|
||||
@@ -154,79 +172,27 @@ const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] =
|
||||
{182300, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f} //DESTROYED_HORDE_ROOST_EAST
|
||||
};
|
||||
|
||||
enum ControlNPCTypes
|
||||
struct HalaaIds
|
||||
{
|
||||
NA_NPC_RESEARCHER = 0,
|
||||
NA_NPC_QUARTERMASTER,
|
||||
NA_NPC_BLADE_MERCHANT,
|
||||
NA_NPC_FOOD_MERCHANT,
|
||||
NA_NPC_AMMO,
|
||||
|
||||
NA_NPC_GUARD_01,
|
||||
NA_NPC_GUARD_02,
|
||||
NA_NPC_GUARD_03,
|
||||
NA_NPC_GUARD_04,
|
||||
NA_NPC_GUARD_05,
|
||||
NA_NPC_GUARD_06,
|
||||
NA_NPC_GUARD_07,
|
||||
NA_NPC_GUARD_08,
|
||||
NA_NPC_GUARD_09,
|
||||
NA_NPC_GUARD_10,
|
||||
NA_NPC_GUARD_11,
|
||||
NA_NPC_GUARD_12,
|
||||
NA_NPC_GUARD_13,
|
||||
NA_NPC_GUARD_14,
|
||||
NA_NPC_GUARD_15,
|
||||
|
||||
NA_CONTROL_NPC_NUM
|
||||
uint32 idPatrol;
|
||||
};
|
||||
|
||||
const creature_type HordeControlNPCs[NA_CONTROL_NPC_NUM] =
|
||||
const HalaaIds PatrolCreatureEntry[NA_HALAA_CREATURES] =
|
||||
{
|
||||
{18816, 530, -1523.92f, 7951.76f, -17.6942f, 3.51172f},
|
||||
{18821, 530, -1527.75f, 7952.46f, -17.6948f, 3.99317f},
|
||||
{21474, 530, -1520.14f, 7927.11f, -20.2527f, 3.39389f},
|
||||
{21484, 530, -1524.84f, 7930.34f, -20.182f, 3.6405f},
|
||||
{21483, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f},
|
||||
{18192, 530, -1654.06f, 8000.46f, -26.59f, 3.37f},
|
||||
{18192, 530, -1487.18f, 7899.1f, -19.53f, 0.954f},
|
||||
{18192, 530, -1480.88f, 7908.79f, -19.19f, 4.485f},
|
||||
{18192, 530, -1540.56f, 7995.44f, -20.45f, 0.947f},
|
||||
{18192, 530, -1546.95f, 8000.85f, -20.72f, 6.035f},
|
||||
{18192, 530, -1595.31f, 7860.53f, -21.51f, 3.747f},
|
||||
{18192, 530, -1642.31f, 7995.59f, -25.8f, 3.317f},
|
||||
{18192, 530, -1545.46f, 7995.35f, -20.63f, 1.094f},
|
||||
{18192, 530, -1487.58f, 7907.99f, -19.27f, 5.567f},
|
||||
{18192, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f},
|
||||
{18192, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f},
|
||||
{18192, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f},
|
||||
{18192, 530, -1550.6f, 7944.45f, -21.63f, 3.559f},
|
||||
{18192, 530, -1545.57f, 7935.83f, -21.13f, 3.448f},
|
||||
{18192, 530, -1550.86f, 7937.56f, -21.7f, 3.801f}
|
||||
};
|
||||
|
||||
const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] =
|
||||
{
|
||||
{18817, 530, -1591.18f, 8020.39f, -22.2042f, 4.59022f},
|
||||
{18822, 530, -1588.0f, 8019.0f, -22.2042f, 4.06662f},
|
||||
{21485, 530, -1521.93f, 7927.37f, -20.2299f, 3.24631f},
|
||||
{21487, 530, -1540.33f, 7971.95f, -20.7186f, 3.07178f},
|
||||
{21488, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f},
|
||||
{18256, 530, -1654.06f, 8000.46f, -26.59f, 3.37f},
|
||||
{18256, 530, -1487.18f, 7899.1f, -19.53f, 0.954f},
|
||||
{18256, 530, -1480.88f, 7908.79f, -19.19f, 4.485f},
|
||||
{18256, 530, -1540.56f, 7995.44f, -20.45f, 0.947f},
|
||||
{18256, 530, -1546.95f, 8000.85f, -20.72f, 6.035f},
|
||||
{18256, 530, -1595.31f, 7860.53f, -21.51f, 3.747f},
|
||||
{18256, 530, -1642.31f, 7995.59f, -25.8f, 3.317f},
|
||||
{18256, 530, -1545.46f, 7995.35f, -20.63f, 1.094f},
|
||||
{18256, 530, -1487.58f, 7907.99f, -19.27f, 5.567f},
|
||||
{18256, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f},
|
||||
{18256, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f},
|
||||
{18256, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f},
|
||||
{18256, 530, -1603.75f, 8000.36f, -24.18f, 4.516f},
|
||||
{18256, 530, -1585.73f, 7994.68f, -23.29f, 4.439f},
|
||||
{18256, 530, -1595.5f, 7991.27f, -23.53f, 4.738f}
|
||||
// Horde
|
||||
{18192},
|
||||
{18816},
|
||||
{18821},
|
||||
{21474},
|
||||
{21484},
|
||||
{21483},
|
||||
// Ally
|
||||
{18256},
|
||||
{18817},
|
||||
{18822},
|
||||
{21485},
|
||||
{21487},
|
||||
{21488}
|
||||
};
|
||||
|
||||
enum WyvernStates
|
||||
@@ -246,6 +212,8 @@ enum HalaaStates
|
||||
HALAA_H = 16
|
||||
};
|
||||
|
||||
typedef std::map<uint32, ObjectGuid::LowType> HalaaNPCS;
|
||||
|
||||
class Unit;
|
||||
class Creature;
|
||||
class OutdoorPvPNA;
|
||||
@@ -278,15 +246,14 @@ protected:
|
||||
// called when a faction takes control
|
||||
void FactionTakeOver(TeamId teamId);
|
||||
|
||||
void DeSpawnNPCs();
|
||||
void DeSpawnGOs();
|
||||
void DespawnGOs();
|
||||
void DespawnCreatures(HalaaNPCS teamNPC);
|
||||
|
||||
void SpawnNPCsForTeam(TeamId teamId);
|
||||
void SpawnNPCsForTeam(HalaaNPCS teamNPC);
|
||||
void SpawnGOsForTeam(TeamId teamId);
|
||||
|
||||
void UpdateWyvernRoostWorldState(uint32 roost);
|
||||
void UpdateHalaaWorldState();
|
||||
|
||||
private:
|
||||
bool m_capturable;
|
||||
|
||||
@@ -304,6 +271,8 @@ private:
|
||||
uint32 m_RespawnTimer;
|
||||
|
||||
uint32 m_GuardCheckTimer;
|
||||
|
||||
bool m_canRecap;
|
||||
};
|
||||
|
||||
class OutdoorPvPNA : public OutdoorPvP
|
||||
@@ -322,6 +291,8 @@ public:
|
||||
|
||||
void SendRemoveWorldStates(Player* player) override;
|
||||
|
||||
void HandleKill(Player* killer, Unit* killed) override;
|
||||
|
||||
void HandleKillImpl(Player* player, Unit* killed) override;
|
||||
|
||||
OPvPCapturePointNA* GetCapturePoint() { return m_obj; }
|
||||
|
||||
Reference in New Issue
Block a user