* Cleanups in OutdoorPvP code (mostly formatting). Also removed useless file.
--HG-- branch : trunk
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "OutdoorPvP.h"
|
#include "OutdoorPvP.h"
|
||||||
#include "OutdoorPvPImpl.h"
|
|
||||||
#include "OutdoorPvPMgr.h"
|
#include "OutdoorPvPMgr.h"
|
||||||
#include "ObjectAccessor.h"
|
#include "ObjectAccessor.h"
|
||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
|
|||||||
@@ -50,8 +50,11 @@ enum ObjectiveStates
|
|||||||
OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE,
|
OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define OTHER_TEAM(a) (a == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE)
|
||||||
|
|
||||||
// struct for go spawning
|
// struct for go spawning
|
||||||
struct go_type{
|
struct go_type
|
||||||
|
{
|
||||||
uint32 entry;
|
uint32 entry;
|
||||||
uint32 map;
|
uint32 map;
|
||||||
float x;
|
float x;
|
||||||
@@ -65,7 +68,8 @@ struct go_type{
|
|||||||
};
|
};
|
||||||
|
|
||||||
// struct for creature spawning
|
// struct for creature spawning
|
||||||
struct creature_type{
|
struct creature_type
|
||||||
|
{
|
||||||
uint32 entry;
|
uint32 entry;
|
||||||
uint32 teamval;
|
uint32 teamval;
|
||||||
uint32 map;
|
uint32 map;
|
||||||
@@ -82,37 +86,42 @@ class WorldPacket;
|
|||||||
class Creature;
|
class Creature;
|
||||||
class Unit;
|
class Unit;
|
||||||
struct GossipMenuItems;
|
struct GossipMenuItems;
|
||||||
|
class OutdoorPvP;
|
||||||
|
|
||||||
typedef std::set<Player*> PlayerSet;
|
typedef std::set<Player*> PlayerSet;
|
||||||
|
|
||||||
class OutdoorPvP;
|
|
||||||
class OPvPCapturePoint
|
class OPvPCapturePoint
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OPvPCapturePoint(OutdoorPvP * pvp);
|
OPvPCapturePoint(OutdoorPvP * pvp);
|
||||||
|
|
||||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
||||||
|
|
||||||
// send world state update to all players present
|
// send world state update to all players present
|
||||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||||
|
|
||||||
// send kill notify to players in the controlling faction
|
// send kill notify to players in the controlling faction
|
||||||
void SendObjectiveComplete(uint32 id, uint64 guid);
|
void SendObjectiveComplete(uint32 id, uint64 guid);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
virtual bool HandlePlayerEnter(Player * plr);
|
virtual bool HandlePlayerEnter(Player * plr);
|
||||||
virtual void HandlePlayerLeave(Player * plr);
|
virtual void HandlePlayerLeave(Player * plr);
|
||||||
//virtual void HandlePlayerActivityChanged(Player * plr);
|
|
||||||
|
|
||||||
// checks if player is in range of a capture credit marker
|
// checks if player is in range of a capture credit marker
|
||||||
bool IsInsideObjective(Player * plr) const;
|
bool IsInsideObjective(Player * plr) const;
|
||||||
|
|
||||||
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||||
|
|
||||||
virtual int32 HandleOpenGo(Player *plr, uint64 guid);
|
virtual int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||||
|
|
||||||
// returns true if the state of the objective has changed, in this case, the OutdoorPvP must send a world state ui update.
|
// returns true if the state of the objective has changed, in this case, the OutdoorPvP must send a world state ui update.
|
||||||
virtual bool Update(uint32 diff);
|
virtual bool Update(uint32 diff);
|
||||||
|
|
||||||
virtual void ChangeState() = 0;
|
virtual void ChangeState() = 0;
|
||||||
|
|
||||||
virtual void ChangeTeam(TeamId /*oldTeam*/) {}
|
virtual void ChangeTeam(TeamId /*oldTeam*/) {}
|
||||||
|
|
||||||
virtual void SendChangePhase();
|
virtual void SendChangePhase();
|
||||||
|
|
||||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||||
@@ -124,35 +133,47 @@ public:
|
|||||||
virtual void DeleteSpawns();
|
virtual void DeleteSpawns();
|
||||||
|
|
||||||
uint32 m_capturePointGUID;
|
uint32 m_capturePointGUID;
|
||||||
|
|
||||||
GameObject *m_capturePoint;
|
GameObject *m_capturePoint;
|
||||||
|
|
||||||
void AddGO(uint32 type, uint32 guid, uint32 entry = 0);
|
void AddGO(uint32 type, uint32 guid, uint32 entry = 0);
|
||||||
void AddCre(uint32 type, uint32 guid, uint32 entry = 0);
|
void AddCre(uint32 type, uint32 guid, uint32 entry = 0);
|
||||||
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);
|
|
||||||
|
|
||||||
protected:
|
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 AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3);
|
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);
|
||||||
bool AddCreature(uint32 type, uint32 entry, uint32 teamval, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
|
bool AddCreature(uint32 type, uint32 entry, uint32 teamval, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
|
||||||
|
|
||||||
bool DelCreature(uint32 type);
|
bool DelCreature(uint32 type);
|
||||||
bool DelObject(uint32 type);
|
bool DelObject(uint32 type);
|
||||||
|
|
||||||
bool DelCapturePoint();
|
bool DelCapturePoint();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// active players in the area of the objective, 0 - alliance, 1 - horde
|
// active players in the area of the objective, 0 - alliance, 1 - horde
|
||||||
PlayerSet m_activePlayers[2];
|
PlayerSet m_activePlayers[2];
|
||||||
|
|
||||||
// total shift needed to capture the objective
|
// total shift needed to capture the objective
|
||||||
float m_maxValue;
|
float m_maxValue;
|
||||||
float m_minValue;
|
float m_minValue;
|
||||||
|
|
||||||
// maximum speed of capture
|
// maximum speed of capture
|
||||||
float m_maxSpeed;
|
float m_maxSpeed;
|
||||||
|
|
||||||
// the status of the objective
|
// the status of the objective
|
||||||
float m_value;
|
float m_value;
|
||||||
|
|
||||||
TeamId m_team;
|
TeamId m_team;
|
||||||
|
|
||||||
// objective states
|
// objective states
|
||||||
ObjectiveStates m_OldState;
|
ObjectiveStates m_OldState;
|
||||||
ObjectiveStates m_State;
|
ObjectiveStates m_State;
|
||||||
|
|
||||||
// neutral value on capture bar
|
// neutral value on capture bar
|
||||||
uint32 m_neutralValuePct;
|
uint32 m_neutralValuePct;
|
||||||
|
|
||||||
@@ -171,21 +192,28 @@ protected:
|
|||||||
class OutdoorPvP : public ZoneScript
|
class OutdoorPvP : public ZoneScript
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPMgr;
|
friend class OutdoorPvPMgr;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
// ctor
|
// ctor
|
||||||
OutdoorPvP();
|
OutdoorPvP();
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
~OutdoorPvP();
|
~OutdoorPvP();
|
||||||
|
|
||||||
// deletes all gos/creatures spawned by the pvp
|
// deletes all gos/creatures spawned by the pvp
|
||||||
void DeleteSpawns();
|
void DeleteSpawns();
|
||||||
|
|
||||||
typedef std::map<uint32/*lowguid*/, OPvPCapturePoint*> OPvPCapturePointMap;
|
typedef std::map<uint32/*lowguid*/, OPvPCapturePoint*> OPvPCapturePointMap;
|
||||||
|
|
||||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
||||||
|
|
||||||
// called when a player triggers an areatrigger
|
// called when a player triggers an areatrigger
|
||||||
virtual bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
virtual bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
||||||
|
|
||||||
// called on custom spell
|
// called on custom spell
|
||||||
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||||
|
|
||||||
// called on go use
|
// called on go use
|
||||||
virtual bool HandleOpenGo(Player *plr, uint64 guid);
|
virtual bool HandleOpenGo(Player *plr, uint64 guid);
|
||||||
|
|
||||||
@@ -220,11 +248,14 @@ public:
|
|||||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||||
|
|
||||||
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
|
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
// the map of the objectives belonging to this outdoorpvp
|
// the map of the objectives belonging to this outdoorpvp
|
||||||
OPvPCapturePointMap m_capturePoints;
|
OPvPCapturePointMap m_capturePoints;
|
||||||
|
|
||||||
PlayerSet m_players[2];
|
PlayerSet m_players[2];
|
||||||
|
|
||||||
uint32 m_TypeId;
|
uint32 m_TypeId;
|
||||||
|
|
||||||
bool m_sendUpdate;
|
bool m_sendUpdate;
|
||||||
@@ -236,6 +267,7 @@ protected:
|
|||||||
|
|
||||||
virtual void HandlePlayerEnterZone(Player * plr, uint32 zone);
|
virtual void HandlePlayerEnterZone(Player * plr, uint32 zone);
|
||||||
virtual void HandlePlayerLeaveZone(Player * plr, uint32 zone);
|
virtual void HandlePlayerLeaveZone(Player * plr, uint32 zone);
|
||||||
|
|
||||||
virtual void HandlePlayerResurrects(Player * plr, uint32 zone);
|
virtual void HandlePlayerResurrects(Player * plr, uint32 zone);
|
||||||
|
|
||||||
void AddCapturePoint(OPvPCapturePoint* cp)
|
void AddCapturePoint(OPvPCapturePoint* cp)
|
||||||
@@ -252,9 +284,10 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RegisterZone(uint32 zoneid);
|
void RegisterZone(uint32 zoneid);
|
||||||
|
|
||||||
bool HasPlayer(Player *plr) const;
|
bool HasPlayer(Player *plr) const;
|
||||||
|
|
||||||
void TeamCastSpell(TeamId team, int32 spellId);
|
void TeamCastSpell(TeamId team, int32 spellId);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*OUTDOOR_PVP_H_*/
|
#endif /*OUTDOOR_PVP_H_*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#ifndef OUTDOORPVP_IMPL_H
|
|
||||||
#define OUTDOORPVP_IMPL_H
|
|
||||||
|
|
||||||
#include "SharedDefines.h"
|
|
||||||
#include "OutdoorPvP.h"
|
|
||||||
#include "Player.h"
|
|
||||||
#include "WorldPacket.h"
|
|
||||||
|
|
||||||
#define OTHER_TEAM(a) (a == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -33,24 +33,32 @@ struct GossipMenuItems;
|
|||||||
// class to handle player enter / leave / areatrigger / GO use events
|
// class to handle player enter / leave / areatrigger / GO use events
|
||||||
class OutdoorPvPMgr
|
class OutdoorPvPMgr
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// ctor
|
// ctor
|
||||||
OutdoorPvPMgr();
|
OutdoorPvPMgr();
|
||||||
|
|
||||||
// dtor
|
// dtor
|
||||||
~OutdoorPvPMgr();
|
~OutdoorPvPMgr();
|
||||||
|
|
||||||
// create outdoor pvp events
|
// create outdoor pvp events
|
||||||
void InitOutdoorPvP();
|
void InitOutdoorPvP();
|
||||||
|
|
||||||
// called when a player enters an outdoor pvp area
|
// called when a player enters an outdoor pvp area
|
||||||
void HandlePlayerEnterZone(Player * plr, uint32 areaflag);
|
void HandlePlayerEnterZone(Player * plr, uint32 areaflag);
|
||||||
|
|
||||||
// called when player leaves an outdoor pvp area
|
// called when player leaves an outdoor pvp area
|
||||||
void HandlePlayerLeaveZone(Player * plr, uint32 areaflag);
|
void HandlePlayerLeaveZone(Player * plr, uint32 areaflag);
|
||||||
|
|
||||||
// called when player resurrects
|
// called when player resurrects
|
||||||
void HandlePlayerResurrects(Player * plr, uint32 areaflag);
|
void HandlePlayerResurrects(Player * plr, uint32 areaflag);
|
||||||
|
|
||||||
// return assigned outdoor pvp
|
// return assigned outdoor pvp
|
||||||
OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid);
|
OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid);
|
||||||
|
|
||||||
// handle custom (non-exist in dbc) spell if registered
|
// handle custom (non-exist in dbc) spell if registered
|
||||||
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject* go);
|
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject* go);
|
||||||
|
|
||||||
// handle custom go if registered
|
// handle custom go if registered
|
||||||
bool HandleOpenGo(Player * plr, uint64 guid);
|
bool HandleOpenGo(Player * plr, uint64 guid);
|
||||||
|
|
||||||
@@ -68,13 +76,17 @@ public:
|
|||||||
|
|
||||||
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
|
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
|
||||||
typedef std::map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
|
typedef std::map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
// contains all initiated outdoor pvp events
|
// contains all initiated outdoor pvp events
|
||||||
// used when initing / cleaning up
|
// used when initing / cleaning up
|
||||||
OutdoorPvPSet m_OutdoorPvPSet;
|
OutdoorPvPSet m_OutdoorPvPSet;
|
||||||
|
|
||||||
// maps the zone ids to an outdoor pvp event
|
// maps the zone ids to an outdoor pvp event
|
||||||
// used in player event handling
|
// used in player event handling
|
||||||
OutdoorPvPMap m_OutdoorPvPMap;
|
OutdoorPvPMap m_OutdoorPvPMap;
|
||||||
|
|
||||||
// update interval
|
// update interval
|
||||||
uint32 m_UpdateTimer;
|
uint32 m_UpdateTimer;
|
||||||
};
|
};
|
||||||
@@ -82,4 +94,3 @@ private:
|
|||||||
#define sOutdoorPvPMgr (*ACE_Singleton<OutdoorPvPMgr, ACE_Null_Mutex>::instance())
|
#define sOutdoorPvPMgr (*ACE_Singleton<OutdoorPvPMgr, ACE_Null_Mutex>::instance())
|
||||||
|
|
||||||
#endif /*OUTDOOR_PVP_MGR_H_*/
|
#endif /*OUTDOOR_PVP_MGR_H_*/
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,8 @@
|
|||||||
#ifndef OUTDOOR_PVP_EP_
|
#ifndef OUTDOOR_PVP_EP_
|
||||||
#define OUTDOOR_PVP_EP_
|
#define OUTDOOR_PVP_EP_
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
|
||||||
|
|
||||||
#include "DBCStructure.h"
|
#include "DBCStructure.h"
|
||||||
|
#include "OutdoorPvP.h"
|
||||||
|
|
||||||
const uint32 EP_AllianceBuffs[4] = {11413, 11414, 11415, 1386};
|
const uint32 EP_AllianceBuffs[4] = {11413, 11414, 11415, 1386};
|
||||||
|
|
||||||
@@ -40,14 +39,16 @@ const uint32 EP_PWT_CM = 17698;
|
|||||||
|
|
||||||
const uint32 EPBuffZones[EPBuffZonesNum] = {139, 2017, 2057};
|
const uint32 EPBuffZones[EPBuffZonesNum] = {139, 2017, 2057};
|
||||||
|
|
||||||
enum EP_TaxiNodes {
|
enum EP_TaxiNodes
|
||||||
|
{
|
||||||
EP_CGT_Taxi = 87,
|
EP_CGT_Taxi = 87,
|
||||||
EP_EWT_Taxi = 86,
|
EP_EWT_Taxi = 86,
|
||||||
EP_NPT_Taxi = 85,
|
EP_NPT_Taxi = 85,
|
||||||
EP_PWT_Taxi = 84
|
EP_PWT_Taxi = 84
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_EastwallTowerWorldStates {
|
enum EP_EastwallTowerWorldStates
|
||||||
|
{
|
||||||
EP_EWT_A = 2354,
|
EP_EWT_A = 2354,
|
||||||
EP_EWT_H = 2356,
|
EP_EWT_H = 2356,
|
||||||
EP_EWT_A_P = 2357, // ally progressing
|
EP_EWT_A_P = 2357, // ally progressing
|
||||||
@@ -57,7 +58,8 @@ enum EP_EastwallTowerWorldStates {
|
|||||||
EP_EWT_N = 2361
|
EP_EWT_N = 2361
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_NorthpassTowerWorldStates {
|
enum EP_NorthpassTowerWorldStates
|
||||||
|
{
|
||||||
EP_NPT_N = 2352,
|
EP_NPT_N = 2352,
|
||||||
EP_NPT_N_A = 2362,
|
EP_NPT_N_A = 2362,
|
||||||
EP_NPT_N_H = 2363,
|
EP_NPT_N_H = 2363,
|
||||||
@@ -67,7 +69,8 @@ enum EP_NorthpassTowerWorldStates {
|
|||||||
EP_NPT_H = 2373
|
EP_NPT_H = 2373
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_PlagewoodTowerWorldStates {
|
enum EP_PlagewoodTowerWorldStates
|
||||||
|
{
|
||||||
EP_PWT_N_A = 2366,
|
EP_PWT_N_A = 2366,
|
||||||
EP_PWT_N_H = 2353, //2367 not present! use neutral!
|
EP_PWT_N_H = 2353, //2367 not present! use neutral!
|
||||||
EP_PWT_A_P = 2368,
|
EP_PWT_A_P = 2368,
|
||||||
@@ -77,7 +80,8 @@ enum EP_PlagewoodTowerWorldStates {
|
|||||||
EP_PWT_N = 2353
|
EP_PWT_N = 2353
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_CrownGuardTowerWorldStates {
|
enum EP_CrownGuardTowerWorldStates
|
||||||
|
{
|
||||||
EP_CGT_N_A = 2374,
|
EP_CGT_N_A = 2374,
|
||||||
EP_CGT_N_H = 2375,
|
EP_CGT_N_H = 2375,
|
||||||
EP_CGT_A_P = 2376,
|
EP_CGT_A_P = 2376,
|
||||||
@@ -87,7 +91,8 @@ enum EP_CrownGuardTowerWorldStates {
|
|||||||
EP_CGT_N = 2355
|
EP_CGT_N = 2355
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_WorldStates {
|
enum EP_WorldStates
|
||||||
|
{
|
||||||
EP_UI_TOWER_SLIDER_DISPLAY = 2426,
|
EP_UI_TOWER_SLIDER_DISPLAY = 2426,
|
||||||
EP_UI_TOWER_SLIDER_POS = 2427,
|
EP_UI_TOWER_SLIDER_POS = 2427,
|
||||||
EP_UI_TOWER_SLIDER_N = 2428,
|
EP_UI_TOWER_SLIDER_N = 2428,
|
||||||
@@ -96,7 +101,8 @@ enum EP_WorldStates {
|
|||||||
EP_UI_TOWER_COUNT_H = 2328
|
EP_UI_TOWER_COUNT_H = 2328
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_Summons {
|
enum EP_Summons
|
||||||
|
{
|
||||||
EP_EWT_COMMANDER = 0,
|
EP_EWT_COMMANDER = 0,
|
||||||
EP_EWT_SOLDIER1,
|
EP_EWT_SOLDIER1,
|
||||||
EP_EWT_SOLDIER2,
|
EP_EWT_SOLDIER2,
|
||||||
@@ -105,7 +111,8 @@ enum EP_Summons {
|
|||||||
EP_PWT_FLIGHTMASTER,
|
EP_PWT_FLIGHTMASTER,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_GoSummons {
|
enum EP_GoSummons
|
||||||
|
{
|
||||||
EP_NPT_BUFF = 0,
|
EP_NPT_BUFF = 0,
|
||||||
EP_NPT_FLAGS,
|
EP_NPT_FLAGS,
|
||||||
EP_EWT_FLAGS,
|
EP_EWT_FLAGS,
|
||||||
@@ -113,7 +120,8 @@ enum EP_GoSummons {
|
|||||||
EP_PWT_FLAGS
|
EP_PWT_FLAGS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_Towers {
|
enum EP_Towers
|
||||||
|
{
|
||||||
EP_EWT = 0, // plaguelands 03
|
EP_EWT = 0, // plaguelands 03
|
||||||
EP_NPT,// plaguelands 01
|
EP_NPT,// plaguelands 01
|
||||||
EP_PWT,// plaguelands 04
|
EP_PWT,// plaguelands 04
|
||||||
@@ -121,14 +129,16 @@ enum EP_Towers {
|
|||||||
EP_TOWER_NUM
|
EP_TOWER_NUM
|
||||||
};
|
};
|
||||||
|
|
||||||
const go_type EPCapturePoints[EP_TOWER_NUM] = {
|
const go_type EPCapturePoints[EP_TOWER_NUM] =
|
||||||
|
{
|
||||||
{182097,0,2574.51,-4794.89,144.704,-1.45003,-0.097056,0.095578,-0.656229,0.742165},
|
{182097,0,2574.51,-4794.89,144.704,-1.45003,-0.097056,0.095578,-0.656229,0.742165},
|
||||||
{181899,0,3181.08,-4379.36,174.123,-2.03472,-0.065392,0.119494,-0.842275,0.521553},
|
{181899,0,3181.08,-4379.36,174.123,-2.03472,-0.065392,0.119494,-0.842275,0.521553},
|
||||||
{182098,0,2962.71,-3042.31,154.789,2.08426,-0.074807,-0.113837,0.855928,0.49883},
|
{182098,0,2962.71,-3042.31,154.789,2.08426,-0.074807,-0.113837,0.855928,0.49883},
|
||||||
{182096,0,1860.85,-3731.23,196.716,-2.53214,0.033967,-0.131914,0.944741,-0.298177}
|
{182096,0,1860.85,-3731.23,196.716,-2.53214,0.033967,-0.131914,0.944741,-0.298177}
|
||||||
};
|
};
|
||||||
|
|
||||||
const go_type EPTowerFlags[EP_TOWER_NUM] = {
|
const go_type EPTowerFlags[EP_TOWER_NUM] =
|
||||||
|
{
|
||||||
{182106,0,2569.60,-4772.93,115.399,2.72271,0,0,0.978148,0.207912},
|
{182106,0,2569.60,-4772.93,115.399,2.72271,0,0,0.978148,0.207912},
|
||||||
{182106,0,3148.17,-4365.51,145.029,1.53589,0,0,0.694658,0.71934},
|
{182106,0,3148.17,-4365.51,145.029,1.53589,0,0,0.694658,0.71934},
|
||||||
{182106,0,2992.63,-3022.95,125.593,3.03687,0,0,0.99863,0.052336},
|
{182106,0,2992.63,-3022.95,125.593,3.03687,0,0,0.99863,0.052336},
|
||||||
@@ -144,7 +154,8 @@ const uint32 EP_EWT_NUM_CREATURES = 5;
|
|||||||
|
|
||||||
// one lordaeron commander, 4 soldiers
|
// one lordaeron commander, 4 soldiers
|
||||||
// should be spawned at EWT and follow a path, but trans-grid pathing isn't safe, so summon them directly at NPT
|
// should be spawned at EWT and follow a path, but trans-grid pathing isn't safe, so summon them directly at NPT
|
||||||
const creature_type EP_EWT_Summons_A[EP_EWT_NUM_CREATURES] = {
|
const creature_type EP_EWT_Summons_A[EP_EWT_NUM_CREATURES] =
|
||||||
|
{
|
||||||
{17635,469,0, 3167.61,-4352.09,138.20,4.5811},
|
{17635,469,0, 3167.61,-4352.09,138.20,4.5811},
|
||||||
{17647,469,0, 3172.74,-4352.99,139.14,4.9873},
|
{17647,469,0, 3172.74,-4352.99,139.14,4.9873},
|
||||||
{17647,469,0, 3165.89,-4354.46,138.67,3.7244},
|
{17647,469,0, 3165.89,-4354.46,138.67,3.7244},
|
||||||
@@ -152,7 +163,8 @@ const creature_type EP_EWT_Summons_A[EP_EWT_NUM_CREATURES] = {
|
|||||||
{17647,469,0, 3169.91,-4349.68,138.37,0.7444}
|
{17647,469,0, 3169.91,-4349.68,138.37,0.7444}
|
||||||
};
|
};
|
||||||
|
|
||||||
const creature_type EP_EWT_Summons_H[EP_EWT_NUM_CREATURES] = {
|
const creature_type EP_EWT_Summons_H[EP_EWT_NUM_CREATURES] =
|
||||||
|
{
|
||||||
{17995,67,0, 3167.61,-4352.09,138.20,4.5811},
|
{17995,67,0, 3167.61,-4352.09,138.20,4.5811},
|
||||||
{17996,67,0, 3172.74,-4352.99,139.14,4.9873},
|
{17996,67,0, 3172.74,-4352.99,139.14,4.9873},
|
||||||
{17996,67,0, 3165.89,-4354.46,138.67,3.7244},
|
{17996,67,0, 3165.89,-4354.46,138.67,3.7244},
|
||||||
@@ -160,7 +172,8 @@ const creature_type EP_EWT_Summons_H[EP_EWT_NUM_CREATURES] = {
|
|||||||
{17996,67,0, 3169.91,-4349.68,138.37,0.7444}
|
{17996,67,0, 3169.91,-4349.68,138.37,0.7444}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EP_TowerStates {
|
enum EP_TowerStates
|
||||||
|
{
|
||||||
EP_TS_N = 1,
|
EP_TS_N = 1,
|
||||||
EP_TS_N_A = 2,
|
EP_TS_N_A = 2,
|
||||||
EP_TS_N_H = 4,
|
EP_TS_N_H = 4,
|
||||||
@@ -180,98 +193,157 @@ class OutdoorPvPEP;
|
|||||||
|
|
||||||
class OPvPCapturePointEP_EWT : public OPvPCapturePoint
|
class OPvPCapturePointEP_EWT : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPEP;
|
friend class OutdoorPvPEP;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointEP_EWT(OutdoorPvP * pvp);
|
OPvPCapturePointEP_EWT(OutdoorPvP * pvp);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
void SummonSupportUnitAtNorthpassTower(uint32 team);
|
void SummonSupportUnitAtNorthpassTower(uint32 team);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
uint32 m_TowerState;
|
uint32 m_TowerState;
|
||||||
|
|
||||||
uint32 m_UnitsSummonedSide;
|
uint32 m_UnitsSummonedSide;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OPvPCapturePointEP_NPT : public OPvPCapturePoint
|
class OPvPCapturePointEP_NPT : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPEP;
|
friend class OutdoorPvPEP;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointEP_NPT(OutdoorPvP * pvp);
|
OPvPCapturePointEP_NPT(OutdoorPvP * pvp);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
void SummonGO(uint32 team);
|
void SummonGO(uint32 team);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
uint32 m_TowerState;
|
uint32 m_TowerState;
|
||||||
|
|
||||||
uint32 m_SummonedGOSide;
|
uint32 m_SummonedGOSide;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OPvPCapturePointEP_CGT : public OPvPCapturePoint
|
class OPvPCapturePointEP_CGT : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPEP;
|
friend class OutdoorPvPEP;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointEP_CGT(OutdoorPvP * pvp);
|
OPvPCapturePointEP_CGT(OutdoorPvP * pvp);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
void LinkGraveYard(uint32 team);
|
void LinkGraveYard(uint32 team);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
uint32 m_TowerState;
|
uint32 m_TowerState;
|
||||||
|
|
||||||
uint32 m_GraveyardSide;
|
uint32 m_GraveyardSide;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OPvPCapturePointEP_PWT : public OPvPCapturePoint
|
class OPvPCapturePointEP_PWT : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPEP;
|
friend class OutdoorPvPEP;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointEP_PWT(OutdoorPvP * pvp);
|
OPvPCapturePointEP_PWT(OutdoorPvP * pvp);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
void SummonFlightMaster(uint32 team);
|
void SummonFlightMaster(uint32 team);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
uint32 m_FlightMasterSpawned;
|
uint32 m_FlightMasterSpawned;
|
||||||
|
|
||||||
uint32 m_TowerState;
|
uint32 m_TowerState;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPEP : public OutdoorPvP
|
class OutdoorPvPEP : public OutdoorPvP
|
||||||
{
|
{
|
||||||
friend class OPvPCapturePointEP_EWT;
|
friend class OPvPCapturePointEP_EWT;
|
||||||
friend class OPvPCapturePointEP_NPT;
|
friend class OPvPCapturePointEP_NPT;
|
||||||
friend class OPvPCapturePointEP_PWT;
|
friend class OPvPCapturePointEP_PWT;
|
||||||
friend class OPvPCapturePointEP_CGT;
|
friend class OPvPCapturePointEP_CGT;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OutdoorPvPEP();
|
OutdoorPvPEP();
|
||||||
|
|
||||||
bool SetupOutdoorPvP();
|
bool SetupOutdoorPvP();
|
||||||
|
|
||||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket &data);
|
void FillInitialWorldStates(WorldPacket &data);
|
||||||
|
|
||||||
void SendRemoveWorldStates(Player * plr);
|
void SendRemoveWorldStates(Player * plr);
|
||||||
|
|
||||||
void BuffTeams();
|
void BuffTeams();
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
// how many towers are controlled
|
// how many towers are controlled
|
||||||
uint32 EP_Controls[EP_TOWER_NUM];
|
uint32 EP_Controls[EP_TOWER_NUM];
|
||||||
|
|
||||||
uint32 m_AllianceTowersControlled;
|
uint32 m_AllianceTowersControlled;
|
||||||
uint32 m_HordeTowersControlled;
|
uint32 m_HordeTowersControlled;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#ifndef OUTDOOR_PVP_HP_
|
#ifndef OUTDOOR_PVP_HP_
|
||||||
#define OUTDOOR_PVP_HP_
|
#define OUTDOOR_PVP_HP_
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
#include "OutdoorPvP.h"
|
||||||
|
|
||||||
#define OutdoorPvPHPBuffZonesNum 6
|
#define OutdoorPvPHPBuffZonesNum 6
|
||||||
// HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
// HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
||||||
@@ -33,7 +33,8 @@ enum OutdoorPvPHPSpells
|
|||||||
HordeBuff = 32049
|
HordeBuff = 32049
|
||||||
};
|
};
|
||||||
|
|
||||||
enum OutdoorPvPHPTowerType{
|
enum OutdoorPvPHPTowerType
|
||||||
|
{
|
||||||
HP_TOWER_BROKEN_HILL = 0,
|
HP_TOWER_BROKEN_HILL = 0,
|
||||||
HP_TOWER_OVERLOOK = 1,
|
HP_TOWER_OVERLOOK = 1,
|
||||||
HP_TOWER_STADIUM = 2,
|
HP_TOWER_STADIUM = 2,
|
||||||
@@ -46,7 +47,8 @@ const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404,11396,11388};
|
|||||||
|
|
||||||
const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403,11395,11387};
|
const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403,11395,11387};
|
||||||
|
|
||||||
enum OutdoorPvPHPWorldStates{
|
enum OutdoorPvPHPWorldStates
|
||||||
|
{
|
||||||
HP_UI_TOWER_DISPLAY_A = 0x9ba,
|
HP_UI_TOWER_DISPLAY_A = 0x9ba,
|
||||||
HP_UI_TOWER_DISPLAY_H = 0x9b9,
|
HP_UI_TOWER_DISPLAY_H = 0x9b9,
|
||||||
|
|
||||||
@@ -70,13 +72,15 @@ const uint32 HP_TowerArtKit_H[HP_TOWER_NUM] = {64,61,68};
|
|||||||
|
|
||||||
const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66,63,69};
|
const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66,63,69};
|
||||||
|
|
||||||
const go_type HPCapturePoints[HP_TOWER_NUM] = {
|
const go_type HPCapturePoints[HP_TOWER_NUM] =
|
||||||
|
{
|
||||||
{182175,530,-471.462,3451.09,34.6432,0.174533,0,0,0.087156,0.996195}, // 0 - Broken Hill
|
{182175,530,-471.462,3451.09,34.6432,0.174533,0,0,0.087156,0.996195}, // 0 - Broken Hill
|
||||||
{182174,530,-184.889,3476.93,38.205,-0.017453,0,0,0.008727,-0.999962}, // 1 - Overlook
|
{182174,530,-184.889,3476.93,38.205,-0.017453,0,0,0.008727,-0.999962}, // 1 - Overlook
|
||||||
{182173,530,-290.016,3702.42,56.6729,0.034907,0,0,0.017452,0.999848} // 2 - Stadium
|
{182173,530,-290.016,3702.42,56.6729,0.034907,0,0,0.017452,0.999848} // 2 - Stadium
|
||||||
};
|
};
|
||||||
|
|
||||||
const go_type HPTowerFlags[HP_TOWER_NUM] = {
|
const go_type HPTowerFlags[HP_TOWER_NUM] =
|
||||||
|
{
|
||||||
{183514,530,-467.078,3528.17,64.7121,3.14159,0,0,1,0}, // 0 broken hill
|
{183514,530,-467.078,3528.17,64.7121,3.14159,0,0,1,0}, // 0 broken hill
|
||||||
{182525,530,-187.887,3459.38,60.0403,-3.12414,0,0,0.999962,-0.008727}, // 1 overlook
|
{182525,530,-187.887,3459.38,60.0403,-3.12414,0,0,0.999962,-0.008727}, // 1 overlook
|
||||||
{183515,530,-289.610,3696.83,75.9447,3.12414,0,0,0.999962,0.008727} // 2 stadium
|
{183515,530,-289.610,3696.83,75.9447,3.12414,0,0,0.999962,0.008727} // 2 stadium
|
||||||
@@ -84,35 +88,51 @@ const go_type HPTowerFlags[HP_TOWER_NUM] = {
|
|||||||
|
|
||||||
class OPvPCapturePointHP : public OPvPCapturePoint
|
class OPvPCapturePointHP : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OPvPCapturePointHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type);
|
OPvPCapturePointHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
OutdoorPvPHPTowerType m_TowerType;
|
OutdoorPvPHPTowerType m_TowerType;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPHP : public OutdoorPvP
|
class OutdoorPvPHP : public OutdoorPvP
|
||||||
{
|
{
|
||||||
friend class OPvPCapturePointHP;
|
friend class OPvPCapturePointHP;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OutdoorPvPHP();
|
OutdoorPvPHP();
|
||||||
|
|
||||||
bool SetupOutdoorPvP();
|
bool SetupOutdoorPvP();
|
||||||
|
|
||||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket &data);
|
void FillInitialWorldStates(WorldPacket &data);
|
||||||
|
|
||||||
void SendRemoveWorldStates(Player * plr);
|
void SendRemoveWorldStates(Player * plr);
|
||||||
|
|
||||||
void HandleKillImpl(Player * plr, Unit * killed);
|
void HandleKillImpl(Player * plr, Unit * killed);
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
// how many towers are controlled
|
// how many towers are controlled
|
||||||
uint32 m_AllianceTowersControlled;
|
uint32 m_AllianceTowersControlled;
|
||||||
uint32 m_HordeTowersControlled;
|
uint32 m_HordeTowersControlled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,17 +19,20 @@
|
|||||||
#ifndef OUTDOOR_PVP_NA_
|
#ifndef OUTDOOR_PVP_NA_
|
||||||
#define OUTDOOR_PVP_NA_
|
#define OUTDOOR_PVP_NA_
|
||||||
|
|
||||||
|
#include "OutdoorPvP.h"
|
||||||
|
|
||||||
// TODO: "sometimes" set to neutral
|
// TODO: "sometimes" set to neutral
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
|
||||||
enum OutdoorPvPNASpells
|
enum OutdoorPvPNASpells
|
||||||
{
|
{
|
||||||
NA_KILL_TOKEN_ALLIANCE = 33005,
|
NA_KILL_TOKEN_ALLIANCE = 33005,
|
||||||
NA_KILL_TOKEN_HORDE = 33004,
|
NA_KILL_TOKEN_HORDE = 33004,
|
||||||
NA_CAPTURE_BUFF = 33795 // strength of the halaani
|
NA_CAPTURE_BUFF = 33795 // strength of the halaani
|
||||||
};
|
};
|
||||||
|
|
||||||
// kill credit for pks
|
// kill credit for pks
|
||||||
const uint32 NA_CREDIT_MARKER = 24867;
|
const uint32 NA_CREDIT_MARKER = 24867;
|
||||||
|
|
||||||
const uint32 NA_GUARDS_MAX = 15;
|
const uint32 NA_GUARDS_MAX = 15;
|
||||||
|
|
||||||
const uint32 NA_BUFF_ZONE = 3518;
|
const uint32 NA_BUFF_ZONE = 3518;
|
||||||
@@ -42,7 +45,8 @@ const uint32 NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating a
|
|||||||
|
|
||||||
const uint32 NA_GUARD_CHECK_TIME = 500; // every half second
|
const uint32 NA_GUARD_CHECK_TIME = 500; // every half second
|
||||||
|
|
||||||
enum OutdoorPvPNAWorldStates{
|
enum OutdoorPvPNAWorldStates
|
||||||
|
{
|
||||||
NA_UI_HORDE_GUARDS_SHOW = 2503,
|
NA_UI_HORDE_GUARDS_SHOW = 2503,
|
||||||
NA_UI_ALLIANCE_GUARDS_SHOW = 2502,
|
NA_UI_ALLIANCE_GUARDS_SHOW = 2502,
|
||||||
NA_UI_GUARDS_MAX = 2493,
|
NA_UI_GUARDS_MAX = 2493,
|
||||||
@@ -82,7 +86,8 @@ enum OutdoorPvPNAWorldStates{
|
|||||||
const uint32 FLIGHT_NODES_NUM = 4;
|
const uint32 FLIGHT_NODES_NUM = 4;
|
||||||
|
|
||||||
// used to access the elements of Horde/AllyControlGOs
|
// used to access the elements of Horde/AllyControlGOs
|
||||||
enum ControlGOTypes{
|
enum ControlGOTypes
|
||||||
|
{
|
||||||
NA_ROOST_S = 0,
|
NA_ROOST_S = 0,
|
||||||
NA_ROOST_W = 1,
|
NA_ROOST_W = 1,
|
||||||
NA_ROOST_N = 2,
|
NA_ROOST_N = 2,
|
||||||
@@ -104,7 +109,8 @@ enum ControlGOTypes{
|
|||||||
const uint32 FlightPathStartNodes[FLIGHT_NODES_NUM] = {103,105,107,109};
|
const uint32 FlightPathStartNodes[FLIGHT_NODES_NUM] = {103,105,107,109};
|
||||||
const uint32 FlightPathEndNodes[FLIGHT_NODES_NUM] = {104,106,108,110};
|
const uint32 FlightPathEndNodes[FLIGHT_NODES_NUM] = {104,106,108,110};
|
||||||
|
|
||||||
enum FlightSpellsNA{
|
enum FlightSpellsNA
|
||||||
|
{
|
||||||
NA_SPELL_FLY_SOUTH = 32059,
|
NA_SPELL_FLY_SOUTH = 32059,
|
||||||
NA_SPELL_FLY_WEST = 32068,
|
NA_SPELL_FLY_WEST = 32068,
|
||||||
NA_SPELL_FLY_NORTH = 32075,
|
NA_SPELL_FLY_NORTH = 32075,
|
||||||
@@ -112,7 +118,8 @@ enum FlightSpellsNA{
|
|||||||
};
|
};
|
||||||
|
|
||||||
// spawned when the alliance is attacking, horde is in control
|
// spawned when the alliance is attacking, horde is in control
|
||||||
const go_type HordeControlGOs[NA_CONTROL_GO_NUM] = {
|
const go_type HordeControlGOs[NA_CONTROL_GO_NUM] =
|
||||||
|
{
|
||||||
{182267,530,-1815.8,8036.51,-26.2354,-2.89725,0,0,0.992546,-0.121869}, //ALLY_ROOST_SOUTH
|
{182267,530,-1815.8,8036.51,-26.2354,-2.89725,0,0,0.992546,-0.121869}, //ALLY_ROOST_SOUTH
|
||||||
{182280,530,-1507.95,8132.1,-19.5585,-1.3439,0,0,0.622515,-0.782608}, //ALLY_ROOST_WEST
|
{182280,530,-1507.95,8132.1,-19.5585,-1.3439,0,0,0.622515,-0.782608}, //ALLY_ROOST_WEST
|
||||||
{182281,530,-1384.52,7779.33,-11.1663,-0.575959,0,0,0.284015,-0.95882}, //ALLY_ROOST_NORTH
|
{182281,530,-1384.52,7779.33,-11.1663,-0.575959,0,0,0.284015,-0.95882}, //ALLY_ROOST_NORTH
|
||||||
@@ -130,7 +137,8 @@ const go_type HordeControlGOs[NA_CONTROL_GO_NUM] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// spawned when the horde is attacking, alliance is in control
|
// spawned when the horde is attacking, alliance is in control
|
||||||
const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] = {
|
const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] =
|
||||||
|
{
|
||||||
{182301,530,-1815.8,8036.51,-26.2354,-2.89725,0,0,0.992546,-0.121869}, //HORDE_ROOST_SOUTH
|
{182301,530,-1815.8,8036.51,-26.2354,-2.89725,0,0,0.992546,-0.121869}, //HORDE_ROOST_SOUTH
|
||||||
{182302,530,-1507.95,8132.1,-19.5585,-1.3439,0,0,0.622515,-0.782608}, //HORDE_ROOST_WEST
|
{182302,530,-1507.95,8132.1,-19.5585,-1.3439,0,0,0.622515,-0.782608}, //HORDE_ROOST_WEST
|
||||||
{182303,530,-1384.52,7779.33,-11.1663,-0.575959,0,0,0.284015,-0.95882}, //HORDE_ROOST_NORTH
|
{182303,530,-1384.52,7779.33,-11.1663,-0.575959,0,0,0.284015,-0.95882}, //HORDE_ROOST_NORTH
|
||||||
@@ -147,7 +155,8 @@ const go_type AllianceControlGOs[NA_CONTROL_GO_NUM] = {
|
|||||||
{182300,530,-1650.11,7732.56,-15.4505,-2.80998,0,0,0.986286,-0.165048} //DESTROYED_HORDE_ROOST_EAST
|
{182300,530,-1650.11,7732.56,-15.4505,-2.80998,0,0,0.986286,-0.165048} //DESTROYED_HORDE_ROOST_EAST
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ControlNPCTypes{
|
enum ControlNPCTypes
|
||||||
|
{
|
||||||
NA_NPC_RESEARCHER = 0,
|
NA_NPC_RESEARCHER = 0,
|
||||||
NA_NPC_QUARTERMASTER,
|
NA_NPC_QUARTERMASTER,
|
||||||
NA_NPC_BLADE_MERCHANT,
|
NA_NPC_BLADE_MERCHANT,
|
||||||
@@ -173,7 +182,8 @@ enum ControlNPCTypes{
|
|||||||
NA_CONTROL_NPC_NUM
|
NA_CONTROL_NPC_NUM
|
||||||
};
|
};
|
||||||
|
|
||||||
const creature_type HordeControlNPCs[NA_CONTROL_NPC_NUM] = {
|
const creature_type HordeControlNPCs[NA_CONTROL_NPC_NUM] =
|
||||||
|
{
|
||||||
{18816,67,530,-1523.92,7951.76,-17.6942,3.51172},
|
{18816,67,530,-1523.92,7951.76,-17.6942,3.51172},
|
||||||
{18821,67,530,-1527.75,7952.46,-17.6948,3.99317},
|
{18821,67,530,-1527.75,7952.46,-17.6948,3.99317},
|
||||||
{21474,67,530,-1520.14,7927.11,-20.2527,3.39389},
|
{21474,67,530,-1520.14,7927.11,-20.2527,3.39389},
|
||||||
@@ -196,7 +206,8 @@ const creature_type HordeControlNPCs[NA_CONTROL_NPC_NUM] = {
|
|||||||
{18192,67,530,-1550.86,7937.56,-21.7,3.801}
|
{18192,67,530,-1550.86,7937.56,-21.7,3.801}
|
||||||
};
|
};
|
||||||
|
|
||||||
const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] = {
|
const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] =
|
||||||
|
{
|
||||||
{18817,469,530,-1591.18,8020.39,-22.2042,4.59022},
|
{18817,469,530,-1591.18,8020.39,-22.2042,4.59022},
|
||||||
{18822,469,530,-1588.0,8019.0,-22.2042,4.06662},
|
{18822,469,530,-1588.0,8019.0,-22.2042,4.06662},
|
||||||
{21485,469,530,-1521.93,7927.37,-20.2299,3.24631},
|
{21485,469,530,-1521.93,7927.37,-20.2299,3.24631},
|
||||||
@@ -219,14 +230,16 @@ const creature_type AllianceControlNPCs[NA_CONTROL_NPC_NUM] = {
|
|||||||
{18256,469,530,-1595.5,7991.27,-23.53,4.738}
|
{18256,469,530,-1595.5,7991.27,-23.53,4.738}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum WyvernStates{
|
enum WyvernStates
|
||||||
|
{
|
||||||
WYVERN_NEU_HORDE = 1,
|
WYVERN_NEU_HORDE = 1,
|
||||||
WYVERN_NEU_ALLIANCE = 2,
|
WYVERN_NEU_ALLIANCE = 2,
|
||||||
WYVERN_HORDE = 4,
|
WYVERN_HORDE = 4,
|
||||||
WYVERN_ALLIANCE = 8
|
WYVERN_ALLIANCE = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HalaaStates{
|
enum HalaaStates
|
||||||
|
{
|
||||||
HALAA_N = 1,
|
HALAA_N = 1,
|
||||||
HALAA_N_A = 2,
|
HALAA_N_A = 2,
|
||||||
HALAA_A = 4,
|
HALAA_A = 4,
|
||||||
@@ -237,61 +250,91 @@ enum HalaaStates{
|
|||||||
class Unit;
|
class Unit;
|
||||||
class Creature;
|
class Creature;
|
||||||
class OutdoorPvPNA;
|
class OutdoorPvPNA;
|
||||||
|
|
||||||
class OPvPCapturePointNA : public OPvPCapturePoint
|
class OPvPCapturePointNA : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPNA;
|
friend class OutdoorPvPNA;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointNA(OutdoorPvP * pvp);
|
OPvPCapturePointNA(OutdoorPvP * pvp);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
|
|
||||||
bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||||
|
|
||||||
int32 HandleOpenGo(Player *plr, uint64 guid);
|
int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||||
|
|
||||||
uint32 GetAliveGuardsCount();
|
uint32 GetAliveGuardsCount();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
// called when a faction takes control
|
// called when a faction takes control
|
||||||
void FactionTakeOver(uint32 team);
|
void FactionTakeOver(uint32 team);
|
||||||
|
|
||||||
void DeSpawnNPCs();
|
void DeSpawnNPCs();
|
||||||
void DeSpawnGOs();
|
void DeSpawnGOs();
|
||||||
|
|
||||||
void SpawnNPCsForTeam(uint32 team);
|
void SpawnNPCsForTeam(uint32 team);
|
||||||
void SpawnGOsForTeam(uint32 team);
|
void SpawnGOsForTeam(uint32 team);
|
||||||
|
|
||||||
void UpdateWyvernRoostWorldState(uint32 roost);
|
void UpdateWyvernRoostWorldState(uint32 roost);
|
||||||
void UpdateHalaaWorldState();
|
void UpdateHalaaWorldState();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool m_capturable;
|
bool m_capturable;
|
||||||
|
|
||||||
uint32 m_GuardsAlive;
|
uint32 m_GuardsAlive;
|
||||||
|
|
||||||
uint32 m_ControllingFaction;
|
uint32 m_ControllingFaction;
|
||||||
|
|
||||||
uint32 m_WyvernStateNorth;
|
uint32 m_WyvernStateNorth;
|
||||||
uint32 m_WyvernStateSouth;
|
uint32 m_WyvernStateSouth;
|
||||||
uint32 m_WyvernStateEast;
|
uint32 m_WyvernStateEast;
|
||||||
uint32 m_WyvernStateWest;
|
uint32 m_WyvernStateWest;
|
||||||
|
|
||||||
uint32 m_HalaaState;
|
uint32 m_HalaaState;
|
||||||
|
|
||||||
uint32 m_RespawnTimer;
|
uint32 m_RespawnTimer;
|
||||||
|
|
||||||
uint32 m_GuardCheckTimer;
|
uint32 m_GuardCheckTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPNA : public OutdoorPvP
|
class OutdoorPvPNA : public OutdoorPvP
|
||||||
{
|
{
|
||||||
friend class OPvPCapturePointNA;
|
friend class OPvPCapturePointNA;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OutdoorPvPNA();
|
OutdoorPvPNA();
|
||||||
|
|
||||||
bool SetupOutdoorPvP();
|
bool SetupOutdoorPvP();
|
||||||
|
|
||||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket &data);
|
void FillInitialWorldStates(WorldPacket &data);
|
||||||
|
|
||||||
void SendRemoveWorldStates(Player * plr);
|
void SendRemoveWorldStates(Player * plr);
|
||||||
|
|
||||||
void HandleKillImpl(Player * plr, Unit * killed);
|
void HandleKillImpl(Player * plr, Unit * killed);
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
OPvPCapturePointNA * m_obj;
|
OPvPCapturePointNA * m_obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#ifndef OUTDOOR_PVP_SI_
|
#ifndef OUTDOOR_PVP_SI_
|
||||||
#define OUTDOOR_PVP_SI_
|
#define OUTDOOR_PVP_SI_
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
#include "OutdoorPvP.h"
|
||||||
|
|
||||||
enum OutdoorPvPSISpells
|
enum OutdoorPvPSISpells
|
||||||
{
|
{
|
||||||
@@ -45,7 +45,8 @@ const uint32 SI_TURNIN_QUEST_CM_H = 18199;
|
|||||||
|
|
||||||
const uint32 SI_SILITHYST_MOUND = 181597;
|
const uint32 SI_SILITHYST_MOUND = 181597;
|
||||||
|
|
||||||
enum SI_WorldStates{
|
enum SI_WorldStates
|
||||||
|
{
|
||||||
SI_GATHERED_A = 2313,
|
SI_GATHERED_A = 2313,
|
||||||
SI_GATHERED_H = 2314,
|
SI_GATHERED_H = 2314,
|
||||||
SI_SILITHYST_MAX = 2317
|
SI_SILITHYST_MAX = 2317
|
||||||
@@ -53,23 +54,35 @@ enum SI_WorldStates{
|
|||||||
|
|
||||||
class OutdoorPvPSI : public OutdoorPvP
|
class OutdoorPvPSI : public OutdoorPvP
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OutdoorPvPSI();
|
OutdoorPvPSI();
|
||||||
|
|
||||||
bool SetupOutdoorPvP();
|
bool SetupOutdoorPvP();
|
||||||
|
|
||||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket &data);
|
void FillInitialWorldStates(WorldPacket &data);
|
||||||
|
|
||||||
void SendRemoveWorldStates(Player * plr);
|
void SendRemoveWorldStates(Player * plr);
|
||||||
|
|
||||||
bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
||||||
|
|
||||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||||
|
|
||||||
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject *go);
|
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject *go);
|
||||||
|
|
||||||
void UpdateWorldState();
|
void UpdateWorldState();
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
uint32 m_Gathered_A;
|
uint32 m_Gathered_A;
|
||||||
uint32 m_Gathered_H;
|
uint32 m_Gathered_H;
|
||||||
|
|
||||||
uint32 m_LastController;
|
uint32 m_LastController;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "OutdoorPvPTF.h"
|
#include "OutdoorPvPTF.h"
|
||||||
#include "OutdoorPvPMgr.h"
|
#include "OutdoorPvPMgr.h"
|
||||||
|
#include "OutdoorPvP.h"
|
||||||
#include "WorldPacket.h"
|
#include "WorldPacket.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
|
|||||||
@@ -1,14 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef OUTDOOR_PVP_TF_
|
#ifndef OUTDOOR_PVP_TF_
|
||||||
#define OUTDOOR_PVP_TF_
|
#define OUTDOOR_PVP_TF_
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
#include "OutdoorPvP.h"
|
||||||
|
|
||||||
const uint32 OutdoorPvPTFBuffZonesNum = 5;
|
const uint32 OutdoorPvPTFBuffZonesNum = 5;
|
||||||
|
|
||||||
const uint32 OutdoorPvPTFBuffZones[OutdoorPvPTFBuffZonesNum] = { 3519 /*Terokkar Forest*/, 3791 /*Sethekk Halls*/, 3789 /*Shadow Labyrinth*/, 3792 /*Mana-Tombs*/, 3790 /*Auchenai Crypts*/ };
|
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
|
// locked for 6 hours after capture
|
||||||
const uint32 TF_LOCK_TIME = 3600 * 6 * 1000;
|
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.)
|
// 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;
|
const uint32 TF_LOCK_TIME_UPDATE = 15000;
|
||||||
|
|
||||||
@@ -18,7 +44,8 @@ const uint32 TF_LOCK_TIME_UPDATE = 15000;
|
|||||||
const uint32 TF_ALLY_QUEST = 11505;
|
const uint32 TF_ALLY_QUEST = 11505;
|
||||||
const uint32 TF_HORDE_QUEST = 11506;
|
const uint32 TF_HORDE_QUEST = 11506;
|
||||||
|
|
||||||
enum OutdoorPvPTF_TowerType{
|
enum OutdoorPvPTF_TowerType
|
||||||
|
{
|
||||||
TF_TOWER_NW = 0,
|
TF_TOWER_NW = 0,
|
||||||
TF_TOWER_N,
|
TF_TOWER_N,
|
||||||
TF_TOWER_NE,
|
TF_TOWER_NE,
|
||||||
@@ -27,7 +54,8 @@ enum OutdoorPvPTF_TowerType{
|
|||||||
TF_TOWER_NUM
|
TF_TOWER_NUM
|
||||||
};
|
};
|
||||||
|
|
||||||
const go_type TFCapturePoints[TF_TOWER_NUM] = {
|
const go_type TFCapturePoints[TF_TOWER_NUM] =
|
||||||
|
{
|
||||||
{183104,530,-3081.65,5335.03,17.1853,-2.14675,0,0,0.878817,-0.477159},
|
{183104,530,-3081.65,5335.03,17.1853,-2.14675,0,0,0.878817,-0.477159},
|
||||||
{183411,530,-2939.9,4788.73,18.987,2.77507,0,0,0.983255,0.182236},
|
{183411,530,-2939.9,4788.73,18.987,2.77507,0,0,0.983255,0.182236},
|
||||||
{183412,530,-3174.94,4440.97,16.2281,1.86750,0,0.803857,0.594823},
|
{183412,530,-3174.94,4440.97,16.2281,1.86750,0,0.803857,0.594823},
|
||||||
@@ -35,13 +63,15 @@ const go_type TFCapturePoints[TF_TOWER_NUM] = {
|
|||||||
{183414,530,-3812.37,4899.3,17.7249,0.087266,0,0,0.043619,0.999048}
|
{183414,530,-3812.37,4899.3,17.7249,0.087266,0,0,0.043619,0.999048}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tf_tower_world_state{
|
struct tf_tower_world_state
|
||||||
|
{
|
||||||
uint32 n;
|
uint32 n;
|
||||||
uint32 h;
|
uint32 h;
|
||||||
uint32 a;
|
uint32 a;
|
||||||
};
|
};
|
||||||
|
|
||||||
const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] = {
|
const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] =
|
||||||
|
{
|
||||||
{0xa79,0xa7a,0xa7b},
|
{0xa79,0xa7a,0xa7b},
|
||||||
{0xa7e,0xa7d,0xa7c},
|
{0xa7e,0xa7d,0xa7c},
|
||||||
{0xa82,0xa81,0xa80},
|
{0xa82,0xa81,0xa80},
|
||||||
@@ -49,11 +79,26 @@ const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] = {
|
|||||||
{0xa85,0xa84,0xa83}
|
{0xa85,0xa84,0xa83}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM] = {12226, 12497, 12486, 12499, 12501};
|
const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM] =
|
||||||
|
{
|
||||||
|
12226,
|
||||||
|
12497,
|
||||||
|
12486,
|
||||||
|
12499,
|
||||||
|
12501
|
||||||
|
};
|
||||||
|
|
||||||
const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM] = {12225, 12496, 12487, 12498, 12500};
|
const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM] =
|
||||||
|
{
|
||||||
|
12225,
|
||||||
|
12496,
|
||||||
|
12487,
|
||||||
|
12498,
|
||||||
|
12500
|
||||||
|
};
|
||||||
|
|
||||||
enum TFWorldStates{
|
enum TFWorldStates
|
||||||
|
{
|
||||||
TF_UI_TOWER_SLIDER_POS = 0xa41,
|
TF_UI_TOWER_SLIDER_POS = 0xa41,
|
||||||
TF_UI_TOWER_SLIDER_N = 0xa40,
|
TF_UI_TOWER_SLIDER_N = 0xa40,
|
||||||
TF_UI_TOWER_SLIDER_DISPLAY = 0xa3f,
|
TF_UI_TOWER_SLIDER_DISPLAY = 0xa3f,
|
||||||
@@ -70,7 +115,8 @@ enum TFWorldStates{
|
|||||||
TF_UI_LOCKED_DISPLAY_ALLIANCE = 0xacf
|
TF_UI_LOCKED_DISPLAY_ALLIANCE = 0xacf
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TFTowerStates {
|
enum TFTowerStates
|
||||||
|
{
|
||||||
TF_TOWERSTATE_N = 1,
|
TF_TOWERSTATE_N = 1,
|
||||||
TF_TOWERSTATE_H = 2,
|
TF_TOWERSTATE_H = 2,
|
||||||
TF_TOWERSTATE_A = 4
|
TF_TOWERSTATE_A = 4
|
||||||
@@ -78,40 +124,60 @@ enum TFTowerStates {
|
|||||||
|
|
||||||
class OPvPCapturePointTF : public OPvPCapturePoint
|
class OPvPCapturePointTF : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OPvPCapturePointTF(OutdoorPvP * pvp, OutdoorPvPTF_TowerType type);
|
OPvPCapturePointTF(OutdoorPvP * pvp, OutdoorPvPTF_TowerType type);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
OutdoorPvPTF_TowerType m_TowerType;
|
OutdoorPvPTF_TowerType m_TowerType;
|
||||||
|
|
||||||
uint32 m_TowerState;
|
uint32 m_TowerState;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPTF : public OutdoorPvP
|
class OutdoorPvPTF : public OutdoorPvP
|
||||||
{
|
{
|
||||||
friend class OPvPCapturePointTF;
|
friend class OPvPCapturePointTF;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OutdoorPvPTF();
|
OutdoorPvPTF();
|
||||||
|
|
||||||
bool SetupOutdoorPvP();
|
bool SetupOutdoorPvP();
|
||||||
|
|
||||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket &data);
|
void FillInitialWorldStates(WorldPacket &data);
|
||||||
|
|
||||||
void SendRemoveWorldStates(Player * plr);
|
void SendRemoveWorldStates(Player * plr);
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
bool m_IsLocked;
|
bool m_IsLocked;
|
||||||
uint32 m_LockTimer;
|
uint32 m_LockTimer;
|
||||||
uint32 m_LockTimerUpdate;
|
uint32 m_LockTimerUpdate;
|
||||||
|
|
||||||
uint32 m_AllianceTowersControlled;
|
uint32 m_AllianceTowersControlled;
|
||||||
uint32 m_HordeTowersControlled;
|
uint32 m_HordeTowersControlled;
|
||||||
|
|
||||||
uint32 hours_left, second_digit, first_digit;
|
uint32 hours_left, second_digit, first_digit;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,14 +19,17 @@
|
|||||||
#ifndef OUTDOOR_PVP_ZM_
|
#ifndef OUTDOOR_PVP_ZM_
|
||||||
#define OUTDOOR_PVP_ZM_
|
#define OUTDOOR_PVP_ZM_
|
||||||
|
|
||||||
#include "OutdoorPvPImpl.h"
|
|
||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
|
#include "OutdoorPvP.h"
|
||||||
|
|
||||||
const uint32 OutdoorPvPZMBuffZonesNum = 5;
|
const uint32 OutdoorPvPZMBuffZonesNum = 5;
|
||||||
|
|
||||||
// the buff is cast in these zones
|
// the buff is cast in these zones
|
||||||
const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521,3607,3717,3715,3716};
|
const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521,3607,3717,3715,3716};
|
||||||
|
|
||||||
// linked when the central tower is controlled
|
// linked when the central tower is controlled
|
||||||
const uint32 ZM_GRAVEYARD_ZONE = 3521;
|
const uint32 ZM_GRAVEYARD_ZONE = 3521;
|
||||||
|
|
||||||
// linked when the central tower is controlled
|
// linked when the central tower is controlled
|
||||||
const uint32 ZM_GRAVEYARD_ID = 969;
|
const uint32 ZM_GRAVEYARD_ID = 969;
|
||||||
|
|
||||||
@@ -51,16 +54,19 @@ const go_type ZM_Banner_N = { 182529,530,253.54,7083.81,36.7728,-0.017453,0,0,0.
|
|||||||
|
|
||||||
// horde field scout spawn data
|
// horde field scout spawn data
|
||||||
const creature_type ZM_HordeFieldScout = {18564,67,530,296.625,7818.4,42.6294,5.18363};
|
const creature_type ZM_HordeFieldScout = {18564,67,530,296.625,7818.4,42.6294,5.18363};
|
||||||
|
|
||||||
// alliance field scout spawn data
|
// alliance field scout spawn data
|
||||||
const creature_type ZM_AllianceFieldScout = {18581,469,530,374.395,6230.08,22.8351,0.593412};
|
const creature_type ZM_AllianceFieldScout = {18581,469,530,374.395,6230.08,22.8351,0.593412};
|
||||||
|
|
||||||
enum ZMCreatureTypes{
|
enum ZMCreatureTypes
|
||||||
|
{
|
||||||
ZM_ALLIANCE_FIELD_SCOUT = 0,
|
ZM_ALLIANCE_FIELD_SCOUT = 0,
|
||||||
ZM_HORDE_FIELD_SCOUT,
|
ZM_HORDE_FIELD_SCOUT,
|
||||||
ZM_CREATURE_NUM
|
ZM_CREATURE_NUM
|
||||||
};
|
};
|
||||||
|
|
||||||
struct zm_beacon {
|
struct zm_beacon
|
||||||
|
{
|
||||||
uint32 slider_disp;
|
uint32 slider_disp;
|
||||||
uint32 slider_n;
|
uint32 slider_n;
|
||||||
uint32 slider_pos;
|
uint32 slider_pos;
|
||||||
@@ -74,38 +80,45 @@ struct zm_beacon {
|
|||||||
uint32 event_leave;
|
uint32 event_leave;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ZM_BeaconType{
|
enum ZM_BeaconType
|
||||||
|
{
|
||||||
ZM_BEACON_EAST = 0,
|
ZM_BEACON_EAST = 0,
|
||||||
ZM_BEACON_WEST,
|
ZM_BEACON_WEST,
|
||||||
ZM_NUM_BEACONS
|
ZM_NUM_BEACONS
|
||||||
};
|
};
|
||||||
|
|
||||||
const zm_beacon ZMBeaconInfo[ZM_NUM_BEACONS] = {
|
const zm_beacon ZMBeaconInfo[ZM_NUM_BEACONS] =
|
||||||
|
{
|
||||||
{2533,2535,2534,2560,2559,2558,2652,2651,2650,11807,11806},
|
{2533,2535,2534,2560,2559,2558,2652,2651,2650,11807,11806},
|
||||||
{2527,2529,2528,2557,2556,2555,2646,2645,2644,11805,11804}
|
{2527,2529,2528,2557,2556,2555,2646,2645,2644,11805,11804}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32 ZMBeaconCaptureA[ZM_NUM_BEACONS] = {
|
const uint32 ZMBeaconCaptureA[ZM_NUM_BEACONS] =
|
||||||
|
{
|
||||||
LANG_OPVP_ZM_CAPTURE_EAST_A,
|
LANG_OPVP_ZM_CAPTURE_EAST_A,
|
||||||
LANG_OPVP_ZM_CAPTURE_WEST_A
|
LANG_OPVP_ZM_CAPTURE_WEST_A
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32 ZMBeaconCaptureH[ZM_NUM_BEACONS] = {
|
const uint32 ZMBeaconCaptureH[ZM_NUM_BEACONS] =
|
||||||
|
{
|
||||||
LANG_OPVP_ZM_CAPTURE_EAST_H,
|
LANG_OPVP_ZM_CAPTURE_EAST_H,
|
||||||
LANG_OPVP_ZM_CAPTURE_WEST_H
|
LANG_OPVP_ZM_CAPTURE_WEST_H
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32 ZMBeaconLooseA[ZM_NUM_BEACONS] = {
|
const uint32 ZMBeaconLooseA[ZM_NUM_BEACONS] =
|
||||||
|
{
|
||||||
LANG_OPVP_ZM_LOOSE_EAST_A,
|
LANG_OPVP_ZM_LOOSE_EAST_A,
|
||||||
LANG_OPVP_ZM_LOOSE_WEST_A
|
LANG_OPVP_ZM_LOOSE_WEST_A
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint32 ZMBeaconLooseH[ZM_NUM_BEACONS] = {
|
const uint32 ZMBeaconLooseH[ZM_NUM_BEACONS] =
|
||||||
|
{
|
||||||
LANG_OPVP_ZM_LOOSE_EAST_H,
|
LANG_OPVP_ZM_LOOSE_EAST_H,
|
||||||
LANG_OPVP_ZM_LOOSE_WEST_H
|
LANG_OPVP_ZM_LOOSE_WEST_H
|
||||||
};
|
};
|
||||||
|
|
||||||
const go_type ZMCapturePoints[ZM_NUM_BEACONS] = {
|
const go_type ZMCapturePoints[ZM_NUM_BEACONS] =
|
||||||
|
{
|
||||||
{182523,530,303.243,6841.36,40.1245,-1.58825,0,0,0.71325,-0.700909},
|
{182523,530,303.243,6841.36,40.1245,-1.58825,0,0,0.71325,-0.700909},
|
||||||
{182522,530,336.466,7340.26,41.4984,-1.58825,0,0,0.71325,-0.700909}
|
{182522,530,336.466,7340.26,41.4984,-1.58825,0,0,0.71325,-0.700909}
|
||||||
};
|
};
|
||||||
@@ -145,31 +158,43 @@ enum OutdoorPvPZMWorldStates
|
|||||||
ZM_MAP_ALLIANCE_FLAG_READY = 2655
|
ZM_MAP_ALLIANCE_FLAG_READY = 2655
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ZM_TowerStateMask{
|
enum ZM_TowerStateMask
|
||||||
|
{
|
||||||
ZM_TOWERSTATE_N = 1,
|
ZM_TOWERSTATE_N = 1,
|
||||||
ZM_TOWERSTATE_A = 2,
|
ZM_TOWERSTATE_A = 2,
|
||||||
ZM_TOWERSTATE_H = 4
|
ZM_TOWERSTATE_H = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPZM;
|
class OutdoorPvPZM;
|
||||||
|
|
||||||
class OPvPCapturePointZM_Beacon : public OPvPCapturePoint
|
class OPvPCapturePointZM_Beacon : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPZM;
|
friend class OutdoorPvPZM;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointZM_Beacon(OutdoorPvP * pvp, ZM_BeaconType type);
|
OPvPCapturePointZM_Beacon(OutdoorPvP * pvp, ZM_BeaconType type);
|
||||||
|
|
||||||
void ChangeState();
|
void ChangeState();
|
||||||
|
|
||||||
void SendChangePhase();
|
void SendChangePhase();
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
// used when player is activated/inactivated in the area
|
// used when player is activated/inactivated in the area
|
||||||
bool HandlePlayerEnter(Player * plr);
|
bool HandlePlayerEnter(Player * plr);
|
||||||
void HandlePlayerLeave(Player * plr);
|
void HandlePlayerLeave(Player * plr);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
ZM_BeaconType m_TowerType;
|
ZM_BeaconType m_TowerType;
|
||||||
uint32 m_TowerState;
|
uint32 m_TowerState;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ZM_GraveYardState{
|
enum ZM_GraveYardState
|
||||||
|
{
|
||||||
ZM_GRAVEYARD_N = 1,
|
ZM_GRAVEYARD_N = 1,
|
||||||
ZM_GRAVEYARD_A = 2,
|
ZM_GRAVEYARD_A = 2,
|
||||||
ZM_GRAVEYARD_H = 4
|
ZM_GRAVEYARD_H = 4
|
||||||
@@ -177,43 +202,69 @@ enum ZM_GraveYardState{
|
|||||||
|
|
||||||
class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||||
{
|
{
|
||||||
friend class OutdoorPvPZM;
|
friend class OutdoorPvPZM;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OPvPCapturePointZM_GraveYard(OutdoorPvP * pvp);
|
OPvPCapturePointZM_GraveYard(OutdoorPvP * pvp);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void ChangeState() {}
|
void ChangeState() {}
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket & data);
|
void FillInitialWorldStates(WorldPacket & data);
|
||||||
|
|
||||||
void UpdateTowerState();
|
void UpdateTowerState();
|
||||||
|
|
||||||
int32 HandleOpenGo(Player *plr, uint64 guid);
|
int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||||
|
|
||||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||||
|
|
||||||
bool HandleGossipOption(Player * plr, uint64 guid, uint32 gossipid);
|
bool HandleGossipOption(Player * plr, uint64 guid, uint32 gossipid);
|
||||||
|
|
||||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||||
|
|
||||||
bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
uint32 m_GraveYardState;
|
uint32 m_GraveYardState;
|
||||||
protected:
|
|
||||||
|
protected:
|
||||||
|
|
||||||
uint32 m_BothControllingFaction;
|
uint32 m_BothControllingFaction;
|
||||||
|
|
||||||
uint64 m_FlagCarrierGUID;
|
uint64 m_FlagCarrierGUID;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPZM : public OutdoorPvP
|
class OutdoorPvPZM : public OutdoorPvP
|
||||||
{
|
{
|
||||||
friend class OPvPCapturePointZM_Beacon;
|
friend class OPvPCapturePointZM_Beacon;
|
||||||
public:
|
|
||||||
|
public:
|
||||||
|
|
||||||
OutdoorPvPZM();
|
OutdoorPvPZM();
|
||||||
|
|
||||||
bool SetupOutdoorPvP();
|
bool SetupOutdoorPvP();
|
||||||
|
|
||||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||||
|
|
||||||
bool Update(uint32 diff);
|
bool Update(uint32 diff);
|
||||||
|
|
||||||
void FillInitialWorldStates(WorldPacket &data);
|
void FillInitialWorldStates(WorldPacket &data);
|
||||||
|
|
||||||
void SendRemoveWorldStates(Player * plr);
|
void SendRemoveWorldStates(Player * plr);
|
||||||
|
|
||||||
void HandleKillImpl(Player * plr, Unit * killed);
|
void HandleKillImpl(Player * plr, Unit * killed);
|
||||||
private:
|
|
||||||
|
private:
|
||||||
|
|
||||||
OPvPCapturePointZM_GraveYard * m_GraveYard;
|
OPvPCapturePointZM_GraveYard * m_GraveYard;
|
||||||
|
|
||||||
uint32 m_AllianceTowersControlled;
|
uint32 m_AllianceTowersControlled;
|
||||||
uint32 m_HordeTowersControlled;
|
uint32 m_HordeTowersControlled;
|
||||||
};
|
};
|
||||||
|
|
||||||
// todo: flag carrier death/leave/mount/activitychange should give back the gossip options
|
// todo: flag carrier death/leave/mount/activitychange should give back the gossip options
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user