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

Class for manage Strand of Ancient battleground. More...

#include <BattlegroundSA.h>

Inheritance diagram for BattlegroundSA:
Collaboration diagram for BattlegroundSA:

Public Member Functions

void AddPlayer (Player *player) OVERRIDE
 Called when a player join battle.
 BattlegroundSA ()
bool CheckAchievementCriteriaMeet (uint32 criteriaId, Player const *source, Unit const *target=NULL, uint32 miscvalue1=0) OVERRIDE
bool DebugStartBoats (Player *player)
bool DebugStopBoats (Player *player)
void EndBattleground (uint32 winner)
 Called on battleground ending.
void EventPlayerClickedOnFlag (Player *Source, GameObject *target_obj) OVERRIDE
 Called when a player click on flag (graveyard flag).
void EventPlayerDamagedGO (Player *player, GameObject *go, uint32 eventType) OVERRIDE
 Called when a player deal damage to building (door).
void EventPlayerUsedGO (Player *Source, GameObject *object) OVERRIDE
 Called when a player use a gamobject (relic).
void FillInitialWorldStates (WorldStateBuilder &builder) OVERRIDE
 Called for generate packet contain worldstate data.
std::string GetBoatDebugStatus ()
WorldSafeLocsEntry const * GetClosestGraveYard (Player *player) OVERRIDE
 Return the nearest graveyard where player can respawn.
uint32 getGateIdFromDamagedOrDestroyEventId (uint32 id)
 Return gate id, relative to bg data, according to gameobject id.
uint32 getWorldStateFromGateId (uint32 id)
 Return worldstate id, according to door id.
void HandleAreaTrigger (Player *Source, uint32 Trigger) OVERRIDE
void HandleKillUnit (Creature *creature, Player *killer) OVERRIDE
 Called when a player kill a unit in bg.
void PostUpdateImpl (uint32 diff) OVERRIDE
 Called every time for update battle data -Update timer -Round switch.
void RemovePlayer (Player *player, uint64 guid, uint32 team) OVERRIDE
 CAlled when a player leave battleground.
void Reset () OVERRIDE
bool SetupBattleground () OVERRIDE
 Called for ini battleground, after that the first player be entered.
bool ShouldDelayStartForDebug () const OVERRIDE
void StartingEventCloseDoors () OVERRIDE
 Called when battle start.
void StartingEventOpenDoors () OVERRIDE
void UpdatePlayerScore (Player *Source, uint32 type, uint32 value, bool doAddHonor=true) OVERRIDE
 Update score board.
 ~BattlegroundSA ()
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)
void CheckArenaAfterTimerConditions ()
void CheckArenaWinConditions ()
void DecreaseInvitedCount (uint32 team)
bool DelCreature (uint32 type)
bool DelObject (uint32 type)
virtual void DoAction (uint32, uint64)
void DoorClose (uint32 type)
void DoorOpen (uint32 type)
void EndBattleground (uint32 winner)
virtual void EventPlayerDroppedFlag (Player *)
void EventPlayerLoggedIn (Player *player)
void EventPlayerLoggedOut (Player *player)
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
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 HandleKillPlayer (Player *player, Player *killer)
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 ()
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 ()

Public Attributes

TeamId Attackers
 Id of attacker team.
bool gateDestroyed
Public Attributes inherited from Battleground
BGCreatures BgCreatures
BGObjects BgObjects

Private Member Functions

bool BoatLaunchWindowStarted () const
void CaptureGraveyard (BG_SA_Graveyards i, Player *Source)
 Called when a graveyard is capture -Update spiritguide -Update gameobject (flag) -Update Worldstate -Send warning for announce this.
void DemolisherStartState (bool start)
 Set selectable or not demolisher, called on battle start, when boats arrive to dock.
void DestroyGate (Player *player, GameObject *go) OVERRIDE
 Called when a gate is destroy -Give honor to player witch destroy it -Update worldstate -Delete gameobject in front of door (lighting object, with different colours for each door).
uint32 GetTimerWorldState () const
void LogBoatDebugMarker (Player *player, char const *action, uint32 elapsedMs=0)
void OverrideGunFaction ()
 Called on start and between the two round -Update faction of all vehicle.
bool ResetObjs ()
 Called on setup and between the two round -Delete all gameobject / creature -Respawn all gameobject / creature to have good faction.
