Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
BattlegroundRV Class Reference

#include <BattlegroundRV.h>

Inheritance diagram for BattlegroundRV:
Collaboration diagram for BattlegroundRV:

Public Member Functions

void AddPlayer (Player *player) OVERRIDE
 BattlegroundRV ()
void FillInitialWorldStates (WorldStateBuilder &builder) OVERRIDE
void HandleAreaTrigger (Player *Source, uint32 Trigger) OVERRIDE
void HandleKillPlayer (Player *player, Player *killer) OVERRIDE
void RemovePlayer (Player *player, uint64 guid, uint32 team) OVERRIDE
void Reset () OVERRIDE
bool SetupBattleground () OVERRIDE
void StartingEventCloseDoors () OVERRIDE
void StartingEventOpenDoors () OVERRIDE
 ~BattlegroundRV ()
Public Member Functions inherited from Battleground
CreatureAddCreature (uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime=0)
bool AddObject (uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0)
void AddOrSetPlayerToCorrectBgGroup (Player *player, uint32 team)
void AddPlayerToResurrectQueue (uint64 npc_guid, uint64 player_guid)
bool AddSpiritGuide (uint32 type, float x, float y, float z, float o, uint32 team)
void AddToBGFreeSlotQueue ()
 Battleground ()
void BlockMovement (Player *player)
template<class Do>
void BroadcastWorker (Do &_do)
virtual bool CanActivateGO (int32, uint32) const
bool CanAwardArenaPoints () const
void CastSpellOnTeam (uint32 SpellID, uint32 TeamID)
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
void CheckArenaAfterTimerConditions ()
void CheckArenaWinConditions ()
void DecreaseInvitedCount (uint32 team)
bool DelCreature (uint32 type)
bool DelObject (uint32 type)
virtual void DestroyGate (Player *, GameObject *)
virtual void DoAction (uint32, uint64)
void DoorClose (uint32 type)
void DoorOpen (uint32 type)
void EndBattleground (uint32 winner)
virtual void EventPlayerClickedOnFlag (Player *, GameObject *)
virtual void EventPlayerDamagedGO (Player *, GameObject *, uint32)
virtual void EventPlayerDroppedFlag (Player *)
void EventPlayerLoggedIn (Player *player)
void EventPlayerLoggedOut (Player *player)
virtual void EventPlayerUsedGO (Player *, GameObject *)
BattlegroundMapFindBgMap () const
uint32 GetAlivePlayersCountByTeam (uint32 TeamTeam) const
uint32 GetArenaMatchmakerRating (uint32 TeamTeam) const
uint32 GetArenaMatchmakerRatingByIndex (uint32 index) const
uint32 GetArenaTeamIdByIndex (uint32 index) const
uint32 GetArenaTeamIdForTeam (uint32 TeamTeam) const
int32 GetArenaTeamRatingChangeByIndex (uint32 index) const
int32 GetArenaTeamRatingChangeForTeam (uint32 TeamTeam) const
uint8 GetArenaType () const
CreatureGetBGCreature (uint32 type)
BattlegroundMapGetBgMap () const
GameObjectGetBGObject (uint32 type)
GroupGetBgRaid (uint32 TeamID) const
uint32 GetBonusHonorFromKill (uint32 kills) const
BattlegroundBracketId GetBracketId () const
uint32 GetClientInstanceID () const
virtual WorldSafeLocsEntry const * GetClosestGraveYard (Player *player)
uint32 GetElapsedTime () const
virtual uint64 GetFlagPickerGUID (int32=-1) const
uint32 GetFreeSlotsForTeam (uint32 TeamTeam) const
uint64 GetGUID () const
uint32 GetInstanceID () const
uint32 GetInvitedCount (uint32 team) const
uint32 GetLastResurrectTime () const
uint32 GetMapId () const
uint32 GetMaxLevel () const
uint32 GetMaxPlayers () const
uint32 GetMaxPlayersPerTeam () const
uint32 GetMinLevel () const
uint32 GetMinPlayers () const
uint32 GetMinPlayersPerTeam () const
char const * GetName () const
int32 GetObjectType (uint64 guid)
uint32 GetOtherTeam (uint32 teamId) const
uint32 GetPlayerActiveSpec (uint64 guid) const
BattlegroundPlayerMap const & GetPlayers () const
BattlegroundScoreMap::const_iterator GetPlayerScoresBegin () const
BattlegroundScoreMap::const_iterator GetPlayerScoresEnd () const
uint32 GetPlayerScoresSize () const
uint32 GetPlayersCountByTeam (uint32 TeamTeam) const
uint32 GetPlayersSize () const
uint32 GetPlayerTeam (uint64 guid) const
virtual uint32 GetPrematureWinner ()
uint32 GetRemainingTime () const
uint32 GetReviveQueueSize () const
uint32 GetScriptId () const
const char * GetSkyFireString (int32 entry)
int32 GetStartDelayTime () const
float GetStartMaxDist () const
BattlegroundStatus GetStatus () const
uint32 GetTeamScore (uint32 TeamID) const
void GetTeamStartLoc (uint32 TeamID, float &X, float &Y, float &Z, float &O) const
BattlegroundTypeId GetTypeID (bool GetRandom=false) const
uint8 GetWinner () const
virtual void HandleKillUnit (Creature *, Player *)
virtual void HandlePlayerResurrect (Player *)
virtual bool HandlePlayerUnderMap (Player *)
virtual void HandleQuestComplete (uint32, Player *)
void HandleTriggerBuff (uint64 go_guid)
bool HasFreeSlots () const
void IncreaseInvitedCount (uint32 team)
virtual bool IsAllNodesControlledByTeam (uint32) const
bool isArena () const
bool isBattleground () const
bool IsPlayerInBattleground (uint64 guid) const
bool IsRandom () const
bool isRated () const
virtual bool IsSpellAllowed (uint32, Player const *) const
void ModifyStartDelayTime (int diff)
void PlaySoundToAll (uint32 SoundID)
void PlaySoundToTeam (uint32 SoundID, uint32 TeamID)
void PSendMessageToAll (int32 entry, ChatMsg type, Player const *source,...)
void RelocateDeadPlayers (uint64 queueIndex)
 Relocate all players in ReviveQueue to the closest graveyard.
