TrinityCore
Loading...
Searching...
No Matches
Battlefield Class Referenceabstract

#include <Battlefield.h>

+ Inheritance diagram for Battlefield:

Public Types

typedef std::map< ObjectGuid::LowType, BfCapturePoint * > BfCapturePointMap
 typedef of map witch store capturepoint and the associate gameobject entry
 

Public Member Functions

 Battlefield ()
 Constructor.
 
 Battlefield (Battlefield const &)=delete
 
 Battlefield (Battlefield &&)=delete
 
Battlefieldoperator= (Battlefield const &)=delete
 
Battlefieldoperator= (Battlefield &&)=delete
 
virtual ~Battlefield ()
 Destructor.
 
virtual bool SetupBattlefield ()
 Call this to init the Battlefield.
 
void SendInitWorldStatesTo (Player *player)
 
void SendUpdateWorldState (uint32 variable, uint32 value)
 Update data of a worldstate to all players present in zone.
 
virtual bool Update (uint32 diff)
 Called every time for update bf data and time.
 
void InvitePlayersInZoneToQueue ()
 Invite all players in zone to join the queue, called x minutes before battle start in Update()
 
void InvitePlayersInQueueToWar ()
 Invite all players in queue to join battle on battle start.
 
void InvitePlayersInZoneToWar ()
 Invite all players in zone to join battle on battle start.
 
virtual void HandleKill (Player *, Unit *)
 Called when a Unit is kill in battlefield zone.
 
uint32 GetTypeId () const
 
uint32 GetZoneId () const
 
void TeamApplyBuff (TeamId team, uint32 spellId, uint32 spellId2=0)
 
bool IsWarTime () const
 Return true if battle is start, false if battle is not started.
 
void ToggleBattlefield (bool enable)
 Enable or Disable battlefield.
 
bool IsEnabled () const
 Return if battlefield is enable.
 
void KickPlayerFromBattlefield (ObjectGuid guid)
 Kick player from battlefield and teleport him to kick-point location.
 
void HandlePlayerEnterZone (Player *player, uint32 zone)
 Called when player (player) enter in zone.
 
void HandlePlayerLeaveZone (Player *player, uint32 zone)
 Called when player (player) leave the zone.
 
virtual uint64 GetData64 (uint32 dataId) const override
 
virtual void SetData64 (uint32 dataId, uint64 value) override
 
virtual uint32 GetData (uint32 dataId) const override
 
virtual void SetData (uint32 dataId, uint32 value) override
 
virtual void UpdateData (uint32 index, int32 pad)
 
TeamId GetDefenderTeam () const
 
TeamId GetAttackerTeam () const
 
TeamId GetOtherTeam (TeamId team) const
 
void SetDefenderTeam (TeamId team)
 
GroupGetFreeBfRaid (TeamId TeamId)
 Find a not full battlefield group, if there is no, create one.
 
GroupGetGroupPlayer (ObjectGuid guid, TeamId TeamId)
 Return battlefield group where player is.
 
bool AddOrSetPlayerToCorrectBfGroup (Player *player)
 Force player to join a battlefield group.
 
WorldSafeLocsEntry const * GetClosestGraveyard (Player *player)
 
virtual void AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid)
 
void RemovePlayerFromResurrectQueue (ObjectGuid player_guid)
 
void SetGraveyardNumber (uint32 number)
 
BfGraveyardGetGraveyardById (uint32 id) const
 
CreatureSpawnCreature (uint32 entry, Position const &pos)
 
GameObjectSpawnGameObject (uint32 entry, Position const &pos, QuaternionData const &rot)
 
CreatureGetCreature (ObjectGuid guid)
 
GameObjectGetGameObject (ObjectGuid guid)
 
virtual void OnBattleStart ()
 Called on start.
 
virtual void OnBattleEnd (bool)
 Called at the end of battle.
 
virtual void OnStartGrouping ()
 Called x minutes before battle start when player in zone are invite to join queue.
 
virtual void OnPlayerJoinWar (Player *)
 Called when a player accept to join the battle.
 