void SendBoatDebugTimerUpdate ()
void SendBoatTransportUpdates ()
void SendTime ()
 Update timer worldstate.
void SendTransportInit (Player *player)
 Send packet to player for create boats (client part).
void SendTransportsRemove (Player *player)
 Send packet to player for destroy boats (client part).
void StartShips ()
 Called for start ship movement.
void TeleportPlayers ()
 Called between the two round -Teleport all players to good location.
void ToggleTimer ()
 Switch on/off timer worldstate.
void UpdateDemolisherSpawns ()
 Respawn dead demolisher.

Private Attributes

bool _allVehiclesAlive [BG_TEAMS_COUNT] = { }
uint64 BoatDebugPlayerGuid
uint32 BoatDebugStartTime
bool BoatDebugTimerActive
uint32 BoatDebugUpdateTimer
std::map< uint32, uint32DemoliserRespawnList
uint32 EndRoundTimer
 Max time of round.
BG_SA_GateState GateStatus [6] = { }
 Status of each gate (Destroy/Damage/Intact).
TeamId GraveyardStatus [BG_SA_MAX_GY] = { }
 Team witch conntrol each graveyard.
bool InitSecondRound
 for know if second round has been init
BG_SA_RoundScore RoundScores [2] = { }
 Score of each round.
bool ShipsStarted
 For know if boats has start moving or not yet.
bool SignaledRoundTwo
 for know if warning about second round start has been sent
bool SignaledRoundTwoHalfMin
 for know if warning about second round start has been sent
BG_SA_Status Status
 Statu of battle (Start or not, and what round).
bool TimerEnabled
 used for know we are in timer phase or not (used for worldstate update)
uint32 TotalTime
 Totale elapsed time of current round.
uint32 UpdateWaitTimer
 5secs before starting the 1min countdown for second round

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)
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)
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

Class for manage Strand of Ancient battleground.

Definition at line 430 of file BattlegroundSA.h.

Constructor & Destructor Documentation

◆ BattlegroundSA()

◆ ~BattlegroundSA()

BattlegroundSA::~BattlegroundSA ( )

Definition at line 35 of file BattlegroundSA.cpp.

Member Function Documentation

◆ AddPlayer()

void BattlegroundSA::AddPlayer ( Player * player)
virtual

◆ BoatLaunchWindowStarted()

bool BattlegroundSA::BoatLaunchWindowStarted ( ) const
private

◆ CaptureGraveyard()

void BattlegroundSA::CaptureGraveyard ( BG_SA_Graveyards i,
Player * Source )
private

◆ CheckAchievementCriteriaMeet()

bool BattlegroundSA::CheckAchievementCriteriaMeet ( uint32 criteriaId,
Player const * source,
Unit const * target = NULL,
uint32 miscvalue1 = 0 )
virtual

◆ DebugStartBoats()

◆ DebugStopBoats()

◆ DemolisherStartState()

void BattlegroundSA::DemolisherStartState ( bool start)
private

Set selectable or not demolisher, called on battle start, when boats arrive to dock.

Definition at line 744 of file BattlegroundSA.cpp.

References BG_SA_DEMOLISHER_1, BG_SA_DEMOLISHER_4, Battleground::BgCreatures, Battleground::GetBGCreature(), UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

Referenced by PostUpdateImpl(), and ResetObjs().

◆ DestroyGate()

void BattlegroundSA::DestroyGate ( Player * player,
GameObject * go )
privatevirtual

◆ EndBattleground()

◆ EventPlayerClickedOnFlag()

void BattlegroundSA::EventPlayerClickedOnFlag ( Player * Source,
GameObject * target_obj )
virtual

◆ EventPlayerDamagedGO()

◆ EventPlayerUsedGO()

◆ FillInitialWorldStates()

◆ GetBoatDebugStatus()

◆ GetClosestGraveYard()

WorldSafeLocsEntry const * BattlegroundSA::GetClosestGraveYard ( Player * player)
virtual

◆ getGateIdFromDamagedOrDestroyEventId()

◆ GetTimerWorldState()

uint32 BattlegroundSA::GetTimerWorldState ( ) const
private

Definition at line 849 of file BattlegroundSA.cpp.

References EndRoundTimer, IN_MILLISECONDS, TimerEnabled, and TotalTime.

Referenced by FillInitialWorldStates(), and SendTime().

