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

#include <BattlegroundIC.h>

Inheritance diagram for BattlegroundIC:
Collaboration diagram for BattlegroundIC:

Public Member Functions

void AddPlayer (Player *player) OVERRIDE
 BattlegroundIC ()
void DestroyGate (Player *player, GameObject *go) OVERRIDE
void DoAction (uint32 action, uint64 var) OVERRIDE
void EndBattleground (uint32 winner)
void EventPlayerClickedOnFlag (Player *source, GameObject *) OVERRIDE
void EventPlayerDamagedGO (Player *, GameObject *go, uint32 eventType) OVERRIDE
void FillInitialWorldStates (WorldStateBuilder &builder) OVERRIDE
WorldSafeLocsEntry const * GetClosestGraveYard (Player *player) OVERRIDE
uint32 GetNodeState (uint8 nodeType) const
void HandleAreaTrigger (Player *player, uint32 trigger) OVERRIDE
void HandleKillPlayer (Player *player, Player *killer) OVERRIDE
void HandleKillUnit (Creature *unit, Player *killer) OVERRIDE
void HandlePlayerResurrect (Player *player) OVERRIDE
bool IsAllNodesControlledByTeam (uint32 team) const OVERRIDE
bool IsSpellAllowed (uint32 spellId, Player const *player) const OVERRIDE
void PostUpdateImpl (uint32 diff) OVERRIDE
 Post-update hook.
void RemovePlayer (Player *player, uint64 guid, uint32 team) OVERRIDE
bool SetupBattleground () OVERRIDE
void SpawnLeader (uint32 teamid)
void StartingEventCloseDoors () OVERRIDE
void StartingEventOpenDoors () OVERRIDE
void UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true) OVERRIDE
 ~BattlegroundIC ()
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)
void DoorClose (uint32 type)
void DoorOpen (uint32 type)
void EndBattleground (uint32 winner)
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
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 bool HandlePlayerUnderMap (Player *)
virtual void HandleQuestComplete (uint32, Player *)
void HandleTriggerBuff (uint64 go_guid)
bool HasFreeSlots () const
void IncreaseInvitedCount (uint32 team)
bool isArena () const
bool isBattleground () const
bool IsPlayerInBattleground (uint64 guid) const
bool IsRandom () const
bool isRated () 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 Reset ()
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 ()

Private Member Functions

uint32 GetGateIDFromEntry (uint32 id)
uint32 GetNextBanner (ICNodePoint *nodePoint, uint32 team, bool returnDefinitve)
uint32 GetWorldStateFromGateEntry (uint32 id, bool open)
void HandleCapturedNodes (ICNodePoint *nodePoint, bool recapture)
void HandleContestedNodes (ICNodePoint *nodePoint)
void UpdateNodeWorldState (ICNodePoint *nodePoint)

Private Attributes

uint32 closeFortressDoorsTimer
uint32 docksTimer
bool doorsClosed
uint16 factionReinforcements [2]
BG_IC_GateState GateStatus [6]
TransportgunshipAlliance
TransportgunshipHorde
ICNodePoint nodePoint [7]
uint32 resourceTimer
uint32 siegeEngineWorkshopTimer

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

Definition at line 845 of file BattlegroundIC.h.

Constructor & Destructor Documentation

◆ BattlegroundIC()

◆ ~BattlegroundIC()

BattlegroundIC::~BattlegroundIC ( )

Definition at line 47 of file BattlegroundIC.cpp.

Member Function Documentation

◆ AddPlayer()

◆ DestroyGate()

◆ DoAction()

◆ EndBattleground()

◆ EventPlayerClickedOnFlag()

◆ EventPlayerDamagedGO()

void BattlegroundIC::EventPlayerDamagedGO ( Player * ,
GameObject * go,
uint32 eventType )
virtual

Reimplemented from Battleground.

Definition at line 835 of file BattlegroundIC.cpp.

◆ FillInitialWorldStates()

◆ GetClosestGraveYard()

◆ GetGateIDFromEntry()

◆ GetNextBanner()

uint32 BattlegroundIC::GetNextBanner ( ICNodePoint * nodePoint,
uint32 team,
bool returnDefinitve )
private

◆ GetNodeState()

uint32 BattlegroundIC::GetNodeState ( uint8 nodeType) const
inline

Definition at line 880 of file BattlegroundIC.h.

References GetNodeState(), and nodePoint.

Referenced by GetNodeState(), and IsSpellAllowed().

◆ GetWorldStateFromGateEntry()

◆ HandleAreaTrigger()

void BattlegroundIC::HandleAreaTrigger ( Player * player,
uint32 trigger )
virtual

◆ HandleCapturedNodes()

void BattlegroundIC::HandleCapturedNodes ( ICNodePoint * nodePoint,
bool recapture )
private

