aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp29
-rw-r--r--src/server/game/Globals/ObjectMgr.h4
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp12
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.h41
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp19
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.h13
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp6
-rw-r--r--src/server/game/Scripting/ScriptMgr.h3
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPHP.cpp58
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPHP.h36
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp143
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPNA.h106
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp13
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPSI.h16
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPTF.cpp67
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPTF.h66
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp71
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.h58
18 files changed, 350 insertions, 411 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index f0fc3f5e297..73a0b0c0c6d 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -2187,7 +2187,7 @@ void ObjectMgr::RemoveCreatureFromGrid(ObjectGuid::LowType guid, CreatureData co
}
}
-ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay, float rotation0, float rotation1, float rotation2, float rotation3)
+ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, Position const& pos, QuaternionData const& rot, uint32 spawntimedelay /*= 0*/)
{
GameObjectTemplate const* goinfo = GetGameObjectTemplate(entry);
if (!goinfo)
@@ -2201,14 +2201,10 @@ ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, fl
GameObjectData& data = NewGOData(guid);
data.id = entry;
data.mapid = mapId;
- data.posX = x;
- data.posY = y;
- data.posZ = z;
- data.orientation = o;
- data.rotation.x = rotation0;
- data.rotation.y = rotation1;
- data.rotation.z = rotation2;
- data.rotation.w = rotation3;
+
+ pos.GetPosition(data.posX, data.posY, data.posZ, data.orientation);
+
+ data.rotation = rot;
data.spawntimesecs = spawntimedelay;
data.animprogress = 100;
data.spawnDifficulties.push_back(DIFFICULTY_NONE);
@@ -2220,7 +2216,7 @@ ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, fl
// Spawn if necessary (loaded grids only)
// We use spawn coords to spawn
- if (!map->Instanceable() && map->IsGridLoaded(x, y))
+ if (!map->Instanceable() && map->IsGridLoaded(data.posX, data.posY))
{
GameObject* go = GameObject::CreateGameObjectFromDB(guid, map);
if (!go)
@@ -2230,12 +2226,12 @@ ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, fl
}
}
- TC_LOG_DEBUG("maps", "AddGOData: dbguid " UI64FMTD " entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o);
+ TC_LOG_DEBUG("maps", "AddGOData: dbguid " UI64FMTD " entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, data.posX, data.posY, data.posZ, data.orientation);
return guid;
}
-ObjectGuid::LowType ObjectMgr::AddCreatureData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay /*= 0*/)
+ObjectGuid::LowType ObjectMgr::AddCreatureData(uint32 entry, uint32 mapId, Position const& pos, uint32 spawntimedelay /*= 0*/)
{
CreatureTemplate const* cInfo = GetCreatureTemplate(entry);
if (!cInfo)
@@ -2256,10 +2252,9 @@ ObjectGuid::LowType ObjectMgr::AddCreatureData(uint32 entry, uint32 mapId, float
data.mapid = mapId;
data.displayid = 0;
data.equipmentId = 0;
- data.posX = x;
- data.posY = y;
- data.posZ = z;
- data.orientation = o;
+
+ pos.GetPosition(data.posX, data.posY, data.posZ, data.orientation);
+
data.spawntimesecs = spawntimedelay;
data.spawndist = 0;
data.currentwaypoint = 0;
@@ -2275,7 +2270,7 @@ ObjectGuid::LowType ObjectMgr::AddCreatureData(uint32 entry, uint32 mapId, float
AddCreatureToGrid(guid, &data);
// We use spawn coords to spawn
- if (!map->Instanceable() && !map->IsRemovalGrid(x, y))
+ if (!map->Instanceable() && !map->IsRemovalGrid(data.posX, data.posY))
{
Creature* creature = Creature::CreateCreatureFromDB(guid, map);
if (!creature)
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 1bcf58a452d..85974e3b9da 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1492,8 +1492,8 @@ class TC_GAME_API ObjectMgr
void RemoveCreatureFromGrid(ObjectGuid::LowType guid, CreatureData const* data);
void AddGameobjectToGrid(ObjectGuid::LowType guid, GameObjectData const* data);
void RemoveGameobjectFromGrid(ObjectGuid::LowType guid, GameObjectData const* data);
- ObjectGuid::LowType AddGOData(uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0, float rotation0 = 0, float rotation1 = 0, float rotation2 = 0, float rotation3 = 0);
- ObjectGuid::LowType AddCreatureData(uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
+ ObjectGuid::LowType AddGOData(uint32 entry, uint32 map, Position const& pos, QuaternionData const& rot, uint32 spawntimedelay = 0);
+ ObjectGuid::LowType AddCreatureData(uint32 entry, uint32 map, Position const& pos, uint32 spawntimedelay = 0);
// reserved names
void LoadReservedPlayersNames();
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index a0d56420d83..c1abd7625e9 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -109,9 +109,9 @@ void OPvPCapturePoint::AddCre(uint32 type, ObjectGuid::LowType guid)
m_CreatureTypes[m_Creatures[type]] = type;
}
-bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
+bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, Position const& pos, QuaternionData const& rot)
{
- if (ObjectGuid::LowType guid = sObjectMgr->AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3))
+ if (ObjectGuid::LowType guid = sObjectMgr->AddGOData(entry, map, pos, rot, 0))
{
AddGO(type, guid);
return true;
@@ -120,9 +120,9 @@ bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, float x,
return false;
}
-bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, TeamId /*teamId = TEAM_NEUTRAL*/, uint32 spawntimedelay /*= 0*/)
+bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 map, Position const& pos, TeamId /*teamId = TEAM_NEUTRAL*/, uint32 spawntimedelay /*= 0*/)
{
- if (ObjectGuid::LowType guid = sObjectMgr->AddCreatureData(entry, map, x, y, z, o, spawntimedelay))
+ if (ObjectGuid::LowType guid = sObjectMgr->AddCreatureData(entry, map, pos, spawntimedelay))
{
AddCre(type, guid);
return true;
@@ -131,7 +131,7 @@ bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 map, float
return false;
}
-bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
+bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, Position const& pos, QuaternionData const& rot)
{
TC_LOG_DEBUG("outdoorpvp", "Creating capture point %u", entry);
@@ -143,7 +143,7 @@ bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, fl
return false;
}
- m_capturePointSpawnId = sObjectMgr->AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3);
+ m_capturePointSpawnId = sObjectMgr->AddGOData(entry, map, pos, rot, 0);
if (!m_capturePointSpawnId)
return false;
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index b063352c07b..e5a01706cbf 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -18,22 +18,22 @@
#ifndef OUTDOOR_PVP_H_
#define OUTDOOR_PVP_H_
+#include "Position.h"
+#include "QuaternionData.h"
#include "SharedDefines.h"
#include "ZoneScript.h"
#include <map>
-class GameObject;
-
enum OutdoorPvPTypes
{
OUTDOOR_PVP_HP = 1,
- OUTDOOR_PVP_NA = 2,
- OUTDOOR_PVP_TF = 3,
- OUTDOOR_PVP_ZM = 4,
- OUTDOOR_PVP_SI = 5
-};
+ OUTDOOR_PVP_NA,
+ OUTDOOR_PVP_TF,
+ OUTDOOR_PVP_ZM,
+ OUTDOOR_PVP_SI,
-#define MAX_OUTDOORPVP_TYPES 6
+ MAX_OUTDOORPVP_TYPES
+};
enum ObjectiveStates
{
@@ -53,14 +53,8 @@ struct go_type
{
uint32 entry;
uint32 map;
- float x;
- float y;
- float z;
- float o;
- float rot0;
- float rot1;
- float rot2;
- float rot3;
+ Position pos;
+ QuaternionData rot;
};
// struct for creature spawning
@@ -68,10 +62,7 @@ struct creature_type
{
uint32 entry;
uint32 map;
- float x;
- float y;
- float z;
- float o;
+ Position pos;
};
class Creature;
@@ -142,17 +133,15 @@ class TC_GAME_API OPvPCapturePoint
void AddGO(uint32 type, ObjectGuid::LowType guid);
void AddCre(uint32 type, ObjectGuid::LowType guid);
- bool SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o = 0,
- float rotation0 = 0, float rotation1 = 0, float rotation2 = 0, float rotation3 = 0);
+ bool SetCapturePointData(uint32 entry, uint32 map, Position const& pos, QuaternionData const& rot);
protected:
- bool AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o,
- float rotation0, float rotation1, float rotation2, float rotation3);
- virtual bool AddCreature(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, TeamId teamId = TEAM_NEUTRAL, uint32 spawntimedelay = 0);
+ bool AddObject(uint32 type, uint32 entry, uint32 map, Position const& pos, QuaternionData const& rot);
+ bool AddCreature(uint32 type, uint32 entry, uint32 map, Position const& pos, TeamId teamId = TEAM_NEUTRAL, uint32 spawntimedelay = 0);
- bool DelCreature(uint32 type);
bool DelObject(uint32 type);
+ bool DelCreature(uint32 type);
bool DelCapturePoint();
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index d9a5dd0cd92..d9a80286db1 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -27,21 +27,17 @@
OutdoorPvPMgr::OutdoorPvPMgr()
{
m_UpdateTimer = 0;
- //TC_LOG_DEBUG("outdoorpvp", "Instantiating OutdoorPvPMgr");
}
void OutdoorPvPMgr::Die()
{
- //TC_LOG_DEBUG("outdoorpvp", "Deleting OutdoorPvPMgr");
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
delete *itr;
m_OutdoorPvPSet.clear();
- for (OutdoorPvPDataMap::iterator itr = m_OutdoorPvPDatas.begin(); itr != m_OutdoorPvPDatas.end(); ++itr)
- delete itr->second;
-
- m_OutdoorPvPDatas.clear();
+ for (uint32 i = 0; i < MAX_OUTDOORPVP_TYPES; ++i)
+ m_OutdoorPvPDatas[i] = 0;
m_OutdoorPvPMap.clear();
}
@@ -58,7 +54,6 @@ void OutdoorPvPMgr::InitOutdoorPvP()
// 0 1
QueryResult result = WorldDatabase.Query("SELECT TypeId, ScriptName FROM outdoorpvp_template");
-
if (!result)
{
TC_LOG_ERROR("server.loading", ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
@@ -83,11 +78,8 @@ void OutdoorPvPMgr::InitOutdoorPvP()
continue;
}
- OutdoorPvPData* data = new OutdoorPvPData();
OutdoorPvPTypes realTypeId = OutdoorPvPTypes(typeId);
- data->TypeId = realTypeId;
- data->ScriptId = sObjectMgr->GetScriptId(fields[1].GetString());
- m_OutdoorPvPDatas[realTypeId] = data;
+ m_OutdoorPvPDatas[realTypeId] = sObjectMgr->GetScriptId(fields[1].GetString());
++count;
}
@@ -96,14 +88,13 @@ void OutdoorPvPMgr::InitOutdoorPvP()
OutdoorPvP* pvp;
for (uint8 i = 1; i < MAX_OUTDOORPVP_TYPES; ++i)
{
- OutdoorPvPDataMap::iterator iter = m_OutdoorPvPDatas.find(OutdoorPvPTypes(i));
- if (iter == m_OutdoorPvPDatas.end())
+ if (!m_OutdoorPvPDatas[i])
{
TC_LOG_ERROR("sql.sql", "Could not initialize OutdoorPvP object for type ID %u; no entry in database.", uint32(i));
continue;
}
- pvp = sScriptMgr->CreateOutdoorPvP(iter->second);
+ pvp = sScriptMgr->CreateOutdoorPvP(m_OutdoorPvPDatas[i]);
if (!pvp)
{
TC_LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; got NULL pointer from script.", uint32(i));
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
index c964cf8f82c..1a73a46da70 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
@@ -21,6 +21,7 @@
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL 1000
#include "OutdoorPvP.h"
+#include <unordered_map>
class Player;
class GameObject;
@@ -29,12 +30,6 @@ class ZoneScript;
struct GossipMenuItems;
enum LocaleConstant : uint8;
-struct OutdoorPvPData
-{
- OutdoorPvPTypes TypeId;
- uint32 ScriptId;
-};
-
// class to handle player enter / leave / areatrigger / GO use events
class TC_GAME_API OutdoorPvPMgr
{
@@ -85,8 +80,8 @@ class TC_GAME_API OutdoorPvPMgr
private:
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
- typedef std::map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
- typedef std::map<OutdoorPvPTypes, OutdoorPvPData*> OutdoorPvPDataMap;
+ typedef std::unordered_map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
+ typedef std::array<uint32, MAX_OUTDOORPVP_TYPES> OutdoorPvPScriptIds;
// contains all initiated outdoor pvp events
// used when initing / cleaning up
@@ -97,7 +92,7 @@ class TC_GAME_API OutdoorPvPMgr
OutdoorPvPMap m_OutdoorPvPMap;
// Holds the outdoor PvP templates
- OutdoorPvPDataMap m_OutdoorPvPDatas;
+ OutdoorPvPScriptIds m_OutdoorPvPDatas;
// update interval
uint32 m_UpdateTimer;
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 668f4bba387..09528245993 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -1654,11 +1654,9 @@ Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/)
return NULL;
}
-OutdoorPvP* ScriptMgr::CreateOutdoorPvP(OutdoorPvPData const* data)
+OutdoorPvP* ScriptMgr::CreateOutdoorPvP(uint32 scriptId)
{
- ASSERT(data);
-
- GET_SCRIPT_RET(OutdoorPvPScript, data->ScriptId, tmpscript, NULL);
+ GET_SCRIPT_RET(OutdoorPvPScript, scriptId, tmpscript, NULL);
return tmpscript->GetOutdoorPvP();
}
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 60cd06d5007..c5e5d1456c5 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -71,7 +71,6 @@ struct CreatureTemplate;
struct CreatureData;
struct ItemTemplate;
struct MapEntry;
-struct OutdoorPvPData;
struct QuestObjective;
struct SceneTemplate;
@@ -991,7 +990,7 @@ class TC_GAME_API ScriptMgr
public: /* OutdoorPvPScript */
- OutdoorPvP* CreateOutdoorPvP(OutdoorPvPData const* data);
+ OutdoorPvP* CreateOutdoorPvP(uint32 scriptId);
public: /* CommandScript */
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,