TrinityCore
Loading...
Searching...
No Matches
OutdoorPvP Class Reference

#include <OutdoorPvP.h>

+ Inheritance diagram for OutdoorPvP:

Public Types

typedef std::map< ObjectGuid::LowType, OPvPCapturePoint * > OPvPCapturePointMap
 
typedef std::pair< ObjectGuid::LowType, GameObject * > GoScriptPair
 
typedef std::pair< ObjectGuid::LowType, Creature * > CreatureScriptPair
 

Public Member Functions

 OutdoorPvP ()
 
virtual ~OutdoorPvP ()
 
void DeleteSpawns ()
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
virtual bool HandleAreaTrigger (Player *, uint32)
 
virtual bool HandleCustomSpell (Player *player, uint32 spellId, GameObject *go)
 
virtual bool HandleOpenGo (Player *player, GameObject *go)
 
virtual bool SetupOutdoorPvP ()
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
void OnCreatureCreate (Creature *) override
 
void OnCreatureRemove (Creature *) override
 
void SendUpdateWorldState (uint32 field, uint32 value)
 
virtual bool Update (uint32 diff)
 
virtual void HandleKill (Player *killer, Unit *killed)
 
virtual void HandleKillImpl (Player *, Unit *)
 
bool IsInsideObjective (Player *player) const
 
virtual void AwardKillBonus (Player *)
 
uint32 GetTypeId () const
 
virtual bool HandleDropFlag (Player *player, uint32 spellId)
 
virtual bool HandleGossipOption (Player *player, Creature *creature, uint32 gossipid)
 
virtual bool CanTalkTo (Player *player, Creature *c, GossipMenuItems const &gso)
 
void TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0)
 
void SendDefenseMessage (uint32 zoneId, uint32 id)
 
Map * GetMap () const
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnUnitDeath (Unit *)
 
virtual ObjectGuid GetGuidData (uint32) const
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Static Public Member Functions

static TeamId GetTeamIdByTeam (uint32 team)
 

Protected Member Functions

virtual void SendRemoveWorldStates (Player *)
 
void BroadcastPacket (WorldPacket const *data) const
 
virtual void HandlePlayerEnterZone (Player *player, uint32 zone)
 
virtual void HandlePlayerLeaveZone (Player *player, uint32 zone)
 
virtual void HandlePlayerResurrects (Player *player, uint32 zone)
 
void AddCapturePoint (OPvPCapturePoint *cp)
 
OPvPCapturePoint * GetCapturePoint (ObjectGuid::LowType guid) const
 
void RegisterZone (uint32 zoneid)
 
bool HasPlayer (Player const *player) const
 
void TeamCastSpell (TeamId team, int32 spellId)
 
template<class Worker >
void BroadcastWorker (Worker &_worker, uint32 zoneId)
 
void SetMapFromZone (uint32 zone)
 

Protected Attributes

OPvPCapturePointMap m_capturePoints
 
GuidSet m_players [2]
 
uint32 m_TypeId
 
bool m_sendUpdate
 
std::map< ObjectGuid::LowType, GameObject * > m_GoScriptStore
 
std::map< ObjectGuid::LowType, Creature * > m_CreatureScriptStore
 
Map * m_map
 

Friends

class OutdoorPvPMgr
 

Detailed Description

Definition at line 185 of file OutdoorPvP.h.

Member Typedef Documentation

◆ CreatureScriptPair

Definition at line 202 of file OutdoorPvP.h.

◆ GoScriptPair

Definition at line 201 of file OutdoorPvP.h.

◆ OPvPCapturePointMap

Definition at line 200 of file OutdoorPvP.h.

Constructor & Destructor Documentation

◆ OutdoorPvP()

OutdoorPvP::OutdoorPvP ( )

Definition at line 241 of file OutdoorPvP.cpp.

◆ ~OutdoorPvP()

OutdoorPvP::~OutdoorPvP ( )
virtual

Definition at line 243 of file OutdoorPvP.cpp.

References DeleteSpawns().

Member Function Documentation

◆ AddCapturePoint()

◆ AwardKillBonus()

virtual void OutdoorPvP::AwardKillBonus ( Player *  )
inlinevirtual

