TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OutdoorPvPNA Class Reference

#include <OutdoorPvPNA.h>

Public Member Functions

 OutdoorPvPNA ()
 
bool SetupOutdoorPvP () override
 
void HandlePlayerEnterZone (Player *player, uint32 zone) override
 
void HandlePlayerLeaveZone (Player *player, uint32 zone) override
 
bool Update (uint32 diff) override
 
void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override
 
void SendRemoveWorldStates (Player *player) override
 
void HandleKillImpl (Player *player, Unit *killed) override
 
- Public Member Functions inherited from OutdoorPvP
 OutdoorPvP ()
 
virtual ~OutdoorPvP ()
 
void DeleteSpawns ()
 
virtual bool HandleAreaTrigger (Player *, uint32, bool)
 
virtual bool HandleCustomSpell (Player *player, uint32 spellId, GameObject *go)
 
virtual bool HandleOpenGo (Player *player, GameObject *go)
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
void OnCreatureCreate (Creature *) override
 
void SendUpdateWorldState (uint32 field, uint32 value)
 
virtual void HandleKill (Player *killer, Unit *killed)
 
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)
 
MapGetMap () 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 OnCreatureRemove (Creature *)
 
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)
 

Private Attributes

OPvPCapturePointNAm_obj
 

Additional Inherited Members

- Public Types inherited from OutdoorPvP
typedef std::map
< ObjectGuid::LowType,
OPvPCapturePoint * > 
OPvPCapturePointMap
 
- Static Public Member Functions inherited from OutdoorPvP
static TeamId GetTeamIdByTeam (uint32 team)
 
- Protected Member Functions inherited from OutdoorPvP
void BroadcastPacket (WorldPacket const *data) const
 
virtual void HandlePlayerResurrects (Player *player, uint32 zone)
 
void AddCapturePoint (OPvPCapturePoint *cp)
 
OPvPCapturePointGetCapturePoint (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 inherited from OutdoorPvP
OPvPCapturePointMap m_capturePoints
 
GuidSet m_players [2]
 
uint32 m_TypeId
 
bool m_sendUpdate
 
Mapm_map
 

Constructor & Destructor Documentation

OutdoorPvPNA::OutdoorPvPNA ( )
27 {
29  m_obj = NULL;
30 }
arena_t NULL
Definition: jemalloc_internal.h:624
OPvPCapturePointNA * m_obj
Definition: OutdoorPvPNA.h:328
uint32 m_TypeId
Definition: OutdoorPvP.h:273
Definition: OutdoorPvP.h:31

Member Function Documentation

void OutdoorPvPNA::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates packet)
overridevirtual

Reimplemented from OutdoorPvP.

219 {
220  m_obj->FillInitialWorldStates(packet);
221 }
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &packet) override
Definition: OutdoorPvPNA.cpp:223
OPvPCapturePointNA * m_obj
Definition: OutdoorPvPNA.h:328

+ Here is the call graph for this function:

void OutdoorPvPNA::HandleKillImpl ( Player player,
Unit killed 
)
overridevirtual

Reimplemented from OutdoorPvP.

33 {
34  if (killed->GetTypeId() == TYPEID_PLAYER && player->GetTeam() != killed->ToPlayer()->GetTeam())
35  {
36  player->KilledMonsterCredit(NA_CREDIT_MARKER); // 0 guid, btw it isn't even used in killedmonster function :S
37  if (player->GetTeam() == ALLIANCE)
38  player->CastSpell(player, NA_KILL_TOKEN_ALLIANCE, true);
39  else
40  player->CastSpell(player, NA_KILL_TOKEN_HORDE, true);
41  }
42 }
const uint32 NA_CREDIT_MARKER
Definition: OutdoorPvPNA.h:43
Player * ToPlayer()
Definition: Object.h:191
Definition: SharedDefines.h:1000
TypeID GetTypeId() const
Definition: Object.h:113
Definition: ObjectGuid.h:33
Definition: OutdoorPvPNA.h:37
Definition: OutdoorPvPNA.h:38

+ Here is the call graph for this function:

void OutdoorPvPNA::HandlePlayerEnterZone ( Player player,
uint32  zone 
)
overridevirtual

Reimplemented from OutdoorPvP.

204 {
205  // add buffs
206  if (player->GetTeam() == m_obj->GetControllingFaction())
207  player->CastSpell(player, NA_CAPTURE_BUFF, true);
208  OutdoorPvP::HandlePlayerEnterZone(player, zone);
209 }
Definition: OutdoorPvPNA.h:39
virtual void HandlePlayerEnterZone(Player *player, uint32 zone)
Definition: OutdoorPvP.cpp:257
uint32 GetControllingFaction() const
Definition: OutdoorPvPNA.cpp:80
OPvPCapturePointNA * m_obj
Definition: OutdoorPvPNA.h:328

+ Here is the call graph for this function:

void OutdoorPvPNA::HandlePlayerLeaveZone ( Player player,
uint32  zone 
)
overridevirtual

Reimplemented from OutdoorPvP.