virtual void OnPlayerLeaveWar (Player *)
 Called when a player leave the battle.
 
virtual void OnPlayerLeaveZone (Player *)
 Called when a player leave battlefield zone.
 
virtual void OnPlayerEnterZone (Player *)
 Called when a player enter in battlefield zone.
 
void SendWarning (uint8 id, WorldObject const *target=nullptr)
 
void PlayerAcceptInviteToQueue (Player *player)
 
void PlayerAcceptInviteToWar (Player *player)
 
uint32 GetBattleId () const
 
void AskToLeaveQueue (Player *player)
 
void PlayerAskToLeave (Player *player)
 
virtual void DoCompleteOrIncrementAchievement (uint32, Player *, uint8)
 
virtual void SendInitWorldStatesToAll ()=0
 Send all worldstate data to all player in zone.
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)=0
 
bool CanFlyIn ()
 Return if we can use mount in battlefield.
 
void SendAreaSpiritHealerQueryOpcode (Player *player, ObjectGuid guid)
 
void StartBattle ()
 
void EndBattle (bool endByTimer)
 
void HideNpc (Creature *creature)
 
void ShowNpc (Creature *creature, bool aggressive)
 
GraveyardVect GetGraveyardVector () const
 
uint32 GetTimer () const
 
void SetTimer (uint32 timer)
 
void DoPlaySoundToAll (uint32 soundID)
 
void InvitePlayerToQueue (Player *player)
 
void InvitePlayerToWar (Player *player)
 
void InitStalker (uint32 entry, Position const &pos)
 
- 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 OnCreatureCreate (Creature *)
 
virtual void OnCreatureRemove (Creature *)
 
virtual void OnGameObjectCreate (GameObject *)
 
virtual void OnGameObjectRemove (GameObject *)
 
virtual void OnUnitDeath (Unit *)
 
virtual ObjectGuid GetGuidData (uint32) const
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Protected Member Functions

void KickAfkPlayers ()
 
virtual void SendRemoveWorldStates (Player *)
 
void BroadcastPacketToZone (WorldPacket const *data) const
 
void BroadcastPacketToQueue (WorldPacket const *data) const
 
void BroadcastPacketToWar (WorldPacket const *data) const
 
void AddCapturePoint (BfCapturePoint *cp)
 
BfCapturePointGetCapturePoint (ObjectGuid::LowType lowguid) const
 
void RegisterZone (uint32 zoneid)
 
bool HasPlayer (Player *player) const
 
void TeamCastSpell (TeamId team, int32 spellId)
 

Protected Attributes

ObjectGuid StalkerGuid
 
uint32 m_Timer
 
bool m_IsEnabled
 
bool m_isActive
 
TeamId m_DefenderTeam
 
BfCapturePointMap m_capturePoints
 
GuidUnorderedSet m_players [PVP_TEAMS_COUNT]
 
GuidUnorderedSet m_PlayersInQueue [PVP_TEAMS_COUNT]
 
GuidUnorderedSet m_PlayersInWar [PVP_TEAMS_COUNT]
 
PlayerTimerMap m_InvitedPlayers [PVP_TEAMS_COUNT]
 
PlayerTimerMap m_PlayersWillBeKick [PVP_TEAMS_COUNT]
 
uint32 m_TypeId
 
uint32 m_BattleId
 
uint32 m_ZoneId
 
uint32 m_MapId
 
Mapm_Map
 
uint32 m_MaxPlayer
 
uint32 m_MinPlayer
 
uint32 m_MinLevel
 
uint32 m_BattleTime
 
uint32 m_NoWarBattleTime
 
uint32 m_RestartAfterCrash
 
uint32 m_TimeForAcceptInvite
 
uint32 m_uiKickDontAcceptTimer
 
WorldLocation KickPosition
 
uint32 m_uiKickAfkPlayersTimer
 
GraveyardVect m_GraveyardList
 
uint32 m_LastResurrectTimer
 
uint32 m_StartGroupingTimer
 
bool m_StartGrouping
 
