diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-06-11 21:41:11 +0200 |
---|---|---|
committer | Carbenium <carbenium@outlook.com> | 2020-07-16 22:00:29 +0200 |
commit | bd96262248fa4d9c8e867b4056e52c44852364c3 (patch) | |
tree | bfcf447563b8edc99de222eb21bf69a999483cd3 /src/server/scripts/OutdoorPvP | |
parent | 68131dbd92f2a9c7b932a7f23719f57adf66d90e (diff) |
Core/OutdoorPvP: refactor using Position and Quat to pack parameters
- Moved statics to cpp
- Save scriptids into an array
(cherry picked from commit 3e7b64b2f765bebc722c1194b7fc2f749fae77f7)
Diffstat (limited to 'src/server/scripts/OutdoorPvP')
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp | 58 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPHP.h | 36 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp | 143 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPNA.h | 106 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp | 13 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPSI.h | 16 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp | 67 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPTF.h | 66 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp | 71 | ||||
-rw-r--r-- | src/server/scripts/OutdoorPvP/OutdoorPvPZM.h | 58 |
10 files changed, 303 insertions, 331 deletions
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp index a6c434d3b1a..9c5eff5aff5 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp @@ -22,34 +22,46 @@ #include "Player.h" #include "WorldStatePackets.h" -const uint32 HP_LANG_CAPTURE_A[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_ALLIANCE, TEXT_OVERLOOK_TAKEN_ALLIANCE, TEXT_STADIUM_TAKEN_ALLIANCE }; -const uint32 HP_LANG_CAPTURE_H[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_HORDE, TEXT_OVERLOOK_TAKEN_HORDE, TEXT_STADIUM_TAKEN_HORDE }; +uint32 const OutdoorPvPHPBuffZonesNum = 6; + // HP, citadel, ramparts, blood furnace, shattered halls, mag's lair +uint32 const OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 }; + +uint32 const HP_CREDITMARKER[HP_TOWER_NUM] = { 19032, 19028, 19029 }; + +uint32 const HP_CapturePointEvent_Enter[HP_TOWER_NUM] = { 11404, 11396, 11388 }; +uint32 const HP_CapturePointEvent_Leave[HP_TOWER_NUM] = { 11403, 11395, 11387 }; + +uint32 const HP_MAP_N[HP_TOWER_NUM] = { 0x9b5, 0x9b2, 0x9a8 }; +uint32 const HP_MAP_A[HP_TOWER_NUM] = { 0x9b3, 0x9b0, 0x9a7 }; +uint32 const HP_MAP_H[HP_TOWER_NUM] = { 0x9b4, 0x9b1, 0x9a6 }; + +uint32 const HP_TowerArtKit_A[HP_TOWER_NUM] = { 65, 62, 67 }; +uint32 const HP_TowerArtKit_H[HP_TOWER_NUM] = { 64, 61, 68 }; +uint32 const HP_TowerArtKit_N[HP_TOWER_NUM] = { 66, 63, 69 }; + +go_type const HPCapturePoints[HP_TOWER_NUM] = +{ + { 182175, 530, { -471.462f, 3451.09f, 34.6432f, 0.174533f }, { 0.0f, 0.0f, 0.087156f, 0.996195f } }, // 0 - Broken Hill + { 182174, 530, { -184.889f, 3476.93f, 38.2050f, -0.017453f }, { 0.0f, 0.0f, 0.008727f, -0.999962f } }, // 1 - Overlook + { 182173, 530, { -290.016f, 3702.42f, 56.6729f, 0.034907f }, { 0.0f, 0.0f, 0.017452f, 0.999848f } } // 2 - Stadium +}; + +go_type const HPTowerFlags[HP_TOWER_NUM] = +{ + { 183514, 530, { -467.078f, 3528.17f, 64.7121f, 3.14159f }, { 0.0f, 0.0f, 1.000000f, 0.000000f } }, // 0 broken hill + { 182525, 530, { -187.887f, 3459.38f, 60.0403f, -3.12414f }, { 0.0f, 0.0f, 0.999962f, -0.008727f } }, // 1 overlook + { 183515, 530, { -289.610f, 3696.83f, 75.9447f, 3.12414f }, { 0.0f, 0.0f, 0.999962f, 0.008727f } } // 2 stadium +}; + +uint32 const HP_LANG_CAPTURE_A[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_ALLIANCE, TEXT_OVERLOOK_TAKEN_ALLIANCE, TEXT_STADIUM_TAKEN_ALLIANCE }; +uint32 const HP_LANG_CAPTURE_H[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_HORDE, TEXT_OVERLOOK_TAKEN_HORDE, TEXT_STADIUM_TAKEN_HORDE }; OPvPCapturePointHP::OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType type) : OPvPCapturePoint(pvp), m_TowerType(type) { - SetCapturePointData(HPCapturePoints[type].entry, - HPCapturePoints[type].map, - HPCapturePoints[type].x, - HPCapturePoints[type].y, - HPCapturePoints[type].z, - HPCapturePoints[type].o, - HPCapturePoints[type].rot0, - HPCapturePoints[type].rot1, - HPCapturePoints[type].rot2, - HPCapturePoints[type].rot3); - AddObject(type, - HPTowerFlags[type].entry, - HPTowerFlags[type].map, - HPTowerFlags[type].x, - HPTowerFlags[type].y, - HPTowerFlags[type].z, - HPTowerFlags[type].o, - HPTowerFlags[type].rot0, - HPTowerFlags[type].rot1, - HPTowerFlags[type].rot2, - HPTowerFlags[type].rot3); + SetCapturePointData(HPCapturePoints[type].entry, HPCapturePoints[type].map, HPCapturePoints[type].pos, HPCapturePoints[type].rot); + AddObject(type, HPTowerFlags[type].entry, HPTowerFlags[type].map, HPTowerFlags[type].pos, HPTowerFlags[type].rot); } OutdoorPvPHP::OutdoorPvPHP() diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h index c71dd2990aa..f02d46b99af 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPHP.h @@ -30,10 +30,6 @@ enum DefenseMessages TEXT_BROKEN_HILL_TAKEN_HORDE = 14846, // '|cffffff00Broken Hill has been taken by the Horde!|r' }; -#define OutdoorPvPHPBuffZonesNum 6 - // HP, citadel, ramparts, blood furnace, shattered halls, mag's lair -const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 }; - enum OutdoorPvPHPSpells { AlliancePlayerKillReward = 32155, @@ -50,12 +46,6 @@ enum OutdoorPvPHPTowerType HP_TOWER_NUM = 3 }; -const uint32 HP_CREDITMARKER[HP_TOWER_NUM] = {19032, 19028, 19029}; - -const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404, 11396, 11388}; - -const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403, 11395, 11387}; - enum OutdoorPvPHPWorldStates { HP_UI_TOWER_DISPLAY_A = 0x9ba, @@ -65,32 +55,6 @@ enum OutdoorPvPHPWorldStates HP_UI_TOWER_COUNT_A = 0x9ac }; -const uint32 HP_MAP_N[HP_TOWER_NUM] = {0x9b5, 0x9b2, 0x9a8}; - -const uint32 HP_MAP_A[HP_TOWER_NUM] = {0x9b3, 0x9b0, 0x9a7}; - -const uint32 HP_MAP_H[HP_TOWER_NUM] = {0x9b4, 0x9b1, 0x9a6}; - -const uint32 HP_TowerArtKit_A[HP_TOWER_NUM] = {65, 62, 67}; - -const uint32 HP_TowerArtKit_H[HP_TOWER_NUM] = {64, 61, 68}; - -const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66, 63, 69}; - -const go_type HPCapturePoints[HP_TOWER_NUM] = -{ - {182175, 530, -471.462f, 3451.09f, 34.6432f, 0.174533f, 0.0f, 0.0f, 0.087156f, 0.996195f}, // 0 - Broken Hill - {182174, 530, -184.889f, 3476.93f, 38.205f, -0.017453f, 0.0f, 0.0f, 0.008727f, -0.999962f}, // 1 - Overlook - {182173, 530, -290.016f, 3702.42f, 56.6729f, 0.034907f, 0.0f, 0.0f, 0.017452f, 0.999848f} // 2 - Stadium -}; - -const go_type HPTowerFlags[HP_TOWER_NUM] = -{ - {183514, 530, -467.078f, 3528.17f, 64.7121f, 3.14159f, 0.0f, 0.0f, 1.0f, 0.0f}, // 0 broken hill - {182525, 530, -187.887f, 3459.38f, 60.0403f, -3.12414f, 0.0f, 0.0f, 0.999962f, -0.008727f}, // 1 overlook - {183515, 530, -289.610f, 3696.83f, 75.9447f, 3.12414f, 0.0f, 0.0f, 0.999962f, 0.008727f} // 2 stadium -}; - class OPvPCapturePointHP : public OPvPCapturePoint { public: diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp index d46b9d90ce2..2488c3643e3 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp @@ -24,6 +24,112 @@ #include "Player.h" #include "WorldStatePackets.h" + // kill credit for pks +uint32 const NA_CREDIT_MARKER = 24867; + +uint32 const NA_GUARDS_MAX = 15; + +uint32 const NA_BUFF_ZONE = 3518; + +uint32 const NA_HALAA_GRAVEYARD = 993; + +uint32 const NA_HALAA_GRAVEYARD_ZONE = 3518; // need to add zone id, not area id + +uint32 const NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating all guards + +uint32 const NA_GUARD_CHECK_TIME = 500; // every half second + +uint32 const FLIGHT_NODES_NUM = 4; + +uint32 const FlightPathStartNodes[FLIGHT_NODES_NUM] = { 103, 105, 107, 109 }; +uint32 const FlightPathEndNodes[FLIGHT_NODES_NUM] = { 104, 106, 108, 110 }; + +// spawned when the alliance is attacking, horde is in control +go_type const HordeControlGOs[NA_CONTROL_GO_NUM] = +{ + { 182267, 530, { -1815.8000f, 8036.5100f, -26.2354f, -2.897250f }, { 0.0f, 0.0f, 0.992546f, -0.121869f } }, //ALLY_ROOST_SOUTH + { 182280, 530, { -1507.9500f, 8132.1000f, -19.5585f, -1.343900f }, { 0.0f, 0.0f, 0.622515f, -0.782608f } }, //ALLY_ROOST_WEST + { 182281, 530, { -1384.5200f, 7779.3300f, -11.1663f, -0.575959f }, { 0.0f, 0.0f, 0.284015f, -0.958820f } }, //ALLY_ROOST_NORTH + { 182282, 530, { -1650.1100f, 7732.5600f, -15.4505f, -2.809980f }, { 0.0f, 0.0f, 0.986286f, -0.165048f } }, //ALLY_ROOST_EAST + + { 182222, 530, { -1825.4022f, 8039.2602f, -26.0800f, -2.897250f }, { 0.0f, 0.0f, 0.992546f, -0.121869f } }, //HORDE_BOMB_WAGON_SOUTH + { 182272, 530, { -1515.3700f, 8136.9100f, -20.4200f, -1.343900f }, { 0.0f, 0.0f, 0.622515f, -0.782608f } }, //HORDE_BOMB_WAGON_WEST + { 182273, 530, { -1377.9500f, 7773.4400f, -10.3100f, -0.575959f }, { 0.0f, 0.0f, 0.284015f, -0.958820f } }, //HORDE_BOMB_WAGON_NORTH + { 182274, 530, { -1659.8700f, 7733.1500f, -15.7500f, -2.809980f }, { 0.0f, 0.0f, 0.986286f, -0.165048f } }, //HORDE_BOMB_WAGON_EAST + + { 182266, 530, { -1815.8000f, 8036.5100f, -26.2354f, -2.897250f }, { 0.0f, 0.0f, 0.992546f, -0.121869f } }, //DESTROYED_ALLY_ROOST_SOUTH + { 182275, 530, { -1507.9500f, 8132.1000f, -19.5585f, -1.343900f }, { 0.0f, 0.0f, 0.622515f, -0.782608f } }, //DESTROYED_ALLY_ROOST_WEST + { 182276, 530, { -1384.5200f, 7779.3300f, -11.1663f, -0.575959f }, { 0.0f, 0.0f, 0.284015f, -0.958820f } }, //DESTROYED_ALLY_ROOST_NORTH + { 182277, 530, { -1650.1100f, 7732.5600f, -15.4505f, -2.809980f }, { 0.0f, 0.0f, 0.986286f, -0.165048f } } //DESTROYED_ALLY_ROOST_EAST +}; + +// spawned when the horde is attacking, alliance is in control +go_type const AllianceControlGOs[NA_CONTROL_GO_NUM] = +{ + { 182301, 530, { -1815.8000f, 8036.5100f, -26.2354f, -2.897250f }, { 0.0f, 0.0f, 0.992546f, -0.121869f } }, //HORDE_ROOST_SOUTH + { 182302, 530, { -1507.9500f, 8132.1000f, -19.5585f, -1.343900f }, { 0.0f, 0.0f, 0.622515f, -0.782608f } }, //HORDE_ROOST_WEST + { 182303, 530, { -1384.5200f, 7779.3300f, -11.1663f, -0.575959f }, { 0.0f, 0.0f, 0.284015f, -0.958820f } }, //HORDE_ROOST_NORTH + { 182304, 530, { -1650.1100f, 7732.5600f, -15.4505f, -2.809980f }, { 0.0f, 0.0f, 0.986286f, -0.165048f } }, //HORDE_ROOST_EAST + + { 182305, 530, { -1825.4022f, 8039.2602f, -26.0800f, -2.897250f }, { 0.0f, 0.0f, 0.992546f, -0.121869f } }, //ALLY_BOMB_WAGON_SOUTH + { 182306, 530, { -1515.3700f, 8136.9100f, -20.4200f, -1.343900f }, { 0.0f, 0.0f, 0.622515f, -0.782608f } }, //ALLY_BOMB_WAGON_WEST + { 182307, 530, { -1377.9500f, 7773.4400f, -10.3100f, -0.575959f }, { 0.0f, 0.0f, 0.284015f, -0.958820f } }, //ALLY_BOMB_WAGON_NORTH + { 182308, 530, { -1659.8700f, 7733.1500f, -15.7500f, -2.809980f }, { 0.0f, 0.0f, 0.986286f, -0.165048f } }, //ALLY_BOMB_WAGON_EAST + + { 182297, 530, { -1815.8000f, 8036.5100f, -26.2354f, -2.897250f }, { 0.0f, 0.0f, 0.992546f, -0.121869f } }, //DESTROYED_HORDE_ROOST_SOUTH + { 182298, 530, { -1507.9500f, 8132.1000f, -19.5585f, -1.343900f }, { 0.0f, 0.0f, 0.622515f, -0.782608f } }, //DESTROYED_HORDE_ROOST_WEST + { 182299, 530, { -1384.5200f, 7779.3300f, -11.1663f, -0.575959f }, { 0.0f, 0.0f, 0.284015f, -0.958820f } }, //DESTROYED_HORDE_ROOST_NORTH + { 182300, 530, { -1650.1100f, 7732.5600f, -15.4505f, -2.809980f }, { 0.0f, 0.0f, 0.986286f, -0.165048f } } //DESTROYED_HORDE_ROOST_EAST +}; + +creature_type const HordeControlNPCs[NA_CONTROL_NPC_NUM] = +{ + { 18816, 530, { -1523.92f, 7951.76f, -17.6942f, 3.51172f } }, + { 18821, 530, { -1527.75f, 7952.46f, -17.6948f, 3.99317f } }, + { 21474, 530, { -1520.14f, 7927.11f, -20.2527f, 3.39389f } }, + { 21484, 530, { -1524.84f, 7930.34f, -20.1820f, 3.64050f } }, + { 21483, 530, { -1570.01f, 7993.80f, -22.4505f, 5.02655f } }, + { 18192, 530, { -1654.06f, 8000.46f, -26.5900f, 3.37000f } }, + { 18192, 530, { -1487.18f, 7899.10f, -19.5300f, 0.95400f } }, + { 18192, 530, { -1480.88f, 7908.79f, -19.1900f, 4.48500f } }, + { 18192, 530, { -1540.56f, 7995.44f, -20.4500f, 0.94700f } }, + { 18192, 530, { -1546.95f, 8000.85f, -20.7200f, 6.03500f } }, + { 18192, 530, { -1595.31f, 7860.53f, -21.5100f, 3.74700f } }, + { 18192, 530, { -1642.31f, 7995.59f, -25.8000f, 3.31700f } }, + { 18192, 530, { -1545.46f, 7995.35f, -20.6300f, 1.09400f } }, + { 18192, 530, { -1487.58f, 7907.99f, -19.2700f, 5.56700f } }, + { 18192, 530, { -1651.54f, 7988.56f, -26.5289f, 2.98451f } }, + { 18192, 530, { -1602.46f, 7866.43f, -22.1177f, 4.74729f } }, + { 18192, 530, { -1591.22f, 7875.29f, -22.3536f, 4.34587f } }, + { 18192, 530, { -1550.60f, 7944.45f, -21.6300f, 3.55900f } }, + { 18192, 530, { -1545.57f, 7935.83f, -21.1300f, 3.44800f } }, + { 18192, 530, { -1550.86f, 7937.56f, -21.7000f, 3.80100f } } +}; + +creature_type const AllianceControlNPCs[NA_CONTROL_NPC_NUM] = +{ + { 18817, 530, { -1591.18f, 8020.39f, -22.2042f, 4.59022f } }, + { 18822, 530, { -1588.00f, 8019.00f, -22.2042f, 4.06662f } }, + { 21485, 530, { -1521.93f, 7927.37f, -20.2299f, 3.24631f } }, + { 21487, 530, { -1540.33f, 7971.95f, -20.7186f, 3.07178f } }, + { 21488, 530, { -1570.01f, 7993.80f, -22.4505f, 5.02655f } }, + { 18256, 530, { -1654.06f, 8000.46f, -26.5900f, 3.37000f } }, + { 18256, 530, { -1487.18f, 7899.10f, -19.5300f, 0.95400f } }, + { 18256, 530, { -1480.88f, 7908.79f, -19.1900f, 4.48500f } }, + { 18256, 530, { -1540.56f, 7995.44f, -20.4500f, 0.94700f } }, + { 18256, 530, { -1546.95f, 8000.85f, -20.7200f, 6.03500f } }, + { 18256, 530, { -1595.31f, 7860.53f, -21.5100f, 3.74700f } }, + { 18256, 530, { -1642.31f, 7995.59f, -25.8000f, 3.31700f } }, + { 18256, 530, { -1545.46f, 7995.35f, -20.6300f, 1.09400f } }, + { 18256, 530, { -1487.58f, 7907.99f, -19.2700f, 5.56700f } }, + { 18256, 530, { -1651.54f, 7988.56f, -26.5289f, 2.98451f } }, + { 18256, 530, { -1602.46f, 7866.43f, -22.1177f, 4.74729f } }, + { 18256, 530, { -1591.22f, 7875.29f, -22.3536f, 4.34587f } }, + { 18256, 530, { -1603.75f, 8000.36f, -24.1800f, 4.51600f } }, + { 18256, 530, { -1585.73f, 7994.68f, -23.2900f, 4.43900f } }, + { 18256, 530, { -1595.50f, 7991.27f, -23.5300f, 4.73800f } } +}; + OutdoorPvPNA::OutdoorPvPNA() { m_TypeId = OUTDOOR_PVP_NA; @@ -93,7 +199,7 @@ void OPvPCapturePointNA::SpawnNPCsForTeam(uint32 team) else return; for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i) - AddCreature(i, creatures[i].entry, creatures[i].map, creatures[i].x, creatures[i].y, creatures[i].z, creatures[i].o, OutdoorPvP::GetTeamIdByTeam(team), 1000000); + AddCreature(i, creatures[i].entry, creatures[i].map, creatures[i].pos, OutdoorPvP::GetTeamIdByTeam(team), 1000000); } void OPvPCapturePointNA::DeSpawnNPCs() @@ -104,26 +210,25 @@ void OPvPCapturePointNA::DeSpawnNPCs() void OPvPCapturePointNA::SpawnGOsForTeam(uint32 team) { - const go_type * gos = NULL; + go_type const* gos = nullptr; if (team == ALLIANCE) - gos=AllianceControlGOs; + gos = AllianceControlGOs; else if (team == HORDE) - gos=HordeControlGOs; + gos = HordeControlGOs; else return; - for (int i = 0; i < NA_CONTROL_GO_NUM; ++i) + + // roosts and bomb wagons are spawned when someone uses the matching destroyed roost + static ControlGOTypes const GoTypes[] = { - if (i == NA_ROOST_S || - i == NA_ROOST_W || - i == NA_ROOST_N || - i == NA_ROOST_E || - i == NA_BOMB_WAGON_S || - i == NA_BOMB_WAGON_W || - i == NA_BOMB_WAGON_N || - i == NA_BOMB_WAGON_E) - continue; // roosts and bomb wagons are spawned when someone uses the matching destroyed roost - AddObject(i, gos[i].entry, gos[i].map, gos[i].x, gos[i].y, gos[i].z, gos[i].o, gos[i].rot0, gos[i].rot1, gos[i].rot2, gos[i].rot3); - } + NA_DESTROYED_ROOST_S, + NA_DESTROYED_ROOST_W, + NA_DESTROYED_ROOST_N, + NA_DESTROYED_ROOST_E + }; + + for (ControlGOTypes goType : GoTypes) + AddObject(goType, gos[goType].entry, gos[goType].map, gos[goType].pos, gos[goType].rot); } void OPvPCapturePointNA::DeSpawnGOs() @@ -184,7 +289,7 @@ OPvPCapturePoint(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFactio m_WyvernStateNorth(0), m_WyvernStateSouth(0), m_WyvernStateEast(0), m_WyvernStateWest(0), m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME) { - SetCapturePointData(182210, 530, -1572.57f, 7945.3f, -22.475f, 2.05949f, 0.0f, 0.0f, 0.857167f, 0.515038f); + SetCapturePointData(182210, 530, { -1572.57f, 7945.3f, -22.475f, 2.05949f }, { 0.0f, 0.0f, 0.857167f, 0.515038f }); } bool OutdoorPvPNA::SetupOutdoorPvP() @@ -490,10 +595,10 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, GameObject* go) DelObject(del2); if (add>-1) - AddObject(add, gos[add].entry, gos[add].map, gos[add].x, gos[add].y, gos[add].z, gos[add].o, gos[add].rot0, gos[add].rot1, gos[add].rot2, gos[add].rot3); + AddObject(add, gos[add].entry, gos[add].map, gos[add].pos, gos[add].rot); if (add2>-1) - AddObject(add2, gos[add2].entry, gos[add2].map, gos[add2].x, gos[add2].y, gos[add2].z, gos[add2].o, gos[add2].rot0, gos[add2].rot1, gos[add2].rot2, gos[add2].rot3); + AddObject(add2, gos[add2].entry, gos[add2].map, gos[add2].pos, gos[add2].rot); return retval; } diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h index e52b393abe1..3769bb5f850 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPNA.h @@ -39,21 +39,6 @@ enum OutdoorPvPNASpells NA_CAPTURE_BUFF = 33795 // strength of the halaani }; -// kill credit for pks -const uint32 NA_CREDIT_MARKER = 24867; - -const uint32 NA_GUARDS_MAX = 15; - -const uint32 NA_BUFF_ZONE = 3518; - -const uint32 NA_HALAA_GRAVEYARD = 993; - -const uint32 NA_HALAA_GRAVEYARD_ZONE = 3518; // need to add zone id, not area id - -const uint32 NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating all guards - -const uint32 NA_GUARD_CHECK_TIME = 500; // every half second - enum OutdoorPvPNAWorldStates { NA_UI_HORDE_GUARDS_SHOW = 2503, @@ -88,8 +73,6 @@ enum OutdoorPvPNAWorldStates NA_MAP_HALAA_ALLIANCE = 2673 }; -const uint32 FLIGHT_NODES_NUM = 4; - // used to access the elements of Horde/AllyControlGOs enum ControlGOTypes { @@ -111,9 +94,6 @@ enum ControlGOTypes NA_CONTROL_GO_NUM = 12 }; -const uint32 FlightPathStartNodes[FLIGHT_NODES_NUM] = {103, 105, 107, 109}; -const uint32 FlightPathEndNodes[FLIGHT_NODES_NUM] = {104, 106, 108, 110}; - enum FlightSpellsNA { NA_SPELL_FLY_SOUTH = 32059, @@ -122,44 +102,6 @@ enum FlightSpellsNA NA_SPELL_FLY_EAST = 32081 }; -// spawned when the alliance is attacking, horde is in control -const go_type HordeControlGOs[NA_CONTROL_GO_NUM] = -{ - {182267, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //ALLY_ROOST_SOUTH - {182280, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //ALLY_ROOST_WEST - {182281, 530, -1384.52f, 7779.33f, -11.1663f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //ALLY_ROOST_NORTH - {182282, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //ALLY_ROOST_EAST - - {182222, 530, -1825.4022f, 8039.2602f, -26.08f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //HORDE_BOMB_WAGON_SOUTH - {182272, 530, -1515.37f, 8136.91f, -20.42f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //HORDE_BOMB_WAGON_WEST - {182273, 530, -1377.95f, 7773.44f, -10.31f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //HORDE_BOMB_WAGON_NORTH - {182274, 530, -1659.87f, 7733.15f, -15.75f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //HORDE_BOMB_WAGON_EAST - - {182266, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //DESTROYED_ALLY_ROOST_SOUTH - {182275, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //DESTROYED_ALLY_ROOST_WEST - {182276, 530, -1384.52f, 7779.33f, -11.1663f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //DESTROYED_ALLY_ROOST_NORTH - {182277, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f} //DESTROYED_ALLY_ROOST_EAST -}; - -// spawned when the horde is attacking, alliance is in control -const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] = -{ - {182301, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //HORDE_ROOST_SOUTH - {182302, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //HORDE_ROOST_WEST - {182303, 530, -1384.52f, 7779.33f, -11.1663f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //HORDE_ROOST_NORTH - {182304, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //HORDE_ROOST_EAST - - {182305, 530, -1825.4022f, 8039.2602f, -26.08f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //ALLY_BOMB_WAGON_SOUTH - {182306, 530, -1515.37f, 8136.91f, -20.42f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //ALLY_BOMB_WAGON_WEST - {182307, 530, -1377.95f, 7773.44f, -10.31f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //ALLY_BOMB_WAGON_NORTH - {182308, 530, -1659.87f, 7733.15f, -15.75f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f}, //ALLY_BOMB_WAGON_EAST - - {182297, 530, -1815.8f, 8036.51f, -26.2354f, -2.89725f, 0.0f, 0.0f, 0.992546f, -0.121869f}, //DESTROYED_HORDE_ROOST_SOUTH - {182298, 530, -1507.95f, 8132.1f, -19.5585f, -1.3439f, 0.0f, 0.0f, 0.622515f, -0.782608f}, //DESTROYED_HORDE_ROOST_WEST - {182299, 530, -1384.52f, 7779.33f, -11.1663f, -0.575959f, 0.0f, 0.0f, 0.284015f, -0.95882f}, //DESTROYED_HORDE_ROOST_NORTH - {182300, 530, -1650.11f, 7732.56f, -15.4505f, -2.80998f, 0.0f, 0.0f, 0.986286f, -0.165048f} //DESTROYED_HORDE_ROOST_EAST -}; - enum ControlNPCTypes { NA_NPC_RESEARCHER = 0, @@ -187,54 +129,6 @@ enum ControlNPCTypes NA_CONTROL_NPC_NUM }; -const creature_type HordeControlNPCs[NA_CONTROL_NPC_NUM] = -{ - {18816, 530, -1523.92f, 7951.76f, -17.6942f, 3.51172f}, - {18821, 530, -1527.75f, 7952.46f, -17.6948f, 3.99317f}, - {21474, 530, -1520.14f, 7927.11f, -20.2527f, 3.39389f}, - {21484, 530, -1524.84f, 7930.34f, -20.182f, 3.6405f}, - {21483, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f}, - {18192, 530, -1654.06f, 8000.46f, -26.59f, 3.37f}, - {18192, 530, -1487.18f, 7899.1f, -19.53f, 0.954f}, - {18192, 530, -1480.88f, 7908.79f, -19.19f, 4.485f}, - {18192, 530, -1540.56f, 7995.44f, -20.45f, 0.947f}, - {18192, 530, -1546.95f, 8000.85f, -20.72f, 6.035f}, - {18192, 530, -1595.31f, 7860.53f, -21.51f, 3.747f}, - {18192, 530, -1642.31f, 7995.59f, -25.8f, 3.317f}, - {18192, 530, -1545.46f, 7995.35f, -20.63f, 1.094f}, - {18192, 530, -1487.58f, 7907.99f, -19.27f, 5.567f}, - {18192, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f}, - {18192, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f}, - {18192, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f}, - {18192, 530, -1550.6f, 7944.45f, -21.63f, 3.559f}, - {18192, 530, -1545.57f, 7935.83f, -21.13f, 3.448f}, - {18192, 530, -1550.86f, 7937.56f, -21.7f, 3.801f} -}; - -const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] = -{ - {18817, 530, -1591.18f, 8020.39f, -22.2042f, 4.59022f}, - {18822, 530, -1588.0f, 8019.0f, -22.2042f, 4.06662f}, - {21485, 530, -1521.93f, 7927.37f, -20.2299f, 3.24631f}, - {21487, 530, -1540.33f, 7971.95f, -20.7186f, 3.07178f}, - {21488, 530, -1570.01f, 7993.8f, -22.4505f, 5.02655f}, - {18256, 530, -1654.06f, 8000.46f, -26.59f, 3.37f}, - {18256, 530, -1487.18f, 7899.1f, -19.53f, 0.954f}, - {18256, 530, -1480.88f, 7908.79f, -19.19f, 4.485f}, - {18256, 530, -1540.56f, 7995.44f, -20.45f, 0.947f}, - {18256, 530, -1546.95f, 8000.85f, -20.72f, 6.035f}, - {18256, 530, -1595.31f, 7860.53f, -21.51f, 3.747f}, - {18256, 530, -1642.31f, 7995.59f, -25.8f, 3.317f}, - {18256, 530, -1545.46f, 7995.35f, -20.63f, 1.094f}, - {18256, 530, -1487.58f, 7907.99f, -19.27f, 5.567f}, - {18256, 530, -1651.54f, 7988.56f, -26.5289f, 2.98451f}, - {18256, 530, -1602.46f, 7866.43f, -22.1177f, 4.74729f}, - {18256, 530, -1591.22f, 7875.29f, -22.3536f, 4.34587f}, - {18256, 530, -1603.75f, 8000.36f, -24.18f, 4.516f}, - {18256, 530, -1585.73f, 7994.68f, -23.29f, 4.439f}, - {18256, 530, -1595.5f, 7991.27f, -23.53f, 4.738f} -}; - enum WyvernStates { WYVERN_NEU_HORDE = 1, diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index 8e5baea378a..b14a1cbdadb 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -28,6 +28,19 @@ #include "World.h" #include "WorldStatePackets.h" +uint32 const SI_MAX_RESOURCES = 200; + +uint32 const SI_AREATRIGGER_H = 4168; +uint32 const SI_AREATRIGGER_A = 4162; + +uint32 const SI_TURNIN_QUEST_CM_A = 17090; +uint32 const SI_TURNIN_QUEST_CM_H = 18199; + +uint32 const SI_SILITHYST_MOUND = 181597; + +uint8 const OutdoorPvPSIBuffZonesNum = 3; +uint32 const OutdoorPvPSIBuffZones[OutdoorPvPSIBuffZonesNum] = { 1377, 3428, 3429 }; + OutdoorPvPSI::OutdoorPvPSI() { m_TypeId = OUTDOOR_PVP_SI; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h index 7fe3c8de7b1..e3b72535123 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.h @@ -28,22 +28,6 @@ enum OutdoorPvPSISpells SI_CENARION_FAVOR = 30754 }; -const uint32 SI_MAX_RESOURCES = 200; - -const uint8 OutdoorPvPSIBuffZonesNum = 3; - -const uint32 OutdoorPvPSIBuffZones[OutdoorPvPSIBuffZonesNum] = { 1377, 3428, 3429 }; - -const uint32 SI_AREATRIGGER_H = 4168; - -const uint32 SI_AREATRIGGER_A = 4162; - -const uint32 SI_TURNIN_QUEST_CM_A = 17090; - -const uint32 SI_TURNIN_QUEST_CM_H = 18199; - -const uint32 SI_SILITHYST_MOUND = 181597; - enum SI_WorldStates { SI_GATHERED_A = 2313, diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp index c43ccabeb9a..cacee3490f6 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp @@ -23,6 +23,71 @@ #include "Player.h" #include "WorldStatePackets.h" +uint8 const OutdoorPvPTFBuffZonesNum = 5; +uint32 const OutdoorPvPTFBuffZones[OutdoorPvPTFBuffZonesNum] = +{ + 3519 /*Terokkar Forest*/, + 3791 /*Sethekk Halls*/, + 3789 /*Shadow Labyrinth*/, + 3792 /*Mana-Tombs*/, + 3790 /*Auchenai Crypts*/ +}; + +// locked for 6 hours after capture +uint32 const TF_LOCK_TIME = 3600 * 6 * 1000; + +// update lock timer every 1/4 minute (overkill, but this way it's sure the timer won't "jump" 2 minutes at once.) +uint32 const TF_LOCK_TIME_UPDATE = 15000; + +// blessing of auchindoun, used in TeamCastSpell which uses signed int, so signed +int32 const TF_CAPTURE_BUFF = 33377; + +uint32 const TF_ALLY_QUEST = 11505; +uint32 const TF_HORDE_QUEST = 11506; + +go_type const TFCapturePoints[TF_TOWER_NUM] = +{ + { 183104, 530, { -3081.65f, 5335.03f, 17.1853f, -2.146750f }, { 0.0f, 0.0f, 0.878817f, -0.477159f } }, + { 183411, 530, { -2939.90f, 4788.73f, 18.9870f, 2.775070f }, { 0.0f, 0.0f, 0.983255f, 0.182236f } }, + { 183412, 530, { -3174.94f, 4440.97f, 16.2281f, 1.867500f }, { 0.0f, 0.0f, 0.803857f, 0.594823f } }, + { 183413, 530, { -3603.31f, 4529.15f, 20.9077f, 0.994838f }, { 0.0f, 0.0f, 0.477159f, 0.878817f } }, + { 183414, 530, { -3812.37f, 4899.30f, 17.7249f, 0.087266f }, { 0.0f, 0.0f, 0.043619f, 0.999048f } } +}; + +struct tf_tower_world_state +{ + uint32 n; + uint32 h; + uint32 a; +}; + +tf_tower_world_state const TFTowerWorldStates[TF_TOWER_NUM] = +{ + { 0xa79, 0xa7a, 0xa7b }, + { 0xa7e, 0xa7d, 0xa7c }, + { 0xa82, 0xa81, 0xa80 }, + { 0xa88, 0xa87, 0xa86 }, + { 0xa85, 0xa84, 0xa83 } +}; + +uint32 const TFTowerPlayerEnterEvents[TF_TOWER_NUM] = +{ + 12226, + 12497, + 12486, + 12499, + 12501 +}; + +uint32 const TFTowerPlayerLeaveEvents[TF_TOWER_NUM] = +{ + 12225, + 12496, + 12487, + 12498, + 12500 +}; + OutdoorPvPTF::OutdoorPvPTF() { m_TypeId = OUTDOOR_PVP_TF; @@ -42,7 +107,7 @@ OutdoorPvPTF::OutdoorPvPTF() OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(TF_TOWERSTATE_N) { - SetCapturePointData(TFCapturePoints[type].entry, TFCapturePoints[type].map, TFCapturePoints[type].x, TFCapturePoints[type].y, TFCapturePoints[type].z, TFCapturePoints[type].o, TFCapturePoints[type].rot0, TFCapturePoints[type].rot1, TFCapturePoints[type].rot2, TFCapturePoints[type].rot3); + SetCapturePointData(TFCapturePoints[type].entry, TFCapturePoints[type].map, TFCapturePoints[type].pos, TFCapturePoints[type].rot); } void OPvPCapturePointTF::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h index 932a064d860..22865c5a8b0 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPTF.h @@ -30,29 +30,6 @@ enum DefenseMessages TEXT_SPIRIT_TOWER_LOSE_HORDE = 18287 // '|cffffff00The Horde has lost control of a Spirit Tower!|r' }; -const uint8 OutdoorPvPTFBuffZonesNum = 5; - -const uint32 OutdoorPvPTFBuffZones[OutdoorPvPTFBuffZonesNum] = -{ - 3519 /*Terokkar Forest*/, - 3791 /*Sethekk Halls*/, - 3789 /*Shadow Labyrinth*/, - 3792 /*Mana-Tombs*/, - 3790 /*Auchenai Crypts*/ -}; - -// locked for 6 hours after capture -const uint32 TF_LOCK_TIME = 3600 * 6 * 1000; - -// update lock timer every 1/4 minute (overkill, but this way it's sure the timer won't "jump" 2 minutes at once.) -const uint32 TF_LOCK_TIME_UPDATE = 15000; - -// blessing of auchindoun -#define TF_CAPTURE_BUFF 33377 - -const uint32 TF_ALLY_QUEST = 11505; -const uint32 TF_HORDE_QUEST = 11506; - enum OutdoorPvPTF_TowerType { TF_TOWER_NW = 0, @@ -63,49 +40,6 @@ enum OutdoorPvPTF_TowerType TF_TOWER_NUM }; -const go_type TFCapturePoints[TF_TOWER_NUM] = -{ - {183104, 530, -3081.65f, 5335.03f, 17.1853f, -2.14675f, 0.0f, 0.0f, 0.878817f, -0.477159f}, - {183411, 530, -2939.9f, 4788.73f, 18.987f, 2.77507f, 0.0f, 0.0f, 0.983255f, 0.182236f}, - {183412, 530, -3174.94f, 4440.97f, 16.2281f, 1.86750f, 0.0f, 0.0f, 0.803857f, 0.594823f}, - {183413, 530, -3603.31f, 4529.15f, 20.9077f, 0.994838f, 0.0f, 0.0f, 0.477159f, 0.878817f}, - {183414, 530, -3812.37f, 4899.3f, 17.7249f, 0.087266f, 0.0f, 0.0f, 0.043619f, 0.999048f} -}; - -struct tf_tower_world_state -{ - uint32 n; - uint32 h; - uint32 a; -}; - -const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] = -{ - {0xa79, 0xa7a, 0xa7b}, - {0xa7e, 0xa7d, 0xa7c}, - {0xa82, 0xa81, 0xa80}, - {0xa88, 0xa87, 0xa86}, - {0xa85, 0xa84, 0xa83} -}; - -const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM] = -{ - 12226, - 12497, - 12486, - 12499, - 12501 -}; - -const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM] = -{ - 12225, - 12496, - 12487, - 12498, - 12500 -}; - enum TFWorldStates { TF_UI_TOWER_COUNT_H = 0xa3e, diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp index 1f6f328e7af..eb0cbc3851e 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp @@ -24,10 +24,69 @@ #include "Player.h" #include "WorldStatePackets.h" +uint8 const OutdoorPvPZMBuffZonesNum = 5; + +// the buff is cast in these zones +uint32 const OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = { 3521, 3607, 3717, 3715, 3716 }; + +// linked when the central tower is controlled +uint32 const ZM_GRAVEYARD_ZONE = 3521; + +// linked when the central tower is controlled +uint32 const ZM_GRAVEYARD_ID = 969; + + +// banners 182527, 182528, 182529, gotta check them ingame +go_type const ZM_Banner_A = { 182527, 530, { 253.54f, 7083.81f, 36.7728f, -0.017453f }, { 0.0f, 0.0f, 0.008727f, -0.999962f } }; +go_type const ZM_Banner_H = { 182528, 530, { 253.54f, 7083.81f, 36.7728f, -0.017453f }, { 0.0f, 0.0f, 0.008727f, -0.999962f } }; +go_type const ZM_Banner_N = { 182529, 530, { 253.54f, 7083.81f, 36.7728f, -0.017453f }, { 0.0f, 0.0f, 0.008727f, -0.999962f } }; + +// horde field scout spawn data +creature_type const ZM_HordeFieldScout = { 18564, 530, { 296.625f, 7818.4f, 42.6294f, 5.18363f } }; + +// alliance field scout spawn data +creature_type const ZM_AllianceFieldScout = { 18581, 530, { 374.395f, 6230.08f, 22.8351f, 0.593412f } }; + +struct zm_beacon +{ + uint32 ui_tower_n; + uint32 ui_tower_h; + uint32 ui_tower_a; + uint32 map_tower_n; + uint32 map_tower_h; + uint32 map_tower_a; + uint32 event_enter; + uint32 event_leave; +}; + +zm_beacon const ZMBeaconInfo[ZM_NUM_BEACONS] = +{ + { 2560, 2559, 2558, 2652, 2651, 2650, 11807, 11806 }, + { 2557, 2556, 2555, 2646, 2645, 2644, 11805, 11804 } +}; + +uint32 const ZMBeaconCaptureA[ZM_NUM_BEACONS] = +{ + TEXT_EAST_BEACON_TAKEN_ALLIANCE, + TEXT_WEST_BEACON_TAKEN_ALLIANCE +}; + +uint32 const ZMBeaconCaptureH[ZM_NUM_BEACONS] = +{ + TEXT_EAST_BEACON_TAKEN_HORDE, + TEXT_WEST_BEACON_TAKEN_HORDE +}; + +go_type const ZMCapturePoints[ZM_NUM_BEACONS] = +{ + { 182523, 530, { 303.243f, 6841.36f, 40.1245f, -1.58825f }, { 0.0f, 0.0f, 0.71325f, -0.700909f } }, + { 182522, 530, { 336.466f, 7340.26f, 41.4984f, -1.58825f }, { 0.0f, 0.0f, 0.71325f, -0.700909f } } +}; + OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N) { - SetCapturePointData(ZMCapturePoints[type].entry, ZMCapturePoints[type].map, ZMCapturePoints[type].x, ZMCapturePoints[type].y, ZMCapturePoints[type].z, ZMCapturePoints[type].o, ZMCapturePoints[type].rot0, ZMCapturePoints[type].rot1, ZMCapturePoints[type].rot2, ZMCapturePoints[type].rot3); + SetCapturePointData(ZMCapturePoints[type].entry, ZMCapturePoints[type].map, ZMCapturePoints[type].pos, ZMCapturePoints[type].rot); } void OPvPCapturePointZM_Beacon::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) @@ -191,7 +250,7 @@ int32 OPvPCapturePointZM_GraveYard::HandleOpenGo(Player* player, GameObject* go) { m_GraveYardState = ZM_GRAVEYARD_A; DelObject(0); // only one gotype is used in the whole outdoor pvp, no need to call it a constant - AddObject(0, ZM_Banner_A.entry, ZM_Banner_A.map, ZM_Banner_A.x, ZM_Banner_A.y, ZM_Banner_A.z, ZM_Banner_A.o, ZM_Banner_A.rot0, ZM_Banner_A.rot1, ZM_Banner_A.rot2, ZM_Banner_A.rot3); + AddObject(0, ZM_Banner_A.entry, ZM_Banner_A.map, ZM_Banner_A.pos, ZM_Banner_A.rot); sObjectMgr->RemoveGraveYardLink(ZM_GRAVEYARD_ID, ZM_GRAVEYARD_ZONE, HORDE); // rem gy sObjectMgr->AddGraveYardLink(ZM_GRAVEYARD_ID, ZM_GRAVEYARD_ZONE, ALLIANCE, false); // add gy m_PvP->TeamApplyBuff(TEAM_ALLIANCE, ZM_CAPTURE_BUFF); @@ -202,7 +261,7 @@ int32 OPvPCapturePointZM_GraveYard::HandleOpenGo(Player* player, GameObject* go) { m_GraveYardState = ZM_GRAVEYARD_H; DelObject(0); // only one gotype is used in the whole outdoor pvp, no need to call it a constant - AddObject(0, ZM_Banner_H.entry, ZM_Banner_H.map, ZM_Banner_H.x, ZM_Banner_H.y, ZM_Banner_H.z, ZM_Banner_H.o, ZM_Banner_H.rot0, ZM_Banner_H.rot1, ZM_Banner_H.rot2, ZM_Banner_H.rot3); + AddObject(0, ZM_Banner_H.entry, ZM_Banner_H.map, ZM_Banner_H.pos, ZM_Banner_H.rot); sObjectMgr->RemoveGraveYardLink(ZM_GRAVEYARD_ID, ZM_GRAVEYARD_ZONE, ALLIANCE); // rem gy sObjectMgr->AddGraveYardLink(ZM_GRAVEYARD_ID, ZM_GRAVEYARD_ZONE, HORDE, false); // add gy m_PvP->TeamApplyBuff(TEAM_HORDE, ZM_CAPTURE_BUFF); @@ -221,10 +280,10 @@ OPvPCapturePointZM_GraveYard::OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp) m_GraveYardState = ZM_GRAVEYARD_N; m_FlagCarrierGUID.Clear(); // add field scouts here - AddCreature(ZM_ALLIANCE_FIELD_SCOUT, ZM_AllianceFieldScout.entry, ZM_AllianceFieldScout.map, ZM_AllianceFieldScout.x, ZM_AllianceFieldScout.y, ZM_AllianceFieldScout.z, ZM_AllianceFieldScout.o); - AddCreature(ZM_HORDE_FIELD_SCOUT, ZM_HordeFieldScout.entry, ZM_HordeFieldScout.map, ZM_HordeFieldScout.x, ZM_HordeFieldScout.y, ZM_HordeFieldScout.z, ZM_HordeFieldScout.o); + AddCreature(ZM_ALLIANCE_FIELD_SCOUT, ZM_AllianceFieldScout.entry, ZM_AllianceFieldScout.map, ZM_AllianceFieldScout.pos); + AddCreature(ZM_HORDE_FIELD_SCOUT, ZM_HordeFieldScout.entry, ZM_HordeFieldScout.map, ZM_HordeFieldScout.pos); // add neutral banner - AddObject(0, ZM_Banner_N.entry, ZM_Banner_N.map, ZM_Banner_N.x, ZM_Banner_N.y, ZM_Banner_N.z, ZM_Banner_N.o, ZM_Banner_N.rot0, ZM_Banner_N.rot1, ZM_Banner_N.rot2, ZM_Banner_N.rot3); + AddObject(0, ZM_Banner_N.entry, ZM_Banner_N.map, ZM_Banner_N.pos, ZM_Banner_N.rot); } void OPvPCapturePointZM_GraveYard::UpdateTowerState() diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h index bab2af1419c..b1195d5221c 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h @@ -34,17 +34,6 @@ enum DefenseMessages TEXT_BATTLE_STANDARDS_HORDE = 16288 // (NYI) '|cffffff00The Horde Field Scout is now issuing battle standards.|r' }; -const uint8 OutdoorPvPZMBuffZonesNum = 5; - -// the buff is cast in these zones -const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521, 3607, 3717, 3715, 3716}; - -// linked when the central tower is controlled -const uint32 ZM_GRAVEYARD_ZONE = 3521; - -// linked when the central tower is controlled -const uint32 ZM_GRAVEYARD_ID = 969; - enum OutdoorPvPZMSpells { // cast on the players of the controlling faction @@ -59,17 +48,6 @@ enum OutdoorPvPZMSpells ZM_HordePlayerKillReward = 32158 }; -// banners 182527, 182528, 182529, gotta check them ingame -const go_type ZM_Banner_A = { 182527, 530, 253.54f, 7083.81f, 36.7728f, -0.017453f, 0.0f, 0.0f, 0.008727f, -0.999962f }; -const go_type ZM_Banner_H = { 182528, 530, 253.54f, 7083.81f, 36.7728f, -0.017453f, 0.0f, 0.0f, 0.008727f, -0.999962f }; -const go_type ZM_Banner_N = { 182529, 530, 253.54f, 7083.81f, 36.7728f, -0.017453f, 0.0f, 0.0f, 0.008727f, -0.999962f }; - -// horde field scout spawn data -const creature_type ZM_HordeFieldScout = {18564, 530, 296.625f, 7818.4f, 42.6294f, 5.18363f}; - -// alliance field scout spawn data -const creature_type ZM_AllianceFieldScout = {18581, 530, 374.395f, 6230.08f, 22.8351f, 0.593412f}; - enum ZMCreatureTypes { ZM_ALLIANCE_FIELD_SCOUT = 0, @@ -77,18 +55,6 @@ enum ZMCreatureTypes ZM_CREATURE_NUM }; -struct zm_beacon -{ - uint32 ui_tower_n; - uint32 ui_tower_h; - uint32 ui_tower_a; - uint32 map_tower_n; - uint32 map_tower_h; - uint32 map_tower_a; - uint32 event_enter; - uint32 event_leave; -}; - enum ZM_BeaconType { ZM_BEACON_EAST = 0, @@ -96,30 +62,6 @@ enum ZM_BeaconType ZM_NUM_BEACONS }; -const zm_beacon ZMBeaconInfo[ZM_NUM_BEACONS] = -{ - {2560, 2559, 2558, 2652, 2651, 2650, 11807, 11806}, - {2557, 2556, 2555, 2646, 2645, 2644, 11805, 11804} -}; - -const uint32 ZMBeaconCaptureA[ZM_NUM_BEACONS] = -{ - TEXT_EAST_BEACON_TAKEN_ALLIANCE, - TEXT_WEST_BEACON_TAKEN_ALLIANCE -}; - -const uint32 ZMBeaconCaptureH[ZM_NUM_BEACONS] = -{ - TEXT_EAST_BEACON_TAKEN_HORDE, - TEXT_WEST_BEACON_TAKEN_HORDE -}; - -const go_type ZMCapturePoints[ZM_NUM_BEACONS] = -{ - {182523, 530, 303.243f, 6841.36f, 40.1245f, -1.58825f, 0.0f, 0.0f, 0.71325f, -0.700909f}, - {182522, 530, 336.466f, 7340.26f, 41.4984f, -1.58825f, 0.0f, 0.0f, 0.71325f, -0.700909f} -}; - enum OutdoorPvPZMWorldStates { ZM_WORLDSTATE_UNK_1 = 2653, |