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

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< MapGetWeakPtr () const
 
void SetWeakPtr (Trinity::unique_weak_ptr< Map > weakRef)
 
virtual EnterState CannotEnter (Player *)
 
char const * GetMapName () const
 
Difficulty GetDifficulty () const
 
bool IsRegularDifficulty () const
 
MapDifficulty 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)
 
TempSummonSummonCreature (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)
 
PlayerGetPlayer (ObjectGuid const &guid)
 
CorpseGetCorpse (ObjectGuid const &guid)
 
CreatureGetCreature (ObjectGuid const &guid)
 
GameObjectGetGameObject (ObjectGuid const &guid)
 
CreatureGetCreatureBySpawnId (ObjectGuid::LowType spawnId) const
 
GameObjectGetGameObjectBySpawnId (ObjectGuid::LowType spawnId) const
 
WorldObjectGetWorldObjectBySpawnId (SpawnObjectType type, ObjectGuid::LowType spawnId) const
 
TransportGetTransport (ObjectGuid const &guid)
 
DynamicObjectGetDynamicObject (ObjectGuid const &guid)
 
PetGetPet (ObjectGuid const &guid)
 
MapStoredObjectTypesContainerGetObjectsStore ()
 
CreatureBySpawnIdContainerGetCreatureBySpawnIdStore ()
 
CreatureBySpawnIdContainer const & GetCreatureBySpawnIdStore () const
 
GameObjectBySpawnIdContainerGetGameObjectBySpawnIdStore ()
 
GameObjectBySpawnIdContainer const & GetGameObjectBySpawnIdStore () const
 
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=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)
 
CorpseConvertCorpseToBones (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)
 
WeatherGetOrGenerateZoneDefaultWeather (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
 
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 ()
 

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< Mapm_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, ScriptActionScriptScheduleMap
 

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)
 
GridMapGetGrid (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)
 