GuidUnorderedSet m_Groups [PVP_TEAMS_COUNT]
 
std::vector< uint64m_Data64
 
std::vector< uint32m_Data32
 

Friends

class BattlefieldMgr
 

Detailed Description

Definition at line 210 of file Battlefield.h.

Member Typedef Documentation

◆ BfCapturePointMap

typedef of map witch store capturepoint and the associate gameobject entry

Definition at line 226 of file Battlefield.h.

Constructor & Destructor Documentation

◆ Battlefield() [1/3]

Battlefield::Battlefield ( )

Constructor.

Definition at line 40 of file Battlefield.cpp.

◆ Battlefield() [2/3]

Battlefield::Battlefield ( Battlefield const &  )
delete

◆ Battlefield() [3/3]

Battlefield::Battlefield ( Battlefield &&  )
delete

◆ ~Battlefield()

Battlefield::~Battlefield ( )
virtual

Destructor.

Definition at line 68 of file Battlefield.cpp.

Member Function Documentation

◆ AddCapturePoint()

void Battlefield::AddCapturePoint ( BfCapturePoint cp)
inlineprotected

Definition at line 433 of file Battlefield.h.

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

◆ AddOrSetPlayerToCorrectBfGroup()

bool Battlefield::AddOrSetPlayerToCorrectBfGroup ( Player player)

Force player to join a battlefield group.

Definition at line 524 of file Battlefield.cpp.

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

◆ AddPlayerToResurrectQueue()

void Battlefield::AddPlayerToResurrectQueue ( ObjectGuid  npc_guid,
ObjectGuid  player_guid 
)
virtual

Definition at line 602 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ AskToLeaveQueue()

void Battlefield::AskToLeaveQueue ( Player player)

Definition at line 372 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ BroadcastPacketToQueue()

void Battlefield::BroadcastPacketToQueue ( WorldPacket const *  data) const
protected

Definition at line 429 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ BroadcastPacketToWar()

void Battlefield::BroadcastPacketToWar ( WorldPacket const *  data) const
protected

Definition at line 437 of file Battlefield.cpp.

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

◆ BroadcastPacketToZone()

void Battlefield::BroadcastPacketToZone ( WorldPacket const *  data) const
protected

Definition at line 421 of file Battlefield.cpp.

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

◆ CanFlyIn()

bool Battlefield::CanFlyIn ( )
inline

Return if we can use mount in battlefield.

Definition at line 353 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ DoCompleteOrIncrementAchievement()

virtual void Battlefield::DoCompleteOrIncrementAchievement ( uint32  ,
Player ,
uint8   
)
inlinevirtual

Reimplemented in BattlefieldWG.

Definition at line 346 of file Battlefield.h.

◆ DoPlaySoundToAll()

void Battlefield::DoPlaySoundToAll ( uint32  soundID)

Definition at line 352 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ EndBattle()

void Battlefield::EndBattle ( bool  endByTimer)

Definition at line 333 of file Battlefield.cpp.

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

◆ FillInitialWorldStates()

virtual void Battlefield::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates )
pure virtual

Implemented in BattlefieldWG.

+ Here is the caller graph for this function:

◆ GetAttackerTeam()

TeamId Battlefield::GetAttackerTeam ( ) const
inline

Definition at line 290 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetBattleId()

uint32 Battlefield::GetBattleId ( ) const
inline

Definition at line 342 of file Battlefield.h.

◆ GetCapturePoint()

BfCapturePoint * Battlefield::GetCapturePoint ( ObjectGuid::LowType  lowguid) const
inlineprotected

Definition at line 435 of file Battlefield.h.

◆ GetClosestGraveyard()

WorldSafeLocsEntry const * Battlefield::GetClosestGraveyard ( Player player)

Definition at line 576 of file Battlefield.cpp.

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

◆ GetCreature()

Creature * Battlefield::GetCreature ( ObjectGuid  guid)

Definition at line 831 of file Battlefield.cpp.

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

◆ GetData()