Definition at line 237 of file OutdoorPvP.h.

◆ BroadcastPacket()

void OutdoorPvP::BroadcastPacket ( WorldPacket const *  data) const
protected

◆ BroadcastWorker()

template<class Worker >
void OutdoorPvP::BroadcastWorker ( Worker &  _worker,
uint32  zoneId 
)
protected

Definition at line 648 of file OutdoorPvP.cpp.

References ObjectAccessor::FindPlayer(), m_players, and PVP_TEAMS_COUNT.

Referenced by SendDefenseMessage().

◆ CanTalkTo()

bool OutdoorPvP::CanTalkTo ( Player *  player,
Creature *  c,
GossipMenuItems const &  gso 
)
virtual

Definition at line 519 of file OutdoorPvP.cpp.

References m_capturePoints.

◆ DeleteSpawns()

void OutdoorPvP::DeleteSpawns ( )

Definition at line 216 of file OutdoorPvP.cpp.

References m_capturePoints, m_CreatureScriptStore, and m_GoScriptStore.

Referenced by ~OutdoorPvP().

◆ FillInitialWorldStates()

virtual void OutdoorPvP::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates &  )
inlinevirtual

Reimplemented in OutdoorPvPEP, OutdoorPvPHP, OutdoorPvPNA, OutdoorPvPSI, OutdoorPvPTF, and OutdoorPvPZM.

Definition at line 204 of file OutdoorPvP.h.

Referenced by Player::SendInitWorldStates().

◆ GetCapturePoint()

OPvPCapturePoint * OutdoorPvP::GetCapturePoint ( ObjectGuid::LowType  guid) const
protected

Definition at line 566 of file OutdoorPvP.cpp.

References m_capturePoints.

Referenced by OnGameObjectCreate(), and OnGameObjectRemove().

◆ GetMap()

◆ GetTeamIdByTeam()

◆ GetTypeId()

uint32 OutdoorPvP::GetTypeId ( ) const
inline

Definition at line 239 of file OutdoorPvP.h.

Referenced by Player::SendInitWorldStates().

◆ HandleAreaTrigger()

virtual bool OutdoorPvP::HandleAreaTrigger ( Player *  ,
uint32   
)
inlinevirtual

Reimplemented in OutdoorPvPSI.

Definition at line 207 of file OutdoorPvP.h.

◆ HandleCustomSpell()

bool OutdoorPvP::HandleCustomSpell ( Player *  player,
uint32  spellId,
GameObject *  go 
)
virtual

Reimplemented in OutdoorPvPSI.

Definition at line 485 of file OutdoorPvP.cpp.

References m_capturePoints.

◆ HandleDropFlag()

bool OutdoorPvP::HandleDropFlag ( Player *  player,
uint32  spellId 
)
virtual

Reimplemented in OutdoorPvPSI.

Definition at line 528 of file OutdoorPvP.cpp.

References m_capturePoints.

◆ HandleGossipOption()

bool OutdoorPvP::HandleGossipOption ( Player *  player,
Creature *  creature,
uint32  gossipid 
)
virtual

Definition at line 510 of file OutdoorPvP.cpp.

References m_capturePoints.

◆ HandleKill()

void OutdoorPvP::HandleKill ( Player *  killer,
Unit *  killed 
)
virtual

◆ HandleKillImpl()

virtual void OutdoorPvP::HandleKillImpl ( Player *  ,
Unit *   
)
inlinevirtual

Reimplemented in OutdoorPvPHP, OutdoorPvPNA, and OutdoorPvPZM.

Definition at line 231 of file OutdoorPvP.h.

Referenced by HandleKill().

◆ HandleOpenGo()

bool OutdoorPvP::HandleOpenGo ( Player *  player,
GameObject *  go 
)
virtual

Definition at line 501 of file OutdoorPvP.cpp.

References m_capturePoints.

◆ HandlePlayerEnterZone()

◆ HandlePlayerLeaveZone()

◆ HandlePlayerResurrects()

void OutdoorPvP::HandlePlayerResurrects ( Player *  player,
uint32  zone 
)
protectedvirtual

