TrinityCore
OutdoorPvP Class Reference

#include <OutdoorPvP.h>

+ Inheritance diagram for OutdoorPvP:

Public Types

typedef std::map< ObjectGuid::LowType, std::unique_ptr< OPvPCapturePoint > > OPvPCapturePointMap
 
typedef std::unordered_map< uint32, std::unique_ptr< OutdoorPvPControlZoneHandler > > ControlZoneHandlerMap
 

Public Member Functions

 OutdoorPvP (Map *map)
 
 OutdoorPvP (OutdoorPvP const &right)=delete
 
 OutdoorPvP (OutdoorPvP &&right)=delete
 
OutdoorPvPoperator= (OutdoorPvP const &right)=delete
 
OutdoorPvPoperator= (OutdoorPvP &&right)=delete
 
virtual ~OutdoorPvP ()
 
virtual bool HandleAreaTrigger (Player *, uint32, bool)
 
virtual bool HandleCustomSpell (Player *player, uint32 spellId, GameObject *go)
 
virtual bool HandleOpenGo (Player *player, GameObject *go)
 
virtual bool SetupOutdoorPvP ()
 
void OnCreatureCreate (Creature *) override
 
int32 GetWorldState (int32 worldStateId) const
 
void SetWorldState (int32 worldStateId, int32 value)
 
virtual void Update (uint32 diff)
 
virtual void HandleKill (Player *killer, Unit *killed)
 
virtual void HandleKillImpl (Player *, Unit *)
 
virtual void AwardKillBonus (Player *)
 
uint32 GetTypeId () const
 
virtual bool HandleDropFlag (Player *player, uint32 spellId)
 
void TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0)
 
void SendDefenseMessage (uint32 zoneId, uint32 id)
 
MapGetMap () const
 
void ProcessEvent (WorldObject *target, uint32 eventId, WorldObject *invoker) override
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
 ZoneScript (ZoneScript const &right)
 
 ZoneScript (ZoneScript &&right) noexcept
 
ZoneScriptoperator= (ZoneScript const &right)
 
ZoneScriptoperator= (ZoneScript &&right) noexcept
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnCreatureCreate (Creature *)
 
virtual void OnCreatureRemove (Creature *)
 
virtual void OnGameObjectCreate (GameObject *)
 
virtual void OnGameObjectRemove (GameObject *)
 
virtual void OnAreaTriggerCreate (AreaTrigger *areaTrigger)
 
virtual void OnAreaTriggerRemove (AreaTrigger *areaTrigger)
 
