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

#include "Map.h"

Inheritance diagram for BattlegroundMap:
Map GridRefMgr< MapGridType > 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 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)
 
void OnCreateMap ()
 
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 IsGridLoaded (GridCoord const &gridCoord) const
 
bool IsGridLoaded (float x, float y) const
 
bool IsGridCreated (GridCoord const &gridCoord) const
 
bool IsGridCreated (float x, float y) const
 
void LoadGrid (float x, float y)
 
void LoadAllGrids ()
 
void LoadGridsInRange (Position const &center, float radius)
 
bool UnloadGrid (MapGridType &grid)
 
virtual void UnloadAll ()
 
std::shared_ptr< GridTerrainDataGetGridTerrainDataSharedPtr (GridCoord const &gridCoord)
 
GridTerrainDataGetGridTerrainData (GridCoord const &gridCoord)
 
GridTerrainDataGetGridTerrainData (float x, float y)
 
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 ()
 
uint32 GetInstanceId () const
 
uint8 GetSpawnMode () const
 
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 IsWorldMap () 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 UpdatePlayerZoneStats (uint32 oldZone, uint32 newZone)
 
uint32 ApplyDynamicModeRespawnScaling (WorldObject const *obj, uint32 respawnDelay) const
 
void ScheduleCreatureRespawn (ObjectGuid, Milliseconds, Position pos=Position())
 
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)
 
void EnsureGridCreated (GridCoord 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)
 
std::size_t GetActiveNonPlayersCount () const
 
virtual std::string GetDebugInfo () const
 
uint32 GetCreatedGridsCount ()
 
uint32 GetLoadedGridsCount ()
 
uint32 GetCreatedCellsInGridCount (uint16 const x, uint16 const y)
 
uint32 GetCreatedCellsInMapCount ()
 
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< MapGridType >
GridReference< MapGridType > * getFirst ()
 
GridReference< MapGridType > * 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< MapGridType >
typedef LinkedListHead::Iterator< GridReference< MapGridType > > 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 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 Member Functions inherited from Map
template<class T >
void AddToGrid (T *object, Cell const &cell)
 
- Protected Attributes inherited from Map
std::mutex Lock
 
std::shared_mutex MMapLock
 
MapGridManager _mapGridManager
 
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 
)
2416 : Map(id, InstanceId, spawnMode, _parent), m_bg(nullptr)
2417{
2418 //lets initialize visibility distance for BG/Arenas
2420}
Battleground * m_bg
Definition Map.h:702
void InitVisibilityDistance() override
Definition Map.cpp:2432
Definition Map.h:156

References InitVisibilityDistance().

◆ ~BattlegroundMap()

BattlegroundMap::~BattlegroundMap ( )
override
2423{
2424 if (m_bg)
2425 {
2426 //unlink to prevent crash, always unlink all pointer reference before destruction
2427 m_bg->SetBgMap(nullptr);
2428 m_bg = nullptr;
2429 }
2430}
void SetBgMap(BattlegroundMap *map)
Definition Battleground.h:449

References m_bg, and Battleground::SetBgMap().

Member Function Documentation

◆ AddPlayerToMap()

bool BattlegroundMap::AddPlayerToMap ( Player player)
overridevirtual

Reimplemented from Map.

2459{
2460 player->m_InstanceValid = true;
2461 if (IsBattleArena())
2462 player->CastSpell(player, 100102, true);
2463 return Map::AddPlayerToMap(player);
2464}
virtual bool AddPlayerToMap(Player *)
Definition Map.cpp:343
bool IsBattleArena() const
Definition Map.h:302
bool m_InstanceValid
Definition Player.h:2444
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:1178

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.

2442{
2443 if (!loginCheck && player->GetMapRef().getTarget() == this)
2444 {
2445 LOG_ERROR("maps", "BGMap::CanEnter - player {} is already in map!", player->GetGUID().ToString());
2446 ABORT();
2448 }
2449
2450 if (player->GetBattlegroundId() != GetInstanceId())
2452
2453 // pussywizard: no need to check player limit here, invitations are limited by Battleground::GetFreeSlotsForTeam
2454
2455 return Map::CannotEnter(player, loginCheck);
2456}
#define ABORT
Definition Errors.h:76
#define LOG_ERROR(filterType__,...)
Definition Log.h:157
virtual EnterState CannotEnter(Player *, bool)
Definition Map.h:285
uint32 GetInstanceId() const
Definition Map.h:266
@ CANNOT_ENTER_ALREADY_IN_MAP
Definition Map.h:272
@ CANNOT_ENTER_INSTANCE_BIND_MISMATCH
Definition Map.h:278
std::string ToString() const
Definition ObjectGuid.cpp:47
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
MapReference & GetMapRef()
Definition Player.h:2499
uint32 GetBattlegroundId() const
Definition Player.h:2262
TO * getTarget() const
Definition Reference.h:95

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.

2433{
2434 //init visibility distance for BG/Arenas
2436
2437 if (IsBattleArena()) // pussywizard: start with 30yd visibility range on arenas to ensure players can't get informations about the opponents in any way
2438 m_VisibleDistance = 30.0f;
2439}
float m_VisibleDistance
Definition Map.h:549
static float GetMaxVisibleDistanceInBGArenas()
Definition World.h:255

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

Referenced by BattlegroundMap().

◆ RemoveAllPlayers()

void BattlegroundMap::RemoveAllPlayers ( )
overridevirtual

Reimplemented from Map.

2485{
2486 if (HavePlayers())
2487 for (MapRefMgr::iterator itr = m_mapRefMgr.begin(); itr != m_mapRefMgr.end(); ++itr)
2488 if (Player* player = itr->GetSource())
2489 if (!player->IsBeingTeleportedFar())
2490 player->TeleportTo(player->GetEntryPoint());
2491}
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
MapRefMgr m_mapRefMgr
Definition Map.h:553
bool HavePlayers() const
Definition Map.h:324
Definition Player.h:1081

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

Referenced by MapInstanced::DestroyInstance().

◆ RemovePlayerFromMap()

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

Reimplemented from Map.

2467{
2468 if (Battleground* bg = GetBG())
2469 {
2470 bg->RemovePlayerAtLeave(player);
2471 if (IsBattleArena())
2472 bg->RemoveSpectator(player);
2473 }
2474 if (IsBattleArena())
2475 player->RemoveAura(100102);
2476 Map::RemovePlayerFromMap(player, remove);
2477}
Battleground * GetBG()
Definition Map.h:699
Definition Battleground.h:304
virtual void RemovePlayerFromMap(Player *, bool)
Definition Map.cpp:752
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4808

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

◆ SetBG()

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

References m_bg.

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

◆ SetUnload()

void BattlegroundMap::SetUnload ( )
2480{
2482}
#define MIN_UNLOAD_DELAY
Definition Map.h:87
uint32 m_unloadTimer
Definition Map.h:548

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


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