18 #ifndef OUTDOOR_PVP_H_
19 #define OUTDOOR_PVP_H_
37 #define MAX_OUTDOORPVP_TYPES 6
50 #define OTHER_TEAM(a) (a == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE)
104 virtual bool HandlePlayerEnter(
Player* player);
105 virtual void HandlePlayerLeave(
Player* player);
108 bool IsInsideObjective(
Player* player)
const;
117 virtual void ChangeState() = 0;
121 virtual void SendChangePhase();
129 virtual void DeleteSpawns();
138 bool SetCapturePointData(
uint32 entry,
uint32 map,
float x,
float y,
float z,
float o = 0,
139 float rotation0 = 0,
float rotation1 = 0,
float rotation2 = 0,
float rotation3 = 0);
144 float rotation0,
float rotation1,
float rotation2,
float rotation3);
147 bool DelCreature(
uint32 type);
148 bool DelObject(
uint32 type);
150 bool DelCapturePoint();
230 virtual void HandleKill(
Player* killer,
Unit* killed);
234 bool IsInsideObjective(
Player* player)
const;
280 void BroadcastPacket(
WorldPacket const* data)
const;
291 void RegisterZone(
uint32 zoneid);
293 bool HasPlayer(
Player const* player)
const;
297 template<
class Worker>
298 void BroadcastWorker(Worker& _worker,
uint32 zoneId);
301 void SetMapFromZone(
uint32 zone);
float rot1
Definition: OutdoorPvP.h:62
float z
Definition: OutdoorPvP.h:59
virtual bool CanTalkTo(Player *, Creature *, GossipMenuItems const &)
Definition: OutdoorPvP.h:125
uint32 map
Definition: OutdoorPvP.h:71
float o
Definition: OutdoorPvP.h:75
float y
Definition: OutdoorPvP.h:58
TeamId m_team
Definition: OutdoorPvP.h:167
static TeamId GetTeamIdByTeam(uint32 team)
Definition: OutdoorPvP.h:249
OutdoorPvP * m_PvP
Definition: OutdoorPvP.h:177
virtual void HandleKillImpl(Player *, Unit *)
Definition: OutdoorPvP.h:231
uint32 entry
Definition: OutdoorPvP.h:70
float x
Definition: OutdoorPvP.h:72
std::map< uint32, ObjectGuid::LowType > m_Creatures
Definition: OutdoorPvP.h:182
ObjectiveStates
Definition: OutdoorPvP.h:39
Definition: OutdoorPvP.h:46
virtual void ChangeTeam(TeamId)
Definition: OutdoorPvP.h:119
Definition: OutdoorPvP.h:44
Map * GetMap() const
Definition: OutdoorPvP.h:264
Definition: OutdoorPvP.h:87
virtual void SendRemoveWorldStates(Player *)
Definition: OutdoorPvP.h:278
virtual void OnGameObjectCreate(GameObject *)
Definition: ZoneScript.h:38
Definition: OutdoorPvP.h:30
void HandleDropFlag(Player *player, uint32 spellId)
Definition: OutdoorPvPMgr.cpp:219
Definition: OutdoorPvPMgr.h:38
virtual bool HandleAreaTrigger(Player *, uint32, bool)
Definition: OutdoorPvP.h:208
virtual void AwardKillBonus(Player *)
Definition: OutdoorPvP.h:237
float z
Definition: OutdoorPvP.h:74
OPvPCapturePointMap m_capturePoints
Definition: OutdoorPvP.h:269
void OnCreatureCreate(Creature *) override
Definition: OutdoorPvP.h:221
float m_value
Definition: OutdoorPvP.h:165
Definition: Creature.h:467
float o
Definition: OutdoorPvP.h:60
uint64 LowType
Definition: ObjectGuid.h:199
void HandleGossipOption(Player *player, Creature *creature, uint32 gossipid)
Definition: OutdoorPvPMgr.cpp:200
std::map< ObjectGuid::LowType, uint32 > m_CreatureTypes
Definition: OutdoorPvP.h:184
virtual bool HandleGossipOption(Player *, Creature *, uint32)
Definition: OutdoorPvP.h:123
Definition: SharedDefines.h:994
Definition: SharedDefines.h:1000
Map * m_map
Definition: OutdoorPvP.h:303
void HandlePlayerResurrects(Player *player, uint32 areaflag)
Definition: OutdoorPvPMgr.cpp:228
float y
Definition: OutdoorPvP.h:73
float rot2
Definition: OutdoorPvP.h:63
uint32 map
Definition: OutdoorPvP.h:56
Definition: ZoneScript.h:26
float rot3
Definition: OutdoorPvP.h:64
float rot0
Definition: OutdoorPvP.h:61
virtual void OnGameObjectRemove(GameObject *)
Definition: ZoneScript.h:39
ObjectGuid::LowType m_capturePointSpawnId
Definition: OutdoorPvP.h:131
Definition: OutdoorPvP.h:43
G3D::int16 z
Definition: Vector3int16.h:46
OutdoorPvPTypes
Definition: OutdoorPvP.h:28
void AddObject(T *object)
Definition: ObjectAccessor.h:98
std::map< ObjectGuid::LowType, OPvPCapturePoint * > OPvPCapturePointMap
Definition: OutdoorPvP.h:203
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
G3D::int16 y
Definition: Vector2int16.h:38
Definition: WorldStatePackets.h:27
Definition: SharedDefines.h:992
Definition: GameObject.h:880
GameObject * m_capturePoint
Definition: OutdoorPvP.h:133
Definition: OutdoorPvP.h:45
uint32 GetTypeId() const
Definition: OutdoorPvP.h:239
void HandlePlayerEnterZone(Player *player, uint32 areaflag)
Definition: OutdoorPvPMgr.cpp:122
TeamId
Definition: SharedDefines.h:990
Definition: SharedDefines.h:999
float m_maxValue
Definition: OutdoorPvP.h:158
uint32 m_neutralValuePct
Definition: OutdoorPvP.h:174
std::map< uint32, ObjectGuid::LowType > m_Objects
Definition: OutdoorPvP.h:181
Definition: OutdoorPvP.h:68
Definition: OutdoorPvP.h:188
Definition: OutdoorPvP.h:42
std::set< ObjectGuid > GuidSet
Definition: ObjectGuid.h:332
uint32 m_TypeId
Definition: OutdoorPvP.h:273
float m_minValue
Definition: OutdoorPvP.h:159
#define TC_GAME_API
Definition: Define.h:134
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &)
Definition: OutdoorPvP.h:205
std::map< ObjectGuid::LowType, uint32 > m_ObjectTypes
Definition: OutdoorPvP.h:183
uint32 entry
Definition: OutdoorPvP.h:55
virtual bool SetupOutdoorPvP()
Definition: OutdoorPvP.h:217
Definition: OutdoorPvP.h:32
Definition: OutdoorPvP.h:31
bool CanTalkTo(Player *player, Creature *creature, GossipMenuItems const &gso)
Definition: OutdoorPvPMgr.cpp:209
const FieldDescriptor value
Definition: descriptor.h:1522
virtual ~OPvPCapturePoint()
Definition: OutdoorPvP.h:93
Definition: ObjectGuid.h:189
bool HandleCustomSpell(Player *player, uint32 spellId, GameObject *go)
Definition: OutdoorPvPMgr.cpp:171
bool HandleOpenGo(Player *player, GameObject *go)
Definition: OutdoorPvPMgr.cpp:190
G3D::int16 x
Definition: Vector2int16.h:37
Definition: OutdoorPvP.h:47
bool m_sendUpdate
Definition: OutdoorPvP.h:275
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &)
Definition: OutdoorPvP.h:95
Definition: SharedDefines.h:993
Definition: OutdoorPvP.h:33
ObjectiveStates m_OldState
Definition: OutdoorPvP.h:170
ObjectiveStates m_State
Definition: OutdoorPvP.h:171
void HandlePlayerLeaveZone(Player *player, uint32 areaflag)
Definition: OutdoorPvPMgr.cpp:135
Definition: WorldPacket.h:26
float x
Definition: OutdoorPvP.h:57
float m_maxSpeed
Definition: OutdoorPvP.h:162
Definition: OutdoorPvP.h:53
Definition: OutdoorPvP.h:41
virtual bool HandleDropFlag(Player *, uint32)
Definition: OutdoorPvP.h:127
void Update(uint32 diff)
Definition: WeatherMgr.cpp:150
Definition: OutdoorPvP.h:34