virtual uint32 Battlefield::GetData ( uint32  dataId) const
inlineoverridevirtual

Reimplemented from ZoneScript.

Reimplemented in BattlefieldWG.

Definition at line 284 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetData64()

virtual uint64 Battlefield::GetData64 ( uint32  dataId) const
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 280 of file Battlefield.h.

◆ GetDefenderTeam()

TeamId Battlefield::GetDefenderTeam ( ) const
inline

Definition at line 289 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetFreeBfRaid()

Group * Battlefield::GetFreeBfRaid ( TeamId  TeamId)

Find a not full battlefield group, if there is no, create one.

Parameters
TeamId: Id of player team for who we search a group (player->GetTeamId())

Definition at line 504 of file Battlefield.cpp.

+ Here is the caller graph for this function:

◆ GetGameObject()

GameObject * Battlefield::GetGameObject ( ObjectGuid  guid)

Definition at line 838 of file Battlefield.cpp.

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

◆ GetGraveyardById()

BfGraveyard * Battlefield::GetGraveyardById ( uint32  id) const

Definition at line 561 of file Battlefield.cpp.

+ Here is the caller graph for this function:

◆ GetGraveyardVector()

GraveyardVect Battlefield::GetGraveyardVector ( ) const
inline

Definition at line 363 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetGroupPlayer()

Group * Battlefield::GetGroupPlayer ( ObjectGuid  guid,
TeamId  TeamId 
)

Return battlefield group where player is.

Definition at line 514 of file Battlefield.cpp.

◆ GetOtherTeam()

TeamId Battlefield::GetOtherTeam ( TeamId  team) const
inline

Definition at line 291 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetTimer()

uint32 Battlefield::GetTimer ( ) const
inline

Definition at line 365 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetTypeId()

uint32 Battlefield::GetTypeId ( ) const
inline

Definition at line 255 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ GetZoneId()

uint32 Battlefield::GetZoneId ( ) const
inline

Definition at line 256 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ HandleKill()

virtual void Battlefield::HandleKill ( Player ,
Unit  
)
inlinevirtual

Called when a Unit is kill in battlefield zone.

Reimplemented in BattlefieldWG.

Definition at line 253 of file Battlefield.h.

◆ HandlePlayerEnterZone()

void Battlefield::HandlePlayerEnterZone ( Player player,
uint32  zone 
)

Called when player (player) enter in zone.

Todo:
Send a packet to announce it to player

Definition at line 78 of file Battlefield.cpp.

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

◆ HandlePlayerLeaveZone()

void Battlefield::HandlePlayerLeaveZone ( Player player,
uint32  zone 
)

Called when player (player) leave the zone.

Definition at line 107 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ HasPlayer()

bool Battlefield::HasPlayer ( Player player) const
protected

Definition at line 357 of file Battlefield.cpp.

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

◆ HideNpc()

void Battlefield::HideNpc ( Creature creature)

Definition at line 475 of file Battlefield.cpp.

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

◆ InitStalker()

void Battlefield::InitStalker ( uint32  entry,
Position const &  pos 
)

Definition at line 289 of file Battlefield.cpp.

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

◆ InvitePlayersInQueueToWar()

void Battlefield::InvitePlayersInQueueToWar ( )

Invite all players in queue to join battle on battle start.

Definition at line 221 of file Battlefield.cpp.

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

◆ InvitePlayersInZoneToQueue()

void Battlefield::InvitePlayersInZoneToQueue ( )

Invite all players in zone to join the queue, called x minutes before battle start in Update()

Definition at line 204 of file Battlefield.cpp.

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

◆ InvitePlayersInZoneToWar()

void Battlefield::InvitePlayersInZoneToWar ( )

Invite all players in zone to join battle on battle start.

Definition at line 241 of file Battlefield.cpp.

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

◆ InvitePlayerToQueue()

void Battlefield::InvitePlayerToQueue ( Player player)

Definition at line 212 of file Battlefield.cpp.

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

◆ InvitePlayerToWar()

void Battlefield::InvitePlayerToWar ( Player player)
Todo:
needed ?