Definition at line 265 of file OutdoorPvP.cpp.

◆ HasPlayer()

bool OutdoorPvP::HasPlayer ( Player const *  player) const
protected

Definition at line 579 of file OutdoorPvP.cpp.

References Object::GetGUID(), Player::GetTeamId(), and m_players.

◆ IsInsideObjective()

bool OutdoorPvP::IsInsideObjective ( Player *  player) const

Definition at line 470 of file OutdoorPvP.cpp.

References m_capturePoints.

Referenced by HandleKill().

◆ OnCreatureCreate()

void OutdoorPvP::OnCreatureCreate ( Creature *  creature)
overridevirtual

Reimplemented from ZoneScript.

Definition at line 629 of file OutdoorPvP.cpp.

References ObjectGuid::GetCounter(), Object::GetGUID(), and m_CreatureScriptStore.

◆ OnCreatureRemove()

void OutdoorPvP::OnCreatureRemove ( Creature *  creature)
overridevirtual

Reimplemented from ZoneScript.

Definition at line 635 of file OutdoorPvP.cpp.

References ObjectGuid::GetCounter(), Object::GetGUID(), and m_CreatureScriptStore.

◆ OnGameObjectCreate()

void OutdoorPvP::OnGameObjectCreate ( GameObject *  go)
overridevirtual

◆ OnGameObjectRemove()

void OutdoorPvP::OnGameObjectRemove ( GameObject *  go)
overridevirtual

◆ RegisterZone()

◆ SendDefenseMessage()

◆ SendRemoveWorldStates()

virtual void OutdoorPvP::SendRemoveWorldStates ( Player *  )
inlineprotectedvirtual

Reimplemented in OutdoorPvPEP, OutdoorPvPHP, OutdoorPvPNA, OutdoorPvPSI, OutdoorPvPTF, and OutdoorPvPZM.

Definition at line 278 of file OutdoorPvP.h.

Referenced by HandlePlayerLeaveZone().

◆ SendUpdateWorldState()

◆ SetMapFromZone()

◆ SetupOutdoorPvP()

virtual bool OutdoorPvP::SetupOutdoorPvP ( )
inlinevirtual

Reimplemented in OutdoorPvPEP, OutdoorPvPHP, OutdoorPvPNA, OutdoorPvPSI, OutdoorPvPTF, and OutdoorPvPZM.

Definition at line 216 of file OutdoorPvP.h.

Referenced by OutdoorPvPMgr::InitOutdoorPvP().

◆ TeamApplyBuff()

void OutdoorPvP::TeamApplyBuff ( TeamId  team,
uint32  spellId,
uint32  spellId2 = 0 
)

◆ TeamCastSpell()

void OutdoorPvP::TeamCastSpell ( TeamId  team,
int32  spellId 
)
protected

◆ Update()

bool OutdoorPvP::Update ( uint32  diff)
virtual

Friends And Related Symbol Documentation

◆ OutdoorPvPMgr

friend class OutdoorPvPMgr
friend

Definition at line 187 of file OutdoorPvP.h.

Member Data Documentation

◆ m_capturePoints

◆ m_CreatureScriptStore

std::map<ObjectGuid::LowType, Creature*> OutdoorPvP::m_CreatureScriptStore
protected

Definition at line 303 of file OutdoorPvP.h.

Referenced by DeleteSpawns(), OnCreatureCreate(), and OnCreatureRemove().

◆ m_GoScriptStore

std::map<ObjectGuid::LowType, GameObject*> OutdoorPvP::m_GoScriptStore
protected

Definition at line 302 of file OutdoorPvP.h.

Referenced by DeleteSpawns(), OnGameObjectCreate(), and OnGameObjectRemove().

◆ m_map

Map* OutdoorPvP::m_map
protected

Definition at line 305 of file OutdoorPvP.h.

Referenced by OutdoorPvPSI::HandleAreaTrigger(), and SetMapFromZone().

◆ m_players

◆ m_sendUpdate

bool OutdoorPvP::m_sendUpdate
protected

Definition at line 275 of file OutdoorPvP.h.

Referenced by SendUpdateWorldState().

◆ m_TypeId


The documentation for this class was generated from the following files: