TrinityCore
Loading...
Searching...
No Matches
Map Class Reference

#include <Map.h>

+ Inheritance diagram for Map:

Public Types

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 MapRefManager PlayerList
 
typedef std::unordered_multimap< ObjectGuid::LowType, Creature * > CreatureBySpawnIdContainer
 
typedef std::unordered_multimap< ObjectGuid::LowType, GameObject * > GameObjectBySpawnIdContainer
 
typedef std::function< void(Map *)> FarSpellCallback
 
- Public Types inherited from GridRefManager< NGridType >
typedef LinkedListHead::Iterator< GridReference< NGridType > > iterator
 
- Public Types inherited from RefManager< TO, FROM >
typedef LinkedListHead::Iterator< Reference< TO, FROM > > iterator
 
typedef LinkedListHead::Iterator< Reference< TO, FROM > const > const_iterator
 
- Public Types inherited from LinkedListHead
typedef Iterator< LinkedListElement > iterator
 

Public Member Functions

 Map (uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map *_parent=nullptr)
 
virtual ~Map ()
 
MapEntry const * GetEntry () const
 
bool CanUnload (uint32 diff)
 
virtual bool AddPlayerToMap (Player *)
 
virtual void RemovePlayerFromMap (Player *, bool)
 
template<class T >
bool AddToMap (T *)
 
template<class T >
void RemoveFromMap (T *, bool)
 
void VisitNearbyCellsOf (WorldObject *obj, TypeContainerVisitor< Trinity::ObjectUpdater, GridTypeMapContainer > &gridVisitor, TypeContainerVisitor< Trinity::ObjectUpdater, WorldTypeMapContainer > &worldVisitor)
 
virtual void Update (uint32)
 
float GetVisibilityRange () const
 
virtual void InitVisibilityDistance ()
 
void PlayerRelocation (Player *, float x, float y, float z, float orientation)
 
void CreatureRelocation (Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail=true)
 
void GameObjectRelocation (GameObject *go, float x, float y, float z, float orientation, bool respawnRelocationOnFail=true)
 
void DynamicObjectRelocation (DynamicObject *go, float x, float y, float z, float orientation)
 
template<class T , class CONTAINER >
void Visit (Cell const &cell, TypeContainerVisitor< T, CONTAINER > &visitor)
 
bool IsRemovalGrid (float x, float y) const
 
bool IsRemovalGrid (Position const &pos) const
 
bool IsGridLoaded (uint32 gridId) const
 
bool IsGridLoaded (float x, float y) const
 
bool IsGridLoaded (Position const &pos) const
 
bool GetUnloadLock (GridCoord const &p) const
 
void SetUnloadLock (GridCoord const &p, bool on)
 
void LoadGrid (float x, float y)
 
void LoadAllCells ()
 
bool UnloadGrid (NGridType &ngrid, bool pForce)
 
void GridMarkNoUnload (uint32 x, uint32 y)
 
void GridUnmarkNoUnload (uint32 x, uint32 y)
 
virtual void UnloadAll ()
 
void ResetGridExpiry (NGridType &grid, float factor=1) const
 
time_t GetGridExpiry (void) const
 
uint32 GetId () const
 
Map const * GetParent () const
 
void GetFullTerrainStatusForPosition (uint32 phaseMask, float x, float y, float z, PositionFullTerrainStatus &data, Optional< uint8 > reqLiquidType={}, float collisionHeight=2.03128f) const
 
ZLiquidStatus GetLiquidStatus (uint32 phaseMask, float x, float y, float z, Optional< uint8 > ReqLiquidType, LiquidData *data=nullptr, float collisionHeight=2.03128f) const
 
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 GetAreaId (uint32 phaseMask, Position const &pos) const
 
uint32 GetZoneId (uint32 phaseMask, float x, float y, float z) const
 
uint32 GetZoneId (uint32 phaseMask, Position const &pos) const
 
void GetZoneAndAreaId (uint32 phaseMask, uint32 &zoneid, uint32 &areaid, float x, float y, float z) const
 
void GetZoneAndAreaId (uint32 phaseMask, uint32 &zoneid, uint32 &areaid, Position const &pos) const
 
float GetWaterLevel (float x, float y) const
 
bool IsInWater (uint32 phaseMask, float x, float y, float z, LiquidData *data=nullptr) const
 
bool IsUnderWater (uint32 phaseMask, float x, float y, float z) const
 
void MoveAllCreaturesInMoveList ()
 
void MoveAllGameObjectsInMoveList ()
 
void MoveAllDynamicObjectsInMoveList ()
 
void RemoveAllObjectsInRemoveList ()
 
virtual void RemoveAllPlayers ()
 
bool CreatureRespawnRelocation (Creature *c, bool diffGridOnly)
 
bool GameObjectRespawnRelocation (GameObject *go, bool diffGridOnly)
 
bool CheckGridIntegrity (Creature *c, bool moved) const
 
uint32 GetInstanceId () const
 
uint8 GetSpawnMode () const
 
Trinity::unique_weak_ptr< Map > GetWeakPtr () const
 
void SetWeakPtr (Trinity::unique_weak_ptr< Map > weakRef)
 
virtual EnterState CannotEnter (Player *)
 
char const * GetMapName () const
 
Difficulty GetDifficultyID () const
 
MapDifficultyEntry const * GetMapDifficulty () const
 
bool Instanceable () const
 
bool IsWorldMap () 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) const
 
void AddObjectToRemoveList (WorldObject *obj)
 
void AddObjectToSwitchList (WorldObject *obj, bool on)
 
virtual void DelayedUpdate (uint32 diff)
 
void resetMarkedCells ()
 
bool isCellMarked (uint32 pCellId)
 
void markCell (uint32 pCellId)
 
bool HavePlayers () const
 
uint32 GetPlayersCountExceptGMs () const
 
bool ActiveObjectsNearGrid (NGridType const &ngrid) const
 
void AddWorldObject (WorldObject *obj)
 
void RemoveWorldObject (WorldObject *obj)
 
void SendToPlayers (WorldPacket const *data) const
 
bool SendZoneMessage (uint32 zone, WorldPacket const *packet, WorldSession const *self=nullptr, uint32 team=0) const
 Send a packet to all players (or players selected team) in the zone (except self if mentioned)
 
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)
 
void AddToActive (WorldObject *obj)
 
void RemoveFromActive (WorldObject *obj)
 
template<class T >
void SwitchGridContainers (T *obj, bool on)
 
void UpdateIteratorBack (Player *player)
 
TempSummon * SummonCreature (uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
 
void SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=nullptr)
 
Player * GetPlayer (ObjectGuid const &guid)
 
Corpse * GetCorpse (ObjectGuid const &guid)
 
Creature * GetCreature (ObjectGuid const &guid)
 
GameObject * GetGameObject (ObjectGuid const &guid)
 
Creature * GetCreatureBySpawnId (ObjectGuid::LowType spawnId) const
 
GameObject * GetGameObjectBySpawnId (ObjectGuid::LowType spawnId) const
 
WorldObject * GetWorldObjectBySpawnId (SpawnObjectType type, ObjectGuid::LowType spawnId) const
 
Transport * GetTransport (ObjectGuid const &guid)
 
DynamicObject * GetDynamicObject (ObjectGuid const &guid)
 
Pet * GetPet (ObjectGuid const &guid)
 
MapStoredObjectTypesContainer & GetObjectsStore ()
 
CreatureBySpawnIdContainer & GetCreatureBySpawnIdStore ()
 
CreatureBySpawnIdContainer const & GetCreatureBySpawnIdStore () const
 
GameObjectBySpawnIdContainer & GetGameObjectBySpawnIdStore ()
 
GameObjectBySpawnIdContainer const & GetGameObjectBySpawnIdStore () const
 
std::unordered_set< Corpse * > const * GetCorpsesInCell (uint32 cellId) const
 
Corpse * GetCorpseByPlayer (ObjectGuid const &ownerGuid) const
 
MapInstanced * ToMapInstanced ()
 
MapInstanced const * ToMapInstanced () const
 
InstanceMap * ToInstanceMap ()
 
InstanceMap const * ToInstanceMap () const
 
BattlegroundMap * ToBattlegroundMap ()
 
BattlegroundMap const * ToBattlegroundMap () const
 
float GetWaterOrGroundLevel (uint32 phasemask, float x, float y, float z, float *ground=nullptr, bool swim=false, float collisionHeight=2.03128f) const
 
