mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Battlegrounds: Rework Eye of the Storm (#29351)
This commit is contained in:
292
sql/updates/world/master/2023_10_12_00_world.sql
Normal file
292
sql/updates/world/master/2023_10_12_00_world.sql
Normal file
@@ -0,0 +1,292 @@
|
||||
SET @CGUID := 222699;
|
||||
SET @OGUID := 166313;
|
||||
SET @POOLID := 800005;
|
||||
SET @SPAWN_GROUP := 1020;
|
||||
SET @TRIGGER_ID_NEUTRAL := 33;
|
||||
SET @TRIGGER_SPAWN_ID := 38;
|
||||
|
||||
DELETE FROM `areatrigger_template` WHERE `Id` IN (@TRIGGER_ID_NEUTRAL) AND `IsServerSide` = 1;
|
||||
INSERT INTO `areatrigger_template` (`Id`, `IsServerSide`, `Type`, `Data0`, `Data1`) VALUES
|
||||
(@TRIGGER_ID_NEUTRAL, 1, 0, 3.0, 3.0);
|
||||
|
||||
DELETE FROM `areatrigger` WHERE `SpawnId` BETWEEN @TRIGGER_SPAWN_ID+0 AND @TRIGGER_SPAWN_ID+4 AND `IsServerSide` = 1;
|
||||
INSERT INTO `areatrigger` (`SpawnId`, `AreaTriggerId`, `IsServerSide`, `MapId`, `PosX`, `PosY`, `PosZ`, `Orientation`, `ShapeData0`, `ShapeData1`, `ScriptName`, `Comment`) VALUES
|
||||
(@TRIGGER_SPAWN_ID+0, @TRIGGER_ID_NEUTRAL, 1, 566, 2043.9499511719, 1729.7800292969, 1190.0400390625, 0.0, 1.5, 1.5, 'areatrigger_action_capture_flag', 'Eye of the Storm - Capture Flag - Fel Reaver'),
|
||||
(@TRIGGER_SPAWN_ID+1, @TRIGGER_ID_NEUTRAL, 1, 566, 2048.4699707031, 1393.5899658203, 1194.5400390625, 0.0, 1.5, 1.5, 'areatrigger_action_capture_flag', 'Eye of the Storm - Capture Flag - Blood Elf'),
|
||||
(@TRIGGER_SPAWN_ID+2, @TRIGGER_ID_NEUTRAL, 1, 566, 2284.7700195312, 1731.1099853516, 1190.0799560547, 0.0, 1.5, 1.5, 'areatrigger_action_capture_flag', 'Eye of the Storm - Capture Flag - Mage Tower'),
|
||||
(@TRIGGER_SPAWN_ID+3, @TRIGGER_ID_NEUTRAL, 1, 566, 2286.5600585938, 1402.3399658203, 1197.2900390625, 0.0, 1.5, 1.5, 'areatrigger_action_capture_flag', 'Eye of the Storm - Capture Flag - Horde');
|
||||
|
||||
UPDATE `gameobject_template` SET `StringId` = 'bg_eye_of_the_storm_control_zone' WHERE `entry` IN (184080, 184081, 184082, 184083);
|
||||
|
||||
DELETE FROM `gameobject_template_addon` WHERE `entry` IN (228508 /*Eye of the Storm Flag*/, 245854 /*Large Collision Wall*/);
|
||||
INSERT INTO `gameobject_template_addon` (`entry`, `faction`, `flags`, `WorldEffectID`, `AIAnimKitID`) VALUES
|
||||
(228508, 2059, 0, 0, 0), -- Eye of the Storm Flag
|
||||
(245854, 1375, 0, 0, 0); -- Large Collision Wall
|
||||
|
||||
UPDATE `gameobject_template_addon` SET `faction`=2059, `flags`=32 WHERE `entry`=208977; -- Eye of the Storm Flag
|
||||
|
||||
DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+20;
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `VerifiedBuild`) VALUES
|
||||
(@CGUID+0, 15384, 566, 3820, 3820, '0', '0', 0, 0, 0, 1807.920166015625, 1539.640625, 1259.7191162109375, 4.433136463165283203, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- OLDWorld Trigger (DO NOT DELETE) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@CGUID+1, 15384, 566, 3820, 3820, '0', '0', 0, 0, 0, 2523.897705078125, 1596.935791015625, 1262.95751953125, 0.48869219422340393, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- OLDWorld Trigger (DO NOT DELETE) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@CGUID+2, 15384, 566, 3820, 3820, '0', '0', 0, 0, 0, 2249.007568359375, 1531.8736572265625, 1500.9945068359375, 5.445427417755126953, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- OLDWorld Trigger (DO NOT DELETE) (Area: Eye of the Storm - Difficulty: 0) CreateObject1 (Auras: )
|
||||
(@CGUID+3, 20212, 566, 3820, 3869, '0', '0', 0, 0, 0, 2284.876708984375, 1731.3350830078125, 1189.906982421875, 1.570796370506286621, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Horde Friendly + Invis Man) (Area: Mage Tower - Difficulty: 0) CreateObject2 (Auras: 66157 - Honorable Defender)
|
||||
(@CGUID+4, 20212, 566, 3820, 3869, '0', '0', 0, 0, 0, 2044.28, 1729.68, 1189.96, 0.017453, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Horde Friendly + Invis Man); Fel Reaver; Taken from C++ Script
|
||||
(@CGUID+5, 20212, 566, 3820, 3869, '0', '0', 0, 0, 0, 2048.83, 1393.65, 1194.49, 0.20944, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Horde Friendly + Invis Man); Blood Elf; Taken from C++ Script
|
||||
(@CGUID+6, 20212, 566, 3820, 3869, '0', '0', 0, 0, 0, 2286.56, 1402.36, 1197.11, 3.72381, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Horde Friendly + Invis Man); Draenei Ruins; Taken from C++ Script
|
||||
(@CGUID+7, 20213, 566, 3820, 3869, '0', '0', 0, 0, 0, 2284.876708984375, 1731.3350830078125, 1189.906982421875, 1.570796370506286621, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Alliance Friendly + Invis Man) (Area: Mage Tower - Difficulty: 0) CreateObject2 (Auras: 66157 - Honorable Defender)
|
||||
(@CGUID+8, 20213, 566, 3820, 3869, '0', '0', 0, 0, 0, 2044.28, 1729.68, 1189.96, 0.017453, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Alliance Friendly + Invis Man); Fel Reaver; Taken from C++ Script
|
||||
(@CGUID+9, 20213, 566, 3820, 3869, '0', '0', 0, 0, 0, 2048.83, 1393.65, 1194.49, 0.20944, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Alliance Friendly + Invis Man); Blood Elf; Taken from C++ Script
|
||||
(@CGUID+10, 20213, 566, 3820, 3869, '0', '0', 0, 0, 0, 2286.56, 1402.36, 1197.11, 3.72381, 7200, 0, 0, 152441, 0, 0, NULL, NULL, NULL, NULL, 50791), -- World Trigger (Alliance Friendly + Invis Man); Draenei Ruins; Taken from C++ Script
|
||||
(@CGUID+11, 13117, 566, 3820, 0, '0', '0', 0, 0, 1, 2008.588134765625, 1458.1363525390625, 1172.3004150390625, 5.707226753234863281, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791), -- Horde Spirit Guide (Area: 0 - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost)
|
||||
(@CGUID+12, 13116, 566, 3820, 3870, '0', '0', 0, 0, 1, 2008.46484375, 1458.080078125, 1172.3017578125, 5.654866695404052734, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791), -- Alliance Spirit Guide (Area: Blood Elf Tower - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost)(@CGUID+ZZZZZZ252, 13117, 566, 3820, 0, '0', '0', 0, 0, 1, 2008.588134765625, 1458.1363525390625, 1172.3004150390625, 5.707226753234863281, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791); -- Horde Spirit Guide (Area: 0 - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost)
|
||||
(@CGUID+13, 13116, 566, 3820, 3872, '0', '0', 0, 0, 1, 2008.0699462890625, 1673.3131103515625, 1182.20654296875, 0.523598790168762207, 7200, 0, 0, 10392670, 533108, 0, NULL, NULL, NULL, NULL, 26365), -- Alliance Spirit Guide (Area: Fel Reaver Ruins - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost, 9617 - Ghost Visual)
|
||||
(@CGUID+14, 13117, 566, 3820, 3872, '0', '0', 0, 0, 1, 2357.619140625, 1457.8212890625, 1185.417724609375, 3.630284786224365234, 7200, 0, 0, 10392670, 533108, 0, NULL, NULL, NULL, NULL, 26365), -- Horde Spirit Guide (Area: Fel Reaver Ruins - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost, 9617 - Ghost Visual)
|
||||
(@CGUID+15, 13117, 566, 3820, 3870, '0', '0', 0, 0, 1, 2358.76220703125, 1680.4056396484375, 1173.237060546875, 2.373647689819335937, 7200, 0, 0, 10392670, 533108, 0, NULL, NULL, NULL, NULL, 26365), -- Horde Spirit Guide (Area: Blood Elf Tower - Difficulty: 0) CreateObject2 (Auras: 9036 - Ghost)
|
||||
(@CGUID+16, 13116, 566, 3820, 3820, '0', '0', 0, 0, 1, 2358.496826171875, 1680.3402099609375, 1173.237060546875, 2.076941728591918945, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791), -- Alliance Spirit Guide (Area: Eye of the Storm - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost)
|
||||
(@CGUID+17, 13116, 566, 3820, 3820, '0', '0', 0, 0, 1, 2357.604248046875, 1457.8045654296875, 1185.417724609375, 3.455751895904541015, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791), -- Alliance Spirit Guide (Area: Eye of the Storm - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost)
|
||||
(@CGUID+18, 13117, 566, 3820, 3820, '0', '0', 0, 0, 1, 1805.5521240234375, 1539.5572509765625, 1248.2933349609375, 0.087266460061073303, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791), -- Horde Spirit Guide (Area: Eye of the Storm - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost, 9617 - Ghost Visual)
|
||||
(@CGUID+19, 13116, 566, 3820, 3820, '0', '0', 0, 0, 1, 2526.2734375, 1596.498291015625, 1248.6959228515625, 3.106686115264892578, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791), -- Alliance Spirit Guide (Area: Eye of the Storm - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost, 9617 - Ghost Visual)
|
||||
(@CGUID+20, 13117, 566, 3820, 3820, '0', '0', 0, 0, 1, 2007.931396484375, 1673.318115234375, 1182.2069091796875, 0.558505356311798095, 7200, 0, 0, 1129190, 6310, 0, NULL, NULL, NULL, NULL, 50791); -- Horde Spirit Guide (Area: Eye of the Storm - Difficulty: 0) CreateObject1 (Auras: 9036 - Ghost)
|
||||
|
||||
DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+20;
|
||||
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `StandState`, `AnimTier`, `VisFlags`, `SheathState`, `PvpFlags`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
|
||||
(@CGUID+3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'), -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
(@CGUID+10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, '66157'); -- World Trigger (Horde Friendly + Invis Man) - 66157 - Honorable Defender
|
||||
|
||||
DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+54;
|
||||
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES
|
||||
(@OGUID+0, 184720, 566, 3820, 3820, '0', '0', 0, 1803.2066650390625, 1539.486083984375, 1238.4544677734375, 3.13898324966430664, 0.173647880554199218, 0, 0.984807014465332031, 0.001244877814315259, 7200, 255, 1, 50791), -- Forcefield 001 (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+1, 184719, 566, 3820, 3820, '0', '0', 0, 2527.59716796875, 1596.90625, 1238.4544677734375, 3.159139871597290039, 0.173641681671142578, 0.001514434814453125, -0.98476982116699218, 0.008638577535748481, 7200, 255, 1, 50791), -- Forcefield 000 (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+2, 184978, 566, 3820, 3820, '0', '0', 0, 2302.4765625, 1391.244873046875, 1197.7364501953125, 1.762782454490661621, 0, 0, 0.771624565124511718, 0.636078238487243652, 7200, 255, 1, 50791), -- Berserk Buff (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+3, 184964, 566, 3820, 3820, '0', '0', 0, 2050.46826171875, 1372.2020263671875, 1194.5634765625, 1.675513744354248046, 0, 0, 0.743144035339355468, 0.669131457805633544, 7200, 255, 1, 50791), -- Speed Buff (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+4, 184971, 566, 3820, 3820, '0', '0', 0, 2046.462646484375, 1749.1666259765625, 1190.010498046875, 5.410521507263183593, 0, 0, -0.42261791229248046, 0.906307935714721679, 7200, 255, 1, 50791), -- Restoration Buff (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+5, 184975, 566, 3820, 3820, '0', '0', 0, 2283.7099609375, 1748.8699951171875, 1189.7071533203125, 4.782202720642089843, 0, 0, -0.68199825286865234, 0.731353819370269775, 7200, 255, 1, 50791), -- Berserk Buff (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+6, 184382, 566, 3820, 3820, '0', '0', 0, 2025.13720703125, 1386.1336669921875, 1192.5482177734375, 2.391098499298095703, 0, 0, 0.930417060852050781, 0.366502493619918823, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+7, 184382, 566, 3820, 3820, '0', '0', 0, 2057.4931640625, 1735.111083984375, 1187.675537109375, 5.340708732604980468, 0, 0, -0.45398998260498046, 0.891006767749786376, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+8, 184382, 566, 3820, 3820, '0', '0', 0, 2092.395751953125, 1775.451416015625, 1186.965576171875, 5.89921426773071289, 0, 0, -0.19080829620361328, 0.981627285480499267, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+9, 184382, 566, 3820, 3820, '0', '0', 0, 2074.3212890625, 1385.76220703125, 1194.362060546875, 0.488691210746765136, 0, 0, 0.241921424865722656, 0.970295846462249755, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+10, 184382, 566, 3820, 3820, '0', '0', 0, 2032.2569580078125, 1729.5572509765625, 1191.0802001953125, 1.797688722610473632, 0, 0, 0.7826080322265625, 0.622514784336090087, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+11, 184382, 566, 3820, 3820, '0', '0', 0, 2047.1875, 1349.1944580078125, 1188.5731201171875, 4.642575740814208984, 0, 0, -0.731353759765625, 0.681998312473297119, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+12, 184382, 566, 3820, 3820, '0', '0', 0, 2245.40966796875, 1366.4410400390625, 1195.1107177734375, 2.356194972991943359, 0, 0, 0.923879623413085937, 0.382683247327804565, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+13, 184382, 566, 3820, 3820, '0', '0', 0, 2270.84033203125, 1784.1197509765625, 1186.1473388671875, 2.303830623626708984, 0, 0, 0.913544654846191406, 0.406738430261611938, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+14, 184382, 566, 3820, 3820, '0', '0', 0, 2305.77783203125, 1404.5364990234375, 1199.246337890625, 1.570795774459838867, 0, 0, 0.707106590270996093, 0.707106947898864746, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+15, 184382, 566, 3820, 3820, '0', '0', 0, 2268.46533203125, 1736.8385009765625, 1186.742919921875, 0.942476630210876464, 0, 0, 0.453989982604980468, 0.891006767749786376, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+16, 184382, 566, 3820, 3820, '0', '0', 0, 2276.833251953125, 1400.4375, 1196.146728515625, 2.478367090225219726, 0, 0, 0.94551849365234375, 0.325568377971649169, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+17, 184382, 566, 3820, 3820, '0', '0', 0, 2300.9931640625, 1741.5504150390625, 1187.10693359375, 5.375615119934082031, 0, 0, -0.4383707046508789, 0.898794233798980712, 7200, 255, 1, 50791), -- Visual Banner (Neutral) (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+18, 208977, 566, 3820, 3820, '0', '0', 0, 2174.444580078125, 1569.421875, 1159.852783203125, 4.625123500823974609, 0, 0, -0.73727703094482421, 0.67559051513671875, 7200, 255, 1, 50791), -- Eye of the Storm Flag (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+19, 184381, 566, 3820, 3820, '0', '0', 0, 2245.395751953125, 1366.4132080078125, 1195.27880859375, 2.216565132141113281, 0, 0, 0.894933700561523437, 0.44619917869567871, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+20, 184381, 566, 3820, 3820, '0', '0', 0, 2305.776123046875, 1404.5572509765625, 1199.384765625, 1.745326757431030273, 0, 0, 0.766043663024902343, 0.642788589000701904, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+21, 184381, 566, 3820, 3820, '0', '0', 0, 2276.796875, 1400.407958984375, 1196.333740234375, 2.44346022605895996, 0, 0, 0.939692497253417968, 0.34202045202255249, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+22, 184380, 566, 3820, 3820, '0', '0', 0, 2025.09375, 1386.12158203125, 1192.6536865234375, 2.373644113540649414, 0, 0, 0.927183151245117187, 0.37460830807685852, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+23, 184380, 566, 3820, 3820, '0', '0', 0, 2047.1978759765625, 1349.1875, 1188.5650634765625, 4.625123500823974609, 0, 0, -0.73727703094482421, 0.67559051513671875, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+24, 184380, 566, 3820, 3820, '0', '0', 0, 2074.3056640625, 1385.7725830078125, 1194.4686279296875, 0.471238493919372558, 0, 0, 0.233445167541503906, 0.972369968891143798, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+25, 184381, 566, 3820, 3820, '0', '0', 0, 2300.85595703125, 1741.24658203125, 1187.793212890625, 5.497788906097412109, 0, 0, -0.38268280029296875, 0.923879802227020263, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+26, 184381, 566, 3820, 3820, '0', '0', 0, 2269.126708984375, 1737.703125, 1186.8145751953125, 0.994837164878845214, 0, 0, 0.477158546447753906, 0.878817260265350341, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+27, 184381, 566, 3820, 3820, '0', '0', 0, 2270.8359375, 1784.080322265625, 1186.757080078125, 2.426007747650146484, 0, 0, 0.936672210693359375, 0.350207358598709106, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+28, 184380, 566, 3820, 3820, '0', '0', 0, 2092.354248046875, 1775.4583740234375, 1187.079345703125, 5.881760597229003906, 0, 0, -0.19936752319335937, 0.979924798011779785, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+29, 184380, 566, 3820, 3820, '0', '0', 0, 2032.251708984375, 1729.532958984375, 1190.3251953125, 1.867502212524414062, 0, 0, 0.803856849670410156, 0.594822824001312255, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+30, 184380, 566, 3820, 3820, '0', '0', 0, 2057.45654296875, 1735.07470703125, 1187.9063720703125, 5.35816192626953125, 0, 0, -0.446197509765625, 0.894934535026550292, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Eye of the Storm - Difficulty: 0) CreateObject2
|
||||
(@OGUID+31, 184973, 566, 3820, 0, '0', '0', 0, 2283.7099609375, 1748.8699951171875, 1189.7071533203125, 4.782202720642089843, 0, 0, -0.68199825286865234, 0.731353819370269775, 7200, 255, 1, 50791), -- Speed Buff (Area: 0 - Difficulty: 0) CreateObject1
|
||||
(@OGUID+32, 184965, 566, 3820, 0, '0', '0', 0, 2050.46826171875, 1372.2020263671875, 1194.5634765625, 1.675513744354248046, 0, 0, 0.743144035339355468, 0.669131457805633544, 7200, 255, 1, 50791), -- Restoration Buff (Area: 0 - Difficulty: 0) CreateObject1
|
||||
(@OGUID+33, 184381, 566, 3820, 0, '0', '0', 0, 2074.319580078125, 1385.779541015625, 1194.7203369140625, 0.488691210746765136, 0, 0, 0.241921424865722656, 0.970295846462249755, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: 0 - Difficulty: 0) CreateObject2
|
||||
(@OGUID+34, 184381, 566, 3820, 0, '0', '0', 0, 2047.1910400390625, 1349.1927490234375, 1189.0032958984375, 4.660029888153076171, 0, 0, -0.72537422180175781, 0.688354730606079101, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: 0 - Difficulty: 0) CreateObject2
|
||||
(@OGUID+35, 184381, 566, 3820, 0, '0', '0', 0, 2025.125, 1386.123291015625, 1192.7354736328125, 2.391098499298095703, 0, 0, 0.930417060852050781, 0.366502493619918823, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: 0 - Difficulty: 0) CreateObject2
|
||||
(@OGUID+36, 184977, 566, 3820, 0, '0', '0', 0, 2302.4765625, 1391.244873046875, 1197.7364501953125, 1.762782454490661621, 0, 0, 0.771624565124511718, 0.636078238487243652, 7200, 255, 1, 50791), -- Restoration Buff (Area: 0 - Difficulty: 0) CreateObject1
|
||||
(@OGUID+37, 184380, 566, 3820, 3869, '0', '0', 0, 2301.01904296875, 1741.4930419921875, 1187.48974609375, 5.375615119934082031, 0, 0, -0.4383707046508789, 0.898794233798980712, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Mage Tower - Difficulty: 0) CreateObject2
|
||||
(@OGUID+38, 184380, 566, 3820, 3869, '0', '0', 0, 2270.869873046875, 1784.0989990234375, 1186.4384765625, 2.356194972991943359, 0, 0, 0.923879623413085937, 0.382683247327804565, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Mage Tower - Difficulty: 0) CreateObject2
|
||||
(@OGUID+39, 184380, 566, 3820, 3869, '0', '0', 0, 2268.59716796875, 1737.0191650390625, 1186.75390625, 0.942476630210876464, 0, 0, 0.453989982604980468, 0.891006767749786376, 7200, 255, 1, 50791), -- Visual Banner (Horde) (Area: Mage Tower - Difficulty: 0) CreateObject2
|
||||
(@OGUID+40, 184974, 566, 3820, 0, '0', '0', 0, 2283.7099609375, 1748.8699951171875, 1189.7071533203125, 4.782202720642089843, 0, 0, -0.68199825286865234, 0.731353819370269775, 7200, 255, 1, 50791), -- Restoration Buff (Area: 0 - Difficulty: 0) CreateObject1
|
||||
(@OGUID+41, 184381, 566, 3820, 3871, '0', '0', 0, 2032.248291015625, 1729.546875, 1191.2296142578125, 1.797688722610473632, 0, 0, 0.7826080322265625, 0.622514784336090087, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
(@OGUID+42, 184381, 566, 3820, 3871, '0', '0', 0, 2057.47265625, 1735.109130859375, 1188.065673828125, 5.305802345275878906, 0, 0, -0.46947097778320312, 0.882947921752929687, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
(@OGUID+43, 184381, 566, 3820, 3871, '0', '0', 0, 2092.338623046875, 1775.4739990234375, 1187.504150390625, 5.811946868896484375, 0, 0, -0.2334451675415039, 0.972369968891143798, 7200, 255, 1, 50791), -- Visual Banner (Alliance) (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
(@OGUID+44, 184972, 566, 3820, 3871, '0', '0', 0, 2046.462646484375, 1749.1666259765625, 1190.010498046875, 5.410521507263183593, 0, 0, -0.42261791229248046, 0.906307935714721679, 7200, 255, 1, 50791), -- Berserk Buff (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
(@OGUID+45, 184080, 566, 3820, 3871, '0', '0', 0, 2050.493164, 1372.235962, 1194.563477, 1.710423, 0, 0, 0, 0, 7200, 255, 1, 50791), -- Blood Elf Control Zone
|
||||
(@OGUID+46, 184081, 566, 3820, 3871, '0', '0', 0, 2024.600708, 1742.819580, 1195.157715, 2.443461, 0, 0, 0, 0, 7200, 255, 1, 50791), -- Fel Reaver Control Zone
|
||||
(@OGUID+47, 184082, 566, 3820, 3871, '0', '0', 0, 2282.121582, 1760.006958, 1189.707153, 1.919862, 0, 0, 0.0, 0, 7200, 255, 1, 50791), -- Mage Tower Control Zone
|
||||
(@OGUID+48, 184083, 566, 3820, 3871, '0', '0', 0, 2301.010498, 1386.931641, 1197.183472, 1.570796, 0, 0, 0, 0, 7200, 255, 1, 50791), -- Draenei Ruins Control Zone
|
||||
(@OGUID+49, 184970, 566, 3820, 3820, '0', '0', 0, 2046.462646484375, 1749.1666259765625, 1190.010498046875, 5.410521507263183593, 0, 0, -0.42261791229248046, 0.906307935714721679, 7200, 255, 1, 51485), -- Speed Buff (Area: Eye of the Storm - Difficulty: 0) CreateObject1
|
||||
(@OGUID+50, 184976, 566, 3820, 0, '0', '0', 0, 2302.4765625, 1391.244873046875, 1197.7364501953125, 1.762782454490661621, 0, 0, 0.771624565124511718, 0.636078238487243652, 7200, 255, 1, 26365), -- Speed Buff (Area: 0 - Difficulty: 0) CreateObject1
|
||||
(@OGUID+51, 184966, 566, 3820, 3869, '0', '0', 0, 2050.46826171875, 1372.2020263671875, 1194.5634765625, 1.675513744354248046, 0, 0, 0.743144035339355468, 0.669131457805633544, 7200, 255, 1, 26365), -- Berserk Buff (Area: Mage Tower - Difficulty: 0) CreateObject1
|
||||
(@OGUID+52, 184380, 566, 3820, 3871, '0', '0', 0, 2276.798583984375, 1400.4410400390625, 1196.2200927734375, 2.495818138122558593, 0, 0, 0.948323249816894531, 0.317305892705917358, 7200, 255, 1, 51485), -- Visual Banner (Horde) (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
(@OGUID+53, 184380, 566, 3820, 3871, '0', '0', 0, 2305.763916015625, 1404.5972900390625, 1199.3333740234375, 1.640606880187988281, 0, 0, 0.731352806091308593, 0.6819993257522583, 7200, 255, 1, 51485), -- Visual Banner (Horde) (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
(@OGUID+54, 184380, 566, 3820, 3871, '0', '0', 0, 2245.382080078125, 1366.454833984375, 1195.1815185546875, 2.373644113540649414, 0, 0, 0.927183151245117187, 0.37460830807685852, 7200, 255, 1, 51485); -- Visual Banner (Horde) (Area: Draenei Ruins - Difficulty: 0) CreateObject2
|
||||
|
||||
DELETE FROM `gameobject_addon` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+54;
|
||||
|
||||
-- Graveyards
|
||||
DELETE FROM `graveyard_zone` WHERE `ID` IN (1103, 1104, 1105, 1106, 1107, 1108);
|
||||
INSERT INTO `graveyard_zone` (`ID`, `GhostZone`,`Comment`) VALUES
|
||||
(1103, 3820, 'Eye of the Storm - Alliance Base'),
|
||||
(1104, 3820, 'Eye of the Storm - Horde Base'),
|
||||
(1105, 3820, 'Eye of the Storm - Fel Reaver'),
|
||||
(1106, 3820, 'Eye of the Storm - Blood Elf'),
|
||||
(1107, 3820, 'Eye of the Storm - Draenei Ruins'),
|
||||
(1108, 3820, 'Eye of the Storm - Mage Tower');
|
||||
|
||||
-- Graveyard conditions
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 27 AND `SourceEntry` IN (1103, 1104, 1105, 1106, 1107, 1108);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceEntry`, `SourceGroup`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES
|
||||
-- Bases
|
||||
(27, 1103, 3820, 0, 6, 469, 0, 'Graveyard - Eye of the Storm - Alliance Base - Team Alliance'),
|
||||
(27, 1104, 3820, 0, 6, 67, 0, 'Graveyard - Eye of the Storm - Horde Base - Team Horde'),
|
||||
-- Fel Reaver
|
||||
(27, 1105, 3820, 0, 6, 469, 0, 'Graveyard - Eye of the Storm - Fel Reaver - Team Alliance'),
|
||||
(27, 1105, 3820, 0, 11, 2726, 1, 'Graveyard - Eye of the Storm - Fel Reaver - Alliance Controlled'),
|
||||
(27, 1105, 3820, 1, 6, 67, 0, 'Graveyard - Eye of the Storm - Fel Reaver - Team Horde'),
|
||||
(27, 1105, 3820, 1, 11, 2727, 1, 'Graveyard - Eye of the Storm - Fel Reaver - Horde Controlled'),
|
||||
-- Blood Elf
|
||||
(27, 1106, 3820, 0, 6, 469, 0, 'Graveyard - Eye of the Storm - Blood Elf - Team Alliance'),
|
||||
(27, 1106, 3820, 0, 11, 2723, 1, 'Graveyard - Eye of the Storm - Blood Elf - Alliance Controlled'),
|
||||
(27, 1106, 3820, 1, 6, 67, 0, 'Graveyard - Eye of the Storm - Blood Elf - Team Horde'),
|
||||
(27, 1106, 3820, 1, 11, 2724, 1, 'Graveyard - Eye of the Storm - Blood Elf - Horde Controlled'),
|
||||
-- Draenei Ruins
|
||||
(27, 1107, 3820, 0, 6, 469, 0, 'Graveyard - Eye of the Storm - Draenei Ruins - Team Alliance'),
|
||||
(27, 1107, 3820, 0, 11, 2732, 1, 'Graveyard - Eye of the Storm - Draenei Ruins - Alliance Controlled'),
|
||||
(27, 1107, 3820, 1, 6, 67, 0, 'Graveyard - Eye of the Storm - Draenei Ruins - Team Horde'),
|
||||
(27, 1107, 3820, 1, 11, 2733, 1, 'Graveyard - Eye of the Storm - Draenei Ruins - Horde Controlled'),
|
||||
-- Mage Tower
|
||||
(27, 1108, 3820, 0, 6, 469, 0, 'Graveyard - Eye of the Storm - Mage Tower - Team Alliance'),
|
||||
(27, 1108, 3820, 0, 11, 2730, 1, 'Graveyard - Eye of the Storm - Mage Tower - Alliance Controlled'),
|
||||
(27, 1108, 3820, 1, 6, 67, 0, 'Graveyard - Eye of the Storm - Mage Tower - Team Horde'),
|
||||
(27, 1108, 3820, 1, 11, 2729, 1, 'Graveyard - Eye of the Storm - Mage Tower - Horde Controlled');
|
||||
|
||||
DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOLID+0 AND @POOLID+3;
|
||||
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
|
||||
(@POOLID+0, 1, 'Battleground Eye of the Storm - Buffs - Blood Elf'),
|
||||
(@POOLID+1, 1, 'Battleground Eye of the Storm - Buffs - Fel Reaver'),
|
||||
(@POOLID+2, 1, 'Battleground Eye of the Storm - Buffs - Mage Tower'),
|
||||
(@POOLID+3, 1, 'Battleground Eye of the Storm - Buffs - Draenei Ruins');
|
||||
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry` IN (4568, 4569, 4570, 4571);
|
||||
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
|
||||
(4568, 'at_battleground_buffs'),
|
||||
(4569, 'at_battleground_buffs'),
|
||||
(4570, 'at_battleground_buffs'),
|
||||
(4571, 'at_battleground_buffs');
|
||||
|
||||
DELETE FROM `pool_members` WHERE `poolSpawnId` BETWEEN @POOLID+0 AND @POOLID+3;
|
||||
INSERT INTO `pool_members` (`type`, `spawnId`, `poolSpawnId`, `chance`, `description`) VALUES
|
||||
-- blood elf
|
||||
(1, @OGUID+3, @POOLID+0, 0, 'Battleground Eye of the Storm - Speed Buff - Blood Elf'),
|
||||
(1, @OGUID+32, @POOLID+0, 0, 'Battleground Eye of the Storm - Restoration Buff - Blood Elf'),
|
||||
(1, @OGUID+51, @POOLID+0, 0, 'Battleground Eye of the Storm - Berserker Buff - Blood Elf'),
|
||||
-- fel reaver
|
||||
(1, @OGUID+49, @POOLID+1, 0, 'Battleground Eye of the Storm - Speed Buff - Fel Reaver'),
|
||||
(1, @OGUID+4, @POOLID+1, 0, 'Battleground Eye of the Storm - Restoration Buff - Fel Reaver'),
|
||||
(1, @OGUID+44, @POOLID+1, 0, 'Battleground Eye of the Storm - Berserker Buff - Fel Reaver'),
|
||||
-- mage tower
|
||||
(1, @OGUID+31, @POOLID+2, 0, 'Battleground Eye of the Storm - Speed Buff - Mage Tower'),
|
||||
(1, @OGUID+40, @POOLID+2, 0, 'Battleground Eye of the Storm - Restoration Buff - Mage Tower'),
|
||||
(1, @OGUID+5, @POOLID+2, 0, 'Battleground Eye of the Storm - Berserker Buff - Mage Tower'),
|
||||
-- draenei ruins
|
||||
(1, @OGUID+50, @POOLID+3, 0, 'Battleground Eye of the Storm - Speed Buff - Draenei Ruins'),
|
||||
(1, @OGUID+36, @POOLID+3, 0, 'Battleground Eye of the Storm - Restoration Buff - Draenei Ruins'),
|
||||
(1, @OGUID+2, @POOLID+3, 0, 'Battleground Eye of the Storm - Berserker Buff - Draenei Ruins');
|
||||
|
||||
DELETE FROM `spawn_group_template` WHERE `groupId` BETWEEN @SPAWN_GROUP+0 AND @SPAWN_GROUP+24;
|
||||
INSERT INTO `spawn_group_template` (`groupId`, `groupName`, `groupFlags`) VALUES
|
||||
(@SPAWN_GROUP+0, 'Eye of the Storm - Blood Elf Tower - Horde Controlled', 0x20),
|
||||
(@SPAWN_GROUP+1, 'Eye of the Storm - Blood Elf Tower - Neutral Controlled', 0x20),
|
||||
(@SPAWN_GROUP+2, 'Eye of the Storm - Blood Elf Tower - Alliance Controlled', 0x20),
|
||||
(@SPAWN_GROUP+3, 'Eye of the Storm - Fel Reaver - Horde Controlled', 0x20),
|
||||
(@SPAWN_GROUP+4, 'Eye of the Storm - Fel Reaver - Neutral Controlled', 0x20),
|
||||
(@SPAWN_GROUP+5, 'Eye of the Storm - Fel Reaver - Alliance Controlled', 0x20),
|
||||
(@SPAWN_GROUP+6, 'Eye of the Storm - Mage Tower - Horde Controlled', 0x20),
|
||||
(@SPAWN_GROUP+7, 'Eye of the Storm - Mage Tower - Neutral Controlled', 0x20),
|
||||
(@SPAWN_GROUP+8, 'Eye of the Storm - Nage Tower - Alliance Controlled', 0x20),
|
||||
(@SPAWN_GROUP+9, 'Eye of the Storm - Draenei Ruins - Horde Controlled', 0x20),
|
||||
(@SPAWN_GROUP+10, 'Eye of the Storm - Draenei Ruins - Neutral Controlled', 0x20),
|
||||
(@SPAWN_GROUP+11, 'Eye of the Storm - Draenei Ruins - Alliance Controlled', 0x20);
|
||||
|
||||
DELETE FROM `spawn_group` WHERE `groupId` BETWEEN @SPAWN_GROUP+0 AND @SPAWN_GROUP+24;
|
||||
INSERT INTO `spawn_group` (`groupId`, `spawnType`, `spawnId`) VALUES
|
||||
-- Blood Elf
|
||||
-- -- Horde
|
||||
(@SPAWN_GROUP+0, 1, @OGUID+24),
|
||||
(@SPAWN_GROUP+0, 1, @OGUID+23),
|
||||
(@SPAWN_GROUP+0, 1, @OGUID+22),
|
||||
(@SPAWN_GROUP+0, 0, @CGUID+11),
|
||||
(@SPAWN_GROUP+0, 0, @CGUID+5),
|
||||
-- -- Neutral
|
||||
(@SPAWN_GROUP+1, 1, @OGUID+9),
|
||||
(@SPAWN_GROUP+1, 1, @OGUID+11),
|
||||
(@SPAWN_GROUP+1, 1, @OGUID+6),
|
||||
-- -- Alliance
|
||||
(@SPAWN_GROUP+2, 1, @OGUID+33),
|
||||
(@SPAWN_GROUP+2, 1, @OGUID+34),
|
||||
(@SPAWN_GROUP+2, 1, @OGUID+35),
|
||||
(@SPAWN_GROUP+2, 0, @CGUID+12),
|
||||
(@SPAWN_GROUP+2, 0, @CGUID+9),
|
||||
-- Fel Reaver
|
||||
-- -- Horde
|
||||
(@SPAWN_GROUP+3, 1, @OGUID+29),
|
||||
(@SPAWN_GROUP+3, 1, @OGUID+30),
|
||||
(@SPAWN_GROUP+3, 1, @OGUID+28),
|
||||
(@SPAWN_GROUP+3, 0, @CGUID+20),
|
||||
(@SPAWN_GROUP+3, 0, @CGUID+4),
|
||||
-- -- Neutral
|
||||
(@SPAWN_GROUP+4, 1, @OGUID+10),
|
||||
(@SPAWN_GROUP+4, 1, @OGUID+7),
|
||||
(@SPAWN_GROUP+4, 1, @OGUID+8),
|
||||
-- -- Alliance
|
||||
(@SPAWN_GROUP+5, 1, @OGUID+41),
|
||||
(@SPAWN_GROUP+5, 1, @OGUID+42),
|
||||
(@SPAWN_GROUP+5, 1, @OGUID+43),
|
||||
(@SPAWN_GROUP+5, 0, @CGUID+13),
|
||||
(@SPAWN_GROUP+5, 0, @CGUID+8),
|
||||
-- Mage Tower
|
||||
-- -- Horde
|
||||
(@SPAWN_GROUP+6, 1, @OGUID+38),
|
||||
(@SPAWN_GROUP+6, 1, @OGUID+39),
|
||||
(@SPAWN_GROUP+6, 1, @OGUID+37),
|
||||
(@SPAWN_GROUP+6, 0, @CGUID+15),
|
||||
(@SPAWN_GROUP+6, 0, @CGUID+3),
|
||||
-- -- Neutral
|
||||
(@SPAWN_GROUP+7, 1, @OGUID+13),
|
||||
(@SPAWN_GROUP+7, 1, @OGUID+15),
|
||||
(@SPAWN_GROUP+7, 1, @OGUID+17),
|
||||
-- -- Alliance
|
||||
(@SPAWN_GROUP+8, 1, @OGUID+27),
|
||||
(@SPAWN_GROUP+8, 1, @OGUID+26),
|
||||
(@SPAWN_GROUP+8, 1, @OGUID+25),
|
||||
(@SPAWN_GROUP+8, 0, @CGUID+16),
|
||||
(@SPAWN_GROUP+8, 0, @CGUID+7),
|
||||
-- Draenei Ruins
|
||||
-- -- Horde
|
||||
(@SPAWN_GROUP+9, 1, @OGUID+52),
|
||||
(@SPAWN_GROUP+9, 1, @OGUID+53),
|
||||
(@SPAWN_GROUP+9, 1, @OGUID+54),
|
||||
(@SPAWN_GROUP+9, 0, @CGUID+14),
|
||||
(@SPAWN_GROUP+9, 0, @CGUID+6),
|
||||
-- -- Neutral
|
||||
(@SPAWN_GROUP+10, 1, @OGUID+16),
|
||||
(@SPAWN_GROUP+10, 1, @OGUID+14),
|
||||
(@SPAWN_GROUP+10, 1, @OGUID+12),
|
||||
-- -- Alliance
|
||||
(@SPAWN_GROUP+11, 1, @OGUID+21),
|
||||
(@SPAWN_GROUP+11, 1, @OGUID+20),
|
||||
(@SPAWN_GROUP+11, 1, @OGUID+19),
|
||||
(@SPAWN_GROUP+11, 0, @CGUID+17),
|
||||
(@SPAWN_GROUP+11, 0, @CGUID+10);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=33 AND `SourceEntry` BETWEEN @SPAWN_GROUP+0 AND @SPAWN_GROUP+11;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(33, 0, @SPAWN_GROUP+0, 0, 0, 11, 0, 2724, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Blood Elf - Horde Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+1, 0, 0, 11, 0, 2722, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Blood Elf - Neutral Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+2, 0, 0, 11, 0, 2723, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Blood Elf - Alliance Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+3, 0, 0, 11, 0, 2727, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Fel Reaver - Horde Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+4, 0, 0, 11, 0, 2725, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Fel Reaver - Neutral Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+5, 0, 0, 11, 0, 2726, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Fel Reaver - Alliance Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+6, 0, 0, 11, 0, 2729, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Mage Tower - Horde Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+7, 0, 0, 11, 0, 2728, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Mage Tower - Neutral Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+8, 0, 0, 11, 0, 2730, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Mage Tower - Alliance Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+9, 0, 0, 11, 0, 2733, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Draenei Ruins - Horde Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+10, 0, 0, 11, 0, 2731, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Draenei Ruins - Neutral Controlled'),
|
||||
(33, 0, @SPAWN_GROUP+11, 0, 0, 11, 0, 2732, 1, 0, 0, 0, 0, '', 'Eye of the Storm - Draenei Ruins - Alliance Controlled');
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "BattlegroundEY.h"
|
||||
#include "AreaTrigger.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "Creature.h"
|
||||
@@ -26,40 +27,21 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Util.h"
|
||||
|
||||
BattlegroundEY::BattlegroundEY(BattlegroundTemplate const* battlegroundTemplate) : Battleground(battlegroundTemplate)
|
||||
{
|
||||
BgObjects.resize(BG_EY_OBJECT_MAX);
|
||||
BgCreatures.resize(BG_EY_CREATURES_MAX);
|
||||
m_Points_Trigger[FEL_REAVER] = TR_FEL_REAVER_BUFF;
|
||||
m_Points_Trigger[BLOOD_ELF] = TR_BLOOD_ELF_BUFF;
|
||||
m_Points_Trigger[DRAENEI_RUINS] = TR_DRAENEI_RUINS_BUFF;
|
||||
m_Points_Trigger[MAGE_TOWER] = TR_MAGE_TOWER_BUFF;
|
||||
m_HonorScoreTics[TEAM_ALLIANCE] = 0;
|
||||
m_HonorScoreTics[TEAM_HORDE] = 0;
|
||||
m_TeamPointsCount[TEAM_ALLIANCE] = 0;
|
||||
m_TeamPointsCount[TEAM_HORDE] = 0;
|
||||
m_FlagKeeper.Clear();
|
||||
m_DroppedFlagGUID.Clear();
|
||||
BgObjects.resize(0);
|
||||
BgCreatures.resize(0);
|
||||
m_HonorScoreTics = { 0, 0 };
|
||||
m_FlagCapturedBgObjectType = 0;
|
||||
m_FlagState = BG_EY_FLAG_STATE_ON_BASE;
|
||||
m_FlagsTimer = 0;
|
||||
m_TowerCapCheckTimer = 0;
|
||||
m_PointAddingTimer = 0;
|
||||
m_HonorTics = 0;
|
||||
|
||||
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
|
||||
{
|
||||
m_PointOwnedByTeam[i] = EY_POINT_NO_OWNER;
|
||||
m_PointState[i] = EY_POINT_STATE_UNCONTROLLED;
|
||||
m_PointBarStatus[i] = BG_EY_PROGRESS_BAR_STATE_MIDDLE;
|
||||
m_LastPointCaptureStatus[i] = BattlegroundPointCaptureStatus::Neutral;
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < 2 * EY_POINTS_MAX; ++i)
|
||||
m_CurrentPointPlayersCount[i] = 0;
|
||||
_pointsTimer.Reset(POINTS_TICK_TIME);
|
||||
_assaultEnabled = false;
|
||||
_assaultStackCount = 0;
|
||||
_flagAssaultTimer.Reset(BG_EY_FLAG_ASSAULT_TIMER);
|
||||
}
|
||||
|
||||
BattlegroundEY::~BattlegroundEY() { }
|
||||
@@ -68,53 +50,46 @@ void BattlegroundEY::PostUpdateImpl(uint32 diff)
|
||||
{
|
||||
if (GetStatus() == STATUS_IN_PROGRESS)
|
||||
{
|
||||
m_PointAddingTimer -= diff;
|
||||
if (m_PointAddingTimer <= 0)
|
||||
_pointsTimer.Update(diff);
|
||||
if (_pointsTimer.Passed())
|
||||
{
|
||||
m_PointAddingTimer = BG_EY_FPOINTS_TICK_TIME;
|
||||
if (m_TeamPointsCount[TEAM_ALLIANCE] > 0)
|
||||
AddPoints(ALLIANCE, BG_EY_TickPoints[m_TeamPointsCount[TEAM_ALLIANCE] - 1]);
|
||||
if (m_TeamPointsCount[TEAM_HORDE] > 0)
|
||||
AddPoints(HORDE, BG_EY_TickPoints[m_TeamPointsCount[TEAM_HORDE] - 1]);
|
||||
_pointsTimer.Reset(POINTS_TICK_TIME);
|
||||
|
||||
uint8 baseCountAlliance = GetControlledBaseCount(TEAM_ALLIANCE);
|
||||
uint8 baseCountHorde = GetControlledBaseCount(TEAM_HORDE);
|
||||
if (baseCountAlliance > 0)
|
||||
AddPoints(ALLIANCE, BG_EY_TickPoints[baseCountAlliance - 1]);
|
||||
if (baseCountHorde > 0)
|
||||
AddPoints(HORDE, BG_EY_TickPoints[baseCountHorde - 1]);
|
||||
}
|
||||
|
||||
if (m_FlagState == BG_EY_FLAG_STATE_WAIT_RESPAWN || m_FlagState == BG_EY_FLAG_STATE_ON_GROUND)
|
||||
if (_assaultEnabled)
|
||||
{
|
||||
m_FlagsTimer -= diff;
|
||||
|
||||
if (m_FlagsTimer < 0)
|
||||
_flagAssaultTimer.Update(diff);
|
||||
if (_flagAssaultTimer.Passed())
|
||||
{
|
||||
m_FlagsTimer = 0;
|
||||
if (m_FlagState == BG_EY_FLAG_STATE_WAIT_RESPAWN)
|
||||
RespawnFlag(true);
|
||||
else
|
||||
RespawnFlagAfterDrop();
|
||||
_flagAssaultTimer.Reset(BG_EY_FLAG_ASSAULT_TIMER);
|
||||
_assaultStackCount++;
|
||||
|
||||
// update assault debuff stacks
|
||||
DoForFlagKeepers([&](Player* player) -> void
|
||||
{
|
||||
ApplyAssaultDebuffToPlayer(player);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundEY::StartingEventCloseDoors()
|
||||
{
|
||||
SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_IMMEDIATELY);
|
||||
|
||||
for (uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER; i < BG_EY_OBJECT_MAX; ++i)
|
||||
SpawnBGObject(i, RESPAWN_ONE_DAY);
|
||||
}
|
||||
|
||||
void BattlegroundEY::StartingEventOpenDoors()
|
||||
{
|
||||
SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_ONE_DAY);
|
||||
|
||||
for (uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i)
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
for (uint32 i = 0; i < EY_POINTS_MAX; ++i)
|
||||
for (ObjectGuid const& door : _doorGUIDs)
|
||||
{
|
||||
//randomly spawn buff
|
||||
uint8 buff = urand(0, 2);
|
||||
SpawnBGObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + buff + i * 3, RESPAWN_IMMEDIATELY);
|
||||
if (GameObject* gameObject = GetBgMap()->GetGameObject(door))
|
||||
{
|
||||
gameObject->UseDoorOrButton();
|
||||
gameObject->DespawnOrUnsummon(3s);
|
||||
}
|
||||
}
|
||||
|
||||
// Achievement: Flurry
|
||||
@@ -134,20 +109,76 @@ void BattlegroundEY::AddPoints(uint32 Team, uint32 Points)
|
||||
UpdateTeamScore(team_index);
|
||||
}
|
||||
|
||||
BattlegroundPointCaptureStatus BattlegroundEY::GetPointCaptureStatus(uint32 point) const
|
||||
uint8 BattlegroundEY::GetControlledBaseCount(TeamId teamId) const
|
||||
{
|
||||
if (m_PointBarStatus[point] >= BG_EY_PROGRESS_BAR_ALI_CONTROLLED)
|
||||
return BattlegroundPointCaptureStatus::AllianceControlled;
|
||||
uint8 baseCount = 0;
|
||||
for (auto const& controlZoneHandler : _controlZoneHandlers)
|
||||
{
|
||||
uint32 point = controlZoneHandler.second->GetPoint();
|
||||
switch (teamId)
|
||||
{
|
||||
case TEAM_ALLIANCE:
|
||||
if (GetBgMap()->GetWorldStateValue(m_PointsIconStruct[point].WorldStateAllianceControlledIndex) == 1)
|
||||
baseCount++;
|
||||
break;
|
||||
case TEAM_HORDE:
|
||||
if (GetBgMap()->GetWorldStateValue(m_PointsIconStruct[point].WorldStateHordeControlledIndex) == 1)
|
||||
baseCount++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return baseCount;
|
||||
}
|
||||
|
||||
if (m_PointBarStatus[point] <= BG_EY_PROGRESS_BAR_HORDE_CONTROLLED)
|
||||
return BattlegroundPointCaptureStatus::HordeControlled;
|
||||
void BattlegroundEY::DoForFlagKeepers(std::function<void(Player*)> action) const
|
||||
{
|
||||
if (GameObject* flag = GetBgMap()->GetGameObject(_flagGUID))
|
||||
{
|
||||
if (Player* carrier = ObjectAccessor::FindPlayer(flag->GetFlagCarrierGUID()))
|
||||
action(carrier);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_CurrentPointPlayersCount[2 * point] == m_CurrentPointPlayersCount[2 * point + 1])
|
||||
return BattlegroundPointCaptureStatus::Neutral;
|
||||
void BattlegroundEY::ResetAssaultDebuff()
|
||||
{
|
||||
_assaultEnabled = false;
|
||||
_assaultStackCount = 0;
|
||||
_flagAssaultTimer.Reset(BG_EY_FLAG_ASSAULT_TIMER);
|
||||
DoForFlagKeepers([&](Player* player) -> void
|
||||
{
|
||||
RemoveAssaultDebuffFromPlayer(player);
|
||||
});
|
||||
}
|
||||
|
||||
return m_CurrentPointPlayersCount[2 * point] > m_CurrentPointPlayersCount[2 * point + 1]
|
||||
? BattlegroundPointCaptureStatus::AllianceCapturing
|
||||
: BattlegroundPointCaptureStatus::HordeCapturing;
|
||||
void BattlegroundEY::ApplyAssaultDebuffToPlayer(Player* player)
|
||||
{
|
||||
if (_assaultStackCount == 0)
|
||||
return;
|
||||
|
||||
uint32 spellId = BG_EY_FOCUSED_ASSAULT_SPELL;
|
||||
if (_assaultStackCount >= BG_EY_FLAG_BRUTAL_ASSAULT_STACK_COUNT)
|
||||
{
|
||||
player->RemoveAurasDueToSpell(BG_EY_FOCUSED_ASSAULT_SPELL);
|
||||
spellId = BG_EY_BRUTAL_ASSAULT_SPELL;
|
||||
}
|
||||
|
||||
Aura* aura = player->GetAura(spellId);
|
||||
if (!aura)
|
||||
{
|
||||
player->CastSpell(player, spellId, true);
|
||||
aura = player->GetAura(spellId);
|
||||
}
|
||||
|
||||
if (aura)
|
||||
aura->SetStackAmount(_assaultStackCount);
|
||||
}
|
||||
|
||||
void BattlegroundEY::RemoveAssaultDebuffFromPlayer(Player* player)
|
||||
{
|
||||
player->RemoveAurasDueToSpell(BG_EY_FOCUSED_ASSAULT_SPELL);
|
||||
player->RemoveAurasDueToSpell(BG_EY_BRUTAL_ASSAULT_SPELL);
|
||||
}
|
||||
|
||||
void BattlegroundEY::UpdateTeamScore(uint32 Team)
|
||||
@@ -176,6 +207,7 @@ void BattlegroundEY::EndBattleground(uint32 winner)
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
|
||||
if (winner == HORDE)
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
|
||||
|
||||
// Complete map reward
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
|
||||
@@ -183,33 +215,138 @@ void BattlegroundEY::EndBattleground(uint32 winner)
|
||||
Battleground::EndBattleground(winner);
|
||||
}
|
||||
|
||||
void BattlegroundEY::UpdatePointsCount(uint32 Team)
|
||||
void BattlegroundEY::UpdatePointsCount(TeamId teamId)
|
||||
{
|
||||
if (Team == ALLIANCE)
|
||||
UpdateWorldState(EY_ALLIANCE_BASE, m_TeamPointsCount[TEAM_ALLIANCE]);
|
||||
if (teamId == TEAM_ALLIANCE)
|
||||
UpdateWorldState(EY_ALLIANCE_BASE, GetControlledBaseCount(TEAM_ALLIANCE));
|
||||
else
|
||||
UpdateWorldState(EY_HORDE_BASE, m_TeamPointsCount[TEAM_HORDE]);
|
||||
UpdateWorldState(EY_HORDE_BASE, GetControlledBaseCount(TEAM_HORDE));
|
||||
}
|
||||
|
||||
void BattlegroundEY::UpdatePointsIcons(uint32 Team, uint32 Point)
|
||||
void BattlegroundEY::OnGameObjectCreate(GameObject* gameObject)
|
||||
{
|
||||
//we MUST firstly send 0, after that we can send 1!!!
|
||||
if (m_PointState[Point] == EY_POINT_UNDER_CONTROL)
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
UpdateWorldState(m_PointsIconStruct[Point].WorldStateControlIndex, 0);
|
||||
if (Team == ALLIANCE)
|
||||
UpdateWorldState(m_PointsIconStruct[Point].WorldStateAllianceControlledIndex, 1);
|
||||
else
|
||||
UpdateWorldState(m_PointsIconStruct[Point].WorldStateHordeControlledIndex, 1);
|
||||
case BG_OBJECT_A_DOOR_EY_ENTRY:
|
||||
case BG_OBJECT_H_DOOR_EY_ENTRY:
|
||||
_doorGUIDs.insert(gameObject->GetGUID());
|
||||
break;
|
||||
case BG_OBJECT_FLAG2_EY_ENTRY:
|
||||
_flagGUID = gameObject->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool BattlegroundEY::CanCaptureFlag(AreaTrigger* areaTrigger, Player* player)
|
||||
{
|
||||
if (areaTrigger->GetEntry() != AREATRIGGER_CAPTURE_FLAG)
|
||||
return false;
|
||||
|
||||
if (GameObject* flag = GetBgMap()->GetGameObject(_flagGUID))
|
||||
{
|
||||
if (flag->GetFlagCarrierGUID() != player->GetGUID())
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GameObject* controlzone = player->FindNearestGameObjectWithOptions(40.0f, { .StringId = "bg_eye_of_the_storm_control_zone" }))
|
||||
{
|
||||
uint32 point = _controlZoneHandlers[controlzone->GetEntry()]->GetPoint();
|
||||
switch (GetPlayerTeam(player->GetGUID()))
|
||||
{
|
||||
case ALLIANCE:
|
||||
return GetBgMap()->GetWorldStateValue(m_PointsIconStruct[point].WorldStateAllianceControlledIndex) == 1;
|
||||
case HORDE:
|
||||
return GetBgMap()->GetWorldStateValue(m_PointsIconStruct[point].WorldStateHordeControlledIndex) == 1;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BattlegroundEY::OnCaptureFlag(AreaTrigger* areaTrigger, Player* player)
|
||||
{
|
||||
if (areaTrigger->GetEntry() != AREATRIGGER_CAPTURE_FLAG)
|
||||
return;
|
||||
|
||||
uint32 baseCount = GetControlledBaseCount(GetTeamIndexByTeamId(GetPlayerTeam(player->GetGUID())));
|
||||
|
||||
if (GameObject* gameObject = GetBgMap()->GetGameObject(_flagGUID))
|
||||
gameObject->HandleCustomTypeCommand(GameObjectType::SetNewFlagState(FlagState::Respawning, player));
|
||||
|
||||
Team team = Team(GetPlayerTeam(player->GetGUID()));
|
||||
if (team == ALLIANCE)
|
||||
{
|
||||
SendBroadcastText(BG_EY_TEXT_ALLIANCE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Team == ALLIANCE)
|
||||
UpdateWorldState(m_PointsIconStruct[Point].WorldStateAllianceControlledIndex, 0);
|
||||
else
|
||||
UpdateWorldState(m_PointsIconStruct[Point].WorldStateHordeControlledIndex, 0);
|
||||
UpdateWorldState(m_PointsIconStruct[Point].WorldStateControlIndex, 1);
|
||||
SendBroadcastText(BG_EY_TEXT_HORDE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_HORDE);
|
||||
}
|
||||
|
||||
if (baseCount > 0)
|
||||
AddPoints(team, BG_EY_FlagPoints[baseCount - 1]);
|
||||
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_ON_BASE);
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_ON_BASE);
|
||||
|
||||
UpdatePlayerScore(player, SCORE_FLAG_CAPTURES, 1);
|
||||
|
||||
player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
|
||||
player->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::PvPActive);
|
||||
}
|
||||
|
||||
void BattlegroundEY::OnFlagStateChange(GameObject* /*flagInBase*/, FlagState /*oldValue*/, FlagState newValue, Player* player)
|
||||
{
|
||||
switch (newValue)
|
||||
{
|
||||
case FlagState::InBase:
|
||||
ResetAssaultDebuff();
|
||||
break;
|
||||
case FlagState::Dropped:
|
||||
player->CastSpell(player, SPELL_RECENTLY_DROPPED_NEUTRAL_FLAG, true);
|
||||
RemoveAssaultDebuffFromPlayer(player);
|
||||
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_WAIT_RESPAWN);
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_WAIT_RESPAWN);
|
||||
|
||||
if (GetPlayerTeam(player->GetGUID()) == ALLIANCE)
|
||||
SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_ALLIANCE);
|
||||
else
|
||||
SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_HORDE);
|
||||
break;
|
||||
case FlagState::Taken:
|
||||
if (GetPlayerTeam(player->GetGUID()) == ALLIANCE)
|
||||
{
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_ON_PLAYER);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_PICKED_UP_ALLIANCE);
|
||||
SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_ON_PLAYER);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_PICKED_UP_HORDE);
|
||||
SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
|
||||
}
|
||||
|
||||
ApplyAssaultDebuffToPlayer(player);
|
||||
_assaultEnabled = true;
|
||||
|
||||
player->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::PvPActive);
|
||||
break;
|
||||
case FlagState::Respawning:
|
||||
ResetAssaultDebuff();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateWorldState(NETHERSTORM_FLAG, AsUnderlyingType(newValue));
|
||||
}
|
||||
|
||||
void BattlegroundEY::AddPlayer(Player* player, BattlegroundQueueTypeId queueId)
|
||||
@@ -218,32 +355,6 @@ void BattlegroundEY::AddPlayer(Player* player, BattlegroundQueueTypeId queueId)
|
||||
Battleground::AddPlayer(player, queueId);
|
||||
if (!isInBattleground)
|
||||
PlayerScores[player->GetGUID()] = new BattlegroundEYScore(player->GetGUID(), player->GetBGTeam());
|
||||
|
||||
m_PlayersNearPoint[EY_POINTS_MAX].push_back(player->GetGUID());
|
||||
}
|
||||
|
||||
void BattlegroundEY::RemovePlayer(Player* player, ObjectGuid guid, uint32 /*team*/)
|
||||
{
|
||||
// sometimes flag aura not removed :(
|
||||
for (int j = EY_POINTS_MAX; j >= 0; --j)
|
||||
{
|
||||
for (size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i)
|
||||
if (m_PlayersNearPoint[j][i] == guid)
|
||||
m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i);
|
||||
}
|
||||
if (IsFlagPickedup())
|
||||
{
|
||||
if (m_FlagKeeper == guid)
|
||||
{
|
||||
if (player)
|
||||
EventPlayerDroppedFlag(player);
|
||||
else
|
||||
{
|
||||
SetFlagPicker(ObjectGuid::Empty);
|
||||
RespawnFlag(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundEY::HandleAreaTrigger(Player* player, uint32 trigger, bool entered)
|
||||
@@ -258,26 +369,6 @@ void BattlegroundEY::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
if (GetStatus() == STATUS_WAIT_JOIN && !entered)
|
||||
TeleportPlayerToExploitLocation(player);
|
||||
break;
|
||||
case TR_BLOOD_ELF_POINT:
|
||||
if (m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL && m_PointOwnedByTeam[BLOOD_ELF] == GetPlayerTeam(player->GetGUID()))
|
||||
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
|
||||
EventPlayerCapturedFlag(player, BG_EY_OBJECT_FLAG_BLOOD_ELF);
|
||||
break;
|
||||
case TR_FEL_REAVER_POINT:
|
||||
if (m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL && m_PointOwnedByTeam[FEL_REAVER] == GetPlayerTeam(player->GetGUID()))
|
||||
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
|
||||
EventPlayerCapturedFlag(player, BG_EY_OBJECT_FLAG_FEL_REAVER);
|
||||
break;
|
||||
case TR_MAGE_TOWER_POINT:
|
||||
if (m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL && m_PointOwnedByTeam[MAGE_TOWER] == GetPlayerTeam(player->GetGUID()))
|
||||
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
|
||||
EventPlayerCapturedFlag(player, BG_EY_OBJECT_FLAG_MAGE_TOWER);
|
||||
break;
|
||||
case TR_DRAENEI_RUINS_POINT:
|
||||
if (m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL && m_PointOwnedByTeam[DRAENEI_RUINS] == GetPlayerTeam(player->GetGUID()))
|
||||
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
|
||||
EventPlayerCapturedFlag(player, BG_EY_OBJECT_FLAG_DRAENEI_RUINS);
|
||||
break;
|
||||
case 4512:
|
||||
case 4515:
|
||||
case 4517:
|
||||
@@ -296,98 +387,12 @@ void BattlegroundEY::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
bool BattlegroundEY::SetupBattleground()
|
||||
{
|
||||
// doors
|
||||
if (!AddObject(BG_EY_OBJECT_DOOR_A, BG_OBJECT_A_DOOR_EY_ENTRY, 2527.59716796875f, 1596.90625f, 1238.4544677734375f, 3.159139871597290039f, 0.173641681671142578f, 0.001514434814453125f, -0.98476982116699218f, 0.008638577535748481f, RESPAWN_IMMEDIATELY)
|
||||
|| !AddObject(BG_EY_OBJECT_DOOR_H, BG_OBJECT_H_DOOR_EY_ENTRY, 1803.2066650390625f, 1539.486083984375f, 1238.4544677734375f, 3.13898324966430664f, 0.173647880554199218, 0.0f, 0.984807014465332031f, 0.001244877814315259f, RESPAWN_IMMEDIATELY)
|
||||
// banners (alliance)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2057.47265625f, 1735.109130859375f, 1188.065673828125f, 5.305802345275878906f, 0.0f, 0.0f, -0.46947097778320312f, 0.882947921752929687f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_FEL_REAVER_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2032.248291015625f, 1729.546875f, 1191.2296142578125f, 1.797688722610473632f, 0.0f, 0.0f, 0.7826080322265625f, 0.622514784336090087f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_FEL_REAVER_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2092.338623046875f, 1775.4739990234375f, 1187.504150390625f, 5.811946868896484375f, 0.0f, 0.0f, -0.2334451675415039f, 0.972369968891143798f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2047.1910400390625f, 1349.1927490234375f, 1189.0032958984375f, 4.660029888153076171f, 0.0f, 0.0f, -0.72537422180175781f, 0.688354730606079101f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_BLOOD_ELF_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2074.319580078125f, 1385.779541015625f, 1194.7203369140625f, 0.488691210746765136f, 0.0f, 0.0f, 0.241921424865722656f, 0.970295846462249755f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_BLOOD_ELF_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2025.125f, 1386.123291015625f, 1192.7354736328125f, 2.391098499298095703f, 0.0f, 0.0f, 0.930417060852050781f, 0.366502493619918823f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2276.796875f, 1400.407958984375f, 1196.333740234375f, 2.44346022605895996f, 0.0f, 0.0f, 0.939692497253417968f, 0.34202045202255249f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2305.776123046875f, 1404.5572509765625f, 1199.384765625f, 1.745326757431030273f, 0.0f, 0.0f, 0.766043663024902343f, 0.642788589000701904f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2245.395751953125f, 1366.4132080078125f, 1195.27880859375f, 2.216565132141113281f, 0.0f, 0.0f, 0.894933700561523437f, 0.44619917869567871f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_OBJECT_A_BANNER_EY_ENTRY, 2270.8359375f, 1784.080322265625f, 1186.757080078125f, 2.426007747650146484f, 0.0f, 0.0f, 0.936672210693359375f, 0.350207358598709106f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_MAGE_TOWER_LEFT, BG_OBJECT_A_BANNER_EY_ENTRY, 2269.126708984375f, 1737.703125f, 1186.8145751953125f, 0.994837164878845214f, 0.0f, 0.0f, 0.477158546447753906f, 0.878817260265350341f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_A_BANNER_MAGE_TOWER_RIGHT, BG_OBJECT_A_BANNER_EY_ENTRY, 2300.85595703125f, 1741.24658203125f, 1187.793212890625f, 5.497788906097412109f, 0.0f, 0.0f, -0.38268280029296875f, 0.923879802227020263f, RESPAWN_ONE_DAY)
|
||||
// banners (horde)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2057.45654296875f, 1735.07470703125f, 1187.9063720703125f, 5.35816192626953125f, 0.0f, 0.0f, -0.446197509765625f, 0.894934535026550292f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_FEL_REAVER_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2032.251708984375f, 1729.532958984375f, 1190.3251953125f, 1.867502212524414062f, 0.0f, 0.0f, 0.803856849670410156f, 0.594822824001312255f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_FEL_REAVER_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2092.354248046875f, 1775.4583740234375f, 1187.079345703125f, 5.881760597229003906f, 0.0f, 0.0f, -0.19936752319335937f, 0.979924798011779785f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2047.1978759765625f, 1349.1875f, 1188.5650634765625f, 4.625123500823974609f, 0.0f, 0.0f, -0.73727703094482421f, 0.67559051513671875f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_BLOOD_ELF_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2074.3056640625f, 1385.7725830078125f, 1194.4686279296875f, 0.471238493919372558f, 0.0f, 0.0f, 0.233445167541503906f, 0.972369968891143798f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_BLOOD_ELF_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2025.09375f, 1386.12158203125f, 1192.6536865234375f, 2.373644113540649414f, 0.0f, 0.0f, 0.927183151245117187f, 0.37460830807685852f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2276.798583984375f, 1400.4410400390625f, 1196.2200927734375f, 2.495818138122558593f, 0.0f, 0.0f, 0.948323249816894531f, 0.317305892705917358f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2305.763916015625f, 1404.5972900390625f, 1199.3333740234375f, 1.640606880187988281f, 0.0f, 0.0f, 0.731352806091308593f, 0.6819993257522583f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2245.382080078125f, 1366.454833984375f, 1195.1815185546875f, 2.373644113540649414f, 0.0f, 0.0f, 0.927183151245117187f, 0.37460830807685852f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_OBJECT_H_BANNER_EY_ENTRY, 2270.869873046875f, 1784.0989990234375f, 1186.4384765625f, 2.356194972991943359f, 0.0f, 0.0f, 0.923879623413085937f, 0.382683247327804565f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_MAGE_TOWER_LEFT, BG_OBJECT_H_BANNER_EY_ENTRY, 2268.59716796875f, 1737.0191650390625f, 1186.75390625f, 0.942476630210876464f, 0.0f, 0.0f, 0.453989982604980468f, 0.891006767749786376f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_H_BANNER_MAGE_TOWER_RIGHT, BG_OBJECT_H_BANNER_EY_ENTRY, 2301.01904296875f, 1741.4930419921875f, 1187.48974609375f, 5.375615119934082031f, 0.0f, 0.0f, -0.4383707046508789f, 0.898794233798980712f, RESPAWN_ONE_DAY)
|
||||
// banners (natural)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2057.4931640625f, 1735.111083984375f, 1187.675537109375f, 5.340708732604980468f, 0.0f, 0.0f, -0.45398998260498046f, 0.891006767749786376f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_FEL_REAVER_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2032.2569580078125f, 1729.5572509765625f, 1191.0802001953125f, 1.797688722610473632f, 0.0f, 0.0f, 0.7826080322265625f, 0.622514784336090087f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_FEL_REAVER_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2092.395751953125f, 1775.451416015625f, 1186.965576171875f, 5.89921426773071289f, 0.0f, 0.0f, -0.19080829620361328f, 0.981627285480499267f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2047.1875f, 1349.1944580078125f, 1188.5731201171875f, 4.642575740814208984f, 0.0f, 0.0f, -0.731353759765625f, 0.681998312473297119f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2074.3212890625f, 1385.76220703125f, 1194.362060546875f, 0.488691210746765136f, 0.0f, 0.0f, 0.241921424865722656f, 0.970295846462249755f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2025.13720703125f, 1386.1336669921875f, 1192.5482177734375f, 2.391098499298095703f, 0.0f, 0.0f, 0.930417060852050781f, 0.366502493619918823f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2276.833251953125f, 1400.4375f, 1196.146728515625f, 2.478367090225219726f, 0.0f, 0.0f, 0.94551849365234375f, 0.325568377971649169f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2305.77783203125f, 1404.5364990234375f, 1199.246337890625f, 1.570795774459838867f, 0.0f, 0.0f, 0.707106590270996093f, 0.707106947898864746f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2245.40966796875f, 1366.4410400390625f, 1195.1107177734375f, 2.356194972991943359f, 0.0f, 0.0f, 0.923879623413085937f, 0.382683247327804565f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_OBJECT_N_BANNER_EY_ENTRY, 2270.84033203125f, 1784.1197509765625f, 1186.1473388671875f, 2.303830623626708984f, 0.0f, 0.0f, 0.913544654846191406f, 0.406738430261611938f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_LEFT, BG_OBJECT_N_BANNER_EY_ENTRY, 2268.46533203125f, 1736.8385009765625f, 1186.742919921875f, 0.942476630210876464f, 0.0f, 0.0f, 0.453989982604980468f, 0.891006767749786376f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_RIGHT, BG_OBJECT_N_BANNER_EY_ENTRY, 2300.9931640625f, 1741.5504150390625f, 1187.10693359375f, 5.375615119934082031f, 0.0f, 0.0f, -0.4383707046508789f, 0.898794233798980712f, RESPAWN_ONE_DAY)
|
||||
// flags
|
||||
|| !AddObject(BG_EY_OBJECT_FLAG_NETHERSTORM, BG_OBJECT_FLAG2_EY_ENTRY, 2174.444580078125f, 1569.421875f, 1159.852783203125f, 4.625123500823974609f, 0.0f, 0.0f, -0.73727703094482421f, 0.67559051513671875f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_FLAG_FEL_REAVER, BG_OBJECT_FLAG1_EY_ENTRY, 2044.28f, 1729.68f, 1189.96f, -0.017453f, 0, 0, 0.008727f, -0.999962f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_FLAG_BLOOD_ELF, BG_OBJECT_FLAG1_EY_ENTRY, 2048.83f, 1393.65f, 1194.49f, 0.20944f, 0, 0, 0.104528f, 0.994522f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_FLAG_DRAENEI_RUINS, BG_OBJECT_FLAG1_EY_ENTRY, 2286.56f, 1402.36f, 1197.11f, 3.72381f, 0, 0, 0.957926f, -0.287016f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_FLAG_MAGE_TOWER, BG_OBJECT_FLAG1_EY_ENTRY, 2284.48f, 1731.23f, 1189.99f, 2.89725f, 0, 0, 0.992546f, 0.121869f, RESPAWN_ONE_DAY)
|
||||
// tower cap
|
||||
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_FEL_REAVER, BG_OBJECT_FR_TOWER_CAP_EY_ENTRY, 2024.600708f, 1742.819580f, 1195.157715f, 2.443461f, 0, 0, 0.939693f, 0.342020f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_BLOOD_ELF, BG_OBJECT_BE_TOWER_CAP_EY_ENTRY, 2050.493164f, 1372.235962f, 1194.563477f, 1.710423f, 0, 0, 0.754710f, 0.656059f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_DRAENEI_RUINS, BG_OBJECT_DR_TOWER_CAP_EY_ENTRY, 2301.010498f, 1386.931641f, 1197.183472f, 1.570796f, 0, 0, 0.707107f, 0.707107f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER, BG_OBJECT_HU_TOWER_CAP_EY_ENTRY, 2282.121582f, 1760.006958f, 1189.707153f, 1.919862f, 0, 0, 0.819152f, 0.573576f, RESPAWN_ONE_DAY)
|
||||
// buffs
|
||||
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER, BG_OBJECT_SPEED_BUFF_FEL_REAVER_EY_ENTRY, 2046.462646484375f, 1749.1666259765625f, 1190.010498046875f, 5.410521507263183593f, 0.0f, 0.0f, -0.42261791229248046f, 0.906307935714721679f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_REGENBUFF_FEL_REAVER, BG_OBJECT_RESTORATION_BUFF_FEL_REAVER_EY_ENTRY, 2046.462646484375f, 1749.1666259765625f, 1190.010498046875f, 5.410521507263183593f, 0.0f, 0.0f, -0.42261791229248046f, 0.906307935714721679f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_BERSERKBUFF_FEL_REAVER, BG_OBJECT_BERSERK_BUFF_FEL_REAVER_EY_ENTRY, 2046.462646484375f, 1749.1666259765625f, 1190.010498046875f, 5.410521507263183593f, 0.0f, 0.0f, -0.42261791229248046f, 0.906307935714721679f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_BLOOD_ELF, BG_OBJECT_SPEED_BUFF_BLOOD_ELF_EY_ENTRY, 2050.46826171875f, 1372.2020263671875f, 1194.5634765625f, 1.675513744354248046f, 0.0f, 0.0f, 0.743144035339355468f, 0.669131457805633544f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_REGENBUFF_BLOOD_ELF, BG_OBJECT_RESTORATION_BUFF_BLOOD_ELF_EY_ENTRY, 2050.46826171875f, 1372.2020263671875f, 1194.5634765625f, 1.675513744354248046f, 0.0f, 0.0f, 0.743144035339355468f, 0.669131457805633544f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_BERSERKBUFF_BLOOD_ELF, BG_OBJECT_BERSERK_BUFF_BLOOD_ELF_EY_ENTRY, 2050.46826171875f, 1372.2020263671875f, 1194.5634765625f, 1.675513744354248046f, 0.0f, 0.0f, 0.743144035339355468f, 0.669131457805633544f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_DRAENEI_RUINS, BG_OBJECT_SPEED_BUFF_DRAENEI_RUINS_EY_ENTRY, 2302.4765625f, 1391.244873046875f, 1197.7364501953125f, 1.762782454490661621f, 0.0f, 0.0f, 0.771624565124511718f, 0.636078238487243652f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_REGENBUFF_DRAENEI_RUINS, BG_OBJECT_RESTORATION_BUFF_DRAENEI_RUINS_EY_ENTRY, 2302.4765625f, 1391.244873046875f, 1197.7364501953125f, 1.762782454490661621f, 0.0f, 0.0f, 0.771624565124511718f, 0.636078238487243652f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_BERSERKBUFF_DRAENEI_RUINS, BG_OBJECT_BERSERK_BUFF_DRAENEI_RUINS_EY_ENTRY, 2302.4765625f, 1391.244873046875f, 1197.7364501953125f, 1.762782454490661621f, 0.0f, 0.0f, 0.771624565124511718f, 0.636078238487243652f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_MAGE_TOWER, BG_OBJECT_SPEED_BUFF_MAGE_TOWER_EY_ENTRY, 2283.7099609375f, 1748.8699951171875f, 1189.7071533203125f, 4.782202720642089843f, 0.0f, 0.0f, -0.68199825286865234f, 0.731353819370269775f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_REGENBUFF_MAGE_TOWER, BG_OBJECT_RESTORATION_BUFF_MAGE_TOWER_EY_ENTRY, 2283.7099609375f, 1748.8699951171875f, 1189.7071533203125f, 4.782202720642089843f, 0.0f, 0.0f, -0.68199825286865234f, 0.731353819370269775f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_BERSERKBUFF_MAGE_TOWER, BG_OBJECT_BERSERK_BUFF_MAGE_TOWER_EY_ENTRY, 2283.7099609375f, 1748.8699951171875f, 1189.7071533203125f, 4.782202720642089843f, 0.0f, 0.0f, -0.68199825286865234f, 0.731353819370269775f, RESPAWN_ONE_DAY)
|
||||
)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn some objects. The battleground was not created.");
|
||||
return false;
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* sg = sObjectMgr->GetWorldSafeLoc(EY_GRAVEYARD_MAIN_ALLIANCE);
|
||||
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->Loc.GetPositionX(), sg->Loc.GetPositionY(), sg->Loc.GetPositionZ(), 3.124139f, TEAM_ALLIANCE))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide. The battleground was not created.");
|
||||
return false;
|
||||
}
|
||||
|
||||
sg = sObjectMgr->GetWorldSafeLoc(EY_GRAVEYARD_MAIN_HORDE);
|
||||
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->Loc.GetPositionX(), sg->Loc.GetPositionY(), sg->Loc.GetPositionZ(), 3.193953f, TEAM_HORDE))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide. The battleground was not created.");
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateWorldState(EY_MAX_RESOURCES, BG_EY_MAX_TEAM_SCORE);
|
||||
|
||||
ControlZoneHandlers[BG_OBJECT_FR_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, FEL_REAVER);
|
||||
ControlZoneHandlers[BG_OBJECT_BE_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, BLOOD_ELF);
|
||||
ControlZoneHandlers[BG_OBJECT_DR_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, DRAENEI_RUINS);
|
||||
ControlZoneHandlers[BG_OBJECT_HU_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, MAGE_TOWER);
|
||||
_controlZoneHandlers[BG_OBJECT_FR_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, FEL_REAVER);
|
||||
_controlZoneHandlers[BG_OBJECT_BE_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, BLOOD_ELF);
|
||||
_controlZoneHandlers[BG_OBJECT_DR_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, DRAENEI_RUINS);
|
||||
_controlZoneHandlers[BG_OBJECT_HU_TOWER_CAP_EY_ENTRY] = std::make_unique<BattlegroundEYControlZoneHandler>(this, MAGE_TOWER);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -399,60 +404,10 @@ void BattlegroundEY::Reset()
|
||||
|
||||
m_TeamScores[TEAM_ALLIANCE] = 0;
|
||||
m_TeamScores[TEAM_HORDE] = 0;
|
||||
m_TeamPointsCount[TEAM_ALLIANCE] = 0;
|
||||
m_TeamPointsCount[TEAM_HORDE] = 0;
|
||||
m_HonorScoreTics[TEAM_ALLIANCE] = 0;
|
||||
m_HonorScoreTics[TEAM_HORDE] = 0;
|
||||
m_FlagState = BG_EY_FLAG_STATE_ON_BASE;
|
||||
m_HonorScoreTics = { 0, 0 };
|
||||
m_FlagCapturedBgObjectType = 0;
|
||||
m_FlagKeeper.Clear();
|
||||
m_DroppedFlagGUID.Clear();
|
||||
m_PointAddingTimer = 0;
|
||||
m_TowerCapCheckTimer = 0;
|
||||
bool isBGWeekend = sBattlegroundMgr->IsBGWeekend(GetTypeID());
|
||||
m_HonorTics = (isBGWeekend) ? BG_EY_EYWeekendHonorTicks : BG_EY_NotEYWeekendHonorTicks;
|
||||
|
||||
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
|
||||
{
|
||||
m_PointOwnedByTeam[i] = EY_POINT_NO_OWNER;
|
||||
m_PointState[i] = EY_POINT_STATE_UNCONTROLLED;
|
||||
m_PointBarStatus[i] = BG_EY_PROGRESS_BAR_STATE_MIDDLE;
|
||||
m_PlayersNearPoint[i].clear();
|
||||
m_PlayersNearPoint[i].reserve(15); //tip size
|
||||
}
|
||||
m_PlayersNearPoint[EY_PLAYERS_OUT_OF_POINTS].clear();
|
||||
m_PlayersNearPoint[EY_PLAYERS_OUT_OF_POINTS].reserve(30);
|
||||
}
|
||||
|
||||
void BattlegroundEY::RespawnFlag(bool send_message)
|
||||
{
|
||||
if (m_FlagCapturedBgObjectType > 0)
|
||||
SpawnBGObject(m_FlagCapturedBgObjectType, RESPAWN_ONE_DAY);
|
||||
|
||||
m_FlagCapturedBgObjectType = 0;
|
||||
m_FlagState = BG_EY_FLAG_STATE_ON_BASE;
|
||||
SpawnBGObject(BG_EY_OBJECT_FLAG_NETHERSTORM, RESPAWN_IMMEDIATELY);
|
||||
|
||||
if (send_message)
|
||||
{
|
||||
SendBroadcastText(BG_EY_TEXT_FLAG_RESET, CHAT_MSG_BG_SYSTEM_NEUTRAL);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound...
|
||||
}
|
||||
|
||||
UpdateWorldState(NETHERSTORM_FLAG, 1);
|
||||
}
|
||||
|
||||
void BattlegroundEY::RespawnFlagAfterDrop()
|
||||
{
|
||||
RespawnFlag(true);
|
||||
|
||||
GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID());
|
||||
if (obj)
|
||||
obj->Delete();
|
||||
else
|
||||
TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Unknown dropped flag ({}).", GetDroppedFlagGUID().ToString());
|
||||
|
||||
SetDroppedFlagGUID(ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void BattlegroundEY::HandleKillPlayer(Player* player, Player* killer)
|
||||
@@ -464,217 +419,38 @@ void BattlegroundEY::HandleKillPlayer(Player* player, Player* killer)
|
||||
EventPlayerDroppedFlag(player);
|
||||
}
|
||||
|
||||
void BattlegroundEY::EventPlayerDroppedFlag(Player* player)
|
||||
void BattlegroundEY::EventTeamLostPoint(TeamId teamId, uint32 point, GameObject* controlZone)
|
||||
{
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
if (teamId == TEAM_ALLIANCE)
|
||||
{
|
||||
// if not running, do not cast things at the dropper player, neither send unnecessary messages
|
||||
// just take off the aura
|
||||
if (IsFlagPickedup() && GetFlagPickerGUID() == player->GetGUID())
|
||||
{
|
||||
SetFlagPicker(ObjectGuid::Empty);
|
||||
player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsFlagPickedup())
|
||||
return;
|
||||
|
||||
if (GetFlagPickerGUID() != player->GetGUID())
|
||||
return;
|
||||
|
||||
SetFlagPicker(ObjectGuid::Empty);
|
||||
player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
|
||||
m_FlagState = BG_EY_FLAG_STATE_ON_GROUND;
|
||||
m_FlagsTimer = BG_EY_FLAG_RESPAWN_TIME;
|
||||
player->CastSpell(player, SPELL_RECENTLY_DROPPED_NEUTRAL_FLAG, true);
|
||||
player->CastSpell(player, BG_EY_PLAYER_DROPPED_FLAG_SPELL, true);
|
||||
//this does not work correctly :((it should remove flag carrier name)
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_WAIT_RESPAWN);
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_WAIT_RESPAWN);
|
||||
|
||||
if (GetPlayerTeam(player->GetGUID()) == ALLIANCE)
|
||||
SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_ALLIANCE);
|
||||
else
|
||||
SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_HORDE);
|
||||
}
|
||||
|
||||
void BattlegroundEY::EventPlayerClickedOnFlag(Player* player, GameObject* target_obj)
|
||||
{
|
||||
if (GetStatus() != STATUS_IN_PROGRESS || IsFlagPickedup() || !player->IsWithinDistInMap(target_obj, 10))
|
||||
return;
|
||||
|
||||
if (GetPlayerTeam(player->GetGUID()) == ALLIANCE)
|
||||
{
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_ON_PLAYER);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_PICKED_UP_ALLIANCE);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_ON_PLAYER);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_PICKED_UP_HORDE);
|
||||
}
|
||||
|
||||
if (m_FlagState == BG_EY_FLAG_STATE_ON_BASE)
|
||||
UpdateWorldState(NETHERSTORM_FLAG, 0);
|
||||
m_FlagState = BG_EY_FLAG_STATE_ON_PLAYER;
|
||||
|
||||
SpawnBGObject(BG_EY_OBJECT_FLAG_NETHERSTORM, RESPAWN_ONE_DAY);
|
||||
SetFlagPicker(player->GetGUID());
|
||||
//get flag aura on player
|
||||
player->CastSpell(player, BG_EY_NETHERSTORM_FLAG_SPELL, true);
|
||||
player->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::PvPActive);
|
||||
|
||||
if (GetPlayerTeam(player->GetGUID()) == ALLIANCE)
|
||||
SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
|
||||
else
|
||||
SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
|
||||
}
|
||||
|
||||
void BattlegroundEY::EventTeamLostPoint(Team team, uint32 point, WorldObject* controlZone)
|
||||
{
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
return;
|
||||
|
||||
//Natural point
|
||||
|
||||
if (!team)
|
||||
return;
|
||||
|
||||
if (team == ALLIANCE)
|
||||
{
|
||||
m_TeamPointsCount[TEAM_ALLIANCE]--;
|
||||
SpawnBGObject(m_LosingPointTypes[point].DespawnObjectTypeAlliance, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(m_LosingPointTypes[point].DespawnObjectTypeAlliance + 1, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(m_LosingPointTypes[point].DespawnObjectTypeAlliance + 2, RESPAWN_ONE_DAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_TeamPointsCount[TEAM_HORDE]--;
|
||||
SpawnBGObject(m_LosingPointTypes[point].DespawnObjectTypeHorde, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(m_LosingPointTypes[point].DespawnObjectTypeHorde + 1, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(m_LosingPointTypes[point].DespawnObjectTypeHorde + 2, RESPAWN_ONE_DAY);
|
||||
}
|
||||
|
||||
SpawnBGObject(m_LosingPointTypes[point].SpawnNeutralObjectType, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(m_LosingPointTypes[point].SpawnNeutralObjectType + 1, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(m_LosingPointTypes[point].SpawnNeutralObjectType + 2, RESPAWN_IMMEDIATELY);
|
||||
|
||||
//buff isn't despawned
|
||||
|
||||
m_PointOwnedByTeam[point] = EY_POINT_NO_OWNER;
|
||||
m_PointState[point] = EY_POINT_NO_OWNER;
|
||||
|
||||
if (team == ALLIANCE)
|
||||
SendBroadcastText(m_LosingPointTypes[point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, controlZone);
|
||||
else
|
||||
UpdateWorldState(m_PointsIconStruct[point].WorldStateAllianceControlledIndex, 0);
|
||||
}
|
||||
else if (teamId == TEAM_HORDE)
|
||||
{
|
||||
SendBroadcastText(m_LosingPointTypes[point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, controlZone);
|
||||
UpdateWorldState(m_PointsIconStruct[point].WorldStateHordeControlledIndex, 0);
|
||||
}
|
||||
|
||||
UpdatePointsIcons(team, point);
|
||||
UpdatePointsCount(team);
|
||||
|
||||
//remove bonus honor aura trigger creature when node is lost
|
||||
DelCreature(point + 6);//NULL checks are in DelCreature! 0-5 spirit guides
|
||||
UpdateWorldState(m_PointsIconStruct[point].WorldStateControlIndex, 1);
|
||||
UpdatePointsCount(teamId);
|
||||
}
|
||||
|
||||
void BattlegroundEY::EventTeamCapturedPoint(Team team, uint32 point, WorldObject* controlZone)
|
||||
void BattlegroundEY::EventTeamCapturedPoint(TeamId teamId, uint32 point, GameObject* controlZone)
|
||||
{
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
return;
|
||||
|
||||
SpawnBGObject(m_CapturingPointTypes[point].DespawnNeutralObjectType, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(m_CapturingPointTypes[point].DespawnNeutralObjectType + 1, RESPAWN_ONE_DAY);
|
||||
SpawnBGObject(m_CapturingPointTypes[point].DespawnNeutralObjectType + 2, RESPAWN_ONE_DAY);
|
||||
|
||||
if (team == ALLIANCE)
|
||||
if (teamId == TEAM_ALLIANCE)
|
||||
{
|
||||
m_TeamPointsCount[TEAM_ALLIANCE]++;
|
||||
SpawnBGObject(m_CapturingPointTypes[point].SpawnObjectTypeAlliance, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(m_CapturingPointTypes[point].SpawnObjectTypeAlliance + 1, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(m_CapturingPointTypes[point].SpawnObjectTypeAlliance + 2, RESPAWN_IMMEDIATELY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_TeamPointsCount[TEAM_HORDE]++;
|
||||
SpawnBGObject(m_CapturingPointTypes[point].SpawnObjectTypeHorde, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(m_CapturingPointTypes[point].SpawnObjectTypeHorde + 1, RESPAWN_IMMEDIATELY);
|
||||
SpawnBGObject(m_CapturingPointTypes[point].SpawnObjectTypeHorde + 2, RESPAWN_IMMEDIATELY);
|
||||
}
|
||||
|
||||
//buff isn't respawned
|
||||
|
||||
m_PointOwnedByTeam[point] = team;
|
||||
m_PointState[point] = EY_POINT_UNDER_CONTROL;
|
||||
|
||||
if (team == ALLIANCE)
|
||||
SendBroadcastText(m_CapturingPointTypes[point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, controlZone);
|
||||
else
|
||||
UpdateWorldState(m_PointsIconStruct[point].WorldStateAllianceControlledIndex, 1);
|
||||
}
|
||||
else if (teamId == TEAM_HORDE)
|
||||
{
|
||||
SendBroadcastText(m_CapturingPointTypes[point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, controlZone);
|
||||
|
||||
if (!BgCreatures[point].IsEmpty())
|
||||
DelCreature(point);
|
||||
|
||||
WorldSafeLocsEntry const* sg = sObjectMgr->GetWorldSafeLoc(m_CapturingPointTypes[point].GraveyardId);
|
||||
if (!sg || !AddSpiritGuide(point, sg->Loc.GetPositionX(), sg->Loc.GetPositionY(), sg->Loc.GetPositionZ(), 3.124139f, GetTeamIndexByTeamId(team)))
|
||||
TC_LOG_ERROR("bg.battleground", "BatteGroundEY: Failed to spawn spirit guide. point: {}, team: {}, graveyard_id: {}",
|
||||
point, team, m_CapturingPointTypes[point].GraveyardId);
|
||||
|
||||
// SpawnBGCreature(Point, RESPAWN_IMMEDIATELY);
|
||||
|
||||
UpdatePointsIcons(team, point);
|
||||
UpdatePointsCount(team);
|
||||
|
||||
Creature* trigger = GetBGCreature(point + 6, false);//0-5 spirit guides
|
||||
if (!trigger)
|
||||
trigger = AddCreature(WORLD_TRIGGER, point+6, BG_EY_TriggerPositions[point], GetTeamIndexByTeamId(team));
|
||||
|
||||
//add bonus honor aura trigger creature when node is accupied
|
||||
//cast bonus aura (+50% honor in 25yards)
|
||||
//aura should only apply to players who have accupied the node, set correct faction for trigger
|
||||
if (trigger)
|
||||
{
|
||||
trigger->SetFaction(team == ALLIANCE ? FACTION_ALLIANCE_GENERIC : FACTION_HORDE_GENERIC);
|
||||
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundEY::EventPlayerCapturedFlag(Player* player, uint32 BgObjectType)
|
||||
{
|
||||
if (GetStatus() != STATUS_IN_PROGRESS || GetFlagPickerGUID() != player->GetGUID())
|
||||
return;
|
||||
|
||||
SetFlagPicker(ObjectGuid::Empty);
|
||||
m_FlagState = BG_EY_FLAG_STATE_WAIT_RESPAWN;
|
||||
player->RemoveAurasDueToSpell(BG_EY_NETHERSTORM_FLAG_SPELL);
|
||||
|
||||
player->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::PvPActive);
|
||||
|
||||
uint32 team = GetPlayerTeam(player->GetGUID());
|
||||
if (team == ALLIANCE)
|
||||
{
|
||||
SendBroadcastText(BG_EY_TEXT_ALLIANCE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendBroadcastText(BG_EY_TEXT_HORDE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
|
||||
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_HORDE);
|
||||
UpdateWorldState(m_PointsIconStruct[point].WorldStateHordeControlledIndex, 1);
|
||||
}
|
||||
|
||||
SpawnBGObject(BgObjectType, RESPAWN_IMMEDIATELY);
|
||||
|
||||
m_FlagsTimer = BG_EY_FLAG_RESPAWN_TIME;
|
||||
m_FlagCapturedBgObjectType = BgObjectType;
|
||||
|
||||
uint8 team_id = GetTeamIndexByTeamId(team);
|
||||
if (m_TeamPointsCount[team_id] > 0)
|
||||
AddPoints(team, BG_EY_FlagPoints[m_TeamPointsCount[team_id] - 1]);
|
||||
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_ON_BASE);
|
||||
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_ON_BASE);
|
||||
|
||||
UpdatePlayerScore(player, SCORE_FLAG_CAPTURES, 1);
|
||||
UpdateWorldState(m_PointsIconStruct[point].WorldStateControlIndex, 0);
|
||||
UpdatePointsCount(teamId);
|
||||
}
|
||||
|
||||
bool BattlegroundEY::UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor)
|
||||
@@ -682,75 +458,12 @@ bool BattlegroundEY::UpdatePlayerScore(Player* player, uint32 type, uint32 value
|
||||
if (!Battleground::UpdatePlayerScore(player, type, value, doAddHonor))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case SCORE_FLAG_CAPTURES:
|
||||
player->UpdateCriteria(CriteriaType::TrackedWorldStateUIModified, EY_OBJECTIVE_CAPTURE_FLAG);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (type == SCORE_FLAG_CAPTURES)
|
||||
player->UpdateCriteria(CriteriaType::TrackedWorldStateUIModified, EY_OBJECTIVE_CAPTURE_FLAG);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveyard(Player* player)
|
||||
{
|
||||
uint32 g_id = 0;
|
||||
|
||||
uint32 team = GetPlayerTeam(player->GetGUID());
|
||||
switch (team)
|
||||
{
|
||||
case ALLIANCE: g_id = EY_GRAVEYARD_MAIN_ALLIANCE; break;
|
||||
case HORDE: g_id = EY_GRAVEYARD_MAIN_HORDE; break;
|
||||
default: return nullptr;
|
||||
}
|
||||
|
||||
float distance, nearestDistance;
|
||||
|
||||
WorldSafeLocsEntry const* entry = nullptr;
|
||||
WorldSafeLocsEntry const* nearestEntry = nullptr;
|
||||
entry = sObjectMgr->GetWorldSafeLoc(g_id);
|
||||
nearestEntry = entry;
|
||||
|
||||
if (!entry)
|
||||
{
|
||||
TC_LOG_ERROR("bg.battleground", "BattlegroundEY: The main team graveyard could not be found. The graveyard system will not be operational!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
float plr_x = player->GetPositionX();
|
||||
float plr_y = player->GetPositionY();
|
||||
float plr_z = player->GetPositionZ();
|
||||
|
||||
distance = (entry->Loc.GetPositionX() - plr_x) * (entry->Loc.GetPositionX() - plr_x)
|
||||
+ (entry->Loc.GetPositionY() - plr_y) * (entry->Loc.GetPositionY() - plr_y)
|
||||
+ (entry->Loc.GetPositionZ() - plr_z) * (entry->Loc.GetPositionZ() - plr_z);
|
||||
nearestDistance = distance;
|
||||
|
||||
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
|
||||
{
|
||||
if (m_PointOwnedByTeam[i] == team && m_PointState[i] == EY_POINT_UNDER_CONTROL)
|
||||
{
|
||||
entry = sObjectMgr->GetWorldSafeLoc(m_CapturingPointTypes[i].GraveyardId);
|
||||
if (!entry)
|
||||
TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Graveyard {} could not be found.", m_CapturingPointTypes[i].GraveyardId);
|
||||
else
|
||||
{
|
||||
distance = (entry->Loc.GetPositionX() - plr_x) * (entry->Loc.GetPositionX() - plr_x)
|
||||
+ (entry->Loc.GetPositionY() - plr_y) * (entry->Loc.GetPositionY() - plr_y)
|
||||
+ (entry->Loc.GetPositionZ() - plr_z) * (entry->Loc.GetPositionZ() - plr_z);
|
||||
if (distance < nearestDistance)
|
||||
{
|
||||
nearestDistance = distance;
|
||||
nearestEntry = entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nearestEntry;
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* BattlegroundEY::GetExploitTeleportLocation(Team team)
|
||||
{
|
||||
return sObjectMgr->GetWorldSafeLoc(team == ALLIANCE ? EY_EXPLOIT_TELEPORT_LOCATION_ALLIANCE : EY_EXPLOIT_TELEPORT_LOCATION_HORDE);
|
||||
@@ -776,20 +489,12 @@ void BattlegroundEY::ProcessEvent(WorldObject* target, uint32 eventId, WorldObje
|
||||
{
|
||||
if (gameobject->GetGoType() == GAMEOBJECT_TYPE_CONTROL_ZONE)
|
||||
{
|
||||
if (!ControlZoneHandlers.contains(gameobject->GetEntry()))
|
||||
if (!_controlZoneHandlers.contains(gameobject->GetEntry()))
|
||||
return;
|
||||
|
||||
auto controlzone = gameobject->GetGOInfo()->controlZone;
|
||||
BattlegroundEYControlZoneHandler& handler = *ControlZoneHandlers[invoker->GetEntry()];
|
||||
if (eventId == controlzone.CaptureEventAlliance)
|
||||
handler.HandleCaptureEventAlliance(gameobject);
|
||||
else if (eventId == controlzone.CaptureEventHorde)
|
||||
handler.HandleCaptureEventHorde(gameobject);
|
||||
else if (eventId == controlzone.ContestedEventAlliance)
|
||||
handler.HandleContestedEventAlliance(gameobject);
|
||||
else if (eventId == controlzone.ContestedEventHorde)
|
||||
handler.HandleContestedEventHorde(gameobject);
|
||||
else if (eventId == controlzone.NeutralEventAlliance)
|
||||
BattlegroundEYControlZoneHandler& handler = *_controlZoneHandlers[invoker->GetEntry()];
|
||||
if (eventId == controlzone.NeutralEventAlliance)
|
||||
handler.HandleNeutralEventAlliance(gameobject);
|
||||
else if (eventId == controlzone.NeutralEventHorde)
|
||||
handler.HandleNeutralEventHorde(gameobject);
|
||||
@@ -809,20 +514,20 @@ BattlegroundEYControlZoneHandler::BattlegroundEYControlZoneHandler(BattlegroundE
|
||||
|
||||
void BattlegroundEYControlZoneHandler::HandleProgressEventHorde(GameObject* controlZone)
|
||||
{
|
||||
_battleground->EventTeamCapturedPoint(HORDE, _point, controlZone);
|
||||
_battleground->EventTeamCapturedPoint(TEAM_HORDE, _point, controlZone);
|
||||
}
|
||||
|
||||
void BattlegroundEYControlZoneHandler::HandleProgressEventAlliance(GameObject* controlZone)
|
||||
{
|
||||
_battleground->EventTeamCapturedPoint(ALLIANCE, _point, controlZone);
|
||||
_battleground->EventTeamCapturedPoint(TEAM_ALLIANCE, _point, controlZone);
|
||||
}
|
||||
|
||||
void BattlegroundEYControlZoneHandler::HandleNeutralEventHorde(GameObject* controlZone)
|
||||
{
|
||||
_battleground->EventTeamLostPoint(HORDE, _point, controlZone);
|
||||
_battleground->EventTeamLostPoint(TEAM_HORDE, _point, controlZone);
|
||||
}
|
||||
|
||||
void BattlegroundEYControlZoneHandler::HandleNeutralEventAlliance(GameObject* controlZone)
|
||||
{
|
||||
_battleground->EventTeamLostPoint(ALLIANCE, _point, controlZone);
|
||||
_battleground->EventTeamLostPoint(TEAM_ALLIANCE, _point, controlZone);
|
||||
}
|
||||
|
||||
@@ -21,12 +21,15 @@
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundScore.h"
|
||||
#include "Object.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static constexpr Seconds POINTS_TICK_TIME = 2s;
|
||||
static constexpr Seconds BG_EY_FLAG_ASSAULT_TIMER = 30s;
|
||||
static constexpr uint16 BG_EY_FLAG_BRUTAL_ASSAULT_STACK_COUNT = 5;
|
||||
|
||||
enum BG_EY_Misc
|
||||
{
|
||||
BG_EY_EVENT_START_BATTLE = 13180, // Achievement: Flurry
|
||||
BG_EY_FLAG_RESPAWN_TIME = (8*IN_MILLISECONDS),
|
||||
BG_EY_FPOINTS_TICK_TIME = (2*IN_MILLISECONDS)
|
||||
BG_EY_EVENT_START_BATTLE = 13180 // Achievement: Flurry
|
||||
};
|
||||
|
||||
enum BG_EY_WorldStates
|
||||
@@ -66,20 +69,6 @@ enum BG_EY_WorldStates
|
||||
BLOOD_ELF_ALLIANCE_CONTROL_STATE = 17365,
|
||||
};
|
||||
|
||||
enum BG_EY_ProgressBarConsts
|
||||
{
|
||||
BG_EY_POINT_MAX_CAPTURERS_COUNT = 5,
|
||||
BG_EY_POINT_RADIUS = 70,
|
||||
BG_EY_PROGRESS_BAR_DONT_SHOW = 0,
|
||||
BG_EY_PROGRESS_BAR_SHOW = 1,
|
||||
BG_EY_PROGRESS_BAR_PERCENT_GREY = 40,
|
||||
BG_EY_PROGRESS_BAR_STATE_MIDDLE = 50,
|
||||
BG_EY_PROGRESS_BAR_HORDE_CONTROLLED = 0,
|
||||
BG_EY_PROGRESS_BAR_NEUTRAL_LOW = 30,
|
||||
BG_EY_PROGRESS_BAR_NEUTRAL_HIGH = 70,
|
||||
BG_EY_PROGRESS_BAR_ALI_CONTROLLED = 100
|
||||
};
|
||||
|
||||
enum BG_EY_Sounds
|
||||
{
|
||||
//strange ids, but sure about them
|
||||
@@ -93,61 +82,32 @@ enum BG_EY_Sounds
|
||||
enum BG_EY_Spells
|
||||
{
|
||||
BG_EY_NETHERSTORM_FLAG_SPELL = 34976,
|
||||
BG_EY_PLAYER_DROPPED_FLAG_SPELL = 34991
|
||||
BG_EY_PLAYER_DROPPED_FLAG_SPELL = 34991,
|
||||
|
||||
// Focused/Brutal Assault
|
||||
BG_EY_FOCUSED_ASSAULT_SPELL = 46392,
|
||||
BG_EY_BRUTAL_ASSAULT_SPELL = 46393
|
||||
};
|
||||
|
||||
enum EYBattlegroundObjectEntry
|
||||
{
|
||||
BG_OBJECT_A_DOOR_EY_ENTRY = 184719, //Alliance door
|
||||
BG_OBJECT_H_DOOR_EY_ENTRY = 184720, //Horde door
|
||||
BG_OBJECT_FLAG1_EY_ENTRY = 184493, //Netherstorm flag (generic)
|
||||
BG_OBJECT_FLAG2_EY_ENTRY = 208977, //Netherstorm flag (flagstand)
|
||||
BG_OBJECT_A_BANNER_EY_ENTRY = 184381, //Visual Banner (Alliance)
|
||||
BG_OBJECT_H_BANNER_EY_ENTRY = 184380, //Visual Banner (Horde)
|
||||
BG_OBJECT_N_BANNER_EY_ENTRY = 184382, //Visual Banner (Neutral)
|
||||
BG_OBJECT_BE_TOWER_CAP_EY_ENTRY = 184080, //BE Tower Cap Pt
|
||||
BG_OBJECT_FR_TOWER_CAP_EY_ENTRY = 184081, //Fel Reaver Cap Pt
|
||||
BG_OBJECT_HU_TOWER_CAP_EY_ENTRY = 184082, //Human Tower Cap Pt
|
||||
BG_OBJECT_DR_TOWER_CAP_EY_ENTRY = 184083, //Draenei Tower Cap Pt
|
||||
BG_OBJECT_SPEED_BUFF_FEL_REAVER_EY_ENTRY = 184970,
|
||||
BG_OBJECT_RESTORATION_BUFF_FEL_REAVER_EY_ENTRY = 184971,
|
||||
BG_OBJECT_BERSERK_BUFF_FEL_REAVER_EY_ENTRY = 184972,
|
||||
BG_OBJECT_SPEED_BUFF_BLOOD_ELF_EY_ENTRY = 184964,
|
||||
BG_OBJECT_RESTORATION_BUFF_BLOOD_ELF_EY_ENTRY = 184965,
|
||||
BG_OBJECT_BERSERK_BUFF_BLOOD_ELF_EY_ENTRY = 184966,
|
||||
BG_OBJECT_SPEED_BUFF_DRAENEI_RUINS_EY_ENTRY = 184976,
|
||||
BG_OBJECT_RESTORATION_BUFF_DRAENEI_RUINS_EY_ENTRY = 184977,
|
||||
BG_OBJECT_BERSERK_BUFF_DRAENEI_RUINS_EY_ENTRY = 184978,
|
||||
BG_OBJECT_SPEED_BUFF_MAGE_TOWER_EY_ENTRY = 184973,
|
||||
BG_OBJECT_RESTORATION_BUFF_MAGE_TOWER_EY_ENTRY = 184974,
|
||||
BG_OBJECT_BERSERK_BUFF_MAGE_TOWER_EY_ENTRY = 184975,
|
||||
};
|
||||
|
||||
enum EYBattlegroundPointsTrigger
|
||||
{
|
||||
TR_BLOOD_ELF_POINT = 4476,
|
||||
TR_FEL_REAVER_POINT = 4514,
|
||||
TR_MAGE_TOWER_POINT = 4516,
|
||||
TR_DRAENEI_RUINS_POINT = 4518,
|
||||
TR_BLOOD_ELF_BUFF = 4568,
|
||||
TR_FEL_REAVER_BUFF = 4569,
|
||||
TR_MAGE_TOWER_BUFF = 4570,
|
||||
TR_DRAENEI_RUINS_BUFF = 4571
|
||||
};
|
||||
|
||||
enum EYBattlegroundGaveyards
|
||||
{
|
||||
EY_GRAVEYARD_MAIN_ALLIANCE = 1103,
|
||||
EY_GRAVEYARD_MAIN_HORDE = 1104,
|
||||
EY_GRAVEYARD_FEL_REAVER = 1105,
|
||||
EY_GRAVEYARD_BLOOD_ELF = 1106,
|
||||
EY_GRAVEYARD_DRAENEI_RUINS = 1107,
|
||||
EY_GRAVEYARD_MAGE_TOWER = 1108
|
||||
AREATRIGGER_CAPTURE_FLAG = 33
|
||||
};
|
||||
|
||||
enum EYBattlegroundPoints
|
||||
{
|
||||
FEL_REAVER = 0,
|
||||
FEL_REAVER = 0,
|
||||
BLOOD_ELF = 1,
|
||||
DRAENEI_RUINS = 2,
|
||||
MAGE_TOWER = 3,
|
||||
@@ -156,94 +116,12 @@ enum EYBattlegroundPoints
|
||||
EY_POINTS_MAX = 4
|
||||
};
|
||||
|
||||
enum EYBattlegroundCreaturesTypes
|
||||
{
|
||||
EY_SPIRIT_FEL_REAVER = 0,
|
||||
EY_SPIRIT_BLOOD_ELF = 1,
|
||||
EY_SPIRIT_DRAENEI_RUINS = 2,
|
||||
EY_SPIRIT_MAGE_TOWER = 3,
|
||||
EY_SPIRIT_MAIN_ALLIANCE = 4,
|
||||
EY_SPIRIT_MAIN_HORDE = 5,
|
||||
|
||||
EY_TRIGGER_FEL_REAVER = 6,
|
||||
EY_TRIGGER_BLOOD_ELF = 7,
|
||||
EY_TRIGGER_DRAENEI_RUINS = 8,
|
||||
EY_TRIGGER_MAGE_TOWER = 9,
|
||||
|
||||
BG_EY_CREATURES_MAX = 10
|
||||
};
|
||||
|
||||
enum EYBattlegroundObjectTypes
|
||||
{
|
||||
BG_EY_OBJECT_DOOR_A = 0,
|
||||
BG_EY_OBJECT_DOOR_H = 1,
|
||||
BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER = 2,
|
||||
BG_EY_OBJECT_A_BANNER_FEL_REAVER_LEFT = 3,
|
||||
BG_EY_OBJECT_A_BANNER_FEL_REAVER_RIGHT = 4,
|
||||
BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER = 5,
|
||||
BG_EY_OBJECT_A_BANNER_BLOOD_ELF_LEFT = 6,
|
||||
BG_EY_OBJECT_A_BANNER_BLOOD_ELF_RIGHT = 7,
|
||||
BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER = 8,
|
||||
BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_LEFT = 9,
|
||||
BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_RIGHT = 10,
|
||||
BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER = 11,
|
||||
BG_EY_OBJECT_A_BANNER_MAGE_TOWER_LEFT = 12,
|
||||
BG_EY_OBJECT_A_BANNER_MAGE_TOWER_RIGHT = 13,
|
||||
BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER = 14,
|
||||
BG_EY_OBJECT_H_BANNER_FEL_REAVER_LEFT = 15,
|
||||
BG_EY_OBJECT_H_BANNER_FEL_REAVER_RIGHT = 16,
|
||||
BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER = 17,
|
||||
BG_EY_OBJECT_H_BANNER_BLOOD_ELF_LEFT = 18,
|
||||
BG_EY_OBJECT_H_BANNER_BLOOD_ELF_RIGHT = 19,
|
||||
BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER = 20,
|
||||
BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_LEFT = 21,
|
||||
BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_RIGHT = 22,
|
||||
BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER = 23,
|
||||
BG_EY_OBJECT_H_BANNER_MAGE_TOWER_LEFT = 24,
|
||||
BG_EY_OBJECT_H_BANNER_MAGE_TOWER_RIGHT = 25,
|
||||
BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER = 26,
|
||||
BG_EY_OBJECT_N_BANNER_FEL_REAVER_LEFT = 27,
|
||||
BG_EY_OBJECT_N_BANNER_FEL_REAVER_RIGHT = 28,
|
||||
BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER = 29,
|
||||
BG_EY_OBJECT_N_BANNER_BLOOD_ELF_LEFT = 30,
|
||||
BG_EY_OBJECT_N_BANNER_BLOOD_ELF_RIGHT = 31,
|
||||
BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER = 32,
|
||||
BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_LEFT = 33,
|
||||
BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_RIGHT = 34,
|
||||
BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER = 35,
|
||||
BG_EY_OBJECT_N_BANNER_MAGE_TOWER_LEFT = 36,
|
||||
BG_EY_OBJECT_N_BANNER_MAGE_TOWER_RIGHT = 37,
|
||||
BG_EY_OBJECT_TOWER_CAP_FEL_REAVER = 38,
|
||||
BG_EY_OBJECT_TOWER_CAP_BLOOD_ELF = 39,
|
||||
BG_EY_OBJECT_TOWER_CAP_DRAENEI_RUINS = 40,
|
||||
BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER = 41,
|
||||
BG_EY_OBJECT_FLAG_NETHERSTORM = 42,
|
||||
BG_EY_OBJECT_FLAG_FEL_REAVER = 43,
|
||||
BG_EY_OBJECT_FLAG_BLOOD_ELF = 44,
|
||||
BG_EY_OBJECT_FLAG_DRAENEI_RUINS = 45,
|
||||
BG_EY_OBJECT_FLAG_MAGE_TOWER = 46,
|
||||
//buffs
|
||||
BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER = 47,
|
||||
BG_EY_OBJECT_REGENBUFF_FEL_REAVER = 48,
|
||||
BG_EY_OBJECT_BERSERKBUFF_FEL_REAVER = 49,
|
||||
BG_EY_OBJECT_SPEEDBUFF_BLOOD_ELF = 50,
|
||||
BG_EY_OBJECT_REGENBUFF_BLOOD_ELF = 51,
|
||||
BG_EY_OBJECT_BERSERKBUFF_BLOOD_ELF = 52,
|
||||
BG_EY_OBJECT_SPEEDBUFF_DRAENEI_RUINS = 53,
|
||||
BG_EY_OBJECT_REGENBUFF_DRAENEI_RUINS = 54,
|
||||
BG_EY_OBJECT_BERSERKBUFF_DRAENEI_RUINS = 55,
|
||||
BG_EY_OBJECT_SPEEDBUFF_MAGE_TOWER = 56,
|
||||
BG_EY_OBJECT_REGENBUFF_MAGE_TOWER = 57,
|
||||
BG_EY_OBJECT_BERSERKBUFF_MAGE_TOWER = 58,
|
||||
BG_EY_OBJECT_MAX = 59
|
||||
};
|
||||
|
||||
#define BG_EY_NotEYWeekendHonorTicks 260
|
||||
#define BG_EY_EYWeekendHonorTicks 160
|
||||
|
||||
enum BG_EY_Score
|
||||
{
|
||||
BG_EY_WARNING_NEAR_VICTORY_SCORE = 1400,
|
||||
BG_EY_WARNING_NEAR_VICTORY_SCORE = 1200,
|
||||
BG_EY_MAX_TEAM_SCORE = 1500
|
||||
};
|
||||
|
||||
@@ -269,31 +147,31 @@ enum BG_EY_Objectives
|
||||
|
||||
enum BG_EY_ExploitTeleportLocations
|
||||
{
|
||||
EY_EXPLOIT_TELEPORT_LOCATION_ALLIANCE = 3773,
|
||||
EY_EXPLOIT_TELEPORT_LOCATION_HORDE = 3772
|
||||
EY_EXPLOIT_TELEPORT_LOCATION_ALLIANCE = 3773,
|
||||
EY_EXPLOIT_TELEPORT_LOCATION_HORDE = 3772
|
||||
};
|
||||
|
||||
enum BG_EY_BroadcastTexts
|
||||
{
|
||||
BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS = 17828,
|
||||
BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS = 17829,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS = 17835,
|
||||
BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS = 17836,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS = 91961,
|
||||
BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS = 91962,
|
||||
|
||||
BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER = 17819,
|
||||
BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER = 17823,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER = 17831,
|
||||
BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER = 17832,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER = 91957,
|
||||
BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER = 91958,
|
||||
|
||||
BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS = 17827,
|
||||
BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS = 17826,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS = 17833,
|
||||
BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS = 17834,
|
||||
BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS = 91917,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS = 91959,
|
||||
BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS = 91960,
|
||||
|
||||
BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER = 17824,
|
||||
BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER = 17825,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER = 17837,
|
||||
BG_EY_TEXT_HORDE_LOST_MAGE_TOWER = 17838,
|
||||
BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER = 91963,
|
||||
BG_EY_TEXT_HORDE_LOST_MAGE_TOWER = 91964,
|
||||
|
||||
BG_EY_TEXT_TAKEN_FLAG = 18359,
|
||||
BG_EY_TEXT_FLAG_DROPPED = 18361,
|
||||
@@ -315,44 +193,24 @@ struct BattlegroundEYPointIconsStruct
|
||||
uint32 WorldStateHordeStatusBarIcon;
|
||||
};
|
||||
|
||||
Position const BG_EY_TriggerPositions[EY_POINTS_MAX] =
|
||||
{
|
||||
{2044.28f, 1729.68f, 1189.96f, 0.017453f}, // FEL_REAVER center
|
||||
{2048.83f, 1393.65f, 1194.49f, 0.20944f}, // BLOOD_ELF center
|
||||
{2286.56f, 1402.36f, 1197.11f, 3.72381f}, // DRAENEI_RUINS center
|
||||
{2284.48f, 1731.23f, 1189.99f, 2.89725f} // MAGE_TOWER center
|
||||
};
|
||||
|
||||
struct BattlegroundEYLosingPointStruct
|
||||
{
|
||||
BattlegroundEYLosingPointStruct(uint32 _SpawnNeutralObjectType, uint32 _DespawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _DespawnObjectTypeHorde, uint32 _MessageIdHorde)
|
||||
: SpawnNeutralObjectType(_SpawnNeutralObjectType),
|
||||
DespawnObjectTypeAlliance(_DespawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
|
||||
DespawnObjectTypeHorde(_DespawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde)
|
||||
BattlegroundEYLosingPointStruct(uint32 _MessageIdAlliance, uint32 _MessageIdHorde)
|
||||
: MessageIdAlliance(_MessageIdAlliance), MessageIdHorde(_MessageIdHorde)
|
||||
{ }
|
||||
|
||||
uint32 SpawnNeutralObjectType;
|
||||
uint32 DespawnObjectTypeAlliance;
|
||||
uint32 MessageIdAlliance;
|
||||
uint32 DespawnObjectTypeHorde;
|
||||
uint32 MessageIdHorde;
|
||||
};
|
||||
|
||||
struct BattlegroundEYCapturingPointStruct
|
||||
{
|
||||
BattlegroundEYCapturingPointStruct(uint32 _DespawnNeutralObjectType, uint32 _SpawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _SpawnObjectTypeHorde, uint32 _MessageIdHorde, uint32 _GraveyardId)
|
||||
: DespawnNeutralObjectType(_DespawnNeutralObjectType),
|
||||
SpawnObjectTypeAlliance(_SpawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
|
||||
SpawnObjectTypeHorde(_SpawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde),
|
||||
GraveyardId(_GraveyardId)
|
||||
BattlegroundEYCapturingPointStruct(uint32 _MessageIdAlliance, uint32 _MessageIdHorde)
|
||||
: MessageIdAlliance(_MessageIdAlliance), MessageIdHorde(_MessageIdHorde)
|
||||
{ }
|
||||
|
||||
uint32 DespawnNeutralObjectType;
|
||||
uint32 SpawnObjectTypeAlliance;
|
||||
uint32 MessageIdAlliance;
|
||||
uint32 SpawnObjectTypeHorde;
|
||||
uint32 MessageIdHorde;
|
||||
uint32 GraveyardId;
|
||||
};
|
||||
|
||||
class BattlegroundEY;
|
||||
@@ -367,35 +225,39 @@ public:
|
||||
void HandleNeutralEventHorde(GameObject* controlZone) override;
|
||||
void HandleNeutralEventAlliance(GameObject* controlZone) override;
|
||||
|
||||
uint32 GetPoint() const { return _point; }
|
||||
|
||||
private:
|
||||
BattlegroundEY* _battleground;
|
||||
uint32 _point;
|
||||
};
|
||||
|
||||
const uint8 BG_EY_TickPoints[EY_POINTS_MAX] = {1, 2, 5, 10};
|
||||
const uint32 BG_EY_FlagPoints[EY_POINTS_MAX] = {75, 85, 100, 500};
|
||||
const std::array<uint8, EY_POINTS_MAX> BG_EY_TickPoints = { 1, 2, 5, 10 };
|
||||
const std::array<uint32, EY_POINTS_MAX> BG_EY_FlagPoints = { 75, 85, 100, 500 };
|
||||
|
||||
//constant arrays:
|
||||
const BattlegroundEYPointIconsStruct m_PointsIconStruct[EY_POINTS_MAX] =
|
||||
const std::array<BattlegroundEYPointIconsStruct, EY_POINTS_MAX> m_PointsIconStruct =
|
||||
{
|
||||
BattlegroundEYPointIconsStruct(FEL_REAVER_UNCONTROL, FEL_REAVER_ALLIANCE_CONTROL, FEL_REAVER_HORDE_CONTROL, FEL_REAVER_ALLIANCE_CONTROL_STATE, FEL_REAVER_HORDE_CONTROL_STATE),
|
||||
BattlegroundEYPointIconsStruct(BLOOD_ELF_UNCONTROL, BLOOD_ELF_ALLIANCE_CONTROL, BLOOD_ELF_HORDE_CONTROL, BLOOD_ELF_ALLIANCE_CONTROL_STATE, BLOOD_ELF_HORDE_CONTROL_STATE),
|
||||
BattlegroundEYPointIconsStruct(DRAENEI_RUINS_UNCONTROL, DRAENEI_RUINS_ALLIANCE_CONTROL, DRAENEI_RUINS_HORDE_CONTROL, DRAENEI_RUINS_ALLIANCE_CONTROL_STATE, DRAENEI_RUINS_HORDE_CONTROL_STATE),
|
||||
BattlegroundEYPointIconsStruct(MAGE_TOWER_UNCONTROL, MAGE_TOWER_ALLIANCE_CONTROL, MAGE_TOWER_HORDE_CONTROL, MAGE_TOWER_ALLIANCE_CONTROL_STATE, MAGE_TOWER_HORDE_CONTROL_STATE)
|
||||
};
|
||||
const BattlegroundEYLosingPointStruct m_LosingPointTypes[EY_POINTS_MAX] =
|
||||
|
||||
const std::array<BattlegroundEYLosingPointStruct, EY_POINTS_MAX> m_LosingPointTypes =
|
||||
{
|
||||
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS),
|
||||
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER),
|
||||
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS),
|
||||
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_HORDE_LOST_MAGE_TOWER)
|
||||
BattlegroundEYLosingPointStruct(BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS, BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS),
|
||||
BattlegroundEYLosingPointStruct(BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER, BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER),
|
||||
BattlegroundEYLosingPointStruct(BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS, BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS),
|
||||
BattlegroundEYLosingPointStruct(BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER, BG_EY_TEXT_HORDE_LOST_MAGE_TOWER)
|
||||
};
|
||||
const BattlegroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX] =
|
||||
|
||||
const std::array<BattlegroundEYCapturingPointStruct, EY_POINTS_MAX> m_CapturingPointTypes =
|
||||
{
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS, EY_GRAVEYARD_FEL_REAVER),
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER, EY_GRAVEYARD_BLOOD_ELF),
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS, EY_GRAVEYARD_DRAENEI_RUINS),
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER, EY_GRAVEYARD_MAGE_TOWER)
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS, BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS),
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER, BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER),
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS, BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS),
|
||||
BattlegroundEYCapturingPointStruct(BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER, BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER)
|
||||
};
|
||||
|
||||
struct BattlegroundEYScore final : public BattlegroundScore
|
||||
@@ -438,44 +300,31 @@ class BattlegroundEY : public Battleground
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
void AddPlayer(Player* player, BattlegroundQueueTypeId queueId) override;
|
||||
void StartingEventCloseDoors() override;
|
||||
void StartingEventOpenDoors() override;
|
||||
|
||||
/* BG Flags */
|
||||
ObjectGuid GetFlagPickerGUID(int32 /*team*/ = -1) const override { return m_FlagKeeper; }
|
||||
void SetFlagPicker(ObjectGuid guid) { m_FlagKeeper = guid; }
|
||||
bool IsFlagPickedup() const { return !m_FlagKeeper.IsEmpty(); }
|
||||
uint8 GetFlagState() const { return m_FlagState; }
|
||||
void RespawnFlag(bool send_message);
|
||||
void RespawnFlagAfterDrop();
|
||||
|
||||
void RemovePlayer(Player* player, ObjectGuid guid, uint32 team) override;
|
||||
void HandleAreaTrigger(Player* source, uint32 trigger, bool entered) override;
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
WorldSafeLocsEntry const* GetClosestGraveyard(Player* player) override;
|
||||
WorldSafeLocsEntry const* GetExploitTeleportLocation(Team team) override;
|
||||
bool SetupBattleground() override;
|
||||
void Reset() override;
|
||||
void UpdateTeamScore(uint32 Team);
|
||||
void EndBattleground(uint32 winner) override;
|
||||
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
|
||||
void SetDroppedFlagGUID(ObjectGuid guid, int32 /*TeamID*/ = -1) override { m_DroppedFlagGUID = guid; }
|
||||
ObjectGuid GetDroppedFlagGUID() const { return m_DroppedFlagGUID; }
|
||||
|
||||
/* Battleground Events */
|
||||
void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) override;
|
||||
void EventPlayerDroppedFlag(Player* Source) override;
|
||||
|
||||
uint32 GetPrematureWinner() override;
|
||||
|
||||
void ProcessEvent(WorldObject* target, uint32 eventId, WorldObject* invoker) override;
|
||||
void PostUpdateImpl(uint32 diff) override;
|
||||
|
||||
void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType);
|
||||
void EventTeamCapturedPoint(Team team, uint32 point, WorldObject* controlZone);
|
||||
void EventTeamLostPoint(Team team, uint32 point, WorldObject* controlZone);
|
||||
void UpdatePointsCount(uint32 Team);
|
||||
void UpdatePointsIcons(uint32 Team, uint32 Point);
|
||||
void EventTeamCapturedPoint(TeamId teamId, uint32 point, GameObject* controlZone);
|
||||
void EventTeamLostPoint(TeamId teamId, uint32 point, GameObject* controlZone);
|
||||
void UpdatePointsCount(TeamId teamId);
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject) override;
|
||||
|
||||
bool CanCaptureFlag([[maybe_unused]] AreaTrigger* areaTrigger, [[maybe_unused]] Player* player) override;
|
||||
void OnCaptureFlag([[maybe_unused]] AreaTrigger* areaTrigger, [[maybe_unused]] Player* player) override;
|
||||
void OnFlagStateChange(GameObject* flagInBase, FlagState oldValue, FlagState newValue, Player* player) override;
|
||||
|
||||
private:
|
||||
/* Scorekeeping */
|
||||
@@ -483,30 +332,28 @@ class BattlegroundEY : public Battleground
|
||||
|
||||
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
|
||||
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
|
||||
BattlegroundPointCaptureStatus GetPointCaptureStatus(uint32 point) const;
|
||||
|
||||
uint32 m_HonorScoreTics[2];
|
||||
uint32 m_TeamPointsCount[2];
|
||||
uint8 GetControlledBaseCount(TeamId teamId) const;
|
||||
|
||||
uint32 m_Points_Trigger[EY_POINTS_MAX];
|
||||
std::array<uint32, PVP_TEAMS_COUNT> m_HonorScoreTics;
|
||||
|
||||
ObjectGuid m_FlagKeeper; // keepers guid
|
||||
ObjectGuid m_DroppedFlagGUID;
|
||||
uint32 m_FlagCapturedBgObjectType; // type that should be despawned when flag is captured
|
||||
uint8 m_FlagState; // for checking flag state
|
||||
int32 m_FlagsTimer;
|
||||
int32 m_TowerCapCheckTimer;
|
||||
|
||||
uint32 m_PointOwnedByTeam[EY_POINTS_MAX];
|
||||
uint8 m_PointState[EY_POINTS_MAX];
|
||||
int32 m_PointBarStatus[EY_POINTS_MAX];
|
||||
BattlegroundPointCaptureStatus m_LastPointCaptureStatus[EY_POINTS_MAX];
|
||||
GuidVector m_PlayersNearPoint[EY_POINTS_MAX + 1];
|
||||
uint8 m_CurrentPointPlayersCount[2*EY_POINTS_MAX];
|
||||
|
||||
int32 m_PointAddingTimer;
|
||||
TimeTracker _pointsTimer;
|
||||
uint32 m_HonorTics;
|
||||
|
||||
std::unordered_map<uint32, std::unique_ptr<BattlegroundEYControlZoneHandler>> ControlZoneHandlers;
|
||||
std::unordered_map<uint32, std::unique_ptr<BattlegroundEYControlZoneHandler>> _controlZoneHandlers;
|
||||
GuidUnorderedSet _doorGUIDs;
|
||||
ObjectGuid _flagGUID;
|
||||
|
||||
// Focused/Brutal Assault
|
||||
bool _assaultEnabled;
|
||||
TimeTracker _flagAssaultTimer;
|
||||
uint16 _assaultStackCount;
|
||||
|
||||
void DoForFlagKeepers(std::function<void(Player*)> action) const;
|
||||
void ResetAssaultDebuff();
|
||||
void ApplyAssaultDebuffToPlayer(Player* player);
|
||||
void RemoveAssaultDebuffFromPlayer(Player* player);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -2052,8 +2052,6 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
case 23333: // Warsong Flag
|
||||
case 23335: // Silverwing Flag
|
||||
return map_id == 489 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
case 34976: // Netherstorm Flag
|
||||
return map_id == 566 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
case 2584: // Waiting to Resurrect
|
||||
case 42792: // Recently Dropped Flag
|
||||
case 43681: // Inactive
|
||||
|
||||
Reference in New Issue
Block a user