◆ getWorldStateFromGateId()

uint32 BattlegroundSA::getWorldStateFromGateId ( uint32 id)
inline

◆ HandleAreaTrigger()

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

Reimplemented from Battleground.

Definition at line 631 of file BattlegroundSA.cpp.

References Battleground::GetStatus(), and STATUS_IN_PROGRESS.

◆ HandleKillUnit()

void BattlegroundSA::HandleKillUnit ( Creature * creature,
Player * killer )
virtual

Called when a player kill a unit in bg.

Reimplemented from Battleground.

Definition at line 713 of file BattlegroundSA.cpp.

References _allVehiclesAlive, Attackers, Object::GetEntry(), NPC_DEMOLISHER_SA, SCORE_DESTROYED_DEMOLISHER, and UpdatePlayerScore().

◆ LogBoatDebugMarker()

void BattlegroundSA::LogBoatDebugMarker ( Player * player,
char const * action,
uint32 elapsedMs = 0 )
private

Definition at line 312 of file BattlegroundSA.cpp.

References Battleground::GetInstanceID(), and Player::GetSession().

Referenced by DebugStartBoats(), and DebugStopBoats().

◆ OverrideGunFaction()

void BattlegroundSA::OverrideGunFaction ( )
private

Called on start and between the two round -Update faction of all vehicle.

Definition at line 726 of file BattlegroundSA.cpp.

References Attackers, BG_SA_DEMOLISHER_1, BG_SA_DEMOLISHER_4, BG_SA_Factions, BG_SA_GUN_1, BG_SA_GUN_10, Battleground::BgCreatures, Battleground::GetBGCreature(), TEAM_ALLIANCE, and TEAM_HORDE.

Referenced by ResetObjs().

◆ PostUpdateImpl()

◆ RemovePlayer()

void BattlegroundSA::RemovePlayer ( Player * player,
uint64 guid,
uint32 team )
virtual

CAlled when a player leave battleground.

Reimplemented from Battleground.

Definition at line 629 of file BattlegroundSA.cpp.

◆ Reset()

◆ ResetObjs()

bool BattlegroundSA::ResetObjs ( )
private

Called on setup and between the two round -Delete all gameobject / creature -Respawn all gameobject / creature to have good faction.

Definition at line 59 of file BattlegroundSA.cpp.

References Battleground::AddCreature(), Battleground::AddObject(), Battleground::AddSpiritGuide(), ALLIANCE, Attackers, BG_SA_ALLIANCE_DEFENCE_TOKEN, BG_SA_ALLY_ATTACKS, BG_SA_ANCIENT_GATEWS, BG_SA_BEACH_GY, BG_SA_BLUE_GATEWS, BG_SA_BOAT_ONE, BG_SA_BOAT_ONE_A, BG_SA_BOAT_ONE_H, BG_SA_BOAT_TWO, BG_SA_BOAT_TWO_A, BG_SA_BOAT_TWO_H, BG_SA_BOMB, BG_SA_CENTER_GY_ALLIANCE, BG_SA_CENTER_GY_HORDE, BG_SA_CENTRAL_CAPTURABLE_GY, BG_SA_CENTRAL_FLAG, BG_SA_DEMOLISHER_5, BG_SA_Factions, BG_SA_GATE_OK, BG_SA_GREEN_GATEWS, BG_SA_GYEntries, BG_SA_GYOrientation, BG_SA_HORDE_ATTACKS, BG_SA_HORDE_DEFENCE_TOKEN, BG_SA_LEFT_ATT_TOKEN_ALL, BG_SA_LEFT_ATT_TOKEN_HRD, BG_SA_LEFT_CAPTURABLE_GY, BG_SA_LEFT_FLAG, BG_SA_LEFT_FLAGPOLE, BG_SA_LEFT_GY_ALLIANCE, BG_SA_LEFT_GY_HORDE, BG_SA_MAX_GY, BG_SA_MAXNPC, BG_SA_MAXOBJ, BG_SA_NpcEntries, BG_SA_NpcSpawnlocs, BG_SA_ObjEntries, BG_SA_ObjSpawnlocs, BG_SA_PORTAL_DEFFENDER_RED, BG_SA_PURPLE_GATEWS, BG_SA_RED_GATEWS, BG_SA_RIGHT_ATT_TOKEN_ALL, BG_SA_RIGHT_ATT_TOKEN_HRD, BG_SA_RIGHT_CAPTURABLE_GY, BG_SA_RIGHT_GY_ALLIANCE, BG_SA_RIGHT_GY_HORDE, BG_SA_SIGIL_1, BG_SA_TITAN_RELIC, BG_SA_YELLOW_GATEWS, BoatDebugPlayerGuid, BoatDebugStartTime, BoatDebugTimerActive, BoatDebugUpdateTimer, Battleground::DelCreature(), Battleground::DelObject(), DemolisherStartState(), ObjectAccessor::FindPlayer(), GAMEOBJECT_FIELD_FACTION_TEMPLATE, GateStatus, Battleground::GetBGObject(), Battleground::GetPlayers(), GraveyardStatus, HORDE, OverrideGunFaction(), GameObject::Refresh(), RESPAWN_IMMEDIATELY, RESPAWN_ONE_DAY, SendTransportInit(), SendTransportsRemove(), Battleground::SetStatus(), Object::SetUInt32Value(), SF_LOG_ERROR, ShipsStarted, Battleground::SpawnBGObject(), STATUS_WAIT_JOIN, GameObject::StopLegacyTransportAtInitialStop(), sWorldSafeLocsStore, TEAM_ALLIANCE, TEAM_HORDE, TeleportPlayers(), TotalTime, GameObject::UpdateRotationFields(), Battleground::UpdateWorldState(), WorldSafeLocsEntry::x, WorldSafeLocsEntry::y, and WorldSafeLocsEntry::z.