NGridTypegetNGrid (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 ()
 
RespawnInfoGetRespawnInfo (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)
 
RespawnInfoMapGetRespawnMapForType (SpawnObjectType type)
 
RespawnInfoMap const & GetRespawnMapForType (SpawnObjectType type) const
 
void SetSpawnGroupActive (uint32 groupId, bool state)
 
ObjectGuidGeneratorGetGuidSequenceGenerator (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
 
Mapm_parentMap
 
NGridTypei_grids [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
 
GridMapGridMaps [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
 
std::bitset< TOTAL_NUMBER_OF_CELLS_PER_MAP *TOTAL_NUMBER_OF_CELLS_PER_MAPmarked_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 280 of file Map.h.

Member Typedef Documentation

◆ ActiveNonPlayers

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

Definition at line 687 of file Map.h.

◆ CreatureBySpawnIdContainer

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

Definition at line 491 of file Map.h.

◆ FarSpellCallback

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

Definition at line 781 of file Map.h.

◆ GameObjectBySpawnIdContainer

Definition at line 495 of file Map.h.

◆ PlayerList

Definition at line 447 of file Map.h.

◆ ScriptScheduleMap

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

Definition at line 726 of file Map.h.

◆ TransportsContainer

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

Definition at line 692 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 393 of file Map.h.

Constructor & Destructor Documentation

◆ Map()

Map::Map ( uint32  id,
time_t  expiry,
uint32  InstanceId,
uint8  SpawnMode,
Map _parent = nullptr 
)

Definition at line 272 of file Map.cpp.

+ Here is the call graph for this function:

◆ ~Map()

Map::~Map ( )
virtual

Definition at line 88 of file Map.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ _FindGameObject()

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

Definition at line 302 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptCreature()

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

Definition at line 223 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptCreatureSourceOrTarget()

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

Definition at line 124 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptGameObjectSourceOrTarget()

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

Definition at line 157 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptPlayer()

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

Definition at line 208 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptPlayerSourceOrTarget()

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

Definition at line 102 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptUnit()

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

Definition at line 190 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetScriptWorldObject()

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

Definition at line 238 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _ScriptProcessDoor()

void Map::_ScriptProcessDoor ( Object source,
Object target,
ScriptInfo const *  scriptInfo 
) const
inlineprivate

Definition at line 254 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ActiveObjectsNearGrid()

bool Map::ActiveObjectsNearGrid ( NGridType const &  ngrid) const

Definition at line 3695 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddCorpse()

void Map::AddCorpse ( Corpse corpse)

Definition at line 4603 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddCreatureToMoveList()

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

Definition at line 1207 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddDynamicObjectToMoveList()

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

Definition at line 1245 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddFarSpellCallback()

void Map::AddFarSpellCallback ( FarSpellCallback &&  callback)

Definition at line 3518 of file Map.cpp.

+ Here is the caller graph for this function:

◆ AddGameObjectToMoveList()

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

Definition at line 1226 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddObjectToRemoveList()

void Map::AddObjectToRemoveList ( WorldObject obj)

Definition at line 3562 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddObjectToSwitchList()

void Map::AddObjectToSwitchList ( WorldObject obj,
bool  on 
)

Definition at line 3571 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddPlayerToMap()

bool Map::AddPlayerToMap ( Player player)
virtual

Reimplemented in InstanceMap, and BattlegroundMap.

Definition at line 583 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddRespawnInfo()

bool Map::AddRespawnInfo ( RespawnInfo const &  info)
private

Definition at line 3137 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToActive()

void Map::AddToActive ( WorldObject obj)

Definition at line 3732 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToActiveHelper()

void Map::AddToActiveHelper ( WorldObject obj)
inlineprivate

Definition at line 792 of file Map.h.

+ Here is the caller graph for this function:

◆ AddToGrid() [1/5]

template<>
void Map::AddToGrid ( Corpse obj,
Cell const &  cell 
)

Definition at line 354 of file Map.cpp.

+ Here is the call graph for this function:

◆ AddToGrid() [2/5]

template<>
void Map::AddToGrid ( Creature obj,
Cell const &  cell 
)

Definition at line 321 of file Map.cpp.

+ Here is the call graph for this function:

◆ AddToGrid() [3/5]

template<>
void Map::AddToGrid ( DynamicObject obj,
Cell const &  cell 
)

Definition at line 342 of file Map.cpp.

+ Here is the call graph for this function:

◆ AddToGrid() [4/5]

template<>
void Map::AddToGrid ( GameObject obj,
Cell const &  cell 
)

Definition at line 333 of file Map.cpp.

+ Here is the call graph for this function:

◆ AddToGrid() [5/5]

template<class T >
void Map::AddToGrid ( T *  object,
Cell const &  cell 
)
private

Definition at line 311 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToMap() [1/2]

template<class T >
bool Map::AddToMap ( T *  obj)
Todo:
Needs clean up. An object should not be added to map twice.

Definition at line 630 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToMap() [2/2]

template<>
bool Map::AddToMap ( Transport obj)

Definition at line 677 of file Map.cpp.

+ Here is the call graph for this function:

◆ AddUpdateObject()

void Map::AddUpdateObject ( Object obj)
inline

Definition at line 600 of file Map.h.

+ Here is the caller graph for this function:

◆ AddWorldObject()

void Map::AddWorldObject ( WorldObject obj)
inline

Definition at line 441 of file Map.h.

+ Here is the caller graph for this function:

◆ ApplyDynamicModeRespawnScaling()

void Map::ApplyDynamicModeRespawnScaling ( WorldObject const *  obj,
ObjectGuid::LowType  spawnId,
uint32 respawnDelay,
uint32  mode 
) const

Definition at line 3312 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Balance()

void Map::Balance ( )
inline

Definition at line 534 of file Map.h.

+ Here is the caller graph for this function:

◆ buildNGridLinkage()

void Map::buildNGridLinkage ( NGridType pNGridType)
inlineprivate

Definition at line 655 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CannotEnter()

virtual EnterState Map::CannotEnter ( Player )
inlinevirtual

Reimplemented in MapInstanced, InstanceMap, and BattlegroundMap.

Definition at line 408 of file Map.h.

+ Here is the caller graph for this function:

◆ CanUnload()

bool Map::CanUnload ( uint32  diff)
inline

Definition at line 290 of file Map.h.

◆ CheckGridIntegrity()

bool Map::CheckGridIntegrity ( Creature c,
bool  moved 
) const

Definition at line 2907 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckRespawn()

bool Map::CheckRespawn ( RespawnInfo info)
private

Definition at line 3034 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ContainsGameObjectModel()

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

Definition at line 537 of file Map.h.

◆ ConvertCorpseToBones()

Corpse * Map::ConvertCorpseToBones ( ObjectGuid const &  ownerGuid,
bool  insignia = false 
)

Definition at line 4634 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreatureCellRelocation()

bool Map::CreatureCellRelocation ( Creature creature,
Cell  new_cell 
)
private

Definition at line 1406 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreatureRelocation()

void Map::CreatureRelocation ( Creature creature,
float  x,
float  y,
float  z,
float  ang,
bool  respawnRelocationOnFail = true 
)

Definition at line 1108 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreatureRespawnRelocation()

bool Map::CreatureRespawnRelocation ( Creature c,
bool  diffGridOnly 
)

Definition at line 1592 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DelayedUpdate()

void Map::DelayedUpdate ( uint32  diff)
virtual

Reimplemented in MapInstanced.

Definition at line 3523 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteCorpseData()

void Map::DeleteCorpseData ( )

Definition at line 4594 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

◆ DeleteFromWorld() [2/3]

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

Definition at line 464 of file Map.cpp.

+ Here is the caller graph for this function:

◆ DeleteFromWorld() [3/3]

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

Definition at line 479 of file Map.cpp.

+ Here is the call graph for this function:

◆ DeleteRespawnInfo()

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

Definition at line 3203 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteRespawnInfoFromDB()

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

Definition at line 3225 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteRespawnTimes()

void Map::DeleteRespawnTimes ( )
inline

Definition at line 562 of file Map.h.

+ Here is the caller graph for this function:

◆ DeleteRespawnTimesInDB()

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

Definition at line 4534 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteStateMachine()

void Map::DeleteStateMachine ( )
static

Definition at line 264 of file Map.cpp.

+ Here is the caller graph for this function:

◆ DespawnAll()

size_t Map::DespawnAll ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId 
)

Definition at line 3114 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRespawn()

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

Definition at line 3235 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DynamicObjectCellRelocation()

bool Map::DynamicObjectCellRelocation ( DynamicObject go,
Cell  new_cell 
)
private

Definition at line 1531 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DynamicObjectRelocation()

void Map::DynamicObjectRelocation ( DynamicObject go,
float  x,
float  y,
float  z,
float  orientation 
)

Definition at line 1174 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureGridCreated()

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

Definition at line 485 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureGridCreated_i()

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

Definition at line 493 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureGridLoaded()

bool Map::EnsureGridLoaded ( Cell const &  cell)
private

Definition at line 533 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnsureGridLoadedForActiveObject()

void Map::EnsureGridLoadedForActiveObject ( Cell const &  cell,
WorldObject object 
)
private

Definition at line 517 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ExistMap()

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

Definition at line 109 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ExistVMap()

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

Definition at line 138 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GameObjectCellRelocation()

bool Map::GameObjectCellRelocation ( GameObject go,
Cell  new_cell 
)
private

Definition at line 1470 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GameObjectRelocation()

void Map::GameObjectRelocation ( GameObject go,
float  x,
float  y,
float  z,
float  orientation,
bool  respawnRelocationOnFail = true 
)

Definition at line 1140 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GameObjectRespawnRelocation()

bool Map::GameObjectRespawnRelocation ( GameObject go,
bool  diffGridOnly 
)

Definition at line 1623 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateLowGuid()

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

Definition at line 587 of file Map.h.

+ Here is the caller graph for this function:

◆ GetActiveNonPlayersCount()

size_t Map::GetActiveNonPlayersCount ( ) const
inline

Definition at line 610 of file Map.h.

+ Here is the caller graph for this function:

◆ GetAreaId() [1/2]

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

Definition at line 2581 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAreaId() [2/2]

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

Definition at line 364 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAreaInfo()

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

Definition at line 2543 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCorpse()

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

Definition at line 4392 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCorpseByPlayer()

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

Definition at line 508 of file Map.h.

+ Here is the caller graph for this function:

◆ GetCorpsesInCell()

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

Definition at line 499 of file Map.h.

+ Here is the caller graph for this function:

◆ GetCreature()

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

Definition at line 4397 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCreatureBySpawnId()

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

Definition at line 4402 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCreatureBySpawnIdStore() [1/2]

CreatureBySpawnIdContainer & Map::GetCreatureBySpawnIdStore ( )
inline

Definition at line 492 of file Map.h.

+ Here is the caller graph for this function:

◆ GetCreatureBySpawnIdStore() [2/2]

CreatureBySpawnIdContainer const & Map::GetCreatureBySpawnIdStore ( ) const
inline

Definition at line 493 of file Map.h.

◆ GetCreatureRespawnTime()

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

Definition at line 554 of file Map.h.

+ Here is the caller graph for this function:

◆ GetDebugInfo()

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

Reimplemented in InstanceMap.

Definition at line 4839 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDifficulty()

Difficulty Map::GetDifficulty ( ) const
inline

Definition at line 412 of file Map.h.

+ Here is the caller graph for this function:

◆ GetDynamicObject()

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

Definition at line 4449 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEntrancePos()

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

Definition at line 4282 of file Map.cpp.

+ Here is the call graph for this function:

◆ GetEntry()

MapEntry const * Map::GetEntry ( ) const
inline

Definition at line 287 of file Map.h.

+ Here is the caller graph for this function:

◆ GetFullTerrainStatusForPosition()

void Map::GetFullTerrainStatusForPosition ( uint32  phaseMask,
float  x,
float  y,
float  z,
PositionFullTerrainStatus data,
Optional< uint8 reqLiquidType = {},
float  collisionHeight = 2.03128f 
) const

Definition at line 2723 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGameObject()

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

Definition at line 4430 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGameObjectBySpawnId()

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

Definition at line 4416 of file Map.cpp.

+ Here is the call graph for this function:

◆ GetGameObjectBySpawnIdStore() [1/2]

GameObjectBySpawnIdContainer & Map::GetGameObjectBySpawnIdStore ( )
inline

Definition at line 496 of file Map.h.

+ Here is the caller graph for this function:

◆ GetGameObjectBySpawnIdStore() [2/2]

GameObjectBySpawnIdContainer const & Map::GetGameObjectBySpawnIdStore ( ) const
inline

Definition at line 497 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 538 of file Map.h.

◆ GetGORespawnTime()

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

Definition at line 555 of file Map.h.

+ Here is the caller graph for this function:

◆ GetGrid()

GridMap * Map::GetGrid ( float  x,
float  y 
)
inlineprivate

Definition at line 2446 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGridExpiry()

time_t Map::GetGridExpiry ( void  ) const
inline

Definition at line 348 of file Map.h.

+ Here is the caller graph for this function:

◆ GetGridHeight()

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

Definition at line 2522 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGuidSequenceGenerator()

ObjectGuidGenerator & Map::GetGuidSequenceGenerator ( HighGuid  high)
private

Definition at line 3509 of file Map.cpp.

◆ GetHeight() [1/4]

float Map::GetHeight ( float  x,
float  y,
float  z,
bool  checkVMap = true,
float  maxSearchDist = DEFAULT_HEIGHT_SEARCH 
) const

Definition at line 2484 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeight() [2/4]

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

Definition at line 530 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 531 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeight() [4/4]

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

Definition at line 532 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetId()

uint32 Map::GetId ( ) const

Definition at line 4216 of file Map.cpp.

+ Here is the caller graph for this function:

◆ GetInstanceId()

uint32 Map::GetInstanceId ( ) const
inline

Definition at line 387 of file Map.h.

+ Here is the caller graph for this function:

◆ GetLinkedRespawnTime()

time_t Map::GetLinkedRespawnTime ( ObjectGuid  guid) const

Definition at line 4542 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLiquidStatus()

ZLiquidStatus Map::GetLiquidStatus ( uint32  phaseMask,
float  x,
float  y,
float  z,
Optional< uint8 ReqLiquidType,
LiquidData data = nullptr,
float  collisionHeight = 2.03128f 
) const

Definition at line 2635 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMapDifficulty()

MapDifficulty const * Map::GetMapDifficulty ( ) const

Definition at line 4211 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMapName()

char const * Map::GetMapName ( ) const

Definition at line 2924 of file Map.cpp.

+ Here is the caller graph for this function:

◆ GetMaxLowGuid()

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

Definition at line 594 of file Map.h.

+ Here is the caller graph for this function:

◆ GetMinHeight()

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

Definition at line 2530 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNGrid()

NGridType * Map::getNGrid ( uint32  x,
uint32  y 
) const
inlineprivate

Definition at line 657 of file Map.h.

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetObjectsStore()

MapStoredObjectTypesContainer & Map::GetObjectsStore ( )
inline

Definition at line 489 of file Map.h.

+ Here is the caller graph for this function:

◆ GetOrGenerateZoneDefaultWeather()

Weather * Map::GetOrGenerateZoneDefaultWeather ( uint32  zoneId)

Definition at line 4772 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetParent()

Map const * Map::GetParent ( ) const
inline

Definition at line 357 of file Map.h.

◆ GetPet()

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

Definition at line 4435 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPlayer()

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

Definition at line 4387 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPlayers()

PlayerList const & Map::GetPlayers ( ) const
inline

Definition at line 448 of file Map.h.

+ Here is the caller graph for this function:

◆ GetPlayersCountExceptGMs()

uint32 Map::GetPlayersCountExceptGMs ( ) const

Definition at line 3659 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRespawnInfo() [1/2]

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

Definition at line 3185 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRespawnInfo() [2/2]

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

Definition at line 3177 of file Map.cpp.

+ Here is the call graph for this function:

◆ GetRespawnMapForType() [1/2]

RespawnInfoMap & Map::GetRespawnMapForType ( SpawnObjectType  type)
inlineprivate

Definition at line 816 of file Map.h.

+ Here is the caller graph for this function:

◆ GetRespawnMapForType() [2/2]

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

Definition at line 828 of file Map.h.

◆ GetRespawnTime()

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

Definition at line 548 of file Map.h.

+ Here is the caller graph for this function:

◆ GetSpawnGroupData()

SpawnGroupTemplateData const * Map::GetSpawnGroupData ( uint32  groupId) const

Definition at line 3374 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSpawnMode()

uint8 Map::GetSpawnMode ( ) const
inline

Definition at line 388 of file Map.h.

+ Here is the caller graph for this function:

◆ GetTransport()

Transport * Map::GetTransport ( ObjectGuid const &  guid)

Definition at line 4440 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUnloadLock()

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

Definition at line 334 of file Map.h.

◆ GetVisibilityRange()

float Map::GetVisibilityRange ( ) const
inline

Definition at line 311 of file Map.h.

+ Here is the caller graph for this function:

◆ GetWaterLevel()

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

Definition at line 2862 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWaterOrGroundLevel()

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

Definition at line 2458 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWeakPtr()

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

Definition at line 390 of file Map.h.

◆ GetWorldObjectBySpawnId()

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

Definition at line 473 of file Map.h.

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetZoneAndAreaId() [2/2]

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

Definition at line 368 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetZoneId() [1/2]

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

Definition at line 2617 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetZoneId() [2/2]

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

Definition at line 366 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GridMarkNoUnload()

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

Definition at line 555 of file Map.cpp.

+ Here is the call graph for this function:

◆ GridUnmarkNoUnload()

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

Definition at line 568 of file Map.cpp.

+ Here is the call graph for this function:

◆ HavePlayers()

bool Map::HavePlayers ( ) const
inline

Definition at line 437 of file Map.h.

+ Here is the caller graph for this function:

◆ InitializeObject() [1/3]

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

Definition at line 618 of file Map.cpp.

◆ InitializeObject() [2/3]

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

Definition at line 624 of file Map.cpp.

◆ InitializeObject() [3/3]

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

Definition at line 615 of file Map.cpp.

+ Here is the caller graph for this function:

◆ InitStateMachine()

void Map::InitStateMachine ( )
static

Definition at line 256 of file Map.cpp.

+ Here is the caller graph for this function:

◆ InitVisibilityDistance()

void Map::InitVisibilityDistance ( )
virtual

Reimplemented in InstanceMap, BattlegroundMap, and MapInstanced.

Definition at line 302 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InsertGameObjectModel()

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

Definition at line 536 of file Map.h.

+ Here is the caller graph for this function:

◆ Instanceable()

bool Map::Instanceable ( ) const

Definition at line 4226 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Is25ManRaid()

bool Map::Is25ManRaid ( ) const

Definition at line 4261 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsBattleArena()

bool Map::IsBattleArena ( ) const

Definition at line 4272 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsBattleground()

bool Map::IsBattleground ( ) const

Definition at line 4267 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsBattlegroundOrArena()

bool Map::IsBattlegroundOrArena ( ) const

Definition at line 4277 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isCellMarked()

bool Map::isCellMarked ( uint32  pCellId)
inline

Definition at line 434 of file Map.h.

+ Here is the caller graph for this function:

◆ IsDungeon()

bool Map::IsDungeon ( ) const

Definition at line 4236 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGridLoaded() [1/4]

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

Definition at line 331 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGridLoaded() [2/4]

bool Map::IsGridLoaded ( GridCoord const &  p) const
private

Definition at line 712 of file Map.cpp.

+ Here is the call graph for this function:

◆ IsGridLoaded() [3/4]

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

Definition at line 332 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsGridLoaded() [4/4]

bool Map::IsGridLoaded ( uint32  gridId) const
inline

Definition at line 330 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsHeroic()

bool Map::IsHeroic ( ) const

Definition at line 4256 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isInLineOfSight()

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

Definition at line 2870 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInWater()

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

Definition at line 2895 of file Map.cpp.

+ Here is the call graph for this function:

◆ IsNonRaidDungeon()

bool Map::IsNonRaidDungeon ( ) const

Definition at line 4241 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsRaid()

bool Map::IsRaid ( ) const

Definition at line 4246 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsRaidOrHeroicDungeon()

bool Map::IsRaidOrHeroicDungeon ( ) const

Definition at line 4251 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsRegularDifficulty()

bool Map::IsRegularDifficulty ( ) const

Definition at line 4221 of file Map.cpp.

+ Here is the call graph for this function:

◆ IsRemovalGrid() [1/2]

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

Definition at line 323 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsRemovalGrid() [2/2]

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

Definition at line 328 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsSpawnGroupActive()

bool Map::IsSpawnGroupActive ( uint32  groupId) const

Definition at line 3495 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsUnderWater()

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

Definition at line 2902 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsWorldMap()

bool Map::IsWorldMap ( ) const

Definition at line 4231 of file Map.cpp.

+ Here is the call graph for this function:

◆ LoadAllCells()

void Map::LoadAllCells ( )

Definition at line 249 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadCorpseData()

void Map::LoadCorpseData ( )

Definition at line 4558 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadGrid()

void Map::LoadGrid ( float  x,
float  y 
)

Definition at line 578 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadMap()

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

Definition at line 198 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadMapAndVMap()

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

Definition at line 238 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadMMap()

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

Definition at line 165 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadRespawnTimes()

void Map::LoadRespawnTimes ( )

Definition at line 4504 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadVMap()

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

Definition at line 178 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ markCell()

void Map::markCell ( uint32  pCellId)
inline

Definition at line 435 of file Map.h.

+ Here is the caller graph for this function:

◆ MoveAllCreaturesInMoveList()

void Map::MoveAllCreaturesInMoveList ( )
Todo:
pets will disappear if this is outside CreatureRespawnRelocation

Definition at line 1264 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveAllDynamicObjectsInMoveList()

void Map::MoveAllDynamicObjectsInMoveList ( )

Definition at line 1367 of file Map.cpp.

+ Here is the call graph for this function:

◆ MoveAllGameObjectsInMoveList()

void Map::MoveAllGameObjectsInMoveList ( )

Definition at line 1321 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PlayerRelocation()

void Map::PlayerRelocation ( Player player,
float  x,
float  y,
float  z,
float  orientation 
)

Definition at line 1081 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessRelocationNotifies()

void Map::ProcessRelocationNotifies ( const uint32  diff)
private

Definition at line 925 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessRespawns()

void Map::ProcessRespawns ( )

Definition at line 3261 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveAllObjectsInRemoveList()

void Map::RemoveAllObjectsInRemoveList ( )

Definition at line 3588 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveAllPlayers()

void Map::RemoveAllPlayers ( )
virtual

Reimplemented in BattlegroundMap.

Definition at line 1728 of file Map.cpp.

+ Here is the call graph for this function:

◆ RemoveCorpse()

void Map::RemoveCorpse ( Corpse corpse)

Definition at line 4614 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveCreatureFromMoveList()

void Map::RemoveCreatureFromMoveList ( Creature c)
private

Definition at line 1217 of file Map.cpp.

+ Here is the caller graph for this function:

◆ RemoveDynamicObjectFromMoveList()

void Map::RemoveDynamicObjectFromMoveList ( DynamicObject go)
private

Definition at line 1255 of file Map.cpp.

+ Here is the caller graph for this function:

◆ RemoveFromActive()

void Map::RemoveFromActive ( WorldObject obj)

Definition at line 3771 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromActiveHelper()

void Map::RemoveFromActiveHelper ( WorldObject obj)
inlineprivate

Definition at line 797 of file Map.h.

+ Here is the caller graph for this function:

◆ RemoveFromMap() [1/2]

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

Definition at line 1027 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromMap() [2/2]

template<>
void Map::RemoveFromMap ( Transport obj,
bool  remove 
)

Definition at line 1047 of file Map.cpp.

+ Here is the call graph for this function:

◆ RemoveGameObjectFromMoveList()

void Map::RemoveGameObjectFromMoveList ( GameObject go)
private

Definition at line 1236 of file Map.cpp.

+ Here is the caller graph for this function:

◆ RemoveGameObjectModel()

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

Definition at line 535 of file Map.h.

+ Here is the caller graph for this function:

◆ RemoveOldCorpses()

void Map::RemoveOldCorpses ( )

Definition at line 4685 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemovePlayerFromMap()

void Map::RemovePlayerFromMap ( Player player,
bool  remove 
)
virtual

Reimplemented in InstanceMap, and BattlegroundMap.

Definition at line 1002 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveRespawnTime()

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

Definition at line 753 of file Map.h.

+ Here is the caller graph for this function:

◆ RemoveUpdateObject()

void Map::RemoveUpdateObject ( Object obj)
inline

Definition at line 605 of file Map.h.

+ Here is the caller graph for this function:

◆ RemoveWorldObject()

void Map::RemoveWorldObject ( WorldObject obj)
inline

Definition at line 442 of file Map.h.

+ Here is the caller graph for this function:

◆ ResetGridExpiry()

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

Definition at line 343 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetMarkedCells()

void Map::resetMarkedCells ( )
inline

Definition at line 433 of file Map.h.

+ Here is the caller graph for this function:

◆ Respawn() [1/2]

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

Definition at line 3105 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Respawn() [2/2]

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

Definition at line 748 of file Map.h.

◆ SaveRespawnInfoDB()

void Map::SaveRespawnInfoDB ( RespawnInfo const &  info,
CharacterDatabaseTransaction  dbTrans = nullptr 
)

Definition at line 4493 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveRespawnTime()

void Map::SaveRespawnTime ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId,
uint32  entry,
time_t  respawnTime,
uint32  gridId,
CharacterDatabaseTransaction  dbTrans = nullptr,
bool  startup = false 
)

Definition at line 4460 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScriptCommandStart()

void Map::ScriptCommandStart ( ScriptInfo const &  script,
uint32  delay,
Object source,
Object target 
)
  • If effects should be immediate, launch the script execution

Definition at line 73 of file MapScripts.cpp.

+ Here is the call graph for this function:

◆ ScriptsProcess()

void Map::ScriptsProcess ( )
private

Process queued scripts.

  • Process overdue queued scripts

Definition at line 312 of file MapScripts.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendInitSelf()

void Map::SendInitSelf ( Player player)
private

Definition at line 2929 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendInitTransports()

void Map::SendInitTransports ( Player player)

Definition at line 2966 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendObjectUpdates()

void Map::SendObjectUpdates ( )
private

Definition at line 3008 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendRemoveTransports()

void Map::SendRemoveTransports ( Player player)

Definition at line 2982 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendToPlayers()

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

Definition at line 3668 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendZoneDynamicInfo()

void Map::SendZoneDynamicInfo ( uint32  zoneId,
Player player 
) const

Definition at line 4711 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 4757 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendZoneWeather() [1/2]

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

Definition at line 4732 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendZoneWeather() [2/2]

void Map::SendZoneWeather ( ZoneDynamicInfo const &  zoneDynamicInfo,
Player player 
) const

Definition at line 4741 of file Map.cpp.

+ Here is the call graph for this function:

◆ setNGrid()

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

Definition at line 2998 of file Map.cpp.

+ Here is the caller graph for this function:

◆ SetSpawnGroupActive()

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

Definition at line 3481 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSpawnGroupInactive()

void Map::SetSpawnGroupInactive ( uint32  groupId)
inline

Definition at line 779 of file Map.h.

+ Here is the caller graph for this function:

◆ SetTimer()

void Map::SetTimer ( uint32  t)
inlineprivate

Definition at line 624 of file Map.h.

◆ SetUnloadLock()

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

Definition at line 335 of file Map.h.

◆ SetUnloadReferenceLock()

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

Definition at line 669 of file Map.h.

+ Here is the caller graph for this function:

◆ SetWeakPtr()

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

Definition at line 391 of file Map.h.

+ Here is the caller graph for this function:

◆ SetZoneMusic()

void Map::SetZoneMusic ( uint32  zoneId,
uint32  musicId 
)

Definition at line 4764 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetZoneOverrideLight()

void Map::SetZoneOverrideLight ( uint32  zoneId,
uint32  areaLightId,
uint32  overrideLightId,
Milliseconds  transitionTime 
)

Definition at line 4798 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetZoneWeather()

void Map::SetZoneWeather ( uint32  zoneId,
WeatherState  weatherId,
float  intensity 
)

Definition at line 4789 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShouldBeSpawnedOnGridLoad() [1/2]

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

Definition at line 764 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShouldBeSpawnedOnGridLoad() [2/2]

bool Map::ShouldBeSpawnedOnGridLoad ( SpawnObjectType  type,
ObjectGuid::LowType  spawnId 
) const

Definition at line 3356 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SpawnGroupDespawn()

bool Map::SpawnGroupDespawn ( uint32  groupId,
bool  deleteRespawnTimes = false,
size_t *  count = nullptr 
)

Definition at line 3458 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 1852 of file Object.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 1959 of file Object.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SwitchGridContainers() [1/3]

template<>
void Map::SwitchGridContainers ( Creature obj,
bool  on 
)

Definition at line 376 of file Map.cpp.

+ Here is the call graph for this function:

◆ SwitchGridContainers() [2/3]

template<>
void Map::SwitchGridContainers ( GameObject obj,
bool  on 
)

Definition at line 421 of file Map.cpp.

+ Here is the call graph for this function:

◆ 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 523 of file Map.h.

+ Here is the caller graph for this function:

◆ ToBattlegroundMap() [2/2]

BattlegroundMap const * Map::ToBattlegroundMap ( ) const
inline

Definition at line 524 of file Map.h.

◆ ToInstanceMap() [1/2]

InstanceMap * Map::ToInstanceMap ( )
inline

Definition at line 520 of file Map.h.

+ Here is the caller graph for this function:

◆ ToInstanceMap() [2/2]

InstanceMap const * Map::ToInstanceMap ( ) const
inline

Definition at line 521 of file Map.h.

◆ ToMapInstanced() [1/2]

MapInstanced * Map::ToMapInstanced ( )
inline

Definition at line 517 of file Map.h.

+ Here is the caller graph for this function:

◆ ToMapInstanced() [2/2]

MapInstanced const * Map::ToMapInstanced ( ) const
inline

Definition at line 518 of file Map.h.

◆ UnloadAll()

void Map::UnloadAll ( )
virtual

Reimplemented in InstanceMap, and MapInstanced.

Definition at line 1745 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnloadAllRespawnInfos()

void Map::UnloadAllRespawnInfos ( )
private

Definition at line 3194 of file Map.cpp.

+ Here is the caller graph for this function:

◆ UnloadGrid()

bool Map::UnloadGrid ( NGridType ngrid,
bool  pForce 
)

Definition at line 1649 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void Map::Update ( uint32  t_diff)
virtual

update worldsessions for existing players

process any due respawns

update active cells around players and active objects

  • Process necessary scripts

Reimplemented in MapInstanced, and InstanceMap.

Definition at line 762 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateAreaDependentAuras()

void Map::UpdateAreaDependentAuras ( )

Definition at line 4823 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateIteratorBack()

void Map::UpdateIteratorBack ( Player player)

Definition at line 4454 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdatePlayerZoneStats()

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

Definition at line 747 of file Map.cpp.

+ Here is the caller graph for this function:

◆ Visit()

template<class T , class CONTAINER >
void Map::Visit ( Cell const &  cell,
TypeContainerVisitor< T, CONTAINER > &  visitor 
)
inline

Definition at line 935 of file Map.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisitNearbyCellsOf()

void Map::VisitNearbyCellsOf ( WorldObject obj,
TypeContainerVisitor< Trinity::ObjectUpdater, GridTypeMapContainer > &  gridVisitor,
TypeContainerVisitor< Trinity::ObjectUpdater, WorldTypeMapContainer > &  worldVisitor 
)

Definition at line 718 of file Map.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ MapReference

friend class MapReference
friend

Definition at line 282 of file Map.h.

Member Data Documentation

◆ _corpseBones

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

Definition at line 858 of file Map.h.

◆ _corpsesByCell

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

Definition at line 856 of file Map.h.

◆ _corpsesByPlayer

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

Definition at line 857 of file Map.h.

◆ _creatureBySpawnIdStore

CreatureBySpawnIdContainer Map::_creatureBySpawnIdStore
private

Definition at line 854 of file Map.h.

◆ _creatureRespawnTimesBySpawnId

RespawnInfoMap Map::_creatureRespawnTimesBySpawnId
private

Definition at line 814 of file Map.h.

◆ _creaturesToMove

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

Definition at line 641 of file Map.h.

◆ _creatureToMoveLock

bool Map::_creatureToMoveLock
private

Definition at line 640 of file Map.h.

◆ _dynamicObjectsToMove

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

Definition at line 647 of file Map.h.

◆ _dynamicObjectsToMoveLock

bool Map::_dynamicObjectsToMoveLock
private

Definition at line 646 of file Map.h.

◆ _dynamicTree

DynamicMapTree Map::_dynamicTree
protected

Definition at line 680 of file Map.h.

◆ _farSpellCallbacks

MPSCQueue<FarSpellCallback> Map::_farSpellCallbacks
private

Definition at line 862 of file Map.h.

◆ _gameobjectBySpawnIdStore

GameObjectBySpawnIdContainer Map::_gameobjectBySpawnIdStore
private

Definition at line 855 of file Map.h.

◆ _gameObjectRespawnTimesBySpawnId

RespawnInfoMap Map::_gameObjectRespawnTimesBySpawnId
private

Definition at line 815 of file Map.h.

◆ _gameObjectsToMove

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

Definition at line 644 of file Map.h.

◆ _gameObjectsToMoveLock

bool Map::_gameObjectsToMoveLock
private

Definition at line 643 of file Map.h.

◆ _gridLock

std::mutex Map::_gridLock
protected

Definition at line 672 of file Map.h.

◆ _guidGenerators

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

Definition at line 852 of file Map.h.

◆ _mapLock

std::mutex Map::_mapLock
protected

Definition at line 671 of file Map.h.

◆ _objectsStore

MapStoredObjectTypesContainer Map::_objectsStore
private

Definition at line 853 of file Map.h.

◆ _respawnCheckTimer

uint32 Map::_respawnCheckTimer
private

Definition at line 844 of file Map.h.

◆ _respawnTimes

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

Definition at line 813 of file Map.h.

◆ _toggledSpawnGroupIds

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

Definition at line 842 of file Map.h.

◆ _transports

TransportsContainer Map::_transports
protected

Definition at line 693 of file Map.h.

◆ _transportsUpdateIter

TransportsContainer::iterator Map::_transportsUpdateIter
protected

Definition at line 694 of file Map.h.

◆ _updateObjects

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

Definition at line 860 of file Map.h.

◆ _weatherUpdateTimer

IntervalTimer Map::_weatherUpdateTimer
private

Definition at line 848 of file Map.h.

◆ _zoneDynamicInfo

ZoneDynamicInfoMap Map::_zoneDynamicInfo
private

Definition at line 847 of file Map.h.

◆ _zonePlayerCountMap

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

Definition at line 845 of file Map.h.

◆ CreatureGroupHolder

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

Definition at line 461 of file Map.h.

◆ GridMaps

Definition at line 714 of file Map.h.

◆ i_gridExpiry

time_t Map::i_gridExpiry
private

Definition at line 707 of file Map.h.

◆ i_grids

Definition at line 713 of file Map.h.

◆ i_InstanceId

uint32 Map::i_InstanceId
protected

Definition at line 676 of file Map.h.

◆ i_mapEntry

MapEntry const* Map::i_mapEntry
protected

Definition at line 674 of file Map.h.

◆ i_objectsToRemove

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

Definition at line 722 of file Map.h.

◆ i_objectsToSwitch

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

Definition at line 723 of file Map.h.

◆ i_scriptLock

bool Map::i_scriptLock
private

Definition at line 721 of file Map.h.

◆ i_spawnMode

uint8 Map::i_spawnMode
protected

Definition at line 675 of file Map.h.

◆ i_worldObjects

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

Definition at line 724 of file Map.h.

◆ m_activeNonPlayers

ActiveNonPlayers Map::m_activeNonPlayers
protected

Definition at line 688 of file Map.h.

◆ m_activeNonPlayersIter

ActiveNonPlayers::iterator Map::m_activeNonPlayersIter
protected

Definition at line 689 of file Map.h.

◆ m_mapRefIter

MapRefManager::iterator Map::m_mapRefIter
protected

Definition at line 683 of file Map.h.

◆ m_mapRefManager

MapRefManager Map::m_mapRefManager
protected

Definition at line 682 of file Map.h.

◆ m_parentMap

Map* Map::m_parentMap
private

Definition at line 711 of file Map.h.

◆ m_scriptSchedule

ScriptScheduleMap Map::m_scriptSchedule
private

Definition at line 727 of file Map.h.

◆ m_unloadTimer

uint32 Map::m_unloadTimer
protected

Definition at line 678 of file Map.h.

◆ m_VisibilityNotifyPeriod

int32 Map::m_VisibilityNotifyPeriod
protected

Definition at line 685 of file Map.h.

◆ m_VisibleDistance

float Map::m_VisibleDistance
protected

Definition at line 679 of file Map.h.

◆ m_weakRef

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

Definition at line 677 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 715 of file Map.h.


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