AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
BattlegroundMap Class Reference

#include "Map.h"

Inheritance diagram for BattlegroundMap:
Map GridRefMgr< NGridType > RefMgr< TO, FROM > LinkedListHead

Public Member Functions

 BattlegroundMap (uint32 id, uint32 InstanceId, Map *_parent, uint8 spawnMode)
 
 ~BattlegroundMap () override
 
bool AddPlayerToMap (Player *) override
 
void RemovePlayerFromMap (Player *, bool) override
 
EnterState CannotEnter (Player *player, bool loginCheck=false) override
 
void SetUnload ()
 
void RemoveAllPlayers () override
 
void InitVisibilityDistance () override
 
BattlegroundGetBG ()
 
void SetBG (Battleground *bg)
 
- Public Member Functions inherited from Map
 Map (uint32 id, uint32 InstanceId, uint8 SpawnMode, Map *_parent=nullptr)
 
 ~Map () override
 
MapEntry const * GetEntry () const
 
bool CanUnload (uint32 diff)
 
virtual bool AddPlayerToMap (Player *)
 
virtual void RemovePlayerFromMap (Player *, bool)
 
virtual void AfterPlayerUnlinkFromMap ()
 
template<class T >
bool AddToMap (T *, bool checkTransport=false)
 
template<class T >
void RemoveFromMap (T *, bool)
 
void VisitNearbyCellsOf (WorldObject *obj, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &gridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &worldVisitor, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &largeGridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &largeWorldVisitor)
 
void VisitNearbyCellsOfPlayer (Player *player, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &gridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &worldVisitor, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &largeGridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &largeWorldVisitor)
 
virtual void Update (const uint32, const uint32, bool thread=true)
 
float GetVisibilityRange () const
 
void SetVisibilityRange (float range)
 
virtual void InitVisibilityDistance ()
 
void PlayerRelocation (Player *, float x, float y, float z, float o)
 
void CreatureRelocation (Creature *creature, float x, float y, float z, float o)
 
void GameObjectRelocation (GameObject *go, float x, float y, float z, float o)
 
void DynamicObjectRelocation (DynamicObject *go, float x, float y, float z, float o)
 
template<class T , class CONTAINER >
void Visit (const Cell &cell, TypeContainerVisitor< T, CONTAINER > &visitor)
 
bool IsRemovalGrid (float x, float y) const
 
bool IsGridLoaded (float x, float y) const
 
void LoadGrid (float x, float y)
 
void LoadAllCells ()
 
bool UnloadGrid (NGridType &ngrid)
 
virtual void UnloadAll ()
 
uint32 GetId () const
 
Map const * GetParent () const
 
std::shared_mutex & GetMMapLock () const
 
void HandleDelayedVisibility ()
 