Definition at line 596 of file BattlegroundIC.cpp.

References Battleground::AddCreature(), Battleground::AddObject(), Battleground::AddSpiritGuide(), ALLIANCE, BG_IC_DocksVehiclesCatapults, BG_IC_DocksVehiclesGlaives, BG_IC_Factions, BG_IC_GO_DOCKS_BANNER, BG_IC_GO_HANGAR_BANNER, BG_IC_GO_HANGAR_TELEPORTER_1, BG_IC_GO_QUARRY_BANNER, BG_IC_GO_REFINERY_BANNER, BG_IC_GO_SEAFORIUM_BOMBS_1, BG_IC_GO_WORKSHOP_BANNER, BG_IC_HangarTeleporters, BG_IC_NPC_CATAPULT_1_A, BG_IC_NPC_CATAPULT_1_H, BG_IC_NPC_CATAPULT_4_A, BG_IC_NPC_CATAPULT_4_H, BG_IC_NPC_DEMOLISHER_1_A, BG_IC_NPC_DEMOLISHER_1_H, BG_IC_NPC_DEMOLISHER_4_A, BG_IC_NPC_DEMOLISHER_4_H, BG_IC_NPC_GLAIVE_THROWER_1_A, BG_IC_NPC_GLAIVE_THROWER_1_H, BG_IC_NPC_GLAIVE_THROWER_2_A, BG_IC_NPC_GLAIVE_THROWER_2_H, BG_IC_NPC_SIEGE_ENGINE_A, BG_IC_NPC_SIEGE_ENGINE_H, BG_IC_NPC_SPIRIT_GUIDE_1, BG_IC_SpiritGuidePos, BG_IC_WorkshopVehicles, Battleground::CastSpellOnTeam(), Battleground::DelCreature(), DOCKS_UPDATE_TIME, docksTimer, GAMEOBJECT_FIELD_FACTION_TEMPLATE, Battleground::GetBGCreature(), Battleground::GetBGObject(), GO_ALLIANCE_GUNSHIP_PORTAL, GO_HORDE_GUNSHIP_PORTAL, GO_SEAFORIUM_BOMBS, gunshipAlliance, gunshipHorde, HORDE, MAX_CATAPULTS_SPAWNS_PER_FACTION, MAX_DEMOLISHERS_SPAWNS_PER_FACTION, MAX_GLAIVE_THROWERS_SPAWNS_PER_FACTION, MAX_HANGAR_TELEPORTERS_SPAWNS, MAX_WORKSHOP_BOMBS_SPAWNS_PER_FACTION, NODE_TYPE_QUARRY, NODE_TYPE_REFINERY, nodePoint, NPC_CATAPULT, NPC_DEMOLISHER, NPC_GLAIVE_THROWER_A, NPC_GLAIVE_THROWER_H, NPC_SIEGE_ENGINE_A, NPC_SIEGE_ENGINE_H, Battleground::RemoveAuraOnTeam(), RESPAWN_ONE_DAY, Unit::setFaction(), SF_LOG_ERROR, siegeEngineWorkshopTimer, SPELL_OIL_REFINERY, SPELL_QUARRY, TEAM_ALLIANCE, UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC, UNIT_FLAG_NOT_SELECTABLE, UNIT_FLAG_UNK_14, WORKSHOP_UPDATE_TIME, and workshopBombs.

Referenced by EventPlayerClickedOnFlag(), and PostUpdateImpl().

◆ HandleContestedNodes()

void BattlegroundIC::HandleContestedNodes ( ICNodePoint * nodePoint)
private

◆ HandleKillPlayer()

◆ HandleKillUnit()

◆ HandlePlayerResurrect()

void BattlegroundIC::HandlePlayerResurrect ( Player * player)
virtual

◆ IsAllNodesControlledByTeam()

bool BattlegroundIC::IsAllNodesControlledByTeam ( uint32 team) const
virtual

Reimplemented from Battleground.

Definition at line 876 of file BattlegroundIC.cpp.

References ALLIANCE, NODE_STATE_CONTROLLED_A, NODE_STATE_CONTROLLED_H, NODE_TYPE_WORKSHOP, and nodePoint.

◆ IsSpellAllowed()

bool BattlegroundIC::IsSpellAllowed ( uint32 spellId,
Player const * player ) const
virtual

◆ PostUpdateImpl()

void BattlegroundIC::PostUpdateImpl ( uint32 diff)
virtual

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 88 of file BattlegroundIC.cpp.