virtual void OnUnitDeath (Unit *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 TriggerGameEvent (uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr)
 
virtual void ProcessEvent (WorldObject *, uint32, WorldObject *)
 
virtual void DoAction (uint32 actionId, WorldObject *source=nullptr, WorldObject *target=nullptr)
 
virtual void OnFlagStateChange (GameObject *flagInBase, FlagState oldValue, FlagState newValue, Player *player)
 
virtual bool CanCaptureFlag (AreaTrigger *areaTrigger, Player *player)
 
virtual void OnCaptureFlag (AreaTrigger *areaTrigger, Player *player)
 

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 RegisterZone (uint32 zoneid)
 
bool HasPlayer (Player const *player) const
 
void TeamCastSpell (TeamId team, int32 spellId)
 
template<class Worker >
void BroadcastWorker (Worker &_worker, uint32 zoneId)
 

Protected Attributes

OPvPCapturePointMap m_capturePoints
 
ControlZoneHandlerMap ControlZoneHandlers
 
GuidSet m_players [2]
 
uint32 m_TypeId
 
Mapm_map
 

Friends

class OutdoorPvPMgr
 

Detailed Description

Definition at line 127 of file OutdoorPvP.h.

Member Typedef Documentation

◆ ControlZoneHandlerMap

typedef std::unordered_map<uint32 , std::unique_ptr<OutdoorPvPControlZoneHandler> > OutdoorPvP::ControlZoneHandlerMap

Definition at line 144 of file OutdoorPvP.h.

◆ OPvPCapturePointMap

Definition at line 143 of file OutdoorPvP.h.

Constructor & Destructor Documentation

◆ OutdoorPvP() [1/3]

OutdoorPvP::OutdoorPvP ( Map map)
explicit

Definition at line 60 of file OutdoorPvP.cpp.

◆ OutdoorPvP() [2/3]

OutdoorPvP::OutdoorPvP ( OutdoorPvP const &  right)
delete

◆ OutdoorPvP() [3/3]

OutdoorPvP::OutdoorPvP ( OutdoorPvP &&  right)
delete

◆ ~OutdoorPvP()

OutdoorPvP::~OutdoorPvP ( )
virtualdefault

Member Function Documentation

◆ AwardKillBonus()

virtual void OutdoorPvP::AwardKillBonus ( Player )
inlinevirtual

Definition at line 172 of file OutdoorPvP.h.

◆ BroadcastPacket()

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

Definition at line 164 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:

◆ BroadcastWorker()

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

Definition at line 248 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMap()

Map * OutdoorPvP::GetMap ( ) const
inline

Definition at line 195 of file OutdoorPvP.h.

+ Here is the caller graph for this function:

◆ GetTeamIdByTeam()

static TeamId OutdoorPvP::GetTeamIdByTeam ( uint32  team)
inlinestatic

Definition at line 180 of file OutdoorPvP.h.

◆ GetTypeId()

uint32 OutdoorPvP::GetTypeId ( ) const
inline

Definition at line 174 of file OutdoorPvP.h.

◆ GetWorldState()

int32 OutdoorPvP::GetWorldState ( int32  worldStateId) const

Definition at line 86 of file OutdoorPvP.cpp.

+ Here is the caller graph for this function:

◆ HandleAreaTrigger()

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

Reimplemented in OutdoorPvPSI.

Definition at line 147 of file OutdoorPvP.h.

◆ HandleCustomSpell()

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

Reimplemented in OutdoorPvPSI.

Definition at line 125 of file OutdoorPvP.cpp.

◆ HandleDropFlag()

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

Reimplemented in OutdoorPvPSI.

Definition at line 150 of file OutdoorPvP.cpp.

◆ HandleKill()

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

Definition at line 96 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:

◆ HandleKillImpl()

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

Reimplemented in OutdoorPvPHP, OutdoorPvPNA, and OutdoorPvPZM.

Definition at line 169 of file OutdoorPvP.h.

+ Here is the caller graph for this function:

◆ HandleOpenGo()

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

Definition at line 141 of file OutdoorPvP.cpp.

◆ HandlePlayerEnterZone()

void OutdoorPvP::HandlePlayerEnterZone ( Player player,
uint32  zone 
)
protectedvirtual

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

Definition at line 64 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandlePlayerLeaveZone()

void OutdoorPvP::HandlePlayerLeaveZone ( Player player,
uint32  zone 
)
protectedvirtual

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

Definition at line 69 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandlePlayerResurrects()

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

Definition at line 78 of file OutdoorPvP.cpp.

◆ HasPlayer()

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

Definition at line 178 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:

◆ OnCreatureCreate()

void OutdoorPvP::OnCreatureCreate ( Creature )
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 158 of file OutdoorPvP.h.

◆ operator=() [1/2]

OutdoorPvP & OutdoorPvP::operator= ( OutdoorPvP &&  right)
delete

◆ operator=() [2/2]

OutdoorPvP & OutdoorPvP::operator= ( OutdoorPvP const &  right)
delete

◆ ProcessEvent()

void OutdoorPvP::ProcessEvent ( WorldObject target,
uint32  eventId,
WorldObject invoker 
)
overridevirtual

Reimplemented from ZoneScript.

Reimplemented in OutdoorPvPTF.

Definition at line 213 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegisterZone()

void OutdoorPvP::RegisterZone ( uint32  zoneid)
protected

Definition at line 173 of file OutdoorPvP.cpp.

+ Here is the caller graph for this function:

◆ SendDefenseMessage()

void OutdoorPvP::SendDefenseMessage ( uint32  zoneId,
uint32  id 
)

Definition at line 206 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendRemoveWorldStates()

virtual void OutdoorPvP::SendRemoveWorldStates ( Player )
inlineprotectedvirtual

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

Definition at line 211 of file OutdoorPvP.h.

+ Here is the caller graph for this function:

◆ SetupOutdoorPvP()

virtual bool OutdoorPvP::SetupOutdoorPvP ( )
inlinevirtual

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

Definition at line 156 of file OutdoorPvP.h.

+ Here is the caller graph for this function:

◆ SetWorldState()

void OutdoorPvP::SetWorldState ( int32  worldStateId,
int32  value 
)

Definition at line 91 of file OutdoorPvP.cpp.

+ Here is the caller graph for this function:

◆ TeamApplyBuff()

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

Definition at line 200 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TeamCastSpell()

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

Definition at line 184 of file OutdoorPvP.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void OutdoorPvP::Update ( uint32  diff)
virtual

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

Definition at line 80 of file OutdoorPvP.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ OutdoorPvPMgr

friend class OutdoorPvPMgr
friend

Definition at line 129 of file OutdoorPvP.h.

Member Data Documentation

◆ ControlZoneHandlers

ControlZoneHandlerMap OutdoorPvP::ControlZoneHandlers
protected

Definition at line 204 of file OutdoorPvP.h.

◆ m_capturePoints

OPvPCapturePointMap OutdoorPvP::m_capturePoints
protected

Definition at line 202 of file OutdoorPvP.h.

◆ m_map

Map* OutdoorPvP::m_map
protected

Definition at line 229 of file OutdoorPvP.h.

◆ m_players

GuidSet OutdoorPvP::m_players[2]
protected

Definition at line 206 of file OutdoorPvP.h.

◆ m_TypeId

uint32 OutdoorPvP::m_TypeId
protected

Definition at line 208 of file OutdoorPvP.h.


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