Referenced by EventPlayerUsedGO(), PostUpdateImpl(), and SetupBattleground().

◆ SendBoatDebugTimerUpdate()

void BattlegroundSA::SendBoatDebugTimerUpdate ( )
private

◆ SendBoatTransportUpdates()

◆ SendTime()

void BattlegroundSA::SendTime ( )
private

Update timer worldstate.

Definition at line 844 of file BattlegroundSA.cpp.

References BG_SA_TIMER, GetTimerWorldState(), and Battleground::UpdateWorldState().

Referenced by EndBattleground(), PostUpdateImpl(), and ToggleTimer().

◆ SendTransportInit()

◆ SendTransportsRemove()

void BattlegroundSA::SendTransportsRemove ( Player * player)
private

◆ SetupBattleground()

bool BattlegroundSA::SetupBattleground ( )
virtual

Called for ini battleground, after that the first player be entered.

Reimplemented from Battleground.

Definition at line 54 of file BattlegroundSA.cpp.

References ResetObjs().

◆ ShouldDelayStartForDebug()

◆ StartingEventCloseDoors()

void BattlegroundSA::StartingEventCloseDoors ( )
virtual

Called when battle start.

Reimplemented from Battleground.

Definition at line 553 of file BattlegroundSA.cpp.

◆ StartingEventOpenDoors()

void BattlegroundSA::StartingEventOpenDoors ( )
virtual

Reimplemented from Battleground.

Definition at line 555 of file BattlegroundSA.cpp.

◆ StartShips()

◆ TeleportPlayers()

void BattlegroundSA::TeleportPlayers ( )
private

Called between the two round -Teleport all players to good location.

Definition at line 652 of file BattlegroundSA.cpp.

References Attackers, ObjectAccessor::FindPlayer(), Battleground::GetPlayers(), SPELL_AURA_MOD_SHAPESHIFT, SPELL_AURA_SPIRIT_OF_REDEMPTION, and SPELL_PREPARATION.

Referenced by ResetObjs().

◆ ToggleTimer()

void BattlegroundSA::ToggleTimer ( )
private

Switch on/off timer worldstate.

Definition at line 1041 of file BattlegroundSA.cpp.

References BG_SA_ENABLE_TIMER, SendTime(), TimerEnabled, and Battleground::UpdateWorldState().

Referenced by EventPlayerUsedGO(), and PostUpdateImpl().

◆ UpdateDemolisherSpawns()

void BattlegroundSA::UpdateDemolisherSpawns ( )
private

◆ UpdatePlayerScore()

void BattlegroundSA::UpdatePlayerScore ( Player * Source,
uint32 type,
uint32 value,
bool doAddHonor = true )
virtual

Member Data Documentation

◆ _allVehiclesAlive

bool BattlegroundSA::_allVehiclesAlive[BG_TEAMS_COUNT] = { }
private