void RemoveAuraOnTeam (uint32 SpellID, uint32 TeamID)
void RemoveFromBGFreeSlotQueue ()
virtual void RemovePlayerAtLeave (uint64 guid, bool Transport, bool SendPacket)
void RemovePlayerFromResurrectQueue (uint64 player_guid)
virtual void ResetBGSubclass ()
void RewardHonorToTeam (uint32 Honor, uint32 TeamID)
void RewardReputationToTeam (uint32 faction_id, uint32 Reputation, uint32 TeamID)
void RewardXPAtKill (Player *killer, Player *victim)
void SendMessage2ToAll (int32 entry, ChatMsg type, Player const *source, int32 strId1=0, int32 strId2=0)
void SendMessageToAll (int32 entry, ChatMsg type, Player const *source=NULL)
void SendPacketToAll (WorldPacket *packet)
void SendPacketToTeam (uint32 TeamID, WorldPacket *packet, Player *sender=NULL, bool self=true)
void SendWarningToAll (int32 entry,...)
void SetArenaMatchmakerRating (uint32 TeamTeam, uint32 MMR)
void SetArenaorBGType (bool _isArena)
void SetArenaTeamIdForTeam (uint32 TeamTeam, uint32 ArenaTeamId)
void SetArenaTeamRatingChangeForTeam (uint32 TeamTeam, int32 RatingChange)
void SetArenaType (uint8 type)
void SetBgMap (BattlegroundMap *map)
void SetBgRaid (uint32 TeamID, Group *bg_raid)
void SetBracket (PvPDifficultyEntry const *bracketEntry)
void SetClientInstanceID (uint32 InstanceID)
void SetDeleteThis ()
virtual void SetDroppedFlagGUID (uint64, int32=-1)
void SetElapsedTime (uint32 Time)
void SetGuid (uint64 newGuid)
void SetHoliday (bool is_holiday)
void SetInstanceID (uint32 InstanceID)
void SetLastResurrectTime (uint32 Time)
void SetLevelRange (uint32 min, uint32 max)
void SetMapId (uint32 MapID)
void SetMaxPlayers (uint32 MaxPlayers)
void SetMaxPlayersPerTeam (uint32 MaxPlayers)
void SetMinPlayers (uint32 MinPlayers)
void SetMinPlayersPerTeam (uint32 MinPlayers)
void SetName (char const *Name)
void SetRandom (bool isRandom)
void SetRandomTypeID (BattlegroundTypeId TypeIDTypeID)
void SetRated (bool state)
void SetRemainingTime (uint32 Time)
void SetScriptId (uint32 scriptId)
void SetStartDelayTime (int Time)
void SetStartMaxDist (float startMaxDist)
void SetStatus (BattlegroundStatus Status)
void SetTeamStartLoc (uint32 TeamID, float X, float Y, float Z, float O)
void SetTypeID (BattlegroundTypeId TypeIDTypeID)
void SetWinner (uint8 winner)
void SpawnBGObject (uint32 type, uint32 respawntime)
void StartBattleground ()
void StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
bool ToBeDeleted () const
void Update (uint32 diff)
void UpdateArenaWorldState ()
virtual void UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true)
void UpdatePlayersCountByTeam (uint32 TeamTeam, bool remove)
void UpdateWorldState (uint32 Field, uint32 Value)
void UpdateWorldStateForPlayer (uint32 Field, uint32 Value, Player *player)
void YellToAll (Creature *creature, const char *text, Language language)
virtual ~Battleground ()