float GetHeight (float x, float y, float z, bool checkVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
 
float GetGridHeight (float x, float y) const
 
float GetMinHeight (float x, float y) const
 
TransportGetTransportForPos (uint32 phase, float x, float y, float z, WorldObject *worldobject=nullptr)
 
void GetFullTerrainStatusForPosition (uint32 phaseMask, float x, float y, float z, float collisionHeight, PositionFullTerrainStatus &data, uint8 reqLiquidType=MAP_ALL_LIQUIDS)
 
LiquidData const GetLiquidData (uint32 phaseMask, float x, float y, float z, float collisionHeight, uint8 ReqLiquidType)
 
bool GetAreaInfo (uint32 phaseMask, float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId) const
 
uint32 GetAreaId (uint32 phaseMask, float x, float y, float z) const
 
uint32 GetZoneId (uint32 phaseMask, float x, float y, float z) const
 
void GetZoneAndAreaId (uint32 phaseMask, uint32 &zoneid, uint32 &areaid, float x, float y, float z) const
 
float GetWaterLevel (float x, float y) const
 
bool IsInWater (uint32 phaseMask, float x, float y, float z, float collisionHeight) const
 
bool IsUnderWater (uint32 phaseMask, float x, float y, float z, float collisionHeight) const
 
bool HasEnoughWater (WorldObject const *searcher, float x, float y, float z) const
 
bool HasEnoughWater (WorldObject const *searcher, LiquidData const &liquidData) const
 
void MoveAllCreaturesInMoveList ()
 
void MoveAllGameObjectsInMoveList ()
 
void MoveAllDynamicObjectsInMoveList ()
 
void RemoveAllObjectsInRemoveList ()
 
virtual void RemoveAllPlayers ()
 
uint32 GetInstanceId () const
 
uint8 GetSpawnMode () const
 
virtual EnterState CannotEnter (Player *, bool)
 
const char * GetMapName () const
 
Difficulty GetDifficulty () const
 
bool IsRegularDifficulty () const
 
MapDifficulty const * GetMapDifficulty () const
 
bool Instanceable () const
 
bool IsDungeon () const
 
bool IsNonRaidDungeon () const
 
bool IsRaid () const
 
bool IsRaidOrHeroicDungeon () const
 
bool IsHeroic () const
 
bool Is25ManRaid () const
 
bool IsBattleground () const
 
bool IsBattleArena () const
 
bool IsBattlegroundOrArena () const
 
bool GetEntrancePos (int32 &mapid, float &x, float &y)
 
void AddObjectToRemoveList (WorldObject *obj)
 
void AddObjectToSwitchList (WorldObject *obj, bool on)
 
virtual void DelayedUpdate (const uint32 diff)
 
void resetMarkedCells ()
 
bool isCellMarked (uint32 pCellId)
 
void markCell (uint32 pCellId)
 
void resetMarkedCellsLarge ()
 
bool isCellMarkedLarge (uint32 pCellId)
 
void markCellLarge (uint32 pCellId)
 
bool HavePlayers () const
 
uint32 GetPlayersCountExceptGMs () const
 
void AddWorldObject (WorldObject *obj)
 
void RemoveWorldObject (WorldObject *obj)
 
void SendToPlayers (WorldPacket const *data) const
 
PlayerList const & GetPlayers () const
 
void ScriptsStart (std::map< uint32, std::multimap< uint32, ScriptInfo > > const &scripts, uint32 id, Object *source, Object *target)
 Put scripts in the execution queue.
 
void ScriptCommandStart (ScriptInfo const &script, uint32 delay, Object *source, Object *target)
 
template<class T >
void AddToActive (T *obj)
 
template<class T >
void RemoveFromActive (T *obj)
 
template<class T >
void SwitchGridContainers (T *obj, bool on)
 
void UpdateIteratorBack (Player *player)
 
TempSummonSummonCreature (uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, bool visibleBySummonerOnly=false)
 
GameObjectSummonGameObject (uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true)
 
GameObjectSummonGameObject (uint32 entry, Position const &pos, float rotation0=0.0f, float rotation1=0.0f, float rotation2=0.0f, float rotation3=0.0f, uint32 respawnTime=100, bool checkTransport=true)
 
void SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=nullptr)
 
CorpseGetCorpse (ObjectGuid const guid)
 
CreatureGetCreature (ObjectGuid const guid)
 
GameObjectGetGameObject (ObjectGuid const guid)
 
TransportGetTransport (ObjectGuid const guid)
 
DynamicObjectGetDynamicObject (ObjectGuid const guid)
 
PetGetPet (ObjectGuid const guid)
 
MapStoredObjectTypesContainerGetObjectsStore ()
 
CreatureBySpawnIdContainerGetCreatureBySpawnIdStore ()
 
GameObjectBySpawnIdContainerGetGameObjectBySpawnIdStore ()
 
std::unordered_set< Corpse * > const * GetCorpsesInCell (uint32 cellId) const
 
CorpseGetCorpseByPlayer (ObjectGuid const &ownerGuid) const
 
MapInstancedToMapInstanced ()
 
MapInstanced const * ToMapInstanced () const
 
InstanceMapToInstanceMap ()
 
InstanceMap const * ToInstanceMap () const
 
BattlegroundMapToBattlegroundMap ()
 
BattlegroundMap const * ToBattlegroundMap () const
 