float GetMinHeight (float x, float y) const
 
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 GetHeight (Position const &pos, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
 
float GetHeight (uint32 phasemask, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
 
float GetHeight (uint32 phasemask, Position const &pos, 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
 
void Balance ()
 
void RemoveGameObjectModel (GameObjectModel const &model)
 
void InsertGameObjectModel (GameObjectModel const &model)
 
bool ContainsGameObjectModel (GameObjectModel const &model) const
 
float GetGameObjectFloor (uint32 phasemask, float x, float y, float z, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) 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)
 
time_t GetLinkedRespawnTime (ObjectGuid guid) const
 
time_t GetRespawnTime (SpawnObjectType type, ObjectGuid::LowType spawnId) const
 
time_t GetCreatureRespawnTime (ObjectGuid::LowType spawnId) const
 
time_t GetGORespawnTime (ObjectGuid::LowType spawnId) const
 
void UpdatePlayerZoneStats (uint32 oldZone, uint32 newZone)
 
void SaveRespawnTime (SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 entry, time_t respawnTime, uint32 gridId, CharacterDatabaseTransaction dbTrans=nullptr, bool startup=false)
 
void SaveRespawnInfoDB (RespawnInfo const &info, CharacterDatabaseTransaction dbTrans=nullptr)
 
void LoadRespawnTimes ()
 
void DeleteRespawnTimes ()
 
void LoadCorpseData ()
 
void DeleteCorpseData ()
 
void AddCorpse (Corpse *corpse)
 
void RemoveCorpse (Corpse *corpse)
 
Corpse * ConvertCorpseToBones (ObjectGuid const &ownerGuid, bool insignia=false)
 
void RemoveOldCorpses ()
 
void SendInitTransports (Player *player)
 
void SendRemoveTransports (Player *player)
 
void SendZoneDynamicInfo (uint32 zoneId, Player *player) const
 
void SendZoneWeather (uint32 zoneId, Player *player) const
 
void SendZoneWeather (ZoneDynamicInfo const &zoneDynamicInfo, Player *player) const
 
void SendZoneText (uint32 zoneId, const char *text, WorldSession const *self=nullptr, uint32 team=0) const
 Send a System Message to all players in the zone (except self if mentioned)
 
void SetZoneMusic (uint32 zoneId, uint32 musicId)
 
Weather * GetOrGenerateZoneDefaultWeather (uint32 zoneId)
 
void SetZoneWeather (uint32 zoneId, WeatherState weatherId, float intensity)
 
void SetZoneOverrideLight (uint32 zoneId, uint32 areaLightId, uint32 overrideLightId, Milliseconds transitionTime)
 
void UpdateAreaDependentAuras ()
 
template<HighGuid high>
ObjectGuid::LowType GenerateLowGuid ()
 
template<HighGuid high>
ObjectGuid::LowType GetMaxLowGuid ()
 
void AddUpdateObject (Object *obj)
 
void RemoveUpdateObject (Object *obj)
 
size_t GetActiveNonPlayersCount () const
 
virtual std::string GetDebugInfo () const
 
void ProcessRespawns ()
 
void ApplyDynamicModeRespawnScaling (WorldObject const *obj, ObjectGuid::LowType spawnId, uint32 &respawnDelay, uint32 mode) const
 
void GetRespawnInfo (std::vector< RespawnInfo const * > &respawnData, SpawnObjectTypeMask types) const
 
void Respawn (SpawnObjectType type, ObjectGuid::LowType spawnId, CharacterDatabaseTransaction dbTrans=nullptr)
 
void RemoveRespawnTime (SpawnObjectType type, ObjectGuid::LowType spawnId, CharacterDatabaseTransaction dbTrans=nullptr, bool alwaysDeleteFromDB=false)
 
size_t DespawnAll (SpawnObjectType type, ObjectGuid::LowType spawnId)
 
bool ShouldBeSpawnedOnGridLoad (SpawnObjectType type, ObjectGuid::LowType spawnId) const
 
template<typename T >
bool ShouldBeSpawnedOnGridLoad (ObjectGuid::LowType spawnId) const
 
SpawnGroupTemplateData const * GetSpawnGroupData (uint32 groupId) const
 
bool IsSpawnGroupActive (uint32 groupId) const
 
bool SpawnGroupSpawn (uint32 groupId, bool ignoreRespawn=false, bool force=false, std::vector< WorldObject * > *spawnedObjects=nullptr)
 
bool SpawnGroupDespawn (uint32 groupId, bool deleteRespawnTimes=false, size_t *count=nullptr)
 
void SetSpawnGroupInactive (uint32 groupId)
 
void AddFarSpellCallback (FarSpellCallback &&callback)
 
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 DeleteFromWorld (Transport *transport)
 
template<>
void InitializeObject (Creature *obj)
 
template<>
void InitializeObject (GameObject *obj)
 
template<>
bool AddToMap (Transport *obj)
 
template<>
void RemoveFromMap (Transport *obj, bool remove)
 
- Public Member Functions inherited from GridRefManager< NGridType >
GridReference< NGridType > * getFirst ()
 
GridReference< NGridType > * getLast ()
 
iterator begin ()
 
iterator end ()
 
- Public Member Functions inherited from RefManager< TO, FROM >
 RefManager ()
 
Reference< TO, FROM > * getFirst ()
 
Reference< TO, FROM > const * getFirst () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
virtual ~RefManager ()
 
void clearReferences ()
 
- Public Member Functions inherited from LinkedListHead
 LinkedListHead ()
 
bool isEmpty () const
 
LinkedListElement * getFirst ()
 
LinkedListElement const * getFirst () const
 
LinkedListElement * getLast ()
 
LinkedListElement const * getLast () const
 
void insertFirst (LinkedListElement *pElem)
 
void insertLast (LinkedListElement *pElem)
 
uint32 getSize () const
 
void incSize ()
 
void decSize ()
 

Static Public Member Functions

static bool ExistMap (uint32 mapid, int gx, int gy)
 
static bool ExistVMap (uint32 mapid, int gx, int gy)
 
static void InitStateMachine ()
 
static void DeleteStateMachine ()
 
static void DeleteRespawnTimesInDB (uint16 mapId, uint32 instanceId)
 

Public Attributes

std::unordered_map< ObjectGuid::LowType, CreatureGroup * > CreatureGroupHolder
 

Protected Types

typedef std::set< WorldObject * > ActiveNonPlayers
 
typedef std::set< Transport * > TransportsContainer
 

Protected Member Functions

void SetUnloadReferenceLock (GridCoord const &p, bool on)
 
- Protected Member Functions inherited from LinkedListHead
 ~LinkedListHead ()
 

Protected Attributes

std::mutex _mapLock
 
std::mutex _gridLock
 
MapEntry const * i_mapEntry
 
uint8 i_spawnMode
 
uint32 i_InstanceId
 
Trinity::unique_weak_ptr< Map > m_weakRef
 
uint32 m_unloadTimer
 
float m_VisibleDistance
 
DynamicMapTree _dynamicTree
 
MapRefManager m_mapRefManager
 
MapRefManager::iterator m_mapRefIter
 
int32 m_VisibilityNotifyPeriod
 
ActiveNonPlayers m_activeNonPlayers
 
ActiveNonPlayers::iterator m_activeNonPlayersIter
 
TransportsContainer _transports
 
TransportsContainer::iterator _transportsUpdateIter
 

Private Types

typedef std::multimap< time_t, ScriptAction > ScriptScheduleMap
 

Private Member Functions

void LoadMapAndVMap (int gx, int gy)
 
void LoadVMap (int gx, int gy)
 
void LoadMap (int gx, int gy, bool reload=false)
 
void LoadMMap (int gx, int gy)
 
GridMap * GetGrid (float x, float y)
 
void SetTimer (uint32 t)
 
void SendInitSelf (Player *player)
 
bool CreatureCellRelocation (Creature *creature, Cell new_cell)
 
bool GameObjectCellRelocation (GameObject *go, Cell new_cell)
 
bool DynamicObjectCellRelocation (DynamicObject *go, Cell new_cell)
 
template<class T >
void InitializeObject (T *obj)
 
void AddCreatureToMoveList (Creature *c, float x, float y, float z, float ang)
 
void RemoveCreatureFromMoveList (Creature *c)
 
void AddGameObjectToMoveList (GameObject *go, float x, float y, float z, float ang)
 
void RemoveGameObjectFromMoveList (GameObject *go)
 
void AddDynamicObjectToMoveList (DynamicObject *go, float x, float y, float z, float ang)
 
void RemoveDynamicObjectFromMoveList (DynamicObject *go)
 
bool IsGridLoaded (GridCoord const &) const
 
void EnsureGridCreated (GridCoord const &)
 
void EnsureGridCreated_i (GridCoord const &)
 
bool EnsureGridLoaded (Cell const &)
 
void EnsureGridLoadedForActiveObject (Cell const &, WorldObject *object)
 
void buildNGridLinkage (NGridType *pNGridType)
 
NGridType * getNGrid (uint32 x, uint32 y) const
 
void setNGrid (NGridType *grid, uint32 x, uint32 y)
 
void ScriptsProcess ()
 Process queued scripts.
 
void SendObjectUpdates ()
 
Player * _GetScriptPlayerSourceOrTarget (Object *source, Object *target, ScriptInfo const *scriptInfo) const
 
Creature * _GetScriptCreatureSourceOrTarget (Object *source, Object *target, ScriptInfo const *scriptInfo, bool bReverse=false) const
 
GameObject * _GetScriptGameObjectSourceOrTarget (Object *source, Object *target, ScriptInfo const *scriptInfo, bool bReverse=false) const
 
Unit * _GetScriptUnit (Object *obj, bool isSource, ScriptInfo const *scriptInfo) const
 
Player * _GetScriptPlayer (Object *obj, bool isSource, ScriptInfo const *scriptInfo) const
 
Creature * _GetScriptCreature (Object *obj, bool isSource, ScriptInfo const *scriptInfo) const
 
WorldObject * _GetScriptWorldObject (Object *obj, bool isSource, ScriptInfo const *scriptInfo) const
 
void _ScriptProcessDoor (Object *source, Object *target, ScriptInfo const *scriptInfo) const
 
GameObject * _FindGameObject (WorldObject *pWorldObject, ObjectGuid::LowType guid) const
 
void ProcessRelocationNotifies (const uint32 diff)
 
bool CheckRespawn (RespawnInfo *info)
 
void DoRespawn (SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 gridId)
 
bool AddRespawnInfo (RespawnInfo const &info)
 
void UnloadAllRespawnInfos ()
 
RespawnInfo * GetRespawnInfo (SpawnObjectType type, ObjectGuid::LowType spawnId) const
 
void Respawn (RespawnInfo *info, CharacterDatabaseTransaction dbTrans=nullptr)
 
void DeleteRespawnInfo (RespawnInfo *info, CharacterDatabaseTransaction dbTrans=nullptr)
 
void DeleteRespawnInfoFromDB (SpawnObjectType type, ObjectGuid::LowType spawnId, CharacterDatabaseTransaction dbTrans=nullptr)
 
template<class T >
void AddToGrid (T *object, Cell const &cell)
 
template<class T >
void DeleteFromWorld (T *)
 
void AddToActiveHelper (WorldObject *obj)
 
void RemoveFromActiveHelper (WorldObject *obj)
 
RespawnInfoMap & GetRespawnMapForType (SpawnObjectType type)
 
RespawnInfoMap const & GetRespawnMapForType (SpawnObjectType type) const
 
void SetSpawnGroupActive (uint32 groupId, bool state)
 
ObjectGuidGenerator & GetGuidSequenceGenerator (HighGuid high)
 

Private Attributes

bool _creatureToMoveLock
 
std::vector< Creature * > _creaturesToMove
 
bool _gameObjectsToMoveLock
 
std::vector< GameObject * > _gameObjectsToMove
 
bool _dynamicObjectsToMoveLock
 
std::vector< DynamicObject * > _dynamicObjectsToMove
 
time_t i_gridExpiry
 
Map * m_parentMap
 
NGridType * i_grids [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
 
GridMap * GridMaps [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
 
std::bitset< TOTAL_NUMBER_OF_CELLS_PER_MAP *TOTAL_NUMBER_OF_CELLS_PER_MAP > marked_cells
 
bool i_scriptLock
 
std::set< WorldObject * > i_objectsToRemove
 
std::map< WorldObject *, bool > i_objectsToSwitch
 
std::set< WorldObject * > i_worldObjects
 
ScriptScheduleMap m_scriptSchedule
 
std::unique_ptr< RespawnListContainer > _respawnTimes
 
RespawnInfoMap _creatureRespawnTimesBySpawnId
 
RespawnInfoMap _gameObjectRespawnTimesBySpawnId
 
std::unordered_set< uint32 > _toggledSpawnGroupIds
 
uint32 _respawnCheckTimer
 
std::unordered_map< uint32, uint32 > _zonePlayerCountMap
 
ZoneDynamicInfoMap _zoneDynamicInfo
 
IntervalTimer _weatherUpdateTimer
 
std::map< HighGuid, std::unique_ptr< ObjectGuidGenerator > > _guidGenerators
 
MapStoredObjectTypesContainer _objectsStore
 
CreatureBySpawnIdContainer _creatureBySpawnIdStore
 
GameObjectBySpawnIdContainer _gameobjectBySpawnIdStore
 
std::unordered_map< uint32, std::unordered_set< Corpse * > > _corpsesByCell
 
std::unordered_map< ObjectGuid, Corpse * > _corpsesByPlayer
 
std::unordered_set< Corpse * > _corpseBones
 
std::unordered_set< Object * > _updateObjects
 
MPSCQueue< FarSpellCallback > _farSpellCallbacks
 

Friends

class MapReference
 

Detailed Description

Definition at line 301 of file Map.h.

Member Typedef Documentation

◆ ActiveNonPlayers

typedef std::set<WorldObject*> Map::ActiveNonPlayers
protected

Definition at line 707 of file Map.h.

◆ CreatureBySpawnIdContainer

typedef std::unordered_multimap<ObjectGuid::LowType, Creature*> Map::CreatureBySpawnIdContainer

Definition at line 511 of file Map.h.

◆ FarSpellCallback

typedef std::function<void(Map*)> Map::FarSpellCallback

Definition at line 801 of file Map.h.

◆ GameObjectBySpawnIdContainer

Definition at line 515 of file Map.h.

◆ PlayerList

Definition at line 467 of file Map.h.

◆ ScriptScheduleMap

typedef std::multimap<time_t, ScriptAction> Map::ScriptScheduleMap
private

Definition at line 746 of file Map.h.

◆ TransportsContainer

typedef std::set<Transport*> Map::TransportsContainer
protected

Definition at line 712 of file Map.h.

Member Enumeration Documentation

◆ EnterState

Enumerator
CAN_ENTER 
CANNOT_ENTER_ALREADY_IN_MAP 
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 

Definition at line 414 of file Map.h.

Constructor & Destructor Documentation

◆ Map()

◆ ~Map()

Member Function Documentation

◆ _FindGameObject()

GameObject * Map::_FindGameObject ( WorldObject *  pWorldObject,
ObjectGuid::LowType  guid 
) const
inlineprivate

Definition at line 302 of file MapScripts.cpp.

References GetGameObjectBySpawnIdStore(), and WorldObject::GetMap().

Referenced by _ScriptProcessDoor(), and ScriptsProcess().

◆ _GetScriptCreature()

Creature * Map::_GetScriptCreature ( Object *  obj,
bool  isSource,
ScriptInfo const *  scriptInfo 
) const
inlineprivate

◆ _GetScriptCreatureSourceOrTarget()

Creature * Map::_GetScriptCreatureSourceOrTarget ( Object *  source,
Object *  target,
ScriptInfo const *  scriptInfo,
bool  bReverse = false 
) const
inlineprivate

◆ _GetScriptGameObjectSourceOrTarget()

GameObject * Map::_GetScriptGameObjectSourceOrTarget ( Object *  source,
Object *  target,
ScriptInfo const *  scriptInfo,
bool  bReverse = false 
) const
inlineprivate

◆ _GetScriptPlayer()

Player * Map::_GetScriptPlayer ( Object *  obj,
bool  isSource,
ScriptInfo const *  scriptInfo 
) const
inlineprivate

◆ _GetScriptPlayerSourceOrTarget()

Player * Map::_GetScriptPlayerSourceOrTarget ( Object *  source,
Object *  target,
ScriptInfo const *  scriptInfo 
) const
inlineprivate

◆ _GetScriptUnit()

Unit * Map::_GetScriptUnit ( Object *  obj,
bool  isSource,
ScriptInfo const *  scriptInfo 
) const
inlineprivate

◆ _GetScriptWorldObject()

WorldObject * Map::_GetScriptWorldObject ( Object *  obj,
bool  isSource,
ScriptInfo const *  scriptInfo 
) const
inlineprivate

◆ _ScriptProcessDoor()

◆ ActiveObjectsNearGrid()

◆ AddCorpse()

◆ AddCreatureToMoveList()

void Map::AddCreatureToMoveList ( Creature *  c,
float  x,
float  y,
float  z,
float  ang 
)
private

◆ AddDynamicObjectToMoveList()

void Map::AddDynamicObjectToMoveList ( DynamicObject *  go,
float  x,
float  y,
float  z,
float  ang 
)
private

◆ AddFarSpellCallback()

void Map::AddFarSpellCallback ( FarSpellCallback &&  callback)

Definition at line 3518 of file Map.cpp.

References _farSpellCallbacks.

Referenced by Spell::SelectEffectTypeImplicitTargets().

◆ AddGameObjectToMoveList()

void Map::AddGameObjectToMoveList ( GameObject *  go,
float  x,
float  y,
float  z,
float  ang 
)
private

◆ AddObjectToRemoveList()

◆ AddObjectToSwitchList()

◆ AddPlayerToMap()

◆ AddRespawnInfo()

◆ AddToActive()

◆ AddToActiveHelper()

void Map::AddToActiveHelper ( WorldObject *  obj)
inlineprivate

Definition at line 812 of file Map.h.

Referenced by AddToActive().

◆ AddToGrid() [1/5]

◆ AddToGrid() [2/5]

◆ AddToGrid() [3/5]

◆ AddToGrid() [4/5]

◆ AddToGrid() [5/5]

◆ AddToMap() [1/2]

◆ AddToMap() [2/2]

◆ AddUpdateObject()

void Map::AddUpdateObject ( Object *  obj)
inline

Definition at line 620 of file Map.h.

Referenced by WorldObject::AddToObjectUpdate().

◆ AddWorldObject()

void Map::AddWorldObject ( WorldObject *  obj)
inline

Definition at line 461 of file Map.h.

Referenced by WorldObject::SetMap(), SwitchGridContainers(), and SwitchGridContainers().

◆ ApplyDynamicModeRespawnScaling()

◆ Balance()

void Map::Balance ( )
inline

Definition at line 554 of file Map.h.

Referenced by EnsureGridLoaded().

◆ buildNGridLinkage()

void Map::buildNGridLinkage ( NGridType *  pNGridType)
inlineprivate

◆ CannotEnter()

virtual EnterState Map::CannotEnter ( Player *  )
inlinevirtual

◆ CanUnload()

bool Map::CanUnload ( uint32  diff)
inline

Definition at line 311 of file Map.h.

◆ CheckGridIntegrity()

◆ CheckRespawn()

◆ ContainsGameObjectModel()

bool Map::ContainsGameObjectModel ( GameObjectModel const &  model) const
inline

Definition at line 557 of file Map.h.

◆ ConvertCorpseToBones()

◆ CreatureCellRelocation()

◆ CreatureRelocation()

◆ CreatureRespawnRelocation()

◆ DelayedUpdate()

◆ DeleteCorpseData()

◆ DeleteFromWorld() [1/3]

template<>
void Map::DeleteFromWorld ( Player *  player)
Todo:
I do not know why we need this, it should be removed in ~Object anyway

Definition at line 471 of file Map.cpp.

References ObjectAccessor::RemoveObject(), and RemoveUpdateObject().

◆ DeleteFromWorld() [2/3]

template<class T >
void Map::DeleteFromWorld ( T *  obj)
private

Definition at line 464 of file Map.cpp.

Referenced by RemoveFromMap(), RemoveFromMap(), and RemovePlayerFromMap().

◆ DeleteFromWorld() [3/3]

template<>
void Map::DeleteFromWorld ( Transport *  transport)

Definition at line 479 of file Map.cpp.

References ObjectAccessor::RemoveObject().

◆ DeleteRespawnInfo()

void Map::DeleteRespawnInfo ( RespawnInfo *  info,
CharacterDatabaseTransaction  dbTrans = nullptr 
)
private

◆ DeleteRespawnInfoFromDB()

void Map::DeleteRespawnInfoFromDB ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId,
CharacterDatabaseTransaction  dbTrans = nullptr 
)
private

◆ DeleteRespawnTimes()

◆ DeleteRespawnTimesInDB()

void Map::DeleteRespawnTimesInDB ( uint16  mapId,
uint32  instanceId 
)
static

◆ DeleteStateMachine()

void Map::DeleteStateMachine ( )
static

◆ DespawnAll()

◆ DoRespawn()

void Map::DoRespawn ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId,
uint32  gridId 
)
private

◆ DynamicObjectCellRelocation()

◆ DynamicObjectRelocation()

◆ EnsureGridCreated()

void Map::EnsureGridCreated ( GridCoord const &  p)
private

◆ EnsureGridCreated_i()

◆ EnsureGridLoaded()

◆ EnsureGridLoadedForActiveObject()

◆ ExistMap()

◆ ExistVMap()

bool Map::ExistVMap ( uint32  mapid,
int  gx,
int  gy 
)
static

◆ GameObjectCellRelocation()

◆ GameObjectRelocation()

◆ GameObjectRespawnRelocation()

◆ GenerateLowGuid()

◆ GetActiveNonPlayersCount()

size_t Map::GetActiveNonPlayersCount ( ) const
inline

Definition at line 630 of file Map.h.

Referenced by debug_commandscript::HandleDebugObjectCountMap().

◆ GetAreaId() [1/2]

uint32 Map::GetAreaId ( uint32  phaseMask,
float  x,
float  y,
float  z 
) const

◆ GetAreaId() [2/2]

uint32 Map::GetAreaId ( uint32  phaseMask,
Position const &  pos 
) const
inline

Definition at line 385 of file Map.h.

References GetAreaId(), Position::GetPositionX(), Position::GetPositionY(), and Position::GetPositionZ().

Referenced by GetAreaId().

◆ GetAreaInfo()

bool Map::GetAreaInfo ( uint32  phaseMask,
float  x,
float  y,
float  z,
uint32 &  mogpflags,
int32 &  adtId,
int32 &  rootId,
int32 &  groupId 
) const

◆ GetCorpse()

Corpse * Map::GetCorpse ( ObjectGuid const &  guid)

◆ GetCorpseByPlayer()

Corpse * Map::GetCorpseByPlayer ( ObjectGuid const &  ownerGuid) const
inline

Definition at line 528 of file Map.h.

Referenced by ConvertCorpseToBones(), and Player::GetCorpse().

◆ GetCorpsesInCell()

std::unordered_set< Corpse * > const * Map::GetCorpsesInCell ( uint32  cellId) const
inline

Definition at line 519 of file Map.h.

Referenced by ObjectWorldLoader::Visit().

◆ GetCreature()

Creature * Map::GetCreature ( ObjectGuid const &  guid)

Definition at line 4392 of file Map.cpp.

References _objectsStore, and TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Find().

Referenced by Battleground::_ProcessResurrect(), spell_sha_sentry_totem::AfterApply(), instance_naxxramas::instance_naxxramas_InstanceMapScript::CheckAchievementCriteriaMeet(), spell_sha_fire_nova::CheckFireTotem(), instance_dire_maul::instance_dire_maul_InstanceMapScript::CrystalCreatureCheck(), InstanceScript::DoCastSpellOnPlayer(), WorldSession::DoLootRelease(), InstanceScript::DoRemoveAurasDueToSpellOnPlayer(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::DoSpeech(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomcheck(), Spell::EffectDestroyAllTotems(), instance_oculus::instance_oculus_InstanceMapScript::FreeDragons(), Battleground::GetBGCreature(), Battlefield::GetCreature(), InstanceScript::GetCreature(), ObjectAccessor::GetCreature(), CreatureGameObjectScriptRegistrySwapHooks< ObjectType, ScriptType, Base >::GetEntityFromMap(), instance_oculus::instance_oculus_InstanceMapScript::GreaterWhelps(), WorldSession::HandleAutostoreLootItemOpcode(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::HandleCavernEventTrigger(), spell_sha_fire_nova::HandleDummy(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::HandleHeroicAttempts(), WorldSession::HandleLootMasterGiveOpcode(), WorldSession::HandleLootMoneyOpcode(), spell_sha_stoneclaw_totem::HandleScriptEffect(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::InitiateArthasEvent(), TempSummon::InitStats(), Unit::isAttackingPlayer(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::IsWaveAllDead(), Player::KilledMonsterCredit(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::MissingPlagueCrates(), instance_deadmines::instance_deadmines_InstanceMapScript::MoveCreaturesInside(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::MoveNPCIfAlive(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnCreatureCreate(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::OnCreatureCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnGameObjectCreate(), instance_ruby_sanctum::instance_ruby_sanctum_InstanceMapScript::OnPlayerEnter(), spell_malygos_destroy_platform_channel::OnRemove(), instance_uldaman::instance_uldaman_InstanceMapScript::OnUnitDeath(), instance_dire_maul::instance_dire_maul_InstanceMapScript::OnUnitDeath(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::OnUnitDeath(), instance_drak_tharon_keep::instance_drak_tharon_keep_InstanceScript::OnUnitDeath(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnUnitDeath(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnUnitDeath(), instance_naxxramas::instance_naxxramas_InstanceMapScript::OnUnitDeath(), instance_oculus::instance_oculus_InstanceMapScript::OnUnitDeath(), instance_shadow_labyrinth::instance_shadow_labyrinth_InstanceMapScript::OnUnitDeath(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::OnUnitDeath(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::PowerSparksHandling(), instance_blackrock_spire::instance_blackrock_spireMapScript::ProcessEvent(), instance_uldaman::instance_uldaman_InstanceMapScript::ProcessEvent(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::ProcessEvent(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::ProcessEvent(), instance_oculus::instance_oculus_InstanceMapScript::ProcessEvent(), instance_ulduar::instance_ulduar_InstanceMapScript::ProcessEvent(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::ReadSaveDataMore(), instance_violet_hold::instance_violet_hold_InstanceMapScript::ResetBossEncounter(), ScriptsProcess(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::SendAddsUpStairs(), Player::SendLoot(), instance_uldaman::instance_uldaman_InstanceMapScript::SetBossState(), InstanceScript::SetBossState(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetBossState(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::SetBossState(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetBossState(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetBossState(), instance_oculus::instance_oculus_InstanceMapScript::SetBossState(), instance_ulduar::instance_ulduar_InstanceMapScript::SetBossState(), instance_black_temple::instance_black_temple_InstanceMapScript::SetBossState(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::SetBossState(), instance_arcatraz::instance_arcatraz_InstanceMapScript::SetBossState(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::SetData(), instance_blackrock_spire::instance_blackrock_spireMapScript::SetData(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::SetData(), instance_stratholme::instance_stratholme_InstanceMapScript::SetData(), instance_sunken_temple::instance_sunken_temple_InstanceMapScript::SetData(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::SetData(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::SetData(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::SetData(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetGuidData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetInstanceProgress(), Unit::SetPhaseMask(), instance_violet_hold::instance_violet_hold_InstanceMapScript::StartBossEncounter(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::TombOfSevenEvent(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::TombOfSevenReset(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::Update(), instance_deadmines::instance_deadmines_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::Update(), instance_naxxramas::instance_naxxramas_InstanceMapScript::Update(), instance_oculus::instance_oculus_InstanceMapScript::Update(), instance_ulduar::instance_ulduar_InstanceMapScript::Update(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::Update(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::Update(), Update(), Player::UpdateTriggerVisibility(), and instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::VortexHandling().

◆ GetCreatureBySpawnId()

Creature * Map::GetCreatureBySpawnId ( ObjectGuid::LowType  spawnId) const

Definition at line 4397 of file Map.cpp.

References GetCreatureBySpawnIdStore().

Referenced by npc_living_mojo::JustEngagedWith().

◆ GetCreatureBySpawnIdStore() [1/2]

◆ GetCreatureBySpawnIdStore() [2/2]

CreatureBySpawnIdContainer const & Map::GetCreatureBySpawnIdStore ( ) const
inline

Definition at line 513 of file Map.h.

◆ GetCreatureRespawnTime()

time_t Map::GetCreatureRespawnTime ( ObjectGuid::LowType  spawnId) const
inline

◆ GetDebugInfo()

std::string Map::GetDebugInfo ( ) const
virtual

Reimplemented in InstanceMap.

Definition at line 4838 of file Map.cpp.

References GetDifficultyID(), GetId(), GetInstanceId(), and HavePlayers().

Referenced by InstanceMap::GetDebugInfo().

◆ GetDifficultyID()

◆ GetDynamicObject()

DynamicObject * Map::GetDynamicObject ( ObjectGuid const &  guid)

◆ GetEntrancePos()

bool Map::GetEntrancePos ( int32 &  mapid,
float &  x,
float &  y 
) const

Definition at line 4277 of file Map.cpp.

References MapEntry::GetEntrancePos(), and i_mapEntry.

◆ GetEntry()

MapEntry const * Map::GetEntry ( ) const
inline

◆ GetFullTerrainStatusForPosition()

◆ GetGameObject()

GameObject * Map::GetGameObject ( ObjectGuid const &  guid)

Definition at line 4425 of file Map.cpp.

References _objectsStore, and TypeUnorderedMapContainer< OBJECT_TYPES, KEY_TYPE >::Find().

Referenced by instance_deadmines::instance_deadmines_InstanceMapScript::BlastOutDoor(), Player::CheckDuelDistance(), Spell::CheckEffectTarget(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::CheckLichKingAvailability(), BattlegroundEY::CheckSomeoneJoinedPoint(), BattlegroundEY::CheckSomeoneLeftPoint(), instance_dire_maul::instance_dire_maul_InstanceMapScript::CrystalCreatureCheck(), instance_dire_maul::instance_dire_maul_InstanceMapScript::CrystalCreatureStore(), hyjalAI::DeSpawnVeins(), InstanceScript::DoCloseDoorOrButton(), WorldSession::DoLootRelease(), InstanceScript::DoRespawnGameObject(), InstanceScript::DoUseDoorOrButton(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomcheck(), instance_blackrock_spire::instance_blackrock_spireMapScript::Dragonspireroomstore(), Player::DuelComplete(), Spell::EffectSummonObject(), BattlegroundAB::EventPlayerClickedOnFlag(), instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::FloorEruption(), Battleground::GetBGObject(), CreatureGameObjectScriptRegistrySwapHooks< ObjectType, ScriptType, Base >::GetEntityFromMap(), Battlefield::GetGameObject(), InstanceScript::GetGameObject(), ObjectAccessor::GetGameObject(), GetTransport(), WorldSession::HandleAutostoreLootItemOpcode(), InstanceScript::HandleGameObject(), WorldSession::HandleLootMasterGiveOpcode(), WorldSession::HandleLootMoneyOpcode(), WorldSession::HandleMovementOpcode(), spell_alexstrasza_bunny_destroy_platform_event::HandleSendEvent(), Battleground::HandleTriggerBuff(), instance_deadmines::instance_deadmines_InstanceMapScript::LeverStucked(), spell_alexstrasza_gift_beam_visual::OnRemove(), instance_dire_maul::instance_dire_maul_InstanceMapScript::OnUnitDeath(), Player::PrepareQuestMenu(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::ProcessEvent(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::ProcessEvent(), instance_ulduar::instance_ulduar_InstanceMapScript::ProcessEvent(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::ProcessEvent(), BattlegroundEY::RespawnFlagAfterDrop(), ScriptsProcess(), Player::SendLoot(), Player::SendQuestGiverStatusMultiple(), InstanceScript::SetBossState(), instance_naxxramas::instance_naxxramas_InstanceMapScript::SetBossState(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetBossState(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::SetBossState(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetBossState(), instance_nexus::instance_nexus_InstanceMapScript::SetBossState(), instance_oculus::instance_oculus_InstanceMapScript::SetBossState(), instance_ulduar::instance_ulduar_InstanceMapScript::SetBossState(), instance_magtheridons_lair::instance_magtheridons_lair_InstanceMapScript::SetData(), instance_naxxramas::instance_naxxramas_InstanceMapScript::SetData(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::SetData(), instance_shadowfang_keep::instance_shadowfang_keep_InstanceMapScript::SetData(), instance_stratholme::instance_stratholme_InstanceMapScript::SetData(), instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::SetData(), instance_razorfen_downs::instance_razorfen_downs_InstanceMapScript::SetData(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetData(), instance_violet_hold::instance_violet_hold_InstanceMapScript::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetInstanceProgress(), instance_deadmines::instance_deadmines_InstanceMapScript::ShootCannon(), instance_deadmines::instance_deadmines_InstanceMapScript::SummonCreatures(), instance_deadmines::instance_deadmines_InstanceMapScript::Update(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::Update(), instance_ulduar::instance_ulduar_InstanceMapScript::Update(), instance_razorfen_kraul::instance_razorfen_kraul_InstanceMapScript::Update(), instance_stratholme::instance_stratholme_InstanceMapScript::UpdateGoState(), and Player::UpdateTriggerVisibility().

◆ GetGameObjectBySpawnId()

GameObject * Map::GetGameObjectBySpawnId ( ObjectGuid::LowType  spawnId) const

Definition at line 4411 of file Map.cpp.

References GetGameObjectBySpawnIdStore().

◆ GetGameObjectBySpawnIdStore() [1/2]

◆ GetGameObjectBySpawnIdStore() [2/2]

GameObjectBySpawnIdContainer const & Map::GetGameObjectBySpawnIdStore ( ) const
inline

Definition at line 517 of file Map.h.

◆ GetGameObjectFloor()

float Map::GetGameObjectFloor ( uint32  phasemask,
float  x,
float  y,
float  z,
float  maxSearchDist = DEFAULT_HEIGHT_SEARCH 
) const
inline

Definition at line 558 of file Map.h.

◆ GetGORespawnTime()

time_t Map::GetGORespawnTime ( ObjectGuid::LowType  spawnId) const
inline

◆ GetGrid()

◆ GetGridExpiry()

time_t Map::GetGridExpiry ( void  ) const
inline

Definition at line 369 of file Map.h.

Referenced by MapInstanced::CreateBattleground(), and MapInstanced::CreateInstance().

◆ GetGridHeight()

float Map::GetGridHeight ( float  x,
float  y 
) const

Definition at line 2522 of file Map.cpp.

References GetGrid(), and VMAP_INVALID_HEIGHT_VALUE.

Referenced by GetHeight(), and WorldObject::MovePositionToFirstCollision().

◆ GetGuidSequenceGenerator()

ObjectGuidGenerator & Map::GetGuidSequenceGenerator ( HighGuid  high)
private

Definition at line 3509 of file Map.cpp.

References _guidGenerators.

◆ GetHeight() [1/4]

◆ GetHeight() [2/4]

float Map::GetHeight ( Position const &  pos,
bool  vmap = true,
float  maxSearchDist = DEFAULT_HEIGHT_SEARCH 
) const
inline

Definition at line 550 of file Map.h.

References GetHeight(), Position::GetPositionX(), Position::GetPositionY(), and Position::GetPositionZ().

Referenced by GetHeight().

◆ GetHeight() [3/4]

float Map::GetHeight ( uint32  phasemask,
float  x,
float  y,
float  z,
bool  vmap = true,
float  maxSearchDist = DEFAULT_HEIGHT_SEARCH 
) const
inline

Definition at line 551 of file Map.h.

References GetHeight().

Referenced by GetHeight().

◆ GetHeight() [4/4]

float Map::GetHeight ( uint32  phasemask,
Position const &  pos,
bool  vmap = true,
float  maxSearchDist = DEFAULT_HEIGHT_SEARCH 
) const
inline

Definition at line 552 of file Map.h.

References GetHeight(), Position::GetPositionX(), Position::GetPositionY(), and Position::GetPositionZ().

Referenced by GetHeight().

◆ GetId()

uint32 Map::GetId ( ) const

Definition at line 4216 of file Map.cpp.

References i_mapEntry, and MapEntry::ID.

Referenced by AddObjectToRemoveList(), AddObjectToSwitchList(), InstanceMap::AddPlayerToMap(), spell_kargath_executioner::AreaCheck(), MapUpdateRequest::call(), InstanceMap::CannotEnter(), Player::CanRollForItemInLFG(), InstanceScript::CheckAchievementCriteriaMeet(), Spell::CheckCast(), Player::CheckInstanceValidity(), CheckRespawn(), GameObject::Create(), MapInstanced::CreateBattleground(), MapInstanced::CreateInstance(), InstanceMap::CreateInstanceData(), MapInstanced::CreateInstanceForPlayer(), TransportMgr::CreateInstanceTransports(), DeleteCorpseData(), DeleteRespawnInfo(), DeleteRespawnInfoFromDB(), DoRespawn(), EnsureGridCreated_i(), EnsureGridLoaded(), EnsureGridLoadedForActiveObject(), GetAreaInfo(), GetDebugInfo(), GetFullTerrainStatusForPosition(), GetHeight(), GetLiquidStatus(), GetMapDifficulty(), GetSpawnGroupData(), misc_commandscript::HandleAppearCommand(), debug_commandscript::HandleDebugGuidLimitsMap(), debug_commandscript::HandleDebugInstanceSpawns(), debug_commandscript::HandleDebugLoadCellsCommand(), debug_commandscript::HandleDebugObjectCountMap(), gobject_commandscript::HandleGameObjectAddCommand(), go_commandscript::HandleGoZoneXYCommand(), group_commandscript::HandleGroupSummonCommand(), list_commandscript::HandleListSpawnPointsCommand(), WorldSession::HandleMoveWorldportAck(), npc_commandscript::HandleNpcAddCommand(), misc_commandscript::HandleSummonCommand(), wp_commandscript::HandleWpModifyCommand(), wp_commandscript::HandleWpShowCommand(), Player::inRandomLfgDungeon(), InstanceScript::InstanceScript(), isInLineOfSight(), IsSpawnGroupActive(), LoadCorpseData(), Player::LoadFromDB(), LoadMap(), LoadMMap(), ObjectGridLoader::LoadN(), LoadRespawnTimes(), LoadVMap(), Map(), AchievementCriteriaData::Meets(), MotionMaster::MoveFall(), lfg::LFGPlayerScript::OnMapChanged(), InstanceMap::PermBindAllPlayers(), RemoveAllPlayers(), FormationMgr::RemoveCreatureFromGroup(), InstanceMap::Reset(), Group::ResetInstances(), Player::RewardReputation(), SaveRespawnInfoDB(), SaveRespawnTime(), InstanceMap::SendResetWarnings(), InstanceScript::SetBossState(), WorldObject::SetMap(), InstanceMap::SetResetSchedule(), SetSpawnGroupActive(), SpawnGroupDespawn(), SpawnGroupSpawn(), SummonCreatureGroup(), Transport::TeleportTransport(), UnloadGrid(), ActiveState::Update(), IdleState::Update(), RemovalState::Update(), Update(), InstanceScript::UpdateEncounterState(), ObjectGridLoader::Visit(), ObjectGridLoader::Visit(), and ~Map().

◆ GetInstanceId()

◆ GetLinkedRespawnTime()

time_t Map::GetLinkedRespawnTime ( ObjectGuid  guid) const

◆ GetLiquidStatus()

◆ GetMapDifficulty()

MapDifficultyEntry const * Map::GetMapDifficulty ( ) const

◆ GetMapName()

◆ GetMaxLowGuid()

template<HighGuid high>
ObjectGuid::LowType Map::GetMaxLowGuid ( )
inline

Definition at line 614 of file Map.h.

References Map.

Referenced by debug_commandscript::HandleDebugGuidLimitsMap().

◆ GetMinHeight()

float Map::GetMinHeight ( float  x,
float  y 
) const

Definition at line 2530 of file Map.cpp.

References GetGrid().

Referenced by misc_commandscript::HandleGPSCommand(), and WorldSession::HandleMovementOpcode().

◆ getNGrid()

◆ getObjectHitPos()

bool Map::getObjectHitPos ( uint32  phasemask,
float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
float &  rx,
float &  ry,
float &  rz,
float  modifyDist 
)

Definition at line 2881 of file Map.cpp.

References _dynamicTree, and DynamicMapTree::getObjectHitPos().

Referenced by WorldObject::MovePositionToFirstCollision().

◆ GetObjectsStore()

◆ GetOrGenerateZoneDefaultWeather()

Weather * Map::GetOrGenerateZoneDefaultWeather ( uint32  zoneId)

◆ GetParent()

Map const * Map::GetParent ( ) const
inline

Definition at line 378 of file Map.h.

◆ GetPet()

Pet * Map::GetPet ( ObjectGuid const &  guid)

◆ GetPlayer()

Player * Map::GetPlayer ( ObjectGuid const &  guid)

Definition at line 4382 of file Map.cpp.

References ObjectAccessor::GetPlayer().

Referenced by ScriptsProcess(), and npc_minigob_manabonk::UpdateAI().

◆ GetPlayers()

PlayerList const & Map::GetPlayers ( ) const
inline

Definition at line 468 of file Map.h.

Referenced by AddToMap(), npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI::AggroAllPlayers(), AggroAllPlayers(), npc_announcer_toc5::npc_announcer_toc5AI::AggroAllPlayers(), boss_four_horsemen_baseAI::BeginEncounter(), Transport::BuildUpdate(), Player::CheckInstanceValidity(), boss_general_vezax::boss_general_vezaxAI::CheckPlayersInRange(), boss_general_vezax::boss_general_vezaxAI::CheckShamanisticRage(), instance_violet_hold::instance_violet_hold_InstanceMapScript::CheckWipe(), InstanceScript::DoCastSpellOnPlayers(), npc_halion_controller::DoCheckEvade(), InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), InstanceScript::DoSendNotifyToInstance(), InstanceScript::DoStartTimedAchievement(), InstanceScript::DoStopTimedAchievement(), ScriptedAI::DoTeleportAll(), InstanceScript::DoUpdateAchievementCriteria(), InstanceScript::DoUpdateWorldState(), CreatureAI::DoZoneInCombat(), boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI::EnterEvadeMode(), boss_illidan_stormrage::EnterEvadeModeIfNeeded(), boss_shade_of_akama::EnterEvadeModeIfNeeded(), FindEligibleTarget(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::GetCreatureEntry(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::GetCreatureEntry(), instance_nexus::instance_nexus_InstanceMapScript::GetCreatureEntry(), instance_ulduar::instance_ulduar_InstanceMapScript::GetCreatureEntry(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GetGameObjectEntry(), instance_razorfen_kraul::instance_razorfen_kraul_InstanceMapScript::GetPlayerInMap(), instance_sunwell_plateau::instance_sunwell_plateau_InstanceMapScript::GetPlayerInMap(), npc_minigob_manabonk::GetPlayersInDalaran(), spell_krick_explosive_barrage::HandlePeriodicTick(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::HandlePlayerVehicle(), boss_coren_direbrew::JustDied(), boss_headless_horseman::JustDied(), boss_apothecary_hummel::JustDied(), npc_acolyte_of_shadron::JustDied(), npc_acolyte_of_vesperon::JustDied(), boss_yogg_saron::boss_yogg_saronAI::JustDied(), boss_ahune::JustDied(), boss_shattered_executioner::JustDied(), npc_image_of_medivh::npc_image_of_medivhAI::NextStep(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnCreatureCreate(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::OnCreatureCreate(), RemoveFromMap(), boss_volazj::ResetPlayersPhaseMask(), CreatureTextMgr::SendChatPacket(), CreatureTextMgr::SendNonChatPacket(), SendZoneMessage(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetBossState(), instance_ulduar::instance_ulduar_InstanceMapScript::SetBossState(), instance_stratholme::instance_stratholme_InstanceMapScript::SetData(), boss_shattered_executioner::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetGuidData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SpawnEscapeEvent(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SpawnGunship(), boss_volazj::SpellHitTarget(), boss_volazj::SummonedCreatureDespawn(), instance_zulaman::instance_zulaman_InstanceMapScript::SummonHostage(), instance_stratholme::instance_stratholme_InstanceMapScript::Update(), Creature::Update(), boss_pyroguard_emberseer::UpdateAI(), boss_chromaggus::UpdateAI(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::UpdateAI(), boss_cthun::cthunAI::UpdateAI(), generic_vehicleAI_toc5::generic_vehicleAI_toc5AI::UpdateAI(), boss_warrior_toc5::boss_warrior_toc5AI::UpdateAI(), boss_hunter_toc5::boss_hunter_toc5AI::UpdateAI(), UpdateAreaDependentAuras(), InstanceScript::UpdateEncounterState(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::UpdateMoira(), boss_netherspite::boss_netherspiteAI::UpdatePortals(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::UpdateQuestCredit(), UpdateWorldState(), and npc_thrall_old_hillsbrad::WaypointReached().

◆ GetPlayersCountExceptGMs()

uint32 Map::GetPlayersCountExceptGMs ( ) const

◆ GetRespawnInfo() [1/2]

RespawnInfo * Map::GetRespawnInfo ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId 
) const
private

◆ GetRespawnInfo() [2/2]

void Map::GetRespawnInfo ( std::vector< RespawnInfo const * > &  respawnData,
SpawnObjectTypeMask  types 
) const

◆ GetRespawnMapForType() [1/2]

RespawnInfoMap & Map::GetRespawnMapForType ( SpawnObjectType  type)
inlineprivate

◆ GetRespawnMapForType() [2/2]

RespawnInfoMap const & Map::GetRespawnMapForType ( SpawnObjectType  type) const
inlineprivate

Definition at line 848 of file Map.h.

References ABORT, SPAWN_TYPE_CREATURE, and SPAWN_TYPE_GAMEOBJECT.

◆ GetRespawnTime()

time_t Map::GetRespawnTime ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId 
) const
inline

Definition at line 568 of file Map.h.

Referenced by ShouldBeSpawnedOnGridLoad().

◆ GetSpawnGroupData()

◆ GetSpawnMode()

◆ GetTransport()

◆ GetUnloadLock()

bool Map::GetUnloadLock ( GridCoord const &  p) const
inline

Definition at line 355 of file Map.h.

References CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.

◆ GetVisibilityRange()

◆ GetWaterLevel()

float Map::GetWaterLevel ( float  x,
float  y 
) const

◆ GetWaterOrGroundLevel()

float Map::GetWaterOrGroundLevel ( uint32  phasemask,
float  x,
float  y,
float  z,
float *  ground = nullptr,
bool  swim = false,
float  collisionHeight = 2.03128f 
) const

◆ GetWeakPtr()

Trinity::unique_weak_ptr< Map > Map::GetWeakPtr ( ) const
inline

Definition at line 411 of file Map.h.

◆ GetWorldObjectBySpawnId()

WorldObject * Map::GetWorldObjectBySpawnId ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId 
) const
inline

Definition at line 493 of file Map.h.

References SPAWN_TYPE_CREATURE, and SPAWN_TYPE_GAMEOBJECT.

Referenced by SpawnGroupSpawn().

◆ GetZoneAndAreaId() [1/2]

void Map::GetZoneAndAreaId ( uint32  phaseMask,
uint32 &  zoneid,
uint32 &  areaid,
float  x,
float  y,
float  z 
) const

Definition at line 2627 of file Map.cpp.

References GetAreaId(), and sAreaTableStore.

Referenced by WorldObject::AddToWorld(), and MapManager::GetZoneAndAreaId().

◆ GetZoneAndAreaId() [2/2]

void Map::GetZoneAndAreaId ( uint32  phaseMask,
uint32 &  zoneid,
uint32 &  areaid,
Position const &  pos 
) const
inline

◆ GetZoneId() [1/2]

uint32 Map::GetZoneId ( uint32  phaseMask,
float  x,
float  y,
float  z 
) const

Definition at line 2617 of file Map.cpp.

References GetAreaId(), and sAreaTableStore.

Referenced by MapManager::GetZoneId(), and list_commandscript::HandleListRespawnsCommand().

◆ GetZoneId() [2/2]

uint32 Map::GetZoneId ( uint32  phaseMask,
Position const &  pos 
) const
inline

Definition at line 387 of file Map.h.

References Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), and GetZoneId().

Referenced by GetZoneId().

◆ GridMarkNoUnload()

◆ GridUnmarkNoUnload()

void Map::GridUnmarkNoUnload ( uint32  x,
uint32  y 
)

◆ HavePlayers()

◆ InitializeObject() [1/3]

template<>
void Map::InitializeObject ( Creature *  obj)

Definition at line 618 of file Map.cpp.

References MapObject::_moveState, and MAP_OBJECT_CELL_MOVE_NONE.

◆ InitializeObject() [2/3]

template<>
void Map::InitializeObject ( GameObject *  obj)

Definition at line 624 of file Map.cpp.

References MapObject::_moveState, and MAP_OBJECT_CELL_MOVE_NONE.

◆ InitializeObject() [3/3]

template<class T >
void Map::InitializeObject ( T *  obj)
private

Definition at line 615 of file Map.cpp.

Referenced by AddToMap().

◆ InitStateMachine()

void Map::InitStateMachine ( )
static

◆ InitVisibilityDistance()

void Map::InitVisibilityDistance ( )
virtual

◆ InsertGameObjectModel()

void Map::InsertGameObjectModel ( GameObjectModel const &  model)
inline

◆ Instanceable()

◆ Is25ManRaid()

◆ IsBattleArena()

bool Map::IsBattleArena ( ) const

◆ IsBattleground()

bool Map::IsBattleground ( ) const

◆ IsBattlegroundOrArena()

◆ isCellMarked()

bool Map::isCellMarked ( uint32  pCellId)
inline

Definition at line 454 of file Map.h.

Referenced by ProcessRelocationNotifies(), and VisitNearbyCellsOf().

◆ IsDungeon()

◆ IsGridLoaded() [1/4]

bool Map::IsGridLoaded ( float  x,
float  y 
) const
inline

Definition at line 352 of file Map.h.

References Trinity::ComputeGridCoord(), and IsGridLoaded().

Referenced by IsGridLoaded().

◆ IsGridLoaded() [2/4]

◆ IsGridLoaded() [3/4]

bool Map::IsGridLoaded ( Position const &  pos) const
inline

Definition at line 353 of file Map.h.

References Position::GetPositionX(), Position::GetPositionY(), and IsGridLoaded().

Referenced by IsGridLoaded().

◆ IsGridLoaded() [4/4]

◆ IsHeroic()

bool Map::IsHeroic ( ) const

Definition at line 4251 of file Map.cpp.

References DUNGEON_DIFFICULTY_HEROIC, i_spawnMode, IsRaid(), and RAID_DIFFICULTY_10MAN_HEROIC.

Referenced by spell_kelidan_the_breaker_burning_nova::AfterApply(), spell_kelidan_the_breaker_burning_nova::AfterRemove(), instance_gundrak::instance_gundrak_InstanceMapScript::CheckRequiredBosses(), boss_mal_ganis::boss_mal_ganisAI::DamageTaken(), BattleExperienceEvent::Execute(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::FillInitialWorldStates(), spell_freezing_circle::HandleDamage(), spell_volkhan_cool_down::HandlePeriodicDummyEffect(), spell_prince_taldaram_conjure_flame_sphere::HandleScript(), spell_gal_darah_clear_puncture::HandleScript(), IsRaidOrHeroicDungeon(), instance_gundrak::instance_gundrak_InstanceMapScript::OnGameObjectCreate(), spell_black_morass_time_rift_periodic::OnPeriodic(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::OnPlayerEnter(), at_sindragosa_lair::OnTrigger(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnUnitDeath(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::ReadSaveDataMore(), spell_bronjahm_magic_bane::RecalculateDamage(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetBossState(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_arcatraz::instance_arcatraz_InstanceMapScript::SetBossState(), and instance_shattered_halls::instance_shattered_halls_InstanceMapScript::WriteSaveDataMore().

◆ isInLineOfSight()

bool Map::isInLineOfSight ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2,
uint32  phasemask,
LineOfSightChecks  checks,
VMAP::ModelIgnoreFlags  ignoreFlags 
) const

◆ IsInWater()

bool Map::IsInWater ( uint32  phaseMask,
float  x,
float  y,
float  z,
LiquidData *  data = nullptr 
) const

Definition at line 2895 of file Map.cpp.

References GetLiquidStatus(), LIQUID_MAP_IN_WATER, and LIQUID_MAP_UNDER_WATER.

◆ IsNonRaidDungeon()

bool Map::IsNonRaidDungeon ( ) const

◆ IsRaid()

◆ IsRaidOrHeroicDungeon()

bool Map::IsRaidOrHeroicDungeon ( ) const

Definition at line 4246 of file Map.cpp.

References IsHeroic(), and IsRaid().

Referenced by Unit::Kill(), and InstanceMap::SetResetSchedule().

◆ IsRemovalGrid() [1/2]

bool Map::IsRemovalGrid ( float  x,
float  y 
) const
inline

◆ IsRemovalGrid() [2/2]

bool Map::IsRemovalGrid ( Position const &  pos) const
inline

Definition at line 349 of file Map.h.

References Position::GetPositionX(), Position::GetPositionY(), and IsRemovalGrid().

Referenced by IsRemovalGrid().

◆ IsSpawnGroupActive()

◆ IsUnderWater()

bool Map::IsUnderWater ( uint32  phaseMask,
float  x,
float  y,
float  z 
) const

◆ IsWorldMap()

bool Map::IsWorldMap ( ) const

Definition at line 4226 of file Map.cpp.

References i_mapEntry, and MapEntry::IsWorldMap().

◆ LoadAllCells()

◆ LoadCorpseData()

◆ LoadGrid()

◆ LoadMap()

void Map::LoadMap ( int  gx,
int  gy,
bool  reload = false 
)
private

◆ LoadMapAndVMap()

void Map::LoadMapAndVMap ( int  gx,
int  gy 
)
private

Definition at line 238 of file Map.cpp.

References i_InstanceId, LoadMap(), LoadMMap(), and LoadVMap().

Referenced by EnsureGridCreated_i().

◆ LoadMMap()

void Map::LoadMMap ( int  gx,
int  gy 
)
private

◆ LoadRespawnTimes()

◆ LoadVMap()

◆ markCell()

void Map::markCell ( uint32  pCellId)
inline

Definition at line 455 of file Map.h.

Referenced by VisitNearbyCellsOf().

◆ MoveAllCreaturesInMoveList()

◆ MoveAllDynamicObjectsInMoveList()

◆ MoveAllGameObjectsInMoveList()

◆ PlayerRelocation()

◆ ProcessRelocationNotifies()

◆ ProcessRespawns()

◆ RemoveAllObjectsInRemoveList()

◆ RemoveAllPlayers()

◆ RemoveCorpse()

◆ RemoveCreatureFromMoveList()

void Map::RemoveCreatureFromMoveList ( Creature *  c)
private

◆ RemoveDynamicObjectFromMoveList()

void Map::RemoveDynamicObjectFromMoveList ( DynamicObject *  go)
private

◆ RemoveFromActive()

◆ RemoveFromActiveHelper()

void Map::RemoveFromActiveHelper ( WorldObject *  obj)
inlineprivate

Definition at line 817 of file Map.h.

Referenced by RemoveFromActive().

◆ RemoveFromMap() [1/2]

template<class T >
void Map::RemoveFromMap ( T *  obj,
bool  remove 
)

◆ RemoveFromMap() [2/2]

◆ RemoveGameObjectFromMoveList()

void Map::RemoveGameObjectFromMoveList ( GameObject *  go)
private

◆ RemoveGameObjectModel()

void Map::RemoveGameObjectModel ( GameObjectModel const &  model)
inline

◆ RemoveOldCorpses()

void Map::RemoveOldCorpses ( )

◆ RemovePlayerFromMap()

◆ RemoveRespawnTime()

void Map::RemoveRespawnTime ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId,
CharacterDatabaseTransaction  dbTrans = nullptr,
bool  alwaysDeleteFromDB = false 
)
inline

◆ RemoveUpdateObject()

void Map::RemoveUpdateObject ( Object *  obj)
inline

Definition at line 625 of file Map.h.

Referenced by DeleteFromWorld(), and WorldObject::RemoveFromObjectUpdate().

◆ RemoveWorldObject()

void Map::RemoveWorldObject ( WorldObject *  obj)
inline

Definition at line 462 of file Map.h.

Referenced by WorldObject::ResetMap(), SwitchGridContainers(), and SwitchGridContainers().

◆ ResetGridExpiry()

void Map::ResetGridExpiry ( NGridType &  grid,
float  factor = 1 
) const
inline

◆ resetMarkedCells()

void Map::resetMarkedCells ( )
inline

Definition at line 453 of file Map.h.

Referenced by Update().

◆ Respawn() [1/2]

◆ Respawn() [2/2]

void Map::Respawn ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId,
CharacterDatabaseTransaction  dbTrans = nullptr 
)
inline

Definition at line 768 of file Map.h.

◆ SaveRespawnInfoDB()

◆ SaveRespawnTime()

◆ ScriptCommandStart()

void Map::ScriptCommandStart ( ScriptInfo const &  script,
uint32  delay,
Object *  source,
Object *  target 
)

◆ ScriptsProcess()

void Map::ScriptsProcess ( )
private

Process queued scripts.

  • Process overdue queued scripts

Definition at line 312 of file MapScripts.cpp.

References _creatureBySpawnIdStore, _FindGameObject(), _GetScriptCreature(), _GetScriptCreatureSourceOrTarget(), _GetScriptGameObjectSourceOrTarget(), _GetScriptPlayer(), _GetScriptPlayerSourceOrTarget(), _GetScriptUnit(), _GetScriptWorldObject(), _ScriptProcessDoor(), AddToMap(), ScriptInfo::Amount, Player::AreaExploredOrEventHappens(), ASSERT, ScriptInfo::CallScript, WorldObject::CastSpell(), ScriptInfo::CastSpell, CHAT_TYPE_BOSS_EMOTE, CHAT_TYPE_BOSS_WHISPER, CHAT_TYPE_SAY, CHAT_TYPE_TEXT_EMOTE, CHAT_TYPE_WHISPER, CHAT_TYPE_YELL, ScriptInfo::ChatType, ScriptInfo::command, Corpse, ScriptInfo::CreateItem, ScriptInfo::CreatureEntry, ScriptInfo::DespawnDelay, ScriptInfo::DespawnSelf, ScriptInfo::DestX, ScriptInfo::DestY, ScriptInfo::DestZ, ScriptInfo::Distance, ScriptInfo::Emote, ScriptInfo::EmoteID, ScriptInfo::Equip, EQUIP_ERR_OK, ScriptInfo::EquipmentID, Player::FailQuest(), ScriptInfo::FieldID, ScriptInfo::FieldSet, ScriptInfo::FieldValue, WorldObject::FindNearestCreature(), ScriptInfo::Flags, ScriptInfo::FlagToggle, GameObject, GAMEOBJECT_TYPE_BUTTON, GAMEOBJECT_TYPE_DOOR, GAMEOBJECT_TYPE_FISHINGNODE, GAMEOBJECT_TYPE_TRAP, GetCorpse(), GetCreature(), ScriptInfo::GetDebugInfo(), WorldObject::GetDistance(), GetGameObject(), GameTime::GetGameTime(), GameObject::GetGoType(), Object::GetGUID(), ObjectGuid::GetHigh(), WorldObject::GetMap(), Position::GetOrientation(), GetPet(), GetPlayer(), GetScriptsMapByType(), GetTransport(), Object::GetTypeId(), GO_READY, ScriptInfo::GOGuid, ObjectGuid::IsEmpty(), ScriptInfo::IsRepeatable, GameObject::isSpawned(), WorldObject::IsWithinDistInMap(), Item, ScriptInfo::ItemEntry, JUST_DIED, ScriptInfo::Kill, ScriptInfo::KillCredit, ScriptInfo::LoadPath, m_scriptSchedule, ScriptInfo::MapID, Mo_Transport, ScriptInfo::Model, ScriptInfo::ModelID, Unit::MonsterMoveWithSpeed(), ScriptInfo::Movement, ScriptInfo::MovementDistance, ScriptInfo::MovementType, ScriptInfo::MoveTo, ScriptInfo::MovieID, Unit::NearTeleportTo(), NULL_BAG, NULL_SLOT, OBJECT_FIELD_ENTRY, ScriptInfo::Orientation, ScriptAction::ownerGUID, ScriptInfo::Path, ScriptInfo::PathID, Pet, Player, ScriptInfo::PlayMovie, ScriptInfo::PlaySound, ScriptInfo::PosX, ScriptInfo::PosY, ScriptInfo::PosZ, ScriptInfo::QuestExplored, ScriptInfo::QuestID, RANDOM_MOTION_TYPE, ScriptInfo::RemoveAura, ScriptInfo::RemoveCorpse, ScriptInfo::RespawnGameobject, Unit::Say(), ScriptAction::script, SCRIPT_COMMAND_ACTIVATE_OBJECT, SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT, SCRIPT_COMMAND_CAST_SPELL, SCRIPT_COMMAND_CLOSE_DOOR, SCRIPT_COMMAND_CLOSE_GOSSIP, SCRIPT_COMMAND_CREATE_ITEM, SCRIPT_COMMAND_DESPAWN_SELF, SCRIPT_COMMAND_EMOTE, SCRIPT_COMMAND_EQUIP, SCRIPT_COMMAND_FIELD_SET, SCRIPT_COMMAND_FLAG_REMOVE, SCRIPT_COMMAND_FLAG_SET, SCRIPT_COMMAND_KILL, SCRIPT_COMMAND_KILL_CREDIT, SCRIPT_COMMAND_LOAD_PATH, SCRIPT_COMMAND_MODEL, SCRIPT_COMMAND_MOVE_TO, SCRIPT_COMMAND_MOVEMENT, SCRIPT_COMMAND_OPEN_DOOR, SCRIPT_COMMAND_ORIENTATION, SCRIPT_COMMAND_PLAY_SOUND, SCRIPT_COMMAND_PLAYMOVIE, SCRIPT_COMMAND_QUEST_EXPLORED, SCRIPT_COMMAND_REMOVE_AURA, SCRIPT_COMMAND_RESPAWN_GAMEOBJECT, SCRIPT_COMMAND_TALK, SCRIPT_COMMAND_TELEPORT_TO, SCRIPT_COMMAND_TEMP_SUMMON_CREATURE, ScriptInfo::ScriptID, ScriptsStart(), ScriptInfo::ScriptType, ScriptInfo::SearchRadius, GameObject::SetLootState(), GameObject::SetRespawnTime(), SF_CASTSPELL_SEARCH_CREATURE, SF_CASTSPELL_SOURCE_TO_SOURCE, SF_CASTSPELL_SOURCE_TO_TARGET, SF_CASTSPELL_TARGET_TO_SOURCE, SF_CASTSPELL_TARGET_TO_TARGET, SF_CASTSPELL_TRIGGERED, SF_EMOTE_USE_STATE, SF_KILLCREDIT_REWARD_GROUP, SF_ORIENTATION_FACE_TARGET, SF_PLAYSOUND_DISTANCE_SOUND, SF_PLAYSOUND_TARGET_PLAYER, SF_REMOVEAURA_REVERSE, SF_TALK_USE_PLAYER, SF_TELEPORT_USE_CREATURE, sMapMgr, ScriptInfo::SoundID, ScriptAction::sourceGUID, ScriptInfo::SpellID, sWaypointMgr, ScriptInfo::Talk, ScriptAction::targetGUID, TC_LOG_ERROR, ScriptInfo::TeleportTo, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, ScriptInfo::TempSummonCreature, Unit::TextEmote(), ScriptInfo::TextID, Object::ToGameObject(), Object::ToPlayer(), ObjectGuid::ToString(), Object::ToUnit(), Transport, ScriptInfo::TravelTime, TYPEID_GAMEOBJECT, TYPEID_PLAYER, TYPEID_UNIT, Unit, Vehicle, WAYPOINT_MOTION_TYPE, Unit::Whisper(), and Unit::Yell().

Referenced by ScriptCommandStart(), ScriptsStart(), and Update().

◆ ScriptsStart()

void Map::ScriptsStart ( std::map< uint32, std::multimap< uint32, ScriptInfo > > const &  scripts,
uint32  id,
Object *  source,
Object *  target 
)

Put scripts in the execution queue.

  • Find the script map
  • Schedule script execution for all scripts in the script map
  • If one of the effects should be immediate, launch the script execution

Definition at line 35 of file MapScripts.cpp.

References ObjectGuid::Empty, GameTime::GetGameTime(), Object::GetGUID(), i_scriptLock, m_scriptSchedule, ScriptAction::ownerGUID, ScriptAction::script, ScriptsProcess(), sMapMgr, ScriptAction::sourceGUID, ScriptAction::targetGUID, and Object::ToItem().

Referenced by Transport::DoEventIfAny(), FlightPathMovementGenerator::DoEventIfAny(), Spell::EffectSendEvent(), WaypointMovementGenerator< Creature >::OnArrived(), ScriptsProcess(), Spell::SendLoot(), and GameObject::Use().

◆ SendInitSelf()

◆ SendInitTransports()

void Map::SendInitTransports ( Player *  player)

◆ SendObjectUpdates()

void Map::SendObjectUpdates ( )
private

Definition at line 3008 of file Map.cpp.

References _updateObjects, ASSERT, Object::BuildUpdate(), ByteBuffer::clear(), and Object::IsInWorld().

Referenced by Update().

◆ SendRemoveTransports()

void Map::SendRemoveTransports ( Player *  player)

◆ SendToPlayers()

void Map::SendToPlayers ( WorldPacket const *  data) const

◆ SendZoneDynamicInfo()

◆ SendZoneMessage()

bool Map::SendZoneMessage ( uint32  zone,
WorldPacket const *  packet,
WorldSession const *  self = nullptr,
uint32  team = 0 
) const

Send a packet to all players (or players selected team) in the zone (except self if mentioned)

Definition at line 3675 of file Map.cpp.

References GetPlayers(), Player::GetSession(), Player::GetTeam(), WorldObject::GetZoneId(), Object::IsInWorld(), and Player::SendDirectMessage().

Referenced by SendZoneText(), SetZoneMusic(), SetZoneOverrideLight(), SetZoneWeather(), and Weather::UpdateWeather().

◆ SendZoneText()

void Map::SendZoneText ( uint32  zoneId,
const char *  text,
WorldSession const *  self = nullptr,
uint32  team = 0 
) const

Send a System Message to all players in the zone (except self if mentioned)

Definition at line 4756 of file Map.cpp.

References CHAT_MSG_SYSTEM, WorldPackets::Chat::Chat::Initialize(), LANG_UNIVERSAL, SendZoneMessage(), and WorldPackets::Chat::Chat::Write().

Referenced by OutdoorPvPSI::HandleAreaTrigger().

◆ SendZoneWeather() [1/2]

void Map::SendZoneWeather ( uint32  zoneId,
Player *  player 
) const

Definition at line 4731 of file Map.cpp.

References _zoneDynamicInfo, and SendZoneWeather().

Referenced by SendZoneDynamicInfo(), and SendZoneWeather().

◆ SendZoneWeather() [2/2]

◆ setNGrid()

void Map::setNGrid ( NGridType *  grid,
uint32  x,
uint32  y 
)
inlineprivate

Definition at line 2998 of file Map.cpp.

References ABORT, i_grids, MAX_NUMBER_OF_GRIDS, and TC_LOG_ERROR.

Referenced by EnsureGridCreated_i(), Map(), and UnloadGrid().

◆ SetSpawnGroupActive()

void Map::SetSpawnGroupActive ( uint32  groupId,
bool  state 
)
private

◆ SetSpawnGroupInactive()

void Map::SetSpawnGroupInactive ( uint32  groupId)
inline

◆ SetTimer()

void Map::SetTimer ( uint32  t)
inlineprivate

Definition at line 644 of file Map.h.

References MIN_GRID_DELAY.

◆ SetUnloadLock()

void Map::SetUnloadLock ( GridCoord const &  p,
bool  on 
)
inline

Definition at line 356 of file Map.h.

References CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.

◆ SetUnloadReferenceLock()

void Map::SetUnloadReferenceLock ( GridCoord const &  p,
bool  on 
)
inlineprotected

◆ SetWeakPtr()

void Map::SetWeakPtr ( Trinity::unique_weak_ptr< Map >  weakRef)
inline

◆ SetZoneMusic()

◆ SetZoneOverrideLight()

◆ SetZoneWeather()

◆ ShouldBeSpawnedOnGridLoad() [1/2]

template<typename T >
bool Map::ShouldBeSpawnedOnGridLoad ( ObjectGuid::LowType  spawnId) const
inline

Definition at line 784 of file Map.h.

References ShouldBeSpawnedOnGridLoad().

Referenced by ShouldBeSpawnedOnGridLoad().

◆ ShouldBeSpawnedOnGridLoad() [2/2]

◆ SpawnGroupDespawn()

◆ SpawnGroupSpawn()

bool Map::SpawnGroupSpawn ( uint32  groupId,
bool  ignoreRespawn = false,
bool  force = false,
std::vector< WorldObject * > *  spawnedObjects = nullptr 
)

Definition at line 3382 of file Map.cpp.

References ABORT_MSG, ASSERT, ASSERT_NOTNULL, SpawnGroupTemplateData::flags, GetId(), GetRespawnMapForType(), GetSpawnGroupData(), GetSpawnMode(), GetWorldObjectBySpawnId(), IsGridLoaded(), Creature::LoadFromDB(), GameObject::LoadFromDB(), SpawnGroupTemplateData::mapId, SpawnMetadata::mapId, RemoveRespawnTime(), SetSpawnGroupActive(), sObjectMgr, SPAWN_TYPE_CREATURE, SPAWN_TYPE_GAMEOBJECT, SPAWNGROUP_FLAG_SYSTEM, SpawnMetadata::spawnId, TC_LOG_ERROR, SpawnMetadata::ToSpawnData(), SpawnMetadata::type, and SpawnMetadata::TypeHasData().

Referenced by boss_nalorakk::DoAction(), boss_leotheras_the_blind::DoAction(), boss_kelidan_the_breaker::DoAction(), boss_hexlord_malacrass::DoSpawnCompanions(), HandleNpcSpawnGroup(), boss_crone::JustAppeared(), boss_janalai::JustAppeared(), boss_general_bjarngrim::JustAppeared(), boss_nexusprince_shaffar::JustAppeared(), boss_fathomlord_karathress::JustAppeared(), boss_leotheras_the_blind::JustAppeared(), boss_kelidan_the_breaker::JustAppeared(), boss_kaelthas::JustAppeared(), boss_majordomo::JustReachedHome(), boss_nexusprince_shaffar::JustReachedHome(), npc_grandmother::OnGossipSelect(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::OnPlayerEnter(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnPlayerEnter(), instance_stratholme::instance_stratholme_InstanceMapScript::OnUnitDeath(), SmartScript::ProcessAction(), boss_nalorakk::Reset(), boss_drakkari_colossus::Reset(), boss_high_king_maulgar::Reset(), instance_molten_core::instance_molten_core_InstanceMapScript::SetBossState(), instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj_InstanceMapScript::SetBossState(), instance_uldaman::instance_uldaman_InstanceMapScript::SetData(), instance_blood_furnace::instance_blood_furnace_InstanceMapScript::SetData(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SetSpawnGroupState(), instance_molten_core::instance_molten_core_InstanceMapScript::SpawnMajordomoExecutus(), SummonCroneIfReady(), instance_ramparts::instance_ramparts_InstanceMapScript::Update(), boss_julianne::UpdateAI(), boss_akilzon::UpdateAI(), npc_medivh_bm::UpdateAI(), boss_anzu::UpdateAI(), boss_the_lurker_below::UpdateAI(), InstanceScript::UpdateSpawnGroups(), and boss_majordomo::UpdateSpecialEvents().

◆ SummonCreature()

TempSummon * Map::SummonCreature ( uint32  entry,
Position const &  pos,
SummonPropertiesEntry const *  properties = nullptr,
uint32  duration = 0,
WorldObject *  summoner = nullptr,
uint32  spellId = 0,
uint32  vehId = 0,
ObjectGuid  privateObjectOwner = ObjectGuid::Empty 
)

Definition at line 1853 of file Object.cpp.

References AddToMap(), SummonPropertiesEntry::Control, Creature::Create(), SummonPropertiesEntry::Flags, WorldObject::GetPhaseMask(), GetVisibilityRange(), TempSummon::InitStats(), TempSummon::InitSummon(), PHASEMASK_NORMAL, Unit::SetCreatedBySpell(), Creature::SetHomePosition(), WorldObject::SetPrivateObjectOwner(), SUMMON_CATEGORY_ALLY, SUMMON_CATEGORY_PET, SUMMON_CATEGORY_PUPPET, SUMMON_CATEGORY_UNK, SUMMON_CATEGORY_VEHICLE, SUMMON_CATEGORY_WILD, SUMMON_TYPE_GUARDIAN, SUMMON_TYPE_GUARDIAN2, SUMMON_TYPE_LIGHTWELL, SUMMON_TYPE_MINION, SUMMON_TYPE_MINIPET, SUMMON_TYPE_TOTEM, SUMMON_TYPE_VEHICLE, SUMMON_TYPE_VEHICLE2, SummonPropertiesEntry::Title, Object::ToCreature(), Object::ToUnit(), UNIT_MASK_GUARDIAN, UNIT_MASK_MINION, UNIT_MASK_PUPPET, UNIT_MASK_SUMMON, UNIT_MASK_TOTEM, and Cell::VisitAllObjects().

Referenced by instance_scholomance::instance_scholomance_InstanceMapScript::CheckToSpawnGandling(), npc_halion_controller::DoAction(), Spell::EffectSummonType(), instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::HandleStartEvent(), spell_halion_damage_aoe_summon::HandleSummon(), spell_putricide_mutated_transformation::HandleSummon(), spell_dk_raise_ally::spell_dk_raise_ally_SpellScript::HandleSummon(), npc_halion_controller::JustAppeared(), boss_devourer_of_souls::JustDied(), boss_ossirian::boss_ossirianAI::JustEngagedWith(), boss_devourer_of_souls::JustEngagedWith(), go_strange_pool::OnGossipHello(), instance_zulaman::instance_zulaman_InstanceMapScript::OnPlayerEnter(), instance_ulduar::instance_ulduar_InstanceMapScript::OnPlayerEnter(), at_sindragosa_lair::OnTrigger(), instance_karazhan::instance_karazhan_InstanceMapScript::OnUnitDeath(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnUnitDeath(), spell_halion_twilight_phasing::Phase(), instance_zulgurub::instance_zulgurub_InstanceMapScript::ProcessEvent(), instance_violet_hold::instance_violet_hold_InstanceMapScript::ProcessEvent(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::ProcessEvent(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::SetBossState(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::SetBossState(), instance_ulduar::instance_ulduar_InstanceMapScript::SetBossState(), instance_old_hillsbrad::instance_old_hillsbrad_InstanceMapScript::SetData(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData(), npc_arthas_stratholme::npc_arthas_stratholmeAI::SetGUID(), npc_malcolm_moore::Spawn(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SpawnEscapeEvent(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SpawnInfiniteCorruptor(), instance_zulfarrak::instance_zulfarrak_InstanceMapScript::SpawnPyramidWave(), SummonCreatureGroup(), Spell::SummonGuardian(), instance_blackwing_lair::instance_blackwing_lair_InstanceMapScript::Update(), instance_magisters_terrace::instance_magisters_terrace_InstanceMapScript::Update(), instance_scarlet_monastery::instance_scarlet_monastery_InstanceMapScript::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::Update(), npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(), npc_halion_controller::UpdateAI(), boss_the_lich_king::UpdateAI(), and npc_brann_bronzebeard_algalon::UpdateAI().

◆ SummonCreatureGroup()

void Map::SummonCreatureGroup ( uint8  group,
std::list< TempSummon * > *  list = nullptr 
)

Summons group of creatures.

Parameters
groupId of group to summon.
listList to store pointers to summoned creatures.

Definition at line 1960 of file Object.cpp.

References GetId(), sObjectMgr, SummonCreature(), and SUMMONER_TYPE_MAP.

Referenced by at_ancient_leaf::OnTrigger().

◆ SwitchGridContainers() [1/3]

◆ SwitchGridContainers() [2/3]

◆ SwitchGridContainers() [3/3]

template<class T >
void Map::SwitchGridContainers ( T *  obj,
bool  on 
)

Definition at line 373 of file Map.cpp.

◆ ToBattlegroundMap() [1/2]

BattlegroundMap * Map::ToBattlegroundMap ( )
inline

Definition at line 543 of file Map.h.

Referenced by Player::LoadFromDB(), and npc_ioc_gunship_captain::UpdateAI().

◆ ToBattlegroundMap() [2/2]

BattlegroundMap const * Map::ToBattlegroundMap ( ) const
inline

Definition at line 544 of file Map.h.

◆ ToInstanceMap() [1/2]

◆ ToInstanceMap() [2/2]

InstanceMap const * Map::ToInstanceMap ( ) const
inline

Definition at line 541 of file Map.h.

◆ ToMapInstanced() [1/2]

◆ ToMapInstanced() [2/2]

MapInstanced const * Map::ToMapInstanced ( ) const
inline

Definition at line 538 of file Map.h.

◆ UnloadAll()

◆ UnloadAllRespawnInfos()

void Map::UnloadAllRespawnInfos ( )
private

Definition at line 3194 of file Map.cpp.

References _creatureRespawnTimesBySpawnId, _gameObjectRespawnTimesBySpawnId, and _respawnTimes.

Referenced by ~Map().

◆ UnloadGrid()

◆ Update()

void Map::Update ( uint32  t_diff)
virtual

◆ UpdateAreaDependentAuras()

void Map::UpdateAreaDependentAuras ( )

◆ UpdateIteratorBack()

void Map::UpdateIteratorBack ( Player *  player)

Definition at line 4449 of file Map.cpp.

References Player::GetMapRef(), m_mapRefIter, and MapReference::nocheck_prev().

Referenced by Player::ResetMap().

◆ UpdatePlayerZoneStats()

void Map::UpdatePlayerZoneStats ( uint32  oldZone,
uint32  newZone 
)

Definition at line 747 of file Map.cpp.

References _zonePlayerCountMap, ASSERT, and MAP_INVALID_ZONE.

Referenced by Player::UpdateZone().

◆ Visit()

◆ VisitNearbyCellsOf()

Friends And Related Symbol Documentation

◆ MapReference

friend class MapReference
friend

Definition at line 303 of file Map.h.

Member Data Documentation

◆ _corpseBones

std::unordered_set<Corpse*> Map::_corpseBones
private

Definition at line 878 of file Map.h.

Referenced by AddCorpse(), RemoveCorpse(), RemoveOldCorpses(), and UnloadAll().

◆ _corpsesByCell

std::unordered_map<uint32, std::unordered_set<Corpse*> > Map::_corpsesByCell
private

Definition at line 876 of file Map.h.

Referenced by AddCorpse(), RemoveCorpse(), and UnloadAll().

◆ _corpsesByPlayer

std::unordered_map<ObjectGuid, Corpse*> Map::_corpsesByPlayer
private

Definition at line 877 of file Map.h.

Referenced by AddCorpse(), RemoveCorpse(), RemoveOldCorpses(), and UnloadAll().

◆ _creatureBySpawnIdStore

CreatureBySpawnIdContainer Map::_creatureBySpawnIdStore
private

Definition at line 874 of file Map.h.

Referenced by CheckRespawn(), and ScriptsProcess().

◆ _creatureRespawnTimesBySpawnId

RespawnInfoMap Map::_creatureRespawnTimesBySpawnId
private

Definition at line 834 of file Map.h.

Referenced by GetRespawnInfo(), and UnloadAllRespawnInfos().

◆ _creaturesToMove

std::vector<Creature*> Map::_creaturesToMove
private

Definition at line 661 of file Map.h.

Referenced by AddCreatureToMoveList(), MoveAllCreaturesInMoveList(), and UnloadAll().

◆ _creatureToMoveLock

bool Map::_creatureToMoveLock
private

◆ _dynamicObjectsToMove

std::vector<DynamicObject*> Map::_dynamicObjectsToMove
private

Definition at line 667 of file Map.h.

Referenced by AddDynamicObjectToMoveList(), and MoveAllDynamicObjectsInMoveList().

◆ _dynamicObjectsToMoveLock

bool Map::_dynamicObjectsToMoveLock
private

◆ _dynamicTree

DynamicMapTree Map::_dynamicTree
protected

◆ _farSpellCallbacks

MPSCQueue<FarSpellCallback> Map::_farSpellCallbacks
private

Definition at line 882 of file Map.h.

Referenced by AddFarSpellCallback(), and DelayedUpdate().

◆ _gameobjectBySpawnIdStore

GameObjectBySpawnIdContainer Map::_gameobjectBySpawnIdStore
private

Definition at line 875 of file Map.h.

Referenced by CheckRespawn().

◆ _gameObjectRespawnTimesBySpawnId

RespawnInfoMap Map::_gameObjectRespawnTimesBySpawnId
private

Definition at line 835 of file Map.h.

Referenced by GetRespawnInfo(), and UnloadAllRespawnInfos().

◆ _gameObjectsToMove

std::vector<GameObject*> Map::_gameObjectsToMove
private

Definition at line 664 of file Map.h.

Referenced by AddGameObjectToMoveList(), MoveAllGameObjectsInMoveList(), and UnloadAll().

◆ _gameObjectsToMoveLock

bool Map::_gameObjectsToMoveLock
private

◆ _gridLock

std::mutex Map::_gridLock
protected

Definition at line 692 of file Map.h.

Referenced by EnsureGridCreated().

◆ _guidGenerators

std::map<HighGuid, std::unique_ptr<ObjectGuidGenerator> > Map::_guidGenerators
private

Definition at line 872 of file Map.h.

Referenced by GetGuidSequenceGenerator().

◆ _mapLock

std::mutex Map::_mapLock
protected

◆ _objectsStore

MapStoredObjectTypesContainer Map::_objectsStore
private

Definition at line 873 of file Map.h.

Referenced by GetCorpse(), GetCreature(), GetDynamicObject(), GetGameObject(), and GetPet().

◆ _respawnCheckTimer

uint32 Map::_respawnCheckTimer
private

Definition at line 864 of file Map.h.

Referenced by Update().

◆ _respawnTimes

std::unique_ptr<RespawnListContainer> Map::_respawnTimes
private

◆ _toggledSpawnGroupIds

std::unordered_set<uint32> Map::_toggledSpawnGroupIds
private

Definition at line 862 of file Map.h.

Referenced by IsSpawnGroupActive(), and SetSpawnGroupActive().

◆ _transports

TransportsContainer Map::_transports
protected

◆ _transportsUpdateIter

TransportsContainer::iterator Map::_transportsUpdateIter
protected

Definition at line 714 of file Map.h.

Referenced by DelayedUpdate(), RemoveFromMap(), and Update().

◆ _updateObjects

std::unordered_set<Object*> Map::_updateObjects
private

Definition at line 880 of file Map.h.

Referenced by SendObjectUpdates().

◆ _weatherUpdateTimer

IntervalTimer Map::_weatherUpdateTimer
private

Definition at line 868 of file Map.h.

Referenced by Map(), and Update().

◆ _zoneDynamicInfo

◆ _zonePlayerCountMap

std::unordered_map<uint32, uint32> Map::_zonePlayerCountMap
private

Definition at line 865 of file Map.h.

Referenced by ApplyDynamicModeRespawnScaling(), Map(), and UpdatePlayerZoneStats().

◆ CreatureGroupHolder

std::unordered_map<ObjectGuid::LowType , CreatureGroup*> Map::CreatureGroupHolder

◆ GridMaps

Definition at line 734 of file Map.h.

Referenced by EnsureGridCreated_i(), GetGrid(), LoadMap(), Map(), and UnloadGrid().

◆ i_gridExpiry

time_t Map::i_gridExpiry
private

Definition at line 727 of file Map.h.

Referenced by EnsureGridCreated_i().

◆ i_grids

Definition at line 733 of file Map.h.

Referenced by setNGrid().

◆ i_InstanceId

uint32 Map::i_InstanceId
protected

◆ i_mapEntry

◆ i_objectsToRemove

std::set<WorldObject*> Map::i_objectsToRemove
private

Definition at line 742 of file Map.h.

Referenced by AddObjectToRemoveList(), RemoveAllObjectsInRemoveList(), and UnloadGrid().

◆ i_objectsToSwitch

std::map<WorldObject*, bool> Map::i_objectsToSwitch
private

Definition at line 743 of file Map.h.

Referenced by AddObjectToSwitchList(), and RemoveAllObjectsInRemoveList().

◆ i_scriptLock

bool Map::i_scriptLock
private

Definition at line 741 of file Map.h.

Referenced by ScriptCommandStart(), ScriptsStart(), and Update().

◆ i_spawnMode

uint8 Map::i_spawnMode
protected

Definition at line 695 of file Map.h.

Referenced by Is25ManRaid(), and IsHeroic().

◆ i_worldObjects

std::set<WorldObject*> Map::i_worldObjects
private

Definition at line 744 of file Map.h.

Referenced by ~Map().

◆ m_activeNonPlayers

ActiveNonPlayers Map::m_activeNonPlayers
protected

Definition at line 708 of file Map.h.

Referenced by ActiveObjectsNearGrid(), and Update().

◆ m_activeNonPlayersIter

ActiveNonPlayers::iterator Map::m_activeNonPlayersIter
protected

Definition at line 709 of file Map.h.

Referenced by Update().

◆ m_mapRefIter

MapRefManager::iterator Map::m_mapRefIter
protected

Definition at line 703 of file Map.h.

Referenced by Update(), and UpdateIteratorBack().

◆ m_mapRefManager

◆ m_parentMap

Map* Map::m_parentMap
private

Definition at line 731 of file Map.h.

Referenced by LoadMap(), Map(), and UnloadGrid().

◆ m_scriptSchedule

ScriptScheduleMap Map::m_scriptSchedule
private

Definition at line 747 of file Map.h.

Referenced by ScriptCommandStart(), ScriptsProcess(), ScriptsStart(), Update(), and ~Map().

◆ m_unloadTimer

◆ m_VisibilityNotifyPeriod

int32 Map::m_VisibilityNotifyPeriod
protected

◆ m_VisibleDistance

float Map::m_VisibleDistance
protected

◆ m_weakRef

Trinity::unique_weak_ptr<Map> Map::m_weakRef
protected

Definition at line 697 of file Map.h.

◆ marked_cells

std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> Map::marked_cells
private

Definition at line 735 of file Map.h.


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