Protected Member Functions

bool GetPillarCollision () const
uint32 getState () const
uint32 getTimer () const
void SetPillarCollision (bool apply)
void setState (uint32 state)
void setTimer (uint32 timer)
void TogglePillarCollision ()
Protected Member Functions inherited from Battleground
void _CheckSafePositions (uint32 diff)
Player_GetPlayer (BattlegroundPlayerMap::const_iterator itr, const char *context) const
Player_GetPlayer (BattlegroundPlayerMap::iterator itr, const char *context)
Player_GetPlayer (uint64 guid, bool offlineRemove, const char *context) const
Player_GetPlayerForTeam (uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char *context) const
void _ProcessJoin (uint32 diff)
void _ProcessLeave (uint32 diff)
void _ProcessOfflineQueue ()
void _ProcessProgress (uint32 diff)
void _ProcessRessurect (uint32 diff)
void EndNow ()
void PlayerAddedToBGCheckIfBGIsRunning (Player *player)

Private Member Functions

void PostUpdateImpl (uint32 diff) OVERRIDE
 Post-update hook.

Private Attributes

bool PillarCollision
uint32 State
uint32 Timer

Additional Inherited Members

Public Types inherited from Battleground
typedef std::map< uint64, BattlegroundPlayerBattlegroundPlayerMap
typedef std::map< uint64, BattlegroundScore * > BattlegroundScoreMap
typedef std::vector< uint64BGCreatures
typedef std::vector< uint64BGObjects
Static Public Member Functions inherited from Battleground
static TeamId GetTeamIndexByTeamId (uint32 TeamTeam)
Public Attributes inherited from Battleground
BGCreatures BgCreatures
BGObjects BgObjects
Protected Attributes inherited from Battleground
bool m_BuffChange
uint8 m_Events
BGHonorMode m_HonorMode
bool m_IsRandom
BattlegroundPlayerMap m_Players
std::map< uint64, std::vector< uint64 > > m_ReviveQueue
int32 m_TeamScores [BG_TEAMS_COUNT]
BattlegroundScoreMap PlayerScores
BattlegroundStartTimeIntervals StartDelayTimes [BG_STARTING_EVENT_COUNT]
uint32 StartMessageIds [BG_STARTING_EVENT_COUNT]

Detailed Description

Definition at line 82 of file BattlegroundRV.h.

Constructor & Destructor Documentation

◆ BattlegroundRV()

◆ ~BattlegroundRV()

BattlegroundRV::~BattlegroundRV ( )

Definition at line 28 of file BattlegroundRV.cpp.

Member Function Documentation

◆ AddPlayer()