float GetWaterOrGroundLevel (uint32 phasemask, float x, float y, float z, float *ground=nullptr, bool swim=false, float collisionHeight=DEFAULT_COLLISION_HEIGHT) const
 
float GetHeight (uint32 phasemask, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
 
bool isInLineOfSight (float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const
 
bool CanReachPositionAndGetValidCoords (WorldObject const *source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision=true, bool failOnSlopes=true) const
 Check if a given source can reach a specific point following a path and normalize the coords. Use this method for long paths, otherwise use the overloaded method with the start coords when you need to do a quick check on small segments.
 
bool CanReachPositionAndGetValidCoords (WorldObject const *source, float &destX, float &destY, float &destZ, bool failOnCollision=true, bool failOnSlopes=true) const
 validate the new destination and set reachable coords Check if a given unit can reach a specific point on a segment and set the correct dest coords NOTE: use this method with small segments.
 
bool CanReachPositionAndGetValidCoords (WorldObject const *source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision=true, bool failOnSlopes=true) const
 
bool CheckCollisionAndGetValidCoords (WorldObject const *source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision=true) const
 validate the new destination and set coords Check if a given unit can face collisions in a specific segment
 
void Balance ()
 
void RemoveGameObjectModel (const GameObjectModel &model)
 
void InsertGameObjectModel (const GameObjectModel &model)
 
bool ContainsGameObjectModel (const GameObjectModel &model) const
 
DynamicMapTree const & GetDynamicMapTree () const
 
bool GetObjectHitPos (uint32 phasemask, float x1, float y1, float z1, float x2, float y2, float z2, float &rx, float &ry, float &rz, float modifyDist)
 
float GetGameObjectFloor (uint32 phasemask, float x, float y, float z, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
 
time_t GetLinkedRespawnTime (ObjectGuid guid) const
 
time_t GetCreatureRespawnTime (ObjectGuid::LowType dbGuid) const
 
time_t GetGORespawnTime (ObjectGuid::LowType dbGuid) const
 
void SaveCreatureRespawnTime (ObjectGuid::LowType dbGuid, time_t &respawnTime)
 
void RemoveCreatureRespawnTime (ObjectGuid::LowType dbGuid)
 
void SaveGORespawnTime (ObjectGuid::LowType dbGuid, time_t &respawnTime)
 
void RemoveGORespawnTime (ObjectGuid::LowType dbGuid)
 
void LoadRespawnTimes ()
 
void DeleteRespawnTimes ()
 
time_t GetInstanceResetPeriod () const
 
void ScheduleCreatureRespawn (ObjectGuid, Milliseconds)
 
void LoadCorpseData ()
 
void DeleteCorpseData ()
 
void AddCorpse (Corpse *corpse)
 
void RemoveCorpse (Corpse *corpse)
 
CorpseConvertCorpseToBones (ObjectGuid const ownerGuid, bool insignia=false)
 
void RemoveOldCorpses ()
 
void SendInitTransports (Player *player)
 
void SendRemoveTransports (Player *player)
 
void SendZoneDynamicInfo (Player *player)
 
void SendInitSelf (Player *player)
 
void PlayDirectSoundToMap (uint32 soundId, uint32 zoneId=0)
 
void SetZoneMusic (uint32 zoneId, uint32 musicId)
 
void SetZoneWeather (uint32 zoneId, WeatherState weatherId, float weatherGrade)
 
void SetZoneOverrideLight (uint32 zoneId, uint32 lightId, Milliseconds fadeInTime)
 
void UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source)
 
void LogEncounterFinished (EncounterCreditType type, uint32 creditEntry)
 
void DoForAllPlayers (std::function< void(Player *)> exec)
 
GridMapGetGrid (float x, float y)
 
void EnsureGridCreated (const GridCoord &)
 
bool AllTransportsEmpty () const
 
void AllTransportsRemovePassengers ()
 
TransportsContainer const & GetAllTransports () const
 
template<HighGuid high>
ObjectGuid::LowType GenerateLowGuid ()
 
void AddUpdateObject (Object *obj)
 
void RemoveUpdateObject (Object *obj)
 
size_t GetActiveNonPlayersCount () const
 
virtual std::string GetDebugInfo () const
 
template<>
void AddToGrid (Creature *obj, Cell const &cell)
 
template<>
void AddToGrid (GameObject *obj, Cell const &cell)
 
template<>
void AddToGrid (DynamicObject *obj, Cell const &cell)
 
template<>
void AddToGrid (Corpse *obj, Cell const &cell)
 
template<>
void SwitchGridContainers (Creature *obj, bool on)
 
template<>
void SwitchGridContainers (GameObject *obj, bool on)
 
template<>
void DeleteFromWorld (Player *player)
 
template<>
void InitializeObject (Creature *)
 
template<>
void InitializeObject (GameObject *)
 
template<>
bool AddToMap (MotionTransport *obj, bool)
 
template<>
void RemoveFromMap (MotionTransport *obj, bool remove)
 
template<>
void AddToActive (Creature *c)
 
template<>
void AddToActive (DynamicObject *d)
 
template<>
void AddToActive (GameObject *d)
 
template<>
void RemoveFromActive (Creature *c)
 
template<>
void RemoveFromActive (DynamicObject *obj)
 
template<>
void RemoveFromActive (GameObject *obj)
 
- Public Member Functions inherited from GridRefMgr< NGridType >
GridReference< NGridType > * getFirst ()
 
GridReference< NGridType > * getLast ()
 
iterator begin ()
 
iterator end ()
 
iterator rbegin ()
 
iterator rend ()
 
- Public Member Functions inherited from RefMgr< TO, FROM >
 RefMgr ()=default
 
virtual ~RefMgr ()
 
Reference< TO, FROM > * getFirst ()
 
Reference< TO, FROM > const * getFirst () const
 
Reference< TO, FROM > * getLast ()
 
Reference< TO, FROM > const * getLast () const
 
iterator begin ()
 
iterator end ()
 
iterator rbegin ()
 
iterator rend ()
 
void clearReferences ()
 
- Public Member Functions inherited from LinkedListHead
 LinkedListHead ()
 
bool IsEmpty () const
 
LinkedListElementgetFirst ()
 
LinkedListElement const * getFirst () const
 
LinkedListElementgetLast ()
 
LinkedListElement const * getLast () const
 
void insertFirst (LinkedListElement *pElem)
 
void insertLast (LinkedListElement *pElem)
 
uint32 getSize () const
 
void incSize ()
 
void decSize ()
 

Private Attributes

Battlegroundm_bg
 

Additional Inherited Members

- Public Types inherited from Map
enum  EnterState {
  CAN_ENTER = 0 ,
  CANNOT_ENTER_ALREADY_IN_MAP = 1 ,
  CANNOT_ENTER_NO_ENTRY ,
  CANNOT_ENTER_UNINSTANCED_DUNGEON ,
  CANNOT_ENTER_DIFFICULTY_UNAVAILABLE ,
  CANNOT_ENTER_NOT_IN_RAID ,
  CANNOT_ENTER_CORPSE_IN_DIFFERENT_INSTANCE ,
  CANNOT_ENTER_INSTANCE_BIND_MISMATCH ,
  CANNOT_ENTER_TOO_MANY_INSTANCES ,
  CANNOT_ENTER_MAX_PLAYERS ,
  CANNOT_ENTER_ZONE_IN_COMBAT ,
  CANNOT_ENTER_UNSPECIFIED_REASON
}
 
typedef MapRefMgr PlayerList
 
typedef std::unordered_multimap< ObjectGuid::LowType, Creature * > CreatureBySpawnIdContainer
 
typedef std::unordered_multimap< ObjectGuid::LowType, GameObject * > GameObjectBySpawnIdContainer
 
- Public Types inherited from GridRefMgr< NGridType >
typedef LinkedListHead::Iterator< GridReference< NGridType > > iterator
 
- Public Types inherited from RefMgr< TO, FROM >
typedef LinkedListHead::Iterator< Reference< TO, FROM > > iterator
 
- Public Types inherited from LinkedListHead
typedef Iterator< LinkedListElementiterator
 
- Static Public Member Functions inherited from Map
static bool ExistMap (uint32 mapid, int gx, int gy)
 
static bool ExistVMap (uint32 mapid, int gx, int gy)
 
static void DeleteRespawnTimesInDB (uint16 mapId, uint32 instanceId)
 
- Public Attributes inherited from Map
std::unordered_set< Unit * > i_objectsForDelayedVisibility
 
CreatureGroupHolderType CreatureGroupHolder
 
TaskScheduler _creatureRespawnScheduler
 
DataMap CustomData
 
- Protected Types inherited from Map
typedef std::set< WorldObject * > ActiveNonPlayers
 
- Protected Attributes inherited from Map
std::mutex Lock
 
std::mutex GridLock
 
std::shared_mutex MMapLock
 
MapEntry const * i_mapEntry
 
uint8 i_spawnMode
 
uint32 i_InstanceId
 
uint32 m_unloadTimer
 
float m_VisibleDistance
 
DynamicMapTree _dynamicTree
 
time_t _instanceResetPeriod
 
MapRefMgr m_mapRefMgr
 
MapRefMgr::iterator m_mapRefIter
 
ActiveNonPlayers m_activeNonPlayers
 
ActiveNonPlayers::iterator m_activeNonPlayersIter
 
TransportsContainer _transports
 
TransportsContainer::iterator _transportsUpdateIter
 

Detailed Description

Constructor & Destructor Documentation

◆ BattlegroundMap()

BattlegroundMap::BattlegroundMap ( uint32  id,
uint32  InstanceId,
Map _parent,
uint8  spawnMode 
)
3225 : Map(id, InstanceId, spawnMode, _parent), m_bg(nullptr)
3226{
3227 //lets initialize visibility distance for BG/Arenas
3229}
Definition: Map.h:313
Battleground * m_bg
Definition: Map.h:868
void InitVisibilityDistance() override
Definition: Map.cpp:3241

References InitVisibilityDistance().

◆ ~BattlegroundMap()

BattlegroundMap::~BattlegroundMap ( )
override
3232{
3233 if (m_bg)
3234 {
3235 //unlink to prevent crash, always unlink all pointer reference before destruction
3236 m_bg->SetBgMap(nullptr);
3237 m_bg = nullptr;
3238 }
3239}
void SetBgMap(BattlegroundMap *map)
Definition: Battleground.h:431

References m_bg, and Battleground::SetBgMap().

Member Function Documentation

◆ AddPlayerToMap()

bool BattlegroundMap::AddPlayerToMap ( Player player)
overridevirtual

Reimplemented from Map.

3268{
3269 player->m_InstanceValid = true;
3270 if (IsBattleArena())
3271 player->CastSpell(player, 100102, true);
3272 return Map::AddPlayerToMap(player);
3273}
bool m_InstanceValid
Definition: Player.h:2399
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169
virtual bool AddPlayerToMap(Player *)
Definition: Map.cpp:504
bool IsBattleArena() const
Definition: Map.h:455

References Map::AddPlayerToMap(), Unit::CastSpell(), Map::IsBattleArena(), and Player::m_InstanceValid.

◆ CannotEnter()

Map::EnterState BattlegroundMap::CannotEnter ( Player player,
bool  loginCheck = false 
)
overridevirtual

Reimplemented from Map.

3251{
3252 if (!loginCheck && player->GetMapRef().getTarget() == this)
3253 {
3254 LOG_ERROR("maps", "BGMap::CanEnter - player {} is already in map!", player->GetGUID().ToString());
3255 ABORT();
3257 }
3258
3259 if (player->GetBattlegroundId() != GetInstanceId())
3261
3262 // pussywizard: no need to check player limit here, invitations are limited by Battleground::GetFreeSlotsForTeam
3263
3264 return Map::CannotEnter(player, loginCheck);
3265}
#define ABORT
Definition: Errors.h:76
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
TO * getTarget() const
Definition: Reference.h:95
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
std::string ToString() const
Definition: ObjectGuid.cpp:47
MapReference & GetMapRef()
Definition: Player.h:2454
uint32 GetBattlegroundId() const
Definition: Player.h:2216
virtual EnterState CannotEnter(Player *, bool)
Definition: Map.h:438
uint32 GetInstanceId() const
Definition: Map.h:419
@ CANNOT_ENTER_ALREADY_IN_MAP
Definition: Map.h:425
@ CANNOT_ENTER_INSTANCE_BIND_MISMATCH
Definition: Map.h:431

References ABORT, Map::CANNOT_ENTER_ALREADY_IN_MAP, Map::CANNOT_ENTER_INSTANCE_BIND_MISMATCH, Map::CannotEnter(), Player::GetBattlegroundId(), Object::GetGUID(), Map::GetInstanceId(), Player::GetMapRef(), Reference< TO, FROM >::getTarget(), LOG_ERROR, and ObjectGuid::ToString().

◆ GetBG()

◆ InitVisibilityDistance()

void BattlegroundMap::InitVisibilityDistance ( )
overridevirtual

Reimplemented from Map.

3242{
3243 //init visibility distance for BG/Arenas
3245
3246 if (IsBattleArena()) // pussywizard: start with 30yd visibility range on arenas to ensure players can't get informations about the opponents in any way
3247 m_VisibleDistance = 30.0f;
3248}
float m_VisibleDistance
Definition: Map.h:711
static float GetMaxVisibleDistanceInBGArenas()
Definition: World.h:323

References World::GetMaxVisibleDistanceInBGArenas(), Map::IsBattleArena(), and Map::m_VisibleDistance.

Referenced by BattlegroundMap().

◆ RemoveAllPlayers()

void BattlegroundMap::RemoveAllPlayers ( )
overridevirtual

Reimplemented from Map.

3294{
3295 if (HavePlayers())
3296 for (MapRefMgr::iterator itr = m_mapRefMgr.begin(); itr != m_mapRefMgr.end(); ++itr)
3297 if (Player* player = itr->GetSource())
3298 if (!player->IsBeingTeleportedFar())
3299 player->TeleportTo(player->GetEntryPoint());
3300}
Definition: Player.h:1056
MapRefMgr m_mapRefMgr
Definition: Map.h:715
bool HavePlayers() const
Definition: Map.h:476
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

References MapRefMgr::begin(), MapRefMgr::end(), Map::HavePlayers(), and Map::m_mapRefMgr.

◆ RemovePlayerFromMap()

void BattlegroundMap::RemovePlayerFromMap ( Player player,
bool  remove 
)
overridevirtual

Reimplemented from Map.

3276{
3277 if (Battleground* bg = GetBG())
3278 {
3279 bg->RemovePlayerAtLeave(player);
3280 if (IsBattleArena())
3281 bg->RemoveSpectator(player);
3282 }
3283 if (IsBattleArena())
3284 player->RemoveAura(100102);
3285 Map::RemovePlayerFromMap(player, remove);
3286}
Definition: Battleground.h:298
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4722
virtual void RemovePlayerFromMap(Player *, bool)
Definition: Map.cpp:914
Battleground * GetBG()
Definition: Map.h:865

References GetBG(), Map::IsBattleArena(), Unit::RemoveAura(), and Map::RemovePlayerFromMap().

◆ SetBG()

void BattlegroundMap::SetBG ( Battleground bg)
inline
866{ m_bg = bg; }

References m_bg.

Referenced by MapInstanced::CreateBattleground(), and Battleground::~Battleground().

◆ SetUnload()

void BattlegroundMap::SetUnload ( )
3289{
3291}
#define MIN_UNLOAD_DELAY
Definition: Map.h:168
uint32 m_unloadTimer
Definition: Map.h:710

References Map::m_unloadTimer, and MIN_UNLOAD_DELAY.

Referenced by Battleground::~Battleground().

Member Data Documentation

◆ m_bg

Battleground* BattlegroundMap::m_bg
private

Referenced by GetBG(), SetBG(), and ~BattlegroundMap().