mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
* 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 "OutdoorPvPImpl.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
@@ -50,8 +50,11 @@ enum ObjectiveStates
|
||||
OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE,
|
||||
};
|
||||
|
||||
#define OTHER_TEAM(a) (a == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE)
|
||||
|
||||
// struct for go spawning
|
||||
struct go_type{
|
||||
struct go_type
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 map;
|
||||
float x;
|
||||
@@ -65,7 +68,8 @@ struct go_type{
|
||||
};
|
||||
|
||||
// struct for creature spawning
|
||||
struct creature_type{
|
||||
struct creature_type
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 teamval;
|
||||
uint32 map;
|
||||
@@ -82,179 +86,208 @@ class WorldPacket;
|
||||
class Creature;
|
||||
class Unit;
|
||||
struct GossipMenuItems;
|
||||
class OutdoorPvP;
|
||||
|
||||
typedef std::set<Player*> PlayerSet;
|
||||
|
||||
class OutdoorPvP;
|
||||
class OPvPCapturePoint
|
||||
{
|
||||
public:
|
||||
OPvPCapturePoint(OutdoorPvP * pvp);
|
||||
public:
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
||||
OPvPCapturePoint(OutdoorPvP * pvp);
|
||||
|
||||
// send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
// send kill notify to players in the controlling faction
|
||||
void SendObjectiveComplete(uint32 id, uint64 guid);
|
||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
virtual bool HandlePlayerEnter(Player * plr);
|
||||
virtual void HandlePlayerLeave(Player * plr);
|
||||
//virtual void HandlePlayerActivityChanged(Player * plr);
|
||||
// send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
|
||||
// checks if player is in range of a capture credit marker
|
||||
bool IsInsideObjective(Player * plr) const;
|
||||
// send kill notify to players in the controlling faction
|
||||
void SendObjectiveComplete(uint32 id, uint64 guid);
|
||||
|
||||
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||
virtual int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||
// used when player is activated/inactivated in the area
|
||||
virtual bool HandlePlayerEnter(Player * plr);
|
||||
virtual void HandlePlayerLeave(Player * plr);
|
||||
|
||||
// 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 void ChangeState() = 0;
|
||||
virtual void ChangeTeam(TeamId /*oldTeam*/) {}
|
||||
virtual void SendChangePhase();
|
||||
// checks if player is in range of a capture credit marker
|
||||
bool IsInsideObjective(Player * plr) const;
|
||||
|
||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||
|
||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
virtual int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||
|
||||
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
// 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 void DeleteSpawns();
|
||||
virtual void ChangeState() = 0;
|
||||
|
||||
uint32 m_capturePointGUID;
|
||||
GameObject *m_capturePoint;
|
||||
virtual void ChangeTeam(TeamId /*oldTeam*/) {}
|
||||
|
||||
void AddGO(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);
|
||||
virtual void SendChangePhase();
|
||||
|
||||
protected:
|
||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||
|
||||
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);
|
||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
|
||||
bool DelCreature(uint32 type);
|
||||
bool DelObject(uint32 type);
|
||||
bool DelCapturePoint();
|
||||
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
protected:
|
||||
// active players in the area of the objective, 0 - alliance, 1 - horde
|
||||
PlayerSet m_activePlayers[2];
|
||||
// total shift needed to capture the objective
|
||||
float m_maxValue;
|
||||
float m_minValue;
|
||||
// maximum speed of capture
|
||||
float m_maxSpeed;
|
||||
// the status of the objective
|
||||
float m_value;
|
||||
TeamId m_team;
|
||||
// objective states
|
||||
ObjectiveStates m_OldState;
|
||||
ObjectiveStates m_State;
|
||||
// neutral value on capture bar
|
||||
uint32 m_neutralValuePct;
|
||||
virtual void DeleteSpawns();
|
||||
|
||||
// pointer to the OutdoorPvP this objective belongs to
|
||||
OutdoorPvP* m_PvP;
|
||||
uint32 m_capturePointGUID;
|
||||
|
||||
// map to store the various gameobjects and creatures spawned by the objective
|
||||
// type , guid
|
||||
std::map<uint32,uint64> m_Objects;
|
||||
std::map<uint32,uint64> m_Creatures;
|
||||
std::map<uint64,uint32> m_ObjectTypes;
|
||||
std::map<uint64,uint32> m_CreatureTypes;
|
||||
GameObject *m_capturePoint;
|
||||
|
||||
void AddGO(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 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 DelCreature(uint32 type);
|
||||
bool DelObject(uint32 type);
|
||||
|
||||
bool DelCapturePoint();
|
||||
|
||||
protected:
|
||||
|
||||
// active players in the area of the objective, 0 - alliance, 1 - horde
|
||||
PlayerSet m_activePlayers[2];
|
||||
|
||||
// total shift needed to capture the objective
|
||||
float m_maxValue;
|
||||
float m_minValue;
|
||||
|
||||
// maximum speed of capture
|
||||
float m_maxSpeed;
|
||||
|
||||
// the status of the objective
|
||||
float m_value;
|
||||
|
||||
TeamId m_team;
|
||||
|
||||
// objective states
|
||||
ObjectiveStates m_OldState;
|
||||
ObjectiveStates m_State;
|
||||
|
||||
// neutral value on capture bar
|
||||
uint32 m_neutralValuePct;
|
||||
|
||||
// pointer to the OutdoorPvP this objective belongs to
|
||||
OutdoorPvP* m_PvP;
|
||||
|
||||
// map to store the various gameobjects and creatures spawned by the objective
|
||||
// type , guid
|
||||
std::map<uint32,uint64> m_Objects;
|
||||
std::map<uint32,uint64> m_Creatures;
|
||||
std::map<uint64,uint32> m_ObjectTypes;
|
||||
std::map<uint64,uint32> m_CreatureTypes;
|
||||
};
|
||||
|
||||
// base class for specific outdoor pvp handlers
|
||||
class OutdoorPvP : public ZoneScript
|
||||
{
|
||||
friend class OutdoorPvPMgr;
|
||||
public:
|
||||
// ctor
|
||||
OutdoorPvP();
|
||||
// dtor
|
||||
~OutdoorPvP();
|
||||
// deletes all gos/creatures spawned by the pvp
|
||||
void DeleteSpawns();
|
||||
|
||||
typedef std::map<uint32/*lowguid*/, OPvPCapturePoint*> OPvPCapturePointMap;
|
||||
public:
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
||||
// called when a player triggers an areatrigger
|
||||
virtual bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
||||
// called on custom spell
|
||||
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||
// called on go use
|
||||
virtual bool HandleOpenGo(Player *plr, uint64 guid);
|
||||
// ctor
|
||||
OutdoorPvP();
|
||||
|
||||
// setup stuff
|
||||
virtual bool SetupOutdoorPvP() {return true;}
|
||||
// dtor
|
||||
~OutdoorPvP();
|
||||
|
||||
void OnGameObjectCreate(GameObject *go, bool add);
|
||||
void OnCreatureCreate(Creature *, bool /*add*/) {}
|
||||
// deletes all gos/creatures spawned by the pvp
|
||||
void DeleteSpawns();
|
||||
|
||||
// send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
typedef std::map<uint32/*lowguid*/, OPvPCapturePoint*> OPvPCapturePointMap;
|
||||
|
||||
// called by OutdoorPvPMgr, updates the objectives and if needed, sends new worldstateui information
|
||||
virtual bool Update(uint32 diff);
|
||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
|
||||
|
||||
// handle npc/player kill
|
||||
virtual void HandleKill(Player * killer, Unit * killed);
|
||||
virtual void HandleKillImpl(Player * /*killer*/, Unit * /*killed*/) {}
|
||||
// called when a player triggers an areatrigger
|
||||
virtual bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
||||
|
||||
// checks if player is in range of a capture credit marker
|
||||
bool IsInsideObjective(Player * plr) const;
|
||||
// called on custom spell
|
||||
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||
|
||||
// awards rewards for player kill
|
||||
virtual void AwardKillBonus(Player * /*plr*/) {}
|
||||
// called on go use
|
||||
virtual bool HandleOpenGo(Player *plr, uint64 guid);
|
||||
|
||||
uint32 GetTypeId() {return m_TypeId;}
|
||||
// setup stuff
|
||||
virtual bool SetupOutdoorPvP() {return true;}
|
||||
|
||||
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
void OnGameObjectCreate(GameObject *go, bool add);
|
||||
void OnCreatureCreate(Creature *, bool /*add*/) {}
|
||||
|
||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||
// send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
|
||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
// called by OutdoorPvPMgr, updates the objectives and if needed, sends new worldstateui information
|
||||
virtual bool Update(uint32 diff);
|
||||
|
||||
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
|
||||
protected:
|
||||
// the map of the objectives belonging to this outdoorpvp
|
||||
OPvPCapturePointMap m_capturePoints;
|
||||
// handle npc/player kill
|
||||
virtual void HandleKill(Player * killer, Unit * killed);
|
||||
virtual void HandleKillImpl(Player * /*killer*/, Unit * /*killed*/) {}
|
||||
|
||||
PlayerSet m_players[2];
|
||||
uint32 m_TypeId;
|
||||
// checks if player is in range of a capture credit marker
|
||||
bool IsInsideObjective(Player * plr) const;
|
||||
|
||||
bool m_sendUpdate;
|
||||
// awards rewards for player kill
|
||||
virtual void AwardKillBonus(Player * /*plr*/) {}
|
||||
|
||||
// world state stuff
|
||||
virtual void SendRemoveWorldStates(Player * /*plr*/) {}
|
||||
uint32 GetTypeId() {return m_TypeId;}
|
||||
|
||||
void BroadcastPacket(WorldPacket & data) const;
|
||||
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
virtual void HandlePlayerEnterZone(Player * plr, uint32 zone);
|
||||
virtual void HandlePlayerLeaveZone(Player * plr, uint32 zone);
|
||||
virtual void HandlePlayerResurrects(Player * plr, uint32 zone);
|
||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||
|
||||
void AddCapturePoint(OPvPCapturePoint* cp)
|
||||
{
|
||||
m_capturePoints[cp->m_capturePointGUID] = cp;
|
||||
}
|
||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
|
||||
OPvPCapturePoint * GetCapturePoint(uint32 lowguid) const
|
||||
{
|
||||
OutdoorPvP::OPvPCapturePointMap::const_iterator itr = m_capturePoints.find(lowguid);
|
||||
if (itr != m_capturePoints.end())
|
||||
return itr->second;
|
||||
return NULL;
|
||||
}
|
||||
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
|
||||
|
||||
void RegisterZone(uint32 zoneid);
|
||||
bool HasPlayer(Player *plr) const;
|
||||
void TeamCastSpell(TeamId team, int32 spellId);
|
||||
protected:
|
||||
|
||||
// the map of the objectives belonging to this outdoorpvp
|
||||
OPvPCapturePointMap m_capturePoints;
|
||||
|
||||
PlayerSet m_players[2];
|
||||
|
||||
uint32 m_TypeId;
|
||||
|
||||
bool m_sendUpdate;
|
||||
|
||||
// world state stuff
|
||||
virtual void SendRemoveWorldStates(Player * /*plr*/) {}
|
||||
|
||||
void BroadcastPacket(WorldPacket & data) const;
|
||||
|
||||
virtual void HandlePlayerEnterZone(Player * plr, uint32 zone);
|
||||
virtual void HandlePlayerLeaveZone(Player * plr, uint32 zone);
|
||||
|
||||
virtual void HandlePlayerResurrects(Player * plr, uint32 zone);
|
||||
|
||||
void AddCapturePoint(OPvPCapturePoint* cp)
|
||||
{
|
||||
m_capturePoints[cp->m_capturePointGUID] = cp;
|
||||
}
|
||||
|
||||
OPvPCapturePoint * GetCapturePoint(uint32 lowguid) const
|
||||
{
|
||||
OutdoorPvP::OPvPCapturePointMap::const_iterator itr = m_capturePoints.find(lowguid);
|
||||
if (itr != m_capturePoints.end())
|
||||
return itr->second;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void RegisterZone(uint32 zoneid);
|
||||
|
||||
bool HasPlayer(Player *plr) const;
|
||||
|
||||
void TeamCastSpell(TeamId team, int32 spellId);
|
||||
};
|
||||
|
||||
#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,53 +33,64 @@ struct GossipMenuItems;
|
||||
// class to handle player enter / leave / areatrigger / GO use events
|
||||
class OutdoorPvPMgr
|
||||
{
|
||||
public:
|
||||
// ctor
|
||||
OutdoorPvPMgr();
|
||||
// dtor
|
||||
~OutdoorPvPMgr();
|
||||
public:
|
||||
|
||||
// create outdoor pvp events
|
||||
void InitOutdoorPvP();
|
||||
// called when a player enters an outdoor pvp area
|
||||
void HandlePlayerEnterZone(Player * plr, uint32 areaflag);
|
||||
// called when player leaves an outdoor pvp area
|
||||
void HandlePlayerLeaveZone(Player * plr, uint32 areaflag);
|
||||
// called when player resurrects
|
||||
void HandlePlayerResurrects(Player * plr, uint32 areaflag);
|
||||
// return assigned outdoor pvp
|
||||
OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid);
|
||||
// handle custom (non-exist in dbc) spell if registered
|
||||
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject* go);
|
||||
// handle custom go if registered
|
||||
bool HandleOpenGo(Player * plr, uint64 guid);
|
||||
// ctor
|
||||
OutdoorPvPMgr();
|
||||
|
||||
ZoneScript * GetZoneScript(uint32 zoneId);
|
||||
// dtor
|
||||
~OutdoorPvPMgr();
|
||||
|
||||
void AddZone(uint32 zoneid, OutdoorPvP * handle);
|
||||
// create outdoor pvp events
|
||||
void InitOutdoorPvP();
|
||||
|
||||
void Update(uint32 diff);
|
||||
// called when a player enters an outdoor pvp area
|
||||
void HandlePlayerEnterZone(Player * plr, uint32 areaflag);
|
||||
|
||||
void HandleGossipOption(Player * player, uint64 guid, uint32 gossipid);
|
||||
// called when player leaves an outdoor pvp area
|
||||
void HandlePlayerLeaveZone(Player * plr, uint32 areaflag);
|
||||
|
||||
bool CanTalkTo(Player * player, Creature * creature, GossipMenuItems gso);
|
||||
// called when player resurrects
|
||||
void HandlePlayerResurrects(Player * plr, uint32 areaflag);
|
||||
|
||||
void HandleDropFlag(Player * plr, uint32 spellId);
|
||||
// return assigned outdoor pvp
|
||||
OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid);
|
||||
|
||||
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
|
||||
typedef std::map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
|
||||
private:
|
||||
// contains all initiated outdoor pvp events
|
||||
// used when initing / cleaning up
|
||||
OutdoorPvPSet m_OutdoorPvPSet;
|
||||
// maps the zone ids to an outdoor pvp event
|
||||
// used in player event handling
|
||||
OutdoorPvPMap m_OutdoorPvPMap;
|
||||
// update interval
|
||||
uint32 m_UpdateTimer;
|
||||
// handle custom (non-exist in dbc) spell if registered
|
||||
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject* go);
|
||||
|
||||
// handle custom go if registered
|
||||
bool HandleOpenGo(Player * plr, uint64 guid);
|
||||
|
||||
ZoneScript * GetZoneScript(uint32 zoneId);
|
||||
|
||||
void AddZone(uint32 zoneid, OutdoorPvP * handle);
|
||||
|
||||
void Update(uint32 diff);
|
||||
|
||||
void HandleGossipOption(Player * player, uint64 guid, uint32 gossipid);
|
||||
|
||||
bool CanTalkTo(Player * player, Creature * creature, GossipMenuItems gso);
|
||||
|
||||
void HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
typedef std::vector<OutdoorPvP*> OutdoorPvPSet;
|
||||
typedef std::map<uint32 /* zoneid */, OutdoorPvP*> OutdoorPvPMap;
|
||||
|
||||
private:
|
||||
|
||||
// contains all initiated outdoor pvp events
|
||||
// used when initing / cleaning up
|
||||
OutdoorPvPSet m_OutdoorPvPSet;
|
||||
|
||||
// maps the zone ids to an outdoor pvp event
|
||||
// used in player event handling
|
||||
OutdoorPvPMap m_OutdoorPvPMap;
|
||||
|
||||
// update interval
|
||||
uint32 m_UpdateTimer;
|
||||
};
|
||||
|
||||
#define sOutdoorPvPMgr (*ACE_Singleton<OutdoorPvPMgr, ACE_Null_Mutex>::instance())
|
||||
|
||||
#endif /*OUTDOOR_PVP_MGR_H_*/
|
||||
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
#ifndef OUTDOOR_PVP_EP_
|
||||
#define OUTDOOR_PVP_EP_
|
||||
|
||||
#include "OutdoorPvPImpl.h"
|
||||
|
||||
#include "DBCStructure.h"
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
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};
|
||||
|
||||
enum EP_TaxiNodes {
|
||||
enum EP_TaxiNodes
|
||||
{
|
||||
EP_CGT_Taxi = 87,
|
||||
EP_EWT_Taxi = 86,
|
||||
EP_NPT_Taxi = 85,
|
||||
EP_PWT_Taxi = 84
|
||||
};
|
||||
|
||||
enum EP_EastwallTowerWorldStates {
|
||||
enum EP_EastwallTowerWorldStates
|
||||
{
|
||||
EP_EWT_A = 2354,
|
||||
EP_EWT_H = 2356,
|
||||
EP_EWT_A_P = 2357, // ally progressing
|
||||
@@ -57,7 +58,8 @@ enum EP_EastwallTowerWorldStates {
|
||||
EP_EWT_N = 2361
|
||||
};
|
||||
|
||||
enum EP_NorthpassTowerWorldStates {
|
||||
enum EP_NorthpassTowerWorldStates
|
||||
{
|
||||
EP_NPT_N = 2352,
|
||||
EP_NPT_N_A = 2362,
|
||||
EP_NPT_N_H = 2363,
|
||||
@@ -67,7 +69,8 @@ enum EP_NorthpassTowerWorldStates {
|
||||
EP_NPT_H = 2373
|
||||
};
|
||||
|
||||
enum EP_PlagewoodTowerWorldStates {
|
||||
enum EP_PlagewoodTowerWorldStates
|
||||
{
|
||||
EP_PWT_N_A = 2366,
|
||||
EP_PWT_N_H = 2353, //2367 not present! use neutral!
|
||||
EP_PWT_A_P = 2368,
|
||||
@@ -77,7 +80,8 @@ enum EP_PlagewoodTowerWorldStates {
|
||||
EP_PWT_N = 2353
|
||||
};
|
||||
|
||||
enum EP_CrownGuardTowerWorldStates {
|
||||
enum EP_CrownGuardTowerWorldStates
|
||||
{
|
||||
EP_CGT_N_A = 2374,
|
||||
EP_CGT_N_H = 2375,
|
||||
EP_CGT_A_P = 2376,
|
||||
@@ -87,7 +91,8 @@ enum EP_CrownGuardTowerWorldStates {
|
||||
EP_CGT_N = 2355
|
||||
};
|
||||
|
||||
enum EP_WorldStates {
|
||||
enum EP_WorldStates
|
||||
{
|
||||
EP_UI_TOWER_SLIDER_DISPLAY = 2426,
|
||||
EP_UI_TOWER_SLIDER_POS = 2427,
|
||||
EP_UI_TOWER_SLIDER_N = 2428,
|
||||
@@ -96,7 +101,8 @@ enum EP_WorldStates {
|
||||
EP_UI_TOWER_COUNT_H = 2328
|
||||
};
|
||||
|
||||
enum EP_Summons {
|
||||
enum EP_Summons
|
||||
{
|
||||
EP_EWT_COMMANDER = 0,
|
||||
EP_EWT_SOLDIER1,
|
||||
EP_EWT_SOLDIER2,
|
||||
@@ -105,7 +111,8 @@ enum EP_Summons {
|
||||
EP_PWT_FLIGHTMASTER,
|
||||
};
|
||||
|
||||
enum EP_GoSummons {
|
||||
enum EP_GoSummons
|
||||
{
|
||||
EP_NPT_BUFF = 0,
|
||||
EP_NPT_FLAGS,
|
||||
EP_EWT_FLAGS,
|
||||
@@ -113,7 +120,8 @@ enum EP_GoSummons {
|
||||
EP_PWT_FLAGS
|
||||
};
|
||||
|
||||
enum EP_Towers {
|
||||
enum EP_Towers
|
||||
{
|
||||
EP_EWT = 0, // plaguelands 03
|
||||
EP_NPT,// plaguelands 01
|
||||
EP_PWT,// plaguelands 04
|
||||
@@ -121,14 +129,16 @@ enum EP_Towers {
|
||||
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},
|
||||
{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},
|
||||
{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,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},
|
||||
@@ -144,7 +154,8 @@ const uint32 EP_EWT_NUM_CREATURES = 5;
|
||||
|
||||
// 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
|
||||
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},
|
||||
{17647,469,0, 3172.74,-4352.99,139.14,4.9873},
|
||||
{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}
|
||||
};
|
||||
|
||||
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},
|
||||
{17996,67,0, 3172.74,-4352.99,139.14,4.9873},
|
||||
{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}
|
||||
};
|
||||
|
||||
enum EP_TowerStates {
|
||||
enum EP_TowerStates
|
||||
{
|
||||
EP_TS_N = 1,
|
||||
EP_TS_N_A = 2,
|
||||
EP_TS_N_H = 4,
|
||||
@@ -180,100 +193,159 @@ class OutdoorPvPEP;
|
||||
|
||||
class OPvPCapturePointEP_EWT : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPEP;
|
||||
public:
|
||||
OPvPCapturePointEP_EWT(OutdoorPvP * pvp);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
protected:
|
||||
void SummonSupportUnitAtNorthpassTower(uint32 team);
|
||||
void UpdateTowerState();
|
||||
protected:
|
||||
uint32 m_TowerState;
|
||||
uint32 m_UnitsSummonedSide;
|
||||
friend class OutdoorPvPEP;
|
||||
|
||||
public:
|
||||
|
||||
OPvPCapturePointEP_EWT(OutdoorPvP * pvp);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
protected:
|
||||
|
||||
void SummonSupportUnitAtNorthpassTower(uint32 team);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
|
||||
uint32 m_TowerState;
|
||||
|
||||
uint32 m_UnitsSummonedSide;
|
||||
};
|
||||
|
||||
class OPvPCapturePointEP_NPT : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPEP;
|
||||
public:
|
||||
OPvPCapturePointEP_NPT(OutdoorPvP * pvp);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
protected:
|
||||
void SummonGO(uint32 team);
|
||||
void UpdateTowerState();
|
||||
protected:
|
||||
uint32 m_TowerState;
|
||||
uint32 m_SummonedGOSide;
|
||||
friend class OutdoorPvPEP;
|
||||
|
||||
public:
|
||||
|
||||
OPvPCapturePointEP_NPT(OutdoorPvP * pvp);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
protected:
|
||||
|
||||
void SummonGO(uint32 team);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
|
||||
uint32 m_TowerState;
|
||||
|
||||
uint32 m_SummonedGOSide;
|
||||
};
|
||||
|
||||
class OPvPCapturePointEP_CGT : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPEP;
|
||||
public:
|
||||
OPvPCapturePointEP_CGT(OutdoorPvP * pvp);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
protected:
|
||||
void LinkGraveYard(uint32 team);
|
||||
void UpdateTowerState();
|
||||
protected:
|
||||
uint32 m_TowerState;
|
||||
uint32 m_GraveyardSide;
|
||||
friend class OutdoorPvPEP;
|
||||
|
||||
public:
|
||||
|
||||
OPvPCapturePointEP_CGT(OutdoorPvP * pvp);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
protected:
|
||||
|
||||
void LinkGraveYard(uint32 team);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
|
||||
uint32 m_TowerState;
|
||||
|
||||
uint32 m_GraveyardSide;
|
||||
};
|
||||
|
||||
class OPvPCapturePointEP_PWT : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPEP;
|
||||
public:
|
||||
OPvPCapturePointEP_PWT(OutdoorPvP * pvp);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
protected:
|
||||
void SummonFlightMaster(uint32 team);
|
||||
void UpdateTowerState();
|
||||
protected:
|
||||
uint32 m_FlightMasterSpawned;
|
||||
uint32 m_TowerState;
|
||||
friend class OutdoorPvPEP;
|
||||
|
||||
public:
|
||||
|
||||
OPvPCapturePointEP_PWT(OutdoorPvP * pvp);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
protected:
|
||||
|
||||
void SummonFlightMaster(uint32 team);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
|
||||
uint32 m_FlightMasterSpawned;
|
||||
|
||||
uint32 m_TowerState;
|
||||
};
|
||||
|
||||
class OutdoorPvPEP : public OutdoorPvP
|
||||
{
|
||||
friend class OPvPCapturePointEP_EWT;
|
||||
friend class OPvPCapturePointEP_NPT;
|
||||
friend class OPvPCapturePointEP_PWT;
|
||||
friend class OPvPCapturePointEP_CGT;
|
||||
public:
|
||||
OutdoorPvPEP();
|
||||
bool SetupOutdoorPvP();
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
bool Update(uint32 diff);
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
void BuffTeams();
|
||||
private:
|
||||
// how many towers are controlled
|
||||
uint32 EP_Controls[EP_TOWER_NUM];
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
friend class OPvPCapturePointEP_EWT;
|
||||
friend class OPvPCapturePointEP_NPT;
|
||||
friend class OPvPCapturePointEP_PWT;
|
||||
friend class OPvPCapturePointEP_CGT;
|
||||
|
||||
public:
|
||||
|
||||
OutdoorPvPEP();
|
||||
|
||||
bool SetupOutdoorPvP();
|
||||
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
|
||||
void BuffTeams();
|
||||
|
||||
private:
|
||||
|
||||
// how many towers are controlled
|
||||
uint32 EP_Controls[EP_TOWER_NUM];
|
||||
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef OUTDOOR_PVP_HP_
|
||||
#define OUTDOOR_PVP_HP_
|
||||
|
||||
#include "OutdoorPvPImpl.h"
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
#define OutdoorPvPHPBuffZonesNum 6
|
||||
// HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
||||
@@ -33,7 +33,8 @@ enum OutdoorPvPHPSpells
|
||||
HordeBuff = 32049
|
||||
};
|
||||
|
||||
enum OutdoorPvPHPTowerType{
|
||||
enum OutdoorPvPHPTowerType
|
||||
{
|
||||
HP_TOWER_BROKEN_HILL = 0,
|
||||
HP_TOWER_OVERLOOK = 1,
|
||||
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};
|
||||
|
||||
enum OutdoorPvPHPWorldStates{
|
||||
enum OutdoorPvPHPWorldStates
|
||||
{
|
||||
HP_UI_TOWER_DISPLAY_A = 0x9ba,
|
||||
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 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
|
||||
{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
|
||||
};
|
||||
|
||||
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
|
||||
{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
|
||||
@@ -84,35 +88,51 @@ const go_type HPTowerFlags[HP_TOWER_NUM] = {
|
||||
|
||||
class OPvPCapturePointHP : public OPvPCapturePoint
|
||||
{
|
||||
public:
|
||||
OPvPCapturePointHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
private:
|
||||
OutdoorPvPHPTowerType m_TowerType;
|
||||
public:
|
||||
|
||||
OPvPCapturePointHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
private:
|
||||
|
||||
OutdoorPvPHPTowerType m_TowerType;
|
||||
};
|
||||
|
||||
class OutdoorPvPHP : public OutdoorPvP
|
||||
{
|
||||
friend class OPvPCapturePointHP;
|
||||
public:
|
||||
OutdoorPvPHP();
|
||||
bool SetupOutdoorPvP();
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
bool Update(uint32 diff);
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
void HandleKillImpl(Player * plr, Unit * killed);
|
||||
private:
|
||||
// how many towers are controlled
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
friend class OPvPCapturePointHP;
|
||||
|
||||
public:
|
||||
|
||||
OutdoorPvPHP();
|
||||
|
||||
bool SetupOutdoorPvP();
|
||||
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
|
||||
void HandleKillImpl(Player * plr, Unit * killed);
|
||||
|
||||
private:
|
||||
|
||||
// how many towers are controlled
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,17 +19,20 @@
|
||||
#ifndef OUTDOOR_PVP_NA_
|
||||
#define OUTDOOR_PVP_NA_
|
||||
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
// TODO: "sometimes" set to neutral
|
||||
|
||||
#include "OutdoorPvPImpl.h"
|
||||
enum OutdoorPvPNASpells
|
||||
{
|
||||
NA_KILL_TOKEN_ALLIANCE = 33005,
|
||||
NA_KILL_TOKEN_HORDE = 33004,
|
||||
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;
|
||||
@@ -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
|
||||
|
||||
enum OutdoorPvPNAWorldStates{
|
||||
enum OutdoorPvPNAWorldStates
|
||||
{
|
||||
NA_UI_HORDE_GUARDS_SHOW = 2503,
|
||||
NA_UI_ALLIANCE_GUARDS_SHOW = 2502,
|
||||
NA_UI_GUARDS_MAX = 2493,
|
||||
@@ -82,7 +86,8 @@ enum OutdoorPvPNAWorldStates{
|
||||
const uint32 FLIGHT_NODES_NUM = 4;
|
||||
|
||||
// used to access the elements of Horde/AllyControlGOs
|
||||
enum ControlGOTypes{
|
||||
enum ControlGOTypes
|
||||
{
|
||||
NA_ROOST_S = 0,
|
||||
NA_ROOST_W = 1,
|
||||
NA_ROOST_N = 2,
|
||||
@@ -104,7 +109,8 @@ enum ControlGOTypes{
|
||||
const uint32 FlightPathStartNodes[FLIGHT_NODES_NUM] = {103,105,107,109};
|
||||
const uint32 FlightPathEndNodes[FLIGHT_NODES_NUM] = {104,106,108,110};
|
||||
|
||||
enum FlightSpellsNA{
|
||||
enum FlightSpellsNA
|
||||
{
|
||||
NA_SPELL_FLY_SOUTH = 32059,
|
||||
NA_SPELL_FLY_WEST = 32068,
|
||||
NA_SPELL_FLY_NORTH = 32075,
|
||||
@@ -112,7 +118,8 @@ enum FlightSpellsNA{
|
||||
};
|
||||
|
||||
// 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
|
||||
{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
|
||||
@@ -130,7 +137,8 @@ const go_type HordeControlGOs[NA_CONTROL_GO_NUM] = {
|
||||
};
|
||||
|
||||
// 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
|
||||
{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
|
||||
@@ -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
|
||||
};
|
||||
|
||||
enum ControlNPCTypes{
|
||||
enum ControlNPCTypes
|
||||
{
|
||||
NA_NPC_RESEARCHER = 0,
|
||||
NA_NPC_QUARTERMASTER,
|
||||
NA_NPC_BLADE_MERCHANT,
|
||||
@@ -173,7 +182,8 @@ enum ControlNPCTypes{
|
||||
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},
|
||||
{18821,67,530,-1527.75,7952.46,-17.6948,3.99317},
|
||||
{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}
|
||||
};
|
||||
|
||||
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},
|
||||
{18822,469,530,-1588.0,8019.0,-22.2042,4.06662},
|
||||
{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}
|
||||
};
|
||||
|
||||
enum WyvernStates{
|
||||
enum WyvernStates
|
||||
{
|
||||
WYVERN_NEU_HORDE = 1,
|
||||
WYVERN_NEU_ALLIANCE = 2,
|
||||
WYVERN_HORDE = 4,
|
||||
WYVERN_ALLIANCE = 8
|
||||
};
|
||||
|
||||
enum HalaaStates{
|
||||
enum HalaaStates
|
||||
{
|
||||
HALAA_N = 1,
|
||||
HALAA_N_A = 2,
|
||||
HALAA_A = 4,
|
||||
@@ -237,61 +250,91 @@ enum HalaaStates{
|
||||
class Unit;
|
||||
class Creature;
|
||||
class OutdoorPvPNA;
|
||||
|
||||
class OPvPCapturePointNA : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPNA;
|
||||
public:
|
||||
OPvPCapturePointNA(OutdoorPvP * pvp);
|
||||
bool Update(uint32 diff);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||
int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||
uint32 GetAliveGuardsCount();
|
||||
protected:
|
||||
// called when a faction takes control
|
||||
void FactionTakeOver(uint32 team);
|
||||
friend class OutdoorPvPNA;
|
||||
|
||||
void DeSpawnNPCs();
|
||||
void DeSpawnGOs();
|
||||
void SpawnNPCsForTeam(uint32 team);
|
||||
void SpawnGOsForTeam(uint32 team);
|
||||
public:
|
||||
|
||||
void UpdateWyvernRoostWorldState(uint32 roost);
|
||||
void UpdateHalaaWorldState();
|
||||
OPvPCapturePointNA(OutdoorPvP * pvp);
|
||||
|
||||
private:
|
||||
bool m_capturable;
|
||||
uint32 m_GuardsAlive;
|
||||
uint32 m_ControllingFaction;
|
||||
uint32 m_WyvernStateNorth;
|
||||
uint32 m_WyvernStateSouth;
|
||||
uint32 m_WyvernStateEast;
|
||||
uint32 m_WyvernStateWest;
|
||||
uint32 m_HalaaState;
|
||||
uint32 m_RespawnTimer;
|
||||
uint32 m_GuardCheckTimer;
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go);
|
||||
|
||||
int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||
|
||||
uint32 GetAliveGuardsCount();
|
||||
|
||||
protected:
|
||||
|
||||
// called when a faction takes control
|
||||
void FactionTakeOver(uint32 team);
|
||||
|
||||
void DeSpawnNPCs();
|
||||
void DeSpawnGOs();
|
||||
|
||||
void SpawnNPCsForTeam(uint32 team);
|
||||
void SpawnGOsForTeam(uint32 team);
|
||||
|
||||
void UpdateWyvernRoostWorldState(uint32 roost);
|
||||
void UpdateHalaaWorldState();
|
||||
|
||||
private:
|
||||
|
||||
bool m_capturable;
|
||||
|
||||
uint32 m_GuardsAlive;
|
||||
|
||||
uint32 m_ControllingFaction;
|
||||
|
||||
uint32 m_WyvernStateNorth;
|
||||
uint32 m_WyvernStateSouth;
|
||||
uint32 m_WyvernStateEast;
|
||||
uint32 m_WyvernStateWest;
|
||||
|
||||
uint32 m_HalaaState;
|
||||
|
||||
uint32 m_RespawnTimer;
|
||||
|
||||
uint32 m_GuardCheckTimer;
|
||||
};
|
||||
|
||||
class OutdoorPvPNA : public OutdoorPvP
|
||||
{
|
||||
friend class OPvPCapturePointNA;
|
||||
public:
|
||||
OutdoorPvPNA();
|
||||
bool SetupOutdoorPvP();
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
bool Update(uint32 diff);
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
void HandleKillImpl(Player * plr, Unit * killed);
|
||||
private:
|
||||
OPvPCapturePointNA * m_obj;
|
||||
friend class OPvPCapturePointNA;
|
||||
|
||||
public:
|
||||
|
||||
OutdoorPvPNA();
|
||||
|
||||
bool SetupOutdoorPvP();
|
||||
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
|
||||
void HandleKillImpl(Player * plr, Unit * killed);
|
||||
|
||||
private:
|
||||
|
||||
OPvPCapturePointNA * m_obj;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef OUTDOOR_PVP_SI_
|
||||
#define OUTDOOR_PVP_SI_
|
||||
|
||||
#include "OutdoorPvPImpl.h"
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
enum OutdoorPvPSISpells
|
||||
{
|
||||
@@ -45,7 +45,8 @@ const uint32 SI_TURNIN_QUEST_CM_H = 18199;
|
||||
|
||||
const uint32 SI_SILITHYST_MOUND = 181597;
|
||||
|
||||
enum SI_WorldStates{
|
||||
enum SI_WorldStates
|
||||
{
|
||||
SI_GATHERED_A = 2313,
|
||||
SI_GATHERED_H = 2314,
|
||||
SI_SILITHYST_MAX = 2317
|
||||
@@ -53,23 +54,35 @@ enum SI_WorldStates{
|
||||
|
||||
class OutdoorPvPSI : public OutdoorPvP
|
||||
{
|
||||
public:
|
||||
OutdoorPvPSI();
|
||||
bool SetupOutdoorPvP();
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
bool Update(uint32 diff);
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject *go);
|
||||
void UpdateWorldState();
|
||||
private:
|
||||
uint32 m_Gathered_A;
|
||||
uint32 m_Gathered_H;
|
||||
uint32 m_LastController;
|
||||
public:
|
||||
|
||||
OutdoorPvPSI();
|
||||
|
||||
bool SetupOutdoorPvP();
|
||||
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
|
||||
bool HandleAreaTrigger(Player * plr, uint32 trigger);
|
||||
|
||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject *go);
|
||||
|
||||
void UpdateWorldState();
|
||||
|
||||
private:
|
||||
|
||||
uint32 m_Gathered_A;
|
||||
uint32 m_Gathered_H;
|
||||
|
||||
uint32 m_LastController;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "OutdoorPvPTF.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "OutdoorPvP.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Player.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_
|
||||
#define OUTDOOR_PVP_TF_
|
||||
|
||||
#include "OutdoorPvPImpl.h"
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
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
|
||||
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;
|
||||
|
||||
@@ -18,7 +44,8 @@ const uint32 TF_LOCK_TIME_UPDATE = 15000;
|
||||
const uint32 TF_ALLY_QUEST = 11505;
|
||||
const uint32 TF_HORDE_QUEST = 11506;
|
||||
|
||||
enum OutdoorPvPTF_TowerType{
|
||||
enum OutdoorPvPTF_TowerType
|
||||
{
|
||||
TF_TOWER_NW = 0,
|
||||
TF_TOWER_N,
|
||||
TF_TOWER_NE,
|
||||
@@ -27,7 +54,8 @@ enum OutdoorPvPTF_TowerType{
|
||||
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},
|
||||
{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},
|
||||
@@ -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}
|
||||
};
|
||||
|
||||
struct tf_tower_world_state{
|
||||
struct tf_tower_world_state
|
||||
{
|
||||
uint32 n;
|
||||
uint32 h;
|
||||
uint32 a;
|
||||
};
|
||||
|
||||
const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] = {
|
||||
const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] =
|
||||
{
|
||||
{0xa79,0xa7a,0xa7b},
|
||||
{0xa7e,0xa7d,0xa7c},
|
||||
{0xa82,0xa81,0xa80},
|
||||
@@ -49,11 +79,26 @@ const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] = {
|
||||
{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_N = 0xa40,
|
||||
TF_UI_TOWER_SLIDER_DISPLAY = 0xa3f,
|
||||
@@ -70,7 +115,8 @@ enum TFWorldStates{
|
||||
TF_UI_LOCKED_DISPLAY_ALLIANCE = 0xacf
|
||||
};
|
||||
|
||||
enum TFTowerStates {
|
||||
enum TFTowerStates
|
||||
{
|
||||
TF_TOWERSTATE_N = 1,
|
||||
TF_TOWERSTATE_H = 2,
|
||||
TF_TOWERSTATE_A = 4
|
||||
@@ -78,40 +124,60 @@ enum TFTowerStates {
|
||||
|
||||
class OPvPCapturePointTF : public OPvPCapturePoint
|
||||
{
|
||||
public:
|
||||
OPvPCapturePointTF(OutdoorPvP * pvp, OutdoorPvPTF_TowerType type);
|
||||
bool Update(uint32 diff);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
void UpdateTowerState();
|
||||
protected:
|
||||
OutdoorPvPTF_TowerType m_TowerType;
|
||||
uint32 m_TowerState;
|
||||
public:
|
||||
|
||||
OPvPCapturePointTF(OutdoorPvP * pvp, OutdoorPvPTF_TowerType type);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
|
||||
OutdoorPvPTF_TowerType m_TowerType;
|
||||
|
||||
uint32 m_TowerState;
|
||||
};
|
||||
|
||||
class OutdoorPvPTF : public OutdoorPvP
|
||||
{
|
||||
friend class OPvPCapturePointTF;
|
||||
public:
|
||||
OutdoorPvPTF();
|
||||
bool SetupOutdoorPvP();
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
bool Update(uint32 diff);
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
private:
|
||||
bool m_IsLocked;
|
||||
uint32 m_LockTimer;
|
||||
uint32 m_LockTimerUpdate;
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
uint32 hours_left, second_digit, first_digit;
|
||||
friend class OPvPCapturePointTF;
|
||||
|
||||
public:
|
||||
|
||||
OutdoorPvPTF();
|
||||
|
||||
bool SetupOutdoorPvP();
|
||||
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
|
||||
private:
|
||||
|
||||
bool m_IsLocked;
|
||||
uint32 m_LockTimer;
|
||||
uint32 m_LockTimerUpdate;
|
||||
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
|
||||
uint32 hours_left, second_digit, first_digit;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,14 +19,17 @@
|
||||
#ifndef OUTDOOR_PVP_ZM_
|
||||
#define OUTDOOR_PVP_ZM_
|
||||
|
||||
#include "OutdoorPvPImpl.h"
|
||||
#include "Language.h"
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
const uint32 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;
|
||||
|
||||
@@ -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
|
||||
const creature_type ZM_HordeFieldScout = {18564,67,530,296.625,7818.4,42.6294,5.18363};
|
||||
|
||||
// alliance field scout spawn data
|
||||
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_HORDE_FIELD_SCOUT,
|
||||
ZM_CREATURE_NUM
|
||||
};
|
||||
|
||||
struct zm_beacon {
|
||||
struct zm_beacon
|
||||
{
|
||||
uint32 slider_disp;
|
||||
uint32 slider_n;
|
||||
uint32 slider_pos;
|
||||
@@ -74,38 +80,45 @@ struct zm_beacon {
|
||||
uint32 event_leave;
|
||||
};
|
||||
|
||||
enum ZM_BeaconType{
|
||||
enum ZM_BeaconType
|
||||
{
|
||||
ZM_BEACON_EAST = 0,
|
||||
ZM_BEACON_WEST,
|
||||
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},
|
||||
{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_WEST_A
|
||||
};
|
||||
|
||||
const uint32 ZMBeaconCaptureH[ZM_NUM_BEACONS] = {
|
||||
const uint32 ZMBeaconCaptureH[ZM_NUM_BEACONS] =
|
||||
{
|
||||
LANG_OPVP_ZM_CAPTURE_EAST_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_WEST_A
|
||||
};
|
||||
|
||||
const uint32 ZMBeaconLooseH[ZM_NUM_BEACONS] = {
|
||||
const uint32 ZMBeaconLooseH[ZM_NUM_BEACONS] =
|
||||
{
|
||||
LANG_OPVP_ZM_LOOSE_EAST_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},
|
||||
{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
|
||||
};
|
||||
|
||||
enum ZM_TowerStateMask{
|
||||
enum ZM_TowerStateMask
|
||||
{
|
||||
ZM_TOWERSTATE_N = 1,
|
||||
ZM_TOWERSTATE_A = 2,
|
||||
ZM_TOWERSTATE_H = 4
|
||||
};
|
||||
|
||||
class OutdoorPvPZM;
|
||||
|
||||
class OPvPCapturePointZM_Beacon : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPZM;
|
||||
public:
|
||||
OPvPCapturePointZM_Beacon(OutdoorPvP * pvp, ZM_BeaconType type);
|
||||
void ChangeState();
|
||||
void SendChangePhase();
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
void UpdateTowerState();
|
||||
protected:
|
||||
ZM_BeaconType m_TowerType;
|
||||
uint32 m_TowerState;
|
||||
friend class OutdoorPvPZM;
|
||||
|
||||
public:
|
||||
|
||||
OPvPCapturePointZM_Beacon(OutdoorPvP * pvp, ZM_BeaconType type);
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void SendChangePhase();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
// used when player is activated/inactivated in the area
|
||||
bool HandlePlayerEnter(Player * plr);
|
||||
void HandlePlayerLeave(Player * plr);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
|
||||
ZM_BeaconType m_TowerType;
|
||||
uint32 m_TowerState;
|
||||
};
|
||||
|
||||
enum ZM_GraveYardState{
|
||||
enum ZM_GraveYardState
|
||||
{
|
||||
ZM_GRAVEYARD_N = 1,
|
||||
ZM_GRAVEYARD_A = 2,
|
||||
ZM_GRAVEYARD_H = 4
|
||||
@@ -177,43 +202,69 @@ enum ZM_GraveYardState{
|
||||
|
||||
class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
{
|
||||
friend class OutdoorPvPZM;
|
||||
public:
|
||||
OPvPCapturePointZM_GraveYard(OutdoorPvP * pvp);
|
||||
bool Update(uint32 diff);
|
||||
void ChangeState() {}
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
void UpdateTowerState();
|
||||
int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||
bool HandleGossipOption(Player * plr, uint64 guid, uint32 gossipid);
|
||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
private:
|
||||
uint32 m_GraveYardState;
|
||||
protected:
|
||||
uint32 m_BothControllingFaction;
|
||||
uint64 m_FlagCarrierGUID;
|
||||
friend class OutdoorPvPZM;
|
||||
|
||||
public:
|
||||
|
||||
OPvPCapturePointZM_GraveYard(OutdoorPvP * pvp);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void ChangeState() {}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
int32 HandleOpenGo(Player *plr, uint64 guid);
|
||||
|
||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||
|
||||
bool HandleGossipOption(Player * plr, uint64 guid, uint32 gossipid);
|
||||
|
||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
|
||||
private:
|
||||
|
||||
uint32 m_GraveYardState;
|
||||
|
||||
protected:
|
||||
|
||||
uint32 m_BothControllingFaction;
|
||||
|
||||
uint64 m_FlagCarrierGUID;
|
||||
};
|
||||
|
||||
class OutdoorPvPZM : public OutdoorPvP
|
||||
{
|
||||
friend class OPvPCapturePointZM_Beacon;
|
||||
public:
|
||||
OutdoorPvPZM();
|
||||
bool SetupOutdoorPvP();
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
bool Update(uint32 diff);
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
void HandleKillImpl(Player * plr, Unit * killed);
|
||||
private:
|
||||
OPvPCapturePointZM_GraveYard * m_GraveYard;
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
friend class OPvPCapturePointZM_Beacon;
|
||||
|
||||
public:
|
||||
|
||||
OutdoorPvPZM();
|
||||
|
||||
bool SetupOutdoorPvP();
|
||||
|
||||
void HandlePlayerEnterZone(Player *plr, uint32 zone);
|
||||
void HandlePlayerLeaveZone(Player *plr, uint32 zone);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
|
||||
void SendRemoveWorldStates(Player * plr);
|
||||
|
||||
void HandleKillImpl(Player * plr, Unit * killed);
|
||||
|
||||
private:
|
||||
|
||||
OPvPCapturePointZM_GraveYard * m_GraveYard;
|
||||
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
};
|
||||
|
||||
// todo: flag carrier death/leave/mount/activitychange should give back the gossip options
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user