◆ FillInitialWorldStates()

void BattlegroundRV::FillInitialWorldStates ( WorldStateBuilder & builder)
virtual

◆ GetPillarCollision()

bool BattlegroundRV::GetPillarCollision ( ) const
inlineprotected

Definition at line 114 of file BattlegroundRV.h.

References PillarCollision.

Referenced by TogglePillarCollision().

◆ getState()

uint32 BattlegroundRV::getState ( ) const
inlineprotected

Definition at line 111 of file BattlegroundRV.h.

References State.

Referenced by PostUpdateImpl().

◆ getTimer()

uint32 BattlegroundRV::getTimer ( ) const
inlineprotected

Definition at line 108 of file BattlegroundRV.h.

References Timer.

Referenced by PostUpdateImpl().

◆ HandleAreaTrigger()

void BattlegroundRV::HandleAreaTrigger ( Player * Source,
uint32 Trigger )
virtual

Reimplemented from Battleground.

Definition at line 121 of file BattlegroundRV.cpp.

References Battleground::GetStatus(), Battleground::HandleAreaTrigger(), and STATUS_IN_PROGRESS.

◆ HandleKillPlayer()

◆ PostUpdateImpl()

void BattlegroundRV::PostUpdateImpl ( uint32 diff)
privatevirtual

Post-update hook.

Will be called after battleground update has passed. May be used to implement custom update effects in subclasses.

Parameters
diffa time difference between two worldserver update loops in milliseconds.
See also
Update(), PreUpdateImpl().

Reimplemented from Battleground.

Definition at line 30 of file BattlegroundRV.cpp.

References BG_RV_CLOSE_FIRE_TIMER, BG_RV_FIRE_TO_PILLAR_TIMER, BG_RV_OBJECT_FIRE_1, BG_RV_OBJECT_FIREDOOR_2, BG_RV_PILLAR_SWITCH_TIMER, BG_RV_STATE_CLOSE_FIRE, BG_RV_STATE_OPEN_FENCES, BG_RV_STATE_SWITCH_PILLARS, Battleground::DoorClose(), Battleground::DoorOpen(), getState(), Battleground::GetStatus(), getTimer(), setState(), setTimer(), STATUS_IN_PROGRESS, and TogglePillarCollision().

◆ RemovePlayer()

◆ Reset()

void BattlegroundRV::Reset ( )
virtual

Reimplemented from Battleground.

Definition at line 147 of file BattlegroundRV.cpp.

References Battleground::Reset().

◆ SetPillarCollision()

void BattlegroundRV::SetPillarCollision ( bool apply)
inlineprotected

Definition at line 115 of file BattlegroundRV.h.

References PillarCollision.

Referenced by StartingEventOpenDoors(), and TogglePillarCollision().

◆ setState()

void BattlegroundRV::setState ( uint32 state)
inlineprotected

Definition at line 112 of file BattlegroundRV.h.

References State.

Referenced by PostUpdateImpl(), and StartingEventOpenDoors().

◆ setTimer()

void BattlegroundRV::setTimer ( uint32 timer)
inlineprotected

Definition at line 109 of file BattlegroundRV.h.

References Timer.

Referenced by PostUpdateImpl(), and StartingEventOpenDoors().

◆ SetupBattleground()

◆ StartingEventCloseDoors()

void BattlegroundRV::StartingEventCloseDoors ( )
virtual

Reimplemented from Battleground.

Definition at line 63 of file BattlegroundRV.cpp.

◆ StartingEventOpenDoors()

◆ TogglePillarCollision()

Member Data Documentation

◆ PillarCollision

bool BattlegroundRV::PillarCollision
private

Definition at line 103 of file BattlegroundRV.h.

Referenced by BattlegroundRV(), GetPillarCollision(), and SetPillarCollision().

◆ State

uint32 BattlegroundRV::State
private

Definition at line 102 of file BattlegroundRV.h.

Referenced by BattlegroundRV(), getState(), and setState().

◆ Timer

uint32 BattlegroundRV::Timer
private

Definition at line 101 of file BattlegroundRV.h.

Referenced by BattlegroundRV(), getTimer(), and setTimer().


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