212 {
213  // remove buffs
214  player->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
215  OutdoorPvP::HandlePlayerLeaveZone(player, zone);
216 }
Definition: OutdoorPvPNA.h:39
virtual void HandlePlayerLeaveZone(Player *player, uint32 zone)
Definition: OutdoorPvP.cpp:262

+ Here is the call graph for this function:

void OutdoorPvPNA::SendRemoveWorldStates ( Player player)
overridevirtual

Reimplemented from OutdoorPvP.

272 {
273  player->SendUpdateWorldState(NA_UI_HORDE_GUARDS_SHOW, 0);
274  player->SendUpdateWorldState(NA_UI_ALLIANCE_GUARDS_SHOW, 0);
275  player->SendUpdateWorldState(NA_UI_GUARDS_MAX, 0);
276  player->SendUpdateWorldState(NA_UI_GUARDS_LEFT, 0);
277  player->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_NEU_H, 0);
278  player->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_NEU_A, 0);
279  player->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_H, 0);
280  player->SendUpdateWorldState(NA_MAP_WYVERN_NORTH_A, 0);
281  player->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_H, 0);
282  player->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_A, 0);
283  player->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_H, 0);
284  player->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_A, 0);
285  player->SendUpdateWorldState(NA_MAP_WYVERN_WEST_NEU_H, 0);
286  player->SendUpdateWorldState(NA_MAP_WYVERN_WEST_NEU_A, 0);
287  player->SendUpdateWorldState(NA_MAP_WYVERN_WEST_H, 0);
288  player->SendUpdateWorldState(NA_MAP_WYVERN_WEST_A, 0);
289  player->SendUpdateWorldState(NA_MAP_WYVERN_EAST_NEU_H, 0);
290  player->SendUpdateWorldState(NA_MAP_WYVERN_EAST_NEU_A, 0);
291  player->SendUpdateWorldState(NA_MAP_WYVERN_EAST_H, 0);
292  player->SendUpdateWorldState(NA_MAP_WYVERN_EAST_A, 0);
293  player->SendUpdateWorldState(NA_MAP_HALAA_NEUTRAL, 0);
294  player->SendUpdateWorldState(NA_MAP_HALAA_NEU_A, 0);
295  player->SendUpdateWorldState(NA_MAP_HALAA_NEU_H, 0);
296  player->SendUpdateWorldState(NA_MAP_HALAA_HORDE, 0);
297  player->SendUpdateWorldState(NA_MAP_HALAA_ALLIANCE, 0);
298 }
Definition: OutdoorPvPNA.h:64
Definition: OutdoorPvPNA.h:75
Definition: OutdoorPvPNA.h:74
Definition: OutdoorPvPNA.h:87
Definition: OutdoorPvPNA.h:77
Definition: OutdoorPvPNA.h:70
Definition: OutdoorPvPNA.h:82
Definition: OutdoorPvPNA.h:76
Definition: OutdoorPvPNA.h:71
Definition: OutdoorPvPNA.h:59
Definition: OutdoorPvPNA.h:67
Definition: OutdoorPvPNA.h:88
Definition: OutdoorPvPNA.h:81
Definition: OutdoorPvPNA.h:79
Definition: OutdoorPvPNA.h:65
Definition: OutdoorPvPNA.h:80
Definition: OutdoorPvPNA.h:66
Definition: OutdoorPvPNA.h:61
Definition: OutdoorPvPNA.h:69
Definition: OutdoorPvPNA.h:84
Definition: OutdoorPvPNA.h:72
Definition: OutdoorPvPNA.h:86
Definition: OutdoorPvPNA.h:60
Definition: OutdoorPvPNA.h:85
Definition: OutdoorPvPNA.h:62
bool OutdoorPvPNA::SetupOutdoorPvP ( )
overridevirtual

Reimplemented from OutdoorPvP.

190 {
191 // m_TypeId = OUTDOOR_PVP_NA; _MUST_ be set in ctor, because of spawns cleanup
192  // add the zones affected by the pvp buff
195 
196  // halaa
197  m_obj = new OPvPCapturePointNA(this);
198 
200  return true;
201 }
const uint32 NA_BUFF_ZONE
Definition: OutdoorPvPNA.h:47
void SetMapFromZone(uint32 zone)
Definition: OutdoorPvP.cpp:651
void RegisterZone(uint32 zoneid)
Definition: OutdoorPvP.cpp:583
void AddCapturePoint(OPvPCapturePoint *cp)
Definition: OutdoorPvP.cpp:564
Definition: OutdoorPvPNA.h:259
OPvPCapturePointNA * m_obj
Definition: OutdoorPvPNA.h:328

+ Here is the call graph for this function:

bool OutdoorPvPNA::Update ( uint32  diff)
overridevirtual

Reimplemented from OutdoorPvP.

301 {
302  return m_obj->Update(diff);
303 }
bool Update(uint32 diff) override
Definition: OutdoorPvPNA.cpp:502
OPvPCapturePointNA * m_obj
Definition: OutdoorPvPNA.h:328

+ Here is the call graph for this function:

Member Data Documentation

OPvPCapturePointNA* OutdoorPvPNA::m_obj
private

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