References Battleground::AddObject(), ALLIANCE, BANNER_STATE_CHANGE_TIME, BG_IC_ALLIANCE_RENFORT, BG_IC_Factions, BG_IC_GO_ALLIANCE_GATE_3, BG_IC_GO_DOODAD_ND_HUMAN_GATE_CLOSEDFX_DOOR01, BG_IC_GO_DOODAD_ND_WINTERORC_WALL_GATEFX_DOOR01, BG_IC_GO_HORDE_GATE_1, BG_IC_HORDE_RENFORT, BG_IC_NPC_CATAPULT_1_A, BG_IC_NPC_CATAPULT_1_H, BG_IC_NPC_CATAPULT_4_A, BG_IC_NPC_CATAPULT_4_H, BG_IC_NPC_DEMOLISHER_1_A, BG_IC_NPC_DEMOLISHER_1_H, BG_IC_NPC_DEMOLISHER_4_A, BG_IC_NPC_DEMOLISHER_4_H, BG_IC_NPC_GLAIVE_THROWER_1_A, BG_IC_NPC_GLAIVE_THROWER_1_H, BG_IC_NPC_GLAIVE_THROWER_2_A, BG_IC_NPC_GLAIVE_THROWER_2_H, BG_IC_NPC_SIEGE_ENGINE_A, BG_IC_NPC_SIEGE_ENGINE_H, CHAT_MSG_BG_SYSTEM_NEUTRAL, closeFortressDoorsTimer, Battleground::DelObject(), DOCKS_UPDATE_TIME, docksTimer, doorsClosed, factionReinforcements, GAMEOBJECT_FIELD_FACTION_TEMPLATE, GAMEOBJECT_FIELD_FLAGS, Battleground::GetBGCreature(), Battleground::GetBGObject(), GetNextBanner(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Battleground::GetStatus(), GO_FLAG_DAMAGED, HandleCapturedNodes(), HORDE, IC_RESOURCE_TIME, LANG_BG_IC_ALLIANCE, LANG_BG_IC_HORDE, LANG_BG_IC_TEAM_HAS_TAKEN_NODE, MAX_NODE_TYPES, NODE_STATE_CONTROLLED_A, NODE_STATE_CONTROLLED_H, NODE_TYPE_DOCKS, NODE_TYPE_REFINERY, NODE_TYPE_WORKSHOP, nodePoint, GameObject::RemoveFromWorld(), RESOURCE_HONOR_AMOUNT, resourceTimer, RESPAWN_ONE_DAY, Battleground::RewardHonorToTeam(), Battleground::SendMessage2ToAll(), Object::SetFlag(), Object::SetUInt32Value(), siegeEngineWorkshopTimer, STATUS_IN_PROGRESS, TEAM_ALLIANCE, UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC, UNIT_FLAG_NOT_SELECTABLE, UNIT_FLAG_UNK_14, UpdateNodeWorldState(), Battleground::UpdateWorldState(), and WORKSHOP_UPDATE_TIME.

◆ RemovePlayer()

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

Reimplemented from Battleground.

Definition at line 277 of file BattlegroundIC.cpp.

References Unit::RemoveAura(), SPELL_OIL_REFINERY, and SPELL_QUARRY.

◆ SetupBattleground()

◆ SpawnLeader()

void BattlegroundIC::SpawnLeader ( uint32 teamid)

◆ StartingEventCloseDoors()

void BattlegroundIC::StartingEventCloseDoors ( )
virtual

◆ StartingEventOpenDoors()

◆ UpdateNodeWorldState()

◆ UpdatePlayerScore()

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

Member Data Documentation

◆ closeFortressDoorsTimer

uint32 BattlegroundIC::closeFortressDoorsTimer
private

Definition at line 886 of file BattlegroundIC.h.

Referenced by BattlegroundIC(), and PostUpdateImpl().

◆ docksTimer

uint32 BattlegroundIC::docksTimer
private

Definition at line 888 of file BattlegroundIC.h.

Referenced by BattlegroundIC(), HandleCapturedNodes(), and PostUpdateImpl().

◆ doorsClosed

bool BattlegroundIC::doorsClosed
private

Definition at line 887 of file BattlegroundIC.h.

Referenced by BattlegroundIC(), and PostUpdateImpl().

◆ factionReinforcements

uint16 BattlegroundIC::factionReinforcements[2]
private

◆ GateStatus

BG_IC_GateState BattlegroundIC::GateStatus[6]
private

◆ gunshipAlliance

Transport* BattlegroundIC::gunshipAlliance
private

◆ gunshipHorde

Transport* BattlegroundIC::gunshipHorde
private

◆ nodePoint

◆ resourceTimer

uint32 BattlegroundIC::resourceTimer
private

Definition at line 889 of file BattlegroundIC.h.

Referenced by BattlegroundIC(), and PostUpdateImpl().

◆ siegeEngineWorkshopTimer

uint32 BattlegroundIC::siegeEngineWorkshopTimer
private

Definition at line 890 of file BattlegroundIC.h.

Referenced by BattlegroundIC(), HandleCapturedNodes(), and PostUpdateImpl().


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