Definition at line 632 of file BattlegroundSA.h.

Referenced by CheckAchievementCriteriaMeet(), HandleKillUnit(), and Reset().

◆ Attackers

◆ BoatDebugPlayerGuid

uint64 BattlegroundSA::BoatDebugPlayerGuid
private

◆ BoatDebugStartTime

uint32 BattlegroundSA::BoatDebugStartTime
private

◆ BoatDebugTimerActive

bool BattlegroundSA::BoatDebugTimerActive
private

◆ BoatDebugUpdateTimer

uint32 BattlegroundSA::BoatDebugUpdateTimer
private

◆ DemoliserRespawnList

std::map<uint32, uint32> BattlegroundSA::DemoliserRespawnList
private

Definition at line 629 of file BattlegroundSA.h.

Referenced by UpdateDemolisherSpawns().

◆ EndRoundTimer

uint32 BattlegroundSA::EndRoundTimer
private

Max time of round.

Definition at line 604 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), GetTimerWorldState(), and PostUpdateImpl().

◆ gateDestroyed

bool BattlegroundSA::gateDestroyed

Definition at line 537 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), CheckAchievementCriteriaMeet(), DestroyGate(), and Reset().

◆ GateStatus

BG_SA_GateState BattlegroundSA::GateStatus[6] = { }
private

Status of each gate (Destroy/Damage/Intact).

Definition at line 608 of file BattlegroundSA.h.

Referenced by DestroyGate(), EventPlayerClickedOnFlag(), EventPlayerDamagedGO(), EventPlayerUsedGO(), FillInitialWorldStates(), Reset(), and ResetObjs().

◆ GraveyardStatus

TeamId BattlegroundSA::GraveyardStatus[BG_SA_MAX_GY] = { }
private

Team witch conntrol each graveyard.

Definition at line 612 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), CaptureGraveyard(), FillInitialWorldStates(), GetClosestGraveYard(), and ResetObjs().

◆ InitSecondRound

bool BattlegroundSA::InitSecondRound
private

for know if second round has been init

Definition at line 624 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), EventPlayerUsedGO(), and PostUpdateImpl().

◆ RoundScores

BG_SA_RoundScore BattlegroundSA::RoundScores[2] = { }
private

Score of each round.

Definition at line 614 of file BattlegroundSA.h.

Referenced by EventPlayerUsedGO(), and PostUpdateImpl().

◆ ShipsStarted

bool BattlegroundSA::ShipsStarted
private

For know if boats has start moving or not yet.

Definition at line 606 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), BoatLaunchWindowStarted(), DebugStartBoats(), DebugStopBoats(), GetBoatDebugStatus(), Reset(), ResetObjs(), SendTransportInit(), and StartShips().

◆ SignaledRoundTwo

bool BattlegroundSA::SignaledRoundTwo
private

for know if warning about second round start has been sent

Definition at line 620 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), EventPlayerUsedGO(), and PostUpdateImpl().

◆ SignaledRoundTwoHalfMin

bool BattlegroundSA::SignaledRoundTwoHalfMin
private

for know if warning about second round start has been sent

Definition at line 622 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), EventPlayerUsedGO(), and PostUpdateImpl().

◆ Status

BG_SA_Status BattlegroundSA::Status
private

Statu of battle (Start or not, and what round).

Definition at line 610 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), BoatLaunchWindowStarted(), EventPlayerUsedGO(), PostUpdateImpl(), Reset(), and StartShips().

◆ TimerEnabled

bool BattlegroundSA::TimerEnabled
private

used for know we are in timer phase or not (used for worldstate update)

Definition at line 616 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), EndBattleground(), FillInitialWorldStates(), GetTimerWorldState(), and ToggleTimer().

◆ TotalTime

uint32 BattlegroundSA::TotalTime
private

Totale elapsed time of current round.

Definition at line 602 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), BoatLaunchWindowStarted(), EventPlayerUsedGO(), GetTimerWorldState(), PostUpdateImpl(), Reset(), ResetObjs(), and StartShips().

◆ UpdateWaitTimer

uint32 BattlegroundSA::UpdateWaitTimer
private

5secs before starting the 1min countdown for second round

Definition at line 618 of file BattlegroundSA.h.

Referenced by BattlegroundSA(), EventPlayerUsedGO(), and PostUpdateImpl().


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