Definition at line 260 of file Battlefield.cpp.

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

◆ IsEnabled()

bool Battlefield::IsEnabled ( ) const
inline

Return if battlefield is enable.

Definition at line 266 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ IsWarTime()

bool Battlefield::IsWarTime ( ) const
inline

Return true if battle is start, false if battle is not started.

Definition at line 261 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ KickAfkPlayers()

void Battlefield::KickAfkPlayers ( )
protected

Definition at line 297 of file Battlefield.cpp.

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

◆ KickPlayerFromBattlefield()

void Battlefield::KickPlayerFromBattlefield ( ObjectGuid  guid)

Kick player from battlefield and teleport him to kick-point location.

Parameters
guid: guid of player who must be kick

Definition at line 306 of file Battlefield.cpp.

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

◆ OnBattleEnd()

virtual void Battlefield::OnBattleEnd ( bool  )
inlinevirtual

Called at the end of battle.

Reimplemented in BattlefieldWG.

Definition at line 326 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ OnBattleStart()

virtual void Battlefield::OnBattleStart ( )
inlinevirtual

Called on start.

Reimplemented in BattlefieldWG.

Definition at line 324 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ OnPlayerEnterZone()

virtual void Battlefield::OnPlayerEnterZone ( Player )
inlinevirtual

Called when a player enter in battlefield zone.

Reimplemented in BattlefieldWG.

Definition at line 336 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ OnPlayerJoinWar()

virtual void Battlefield::OnPlayerJoinWar ( Player )
inlinevirtual

Called when a player accept to join the battle.

Reimplemented in BattlefieldWG.

Definition at line 330 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ OnPlayerLeaveWar()

virtual void Battlefield::OnPlayerLeaveWar ( Player )
inlinevirtual

Called when a player leave the battle.

Reimplemented in BattlefieldWG.

Definition at line 332 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ OnPlayerLeaveZone()

virtual void Battlefield::OnPlayerLeaveZone ( Player )
inlinevirtual

Called when a player leave battlefield zone.

Reimplemented in BattlefieldWG.

Definition at line 334 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ OnStartGrouping()

virtual void Battlefield::OnStartGrouping ( )
inlinevirtual

Called x minutes before battle start when player in zone are invite to join queue.

Reimplemented in BattlefieldWG.

Definition at line 328 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ operator=() [1/2]

Battlefield & Battlefield::operator= ( Battlefield &&  )
delete

◆ operator=() [2/2]

Battlefield & Battlefield::operator= ( Battlefield const &  )
delete

◆ PlayerAcceptInviteToQueue()

void Battlefield::PlayerAcceptInviteToQueue ( Player player)

Definition at line 363 of file Battlefield.cpp.

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

◆ PlayerAcceptInviteToWar()

void Battlefield::PlayerAcceptInviteToWar ( Player player)

Definition at line 387 of file Battlefield.cpp.

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

◆ PlayerAskToLeave()

void Battlefield::PlayerAskToLeave ( Player player)

Definition at line 379 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ RegisterZone()

void Battlefield::RegisterZone ( uint32  zoneid)
protected

Definition at line 470 of file Battlefield.cpp.

+ Here is the caller graph for this function:

◆ RemovePlayerFromResurrectQueue()

void Battlefield::RemovePlayerFromResurrectQueue ( ObjectGuid  player_guid)

Definition at line 617 of file Battlefield.cpp.

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

◆ SendAreaSpiritHealerQueryOpcode()

void Battlefield::SendAreaSpiritHealerQueryOpcode ( Player player,
ObjectGuid  guid 
)

Definition at line 632 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ SendInitWorldStatesTo()

void Battlefield::SendInitWorldStatesTo ( Player player)

Definition at line 451 of file Battlefield.cpp.

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

◆ SendInitWorldStatesToAll()

virtual void Battlefield::SendInitWorldStatesToAll ( )
pure virtual

Send all worldstate data to all player in zone.

Implemented in BattlefieldWG.

+ Here is the caller graph for this function:

◆ SendRemoveWorldStates()

virtual void Battlefield::SendRemoveWorldStates ( Player )
inlineprotectedvirtual

Definition at line 425 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ SendUpdateWorldState()

void Battlefield::SendUpdateWorldState ( uint32  variable,
uint32  value 
)

Update data of a worldstate to all players present in zone.

Definition at line 462 of file Battlefield.cpp.

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

◆ SendWarning()

void Battlefield::SendWarning ( uint8  id,
WorldObject const *  target = nullptr 
)

Definition at line 445 of file Battlefield.cpp.

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

◆ SetData()

virtual void Battlefield::SetData ( uint32  dataId,
uint32  value 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 285 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ SetData64()

virtual void Battlefield::SetData64 ( uint32  dataId,
uint64  value 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 281 of file Battlefield.h.

◆ SetDefenderTeam()

void Battlefield::SetDefenderTeam ( TeamId  team)
inline

Definition at line 292 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ SetGraveyardNumber()

void Battlefield::SetGraveyardNumber ( uint32  number)
inline

Definition at line 311 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ SetTimer()

void Battlefield::SetTimer ( uint32  timer)
inline

Definition at line 366 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ SetupBattlefield()

virtual bool Battlefield::SetupBattlefield ( )
inlinevirtual

Call this to init the Battlefield.

Reimplemented in BattlefieldWG.

Definition at line 229 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ ShowNpc()

void Battlefield::ShowNpc ( Creature creature,
bool  aggressive 
)

Definition at line 485 of file Battlefield.cpp.

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

◆ SpawnCreature()

Creature * Battlefield::SpawnCreature ( uint32  entry,
Position const &  pos 
)

Definition at line 777 of file Battlefield.cpp.

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

◆ SpawnGameObject()

GameObject * Battlefield::SpawnGameObject ( uint32  entry,
Position const &  pos,
QuaternionData const &  rot 
)

Definition at line 806 of file Battlefield.cpp.

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

◆ StartBattle()

void Battlefield::StartBattle ( )

Definition at line 313 of file Battlefield.cpp.

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

◆ TeamApplyBuff()

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

◆ TeamCastSpell()

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

Definition at line 405 of file Battlefield.cpp.

+ Here is the call graph for this function:

◆ ToggleBattlefield()

void Battlefield::ToggleBattlefield ( bool  enable)
inline

Enable or Disable battlefield.

Definition at line 264 of file Battlefield.h.

+ Here is the caller graph for this function:

◆ Update()

bool Battlefield::Update ( uint32  diff)
virtual

Called every time for update bf data and time.

  • Update timer for start/end battle
  • Invite player in zone to queue m_StartGroupingTimer minutes before start
  • Kick Afk players
    Parameters
    diff: time ellapsed since last call (in ms)

Reimplemented in BattlefieldWG.

Definition at line 134 of file Battlefield.cpp.

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

◆ UpdateData()

virtual void Battlefield::UpdateData ( uint32  index,
int32  pad 
)
inlinevirtual

Definition at line 286 of file Battlefield.h.

Friends And Related Symbol Documentation

◆ BattlefieldMgr

friend class BattlefieldMgr
friend

Definition at line 212 of file Battlefield.h.

Member Data Documentation

◆ KickPosition

WorldLocation Battlefield::KickPosition
protected

Definition at line 406 of file Battlefield.h.

◆ m_BattleId

uint32 Battlefield::m_BattleId
protected

Definition at line 394 of file Battlefield.h.

◆ m_BattleTime

uint32 Battlefield::m_BattleTime
protected

Definition at line 401 of file Battlefield.h.

◆ m_capturePoints

BfCapturePointMap Battlefield::m_capturePoints
protected

Definition at line 383 of file Battlefield.h.

◆ m_Data32

std::vector<uint32> Battlefield::m_Data32
protected

Definition at line 420 of file Battlefield.h.

◆ m_Data64

std::vector<uint64> Battlefield::m_Data64
protected

Definition at line 419 of file Battlefield.h.

◆ m_DefenderTeam

TeamId Battlefield::m_DefenderTeam
protected

Definition at line 380 of file Battlefield.h.

◆ m_GraveyardList

GraveyardVect Battlefield::m_GraveyardList
protected

Definition at line 411 of file Battlefield.h.

◆ m_Groups

GuidUnorderedSet Battlefield::m_Groups[PVP_TEAMS_COUNT]
protected

Definition at line 417 of file Battlefield.h.

◆ m_InvitedPlayers

PlayerTimerMap Battlefield::m_InvitedPlayers[PVP_TEAMS_COUNT]
protected

Definition at line 389 of file Battlefield.h.

◆ m_isActive

bool Battlefield::m_isActive
protected

Definition at line 379 of file Battlefield.h.

◆ m_IsEnabled

bool Battlefield::m_IsEnabled
protected

Definition at line 378 of file Battlefield.h.

◆ m_LastResurrectTimer

uint32 Battlefield::m_LastResurrectTimer
protected

Definition at line 412 of file Battlefield.h.

◆ m_Map

Map* Battlefield::m_Map
protected

Definition at line 397 of file Battlefield.h.

◆ m_MapId

uint32 Battlefield::m_MapId
protected

Definition at line 396 of file Battlefield.h.

◆ m_MaxPlayer

uint32 Battlefield::m_MaxPlayer
protected

Definition at line 398 of file Battlefield.h.

◆ m_MinLevel

uint32 Battlefield::m_MinLevel
protected

Definition at line 400 of file Battlefield.h.

◆ m_MinPlayer

uint32 Battlefield::m_MinPlayer
protected

Definition at line 399 of file Battlefield.h.

◆ m_NoWarBattleTime

uint32 Battlefield::m_NoWarBattleTime
protected

Definition at line 402 of file Battlefield.h.

◆ m_players

GuidUnorderedSet Battlefield::m_players[PVP_TEAMS_COUNT]
protected

Definition at line 386 of file Battlefield.h.

◆ m_PlayersInQueue

GuidUnorderedSet Battlefield::m_PlayersInQueue[PVP_TEAMS_COUNT]
protected

Definition at line 387 of file Battlefield.h.

◆ m_PlayersInWar

GuidUnorderedSet Battlefield::m_PlayersInWar[PVP_TEAMS_COUNT]
protected

Definition at line 388 of file Battlefield.h.

◆ m_PlayersWillBeKick

PlayerTimerMap Battlefield::m_PlayersWillBeKick[PVP_TEAMS_COUNT]
protected

Definition at line 390 of file Battlefield.h.

◆ m_RestartAfterCrash

uint32 Battlefield::m_RestartAfterCrash
protected

Definition at line 403 of file Battlefield.h.

◆ m_StartGrouping

bool Battlefield::m_StartGrouping
protected

Definition at line 415 of file Battlefield.h.

◆ m_StartGroupingTimer

uint32 Battlefield::m_StartGroupingTimer
protected

Definition at line 414 of file Battlefield.h.

◆ m_TimeForAcceptInvite

uint32 Battlefield::m_TimeForAcceptInvite
protected

Definition at line 404 of file Battlefield.h.

◆ m_Timer

uint32 Battlefield::m_Timer
protected

Definition at line 377 of file Battlefield.h.

◆ m_TypeId

uint32 Battlefield::m_TypeId
protected

Definition at line 393 of file Battlefield.h.

◆ m_uiKickAfkPlayersTimer

uint32 Battlefield::m_uiKickAfkPlayersTimer
protected

Definition at line 408 of file Battlefield.h.

◆ m_uiKickDontAcceptTimer

uint32 Battlefield::m_uiKickDontAcceptTimer
protected

Definition at line 405 of file Battlefield.h.

◆ m_ZoneId

uint32 Battlefield::m_ZoneId
protected

Definition at line 395 of file Battlefield.h.

◆ StalkerGuid

ObjectGuid Battlefield::StalkerGuid
protected

Definition at line 376 of file Battlefield.h.


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