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

#include <Map.h>

Inheritance diagram for Map:
Collaboration diagram for Map:

Public Types

typedef MapRefManager PlayerList
Public Types inherited from GridRefManager< NGridType >
typedef LinkedListHead::Iterator< GridReference< NGridType > > iterator
Public Types inherited from RefManager< GridRefManager< NGridType >, NGridType >
typedef LinkedListHead::Iterator< Reference< GridRefManager< NGridType >, NGridType > > iterator
Public Types inherited from LinkedListHead
typedef Iterator< LinkedListElementiterator

Public Member Functions

bool ActiveObjectsNearGrid (NGridType const &ngrid) const
void AddObjectToRemoveList (WorldObject *obj)
void AddObjectToSwitchList (WorldObject *obj, bool on)
virtual bool AddPlayerToMap (Player *)
template<>
void AddToActive (Creature *c)
template<>
void AddToActive (DynamicObject *d)
template<class T>
void AddToActive (T *obj)
template<>
void AddToGrid (Creature *obj, Cell const &cell)
template<>
void AddToGrid (GameObject *obj, Cell const &cell)
template<class T>
bool AddToMap (T *)
template<>
bool AddToMap (Transport *obj)
void AddWorldObject (WorldObject *obj)
void Balance ()
virtual bool CanEnter (Player *)
bool CanUnload (uint32 diff)
bool CheckGridIntegrity (Creature *c, bool moved) const
bool ContainsGameObjectModel (const GameObjectModel &model) const
void CreatureRelocation (Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail=true)
bool CreatureRespawnRelocation (Creature *c, bool diffGridOnly)
virtual void DelayedUpdate (const uint32 diff)
template<>
void DeleteFromWorld (Player *player)
void DeleteRespawnTimes ()
void GameObjectRelocation (GameObject *go, float x, float y, float z, float orientation, bool respawnRelocationOnFail=true)
bool GameObjectRespawnRelocation (GameObject *go, bool diffGridOnly)
uint16 GetAreaFlag (float x, float y, float z, bool *isOutdoors=0) const
uint32 GetAreaId (float x, float y, float z) const
bool GetAreaInfo (float x, float y, float z, uint32 &mogpflags, int32 &adtId, int32 &rootId, int32 &groupId) const
CreatureGetCreature (uint64 guid)
time_t GetCreatureRespawnTime (uint32 dbGuid) const
DifficultyID GetDifficulty () const
DynamicObjectGetDynamicObject (uint64 guid)
bool GetEntrancePos (int32 &mapid, float &x, float &y)
MapEntry const * GetEntry () const
GameObjectGetGameObject (uint64 guid)
time_t GetGORespawnTime (uint32 dbGuid) const
time_t GetGridExpiry (void) const
float GetHeight (float x, float y, float z, bool checkVMap=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
uint32 GetId (void) const
uint32 GetInstanceId () const
time_t GetLinkedRespawnTime (uint64 guid) const
ZLiquidStatus getLiquidStatus (float x, float y, float z, uint8 ReqLiquidType, LiquidData *data=0) const
MapDifficulty const * GetMapDifficulty () const
const char * GetMapName () 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)
virtual uint32 GetOwnerGuildId (uint32=TEAM_OTHER) const
Map const * GetParent () const
PlayerList const & GetPlayers () const
uint32 GetPlayersCountExceptGMs () const
uint8 GetSpawnMode () const
uint8 GetTerrainType (float x, float y) const
TransportGetTransport (uint64 guid)
bool GetUnloadLock (const GridCoord &p) const
float GetVisibilityRange () const
float GetWaterLevel (float x, float y) const
float GetWaterOrGroundLevel (float x, float y, float z, float *ground=NULL, bool swim=false) const
void GetZoneAndAreaId (uint32 &zoneid, uint32 &areaid, float x, float y, float z) const
uint32 GetZoneId (float x, float y, float z) const
bool HavePlayers () const
template<>
void InitializeObject (Creature *obj)
template<>
void InitializeObject (GameObject *obj)
virtual void InitVisibilityDistance ()
void InsertGameObjectModel (const GameObjectModel &model)
bool Instanceable () const
bool Is25ManRaid () const
bool IsBattleArena () const
bool IsBattleground () const
bool IsBattlegroundOrArena () const
bool isCellMarked (uint32 pCellId)
bool IsDungeon () const
bool IsGridLoaded (float x, float y) const
bool IsHeroic () const
bool isInLineOfSight (float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const
bool IsInstance () const
bool IsInWater (float x, float y, float z, LiquidData *data=0) const
bool IsNonRaidInstance () const
bool IsOutdoors (float x, float y, float z) const
bool IsRaid () const
bool IsRaidOrHeroicDungeon () const
bool IsRegularDifficulty () const
bool IsRemovalGrid (float x, float y) const
bool IsScenario () const
bool IsUnderWater (float x, float y, float z) const
void LoadGrid (float x, float y)
void LoadRespawnTimes ()
 Map (uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map *_parent=NULL)
void markCell (uint32 pCellId)
void MoveAllCreaturesInMoveList ()
void MoveAllGameObjectsInMoveList ()
void PlayerRelocation (Player *, float x, float y, float z, float orientation)
void PreserveTransportVisibility (std::set< uint64 > &guids) const
void RemoveAllObjectsInRemoveList ()
virtual void RemoveAllPlayers ()
void RemoveCreatureRespawnTime (uint32 dbGuid)
template<>
void RemoveFromActive (Creature *c)
template<>
void RemoveFromActive (DynamicObject *obj)
template<class T>
void RemoveFromActive (T *obj)
template<class T>
void RemoveFromMap (T *, bool)
template<>
void RemoveFromMap (Transport *obj, bool remove)
void RemoveGameObjectModel (const GameObjectModel &model)
void RemoveGORespawnTime (uint32 dbGuid)
virtual void RemovePlayerFromMap (Player *, bool)
void RemoveWorldObject (WorldObject *obj)
void ResetGridExpiry (NGridType &grid, float factor=1) const
void resetMarkedCells ()
void SaveCreatureRespawnTime (uint32 dbGuid, time_t respawnTime)
void SaveGORespawnTime (uint32 dbGuid, time_t respawnTime)
void ScriptCommandStart (ScriptInfo const &script, uint32 delay, Object *source, Object *target)
void ScriptsStart (std::map< uint32, std::multimap< uint32, ScriptInfo > > const &scripts, uint32 id, Object *source, Object *target)
 Put scripts in the execution queue.
void SendInitTransports (Player *player)
void SendRemoveTransports (Player *player)
void SendToPlayers (WorldPacket const *data) const
void SetUnloadLock (const GridCoord &p, bool on)
TempSummonSummonCreature (uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=NULL, uint32 duration=0, Unit *summoner=NULL, uint32 spellId=0, uint32 vehId=0)
void SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=NULL)
template<>
void SwitchGridContainers (Creature *obj, bool on)
template<>
void SwitchGridContainers (GameObject *obj, bool on)
template<class T>
void SwitchGridContainers (T *obj, bool on)
InstanceMapToInstanceMap ()
const InstanceMapToInstanceMap () const
MapInstancedToMapInstanced ()
const MapInstancedToMapInstanced () const
virtual void UnloadAll ()
bool UnloadGrid (NGridType &ngrid, bool pForce)
virtual void Update (const uint32)
void UpdateIteratorBack (Player *player)
void UpdateObjectsVisibilityFor (Player *player, Cell cell, CellCoord cellpair)
void UpdateObjectVisibility (WorldObject *obj, Cell cell, CellCoord cellpair)
template<class T, class CONTAINER>
void Visit (const Cell &cell, TypeContainerVisitor< T, CONTAINER > &visitor)
template<class NOTIFIER>
void VisitAll (const float &x, const float &y, float radius, NOTIFIER &notifier)
template<class NOTIFIER>
void VisitFirstFound (const float &x, const float &y, float radius, NOTIFIER &notifier)
template<class NOTIFIER>
void VisitGrid (const float &x, const float &y, float radius, NOTIFIER &notifier)
void VisitNearbyCellsOf (WorldObject *obj, TypeContainerVisitor< Skyfire::ObjectUpdater, GridTypeMapContainer > &gridVisitor, TypeContainerVisitor< Skyfire::ObjectUpdater, WorldTypeMapContainer > &worldVisitor)
template<class NOTIFIER>
void VisitWorld (const float &x, const float &y, float radius, NOTIFIER &notifier)
virtual ~Map ()
Public Member Functions inherited from GridRefManager< NGridType >
iterator begin ()
iterator end ()
GridReference< NGridType > * getFirst ()
GridReference< NGridType > * getLast ()
iterator rbegin ()
iterator rend ()
Public Member Functions inherited from RefManager< GridRefManager< NGridType >, NGridType >
iterator begin ()
void clearReferences ()
iterator end ()
Reference< GridRefManager< NGridType >, NGridType > * getFirst ()
Reference< GridRefManager< NGridType >, NGridType > * getLast ()
iterator rbegin ()
 RefManager ()
iterator rend ()
virtual ~RefManager ()
Public Member Functions inherited from LinkedListHead
void decSize ()
LinkedListElementgetFirst ()
LinkedListElement const * getFirst () const
LinkedListElementgetLast ()
LinkedListElement const * getLast () const
uint32 getSize () const
void incSize ()
void insertFirst (LinkedListElement *pElem)
void insertLast (LinkedListElement *pElem)
bool isEmpty () const
 LinkedListHead ()
virtual ~LinkedListHead ()

Static Public Member Functions

static void DeleteRespawnTimesInDB (uint16 mapId, uint32 instanceId)
static void DeleteStateMachine ()
static bool ExistMap (uint32 mapid, int gx, int gy)
static bool ExistVMap (uint32 mapid, int gx, int gy)
static uint32 GetAreaIdByAreaFlag (uint16 areaflag, uint32 map_id)
static void GetZoneAndAreaIdByAreaFlag (uint32 &zoneid, uint32 &areaid, uint16 areaflag, uint32 map_id)
static uint32 GetZoneIdByAreaFlag (uint16 areaflag, uint32 map_id)
static void InitStateMachine ()

Public Attributes

CreatureGroupHolderType CreatureGroupHolder

Protected Types

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

Protected Member Functions

void SetUnloadReferenceLock (const GridCoord &p, bool on)

Protected Attributes

DynamicMapTree _dynamicTree
TransportsContainer _transports
TransportsContainer::iterator _transportsUpdateIter
std::mutex GridLock
uint32 i_InstanceId
MapEntry const * i_mapEntry
uint8 i_spawnMode
std::mutex Lock
ActiveNonPlayers m_activeNonPlayers
ActiveNonPlayers::iterator m_activeNonPlayersIter
MapRefManager::iterator m_mapRefIter
MapRefManager m_mapRefManager
uint32 m_unloadTimer
int32 m_VisibilityNotifyPeriod
float m_VisibleDistance

Private Types

typedef std::multimap< time_t, ScriptActionScriptScheduleMap

Private Member Functions

GameObject_FindGameObject (WorldObject *pWorldObject, uint32 guid) const
Creature_GetScriptCreature (Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
Creature_GetScriptCreatureSourceOrTarget (Object *source, Object *target, const ScriptInfo *scriptInfo, bool bReverse=false) const
Player_GetScriptPlayer (Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
Player_GetScriptPlayerSourceOrTarget (Object *source, Object *target, const ScriptInfo *scriptInfo) const
Unit_GetScriptUnit (Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
WorldObject_GetScriptWorldObject (Object *obj, bool isSource, const ScriptInfo *scriptInfo) const
void _ScriptProcessDoor (Object *source, Object *target, const ScriptInfo *scriptInfo) const
void AddCreatureToMoveList (Creature *c, float x, float y, float z, float ang)
void AddGameObjectToMoveList (GameObject *go, float x, float y, float z, float ang)
void AddToActiveHelper (WorldObject *obj)
template<class T>
void AddToGrid (T *object, Cell const &cell)
void buildNGridLinkage (NGridType *pNGridType)
bool CreatureCellRelocation (Creature *creature, Cell new_cell)
template<class T>
void DeleteFromWorld (T *)
void EnsureGridCreated (const GridCoord &)
void EnsureGridCreated_i (const GridCoord &)
bool EnsureGridLoaded (Cell const &)
void EnsureGridLoadedForActiveObject (Cell const &, WorldObject *object)
bool GameObjectCellRelocation (GameObject *go, Cell new_cell)
GridMapGetGrid (float x, float y)
NGridTypegetNGrid (uint32 x, uint32 y) const
template<class T>
void InitializeObject (T *obj)
bool IsGridLoaded (const GridCoord &) const
bool isGridObjectDataLoaded (uint32 x, uint32 y) const
void LoadMap (int gx, int gy, bool reload=false)
void LoadMapAndVMap (int gx, int gy)
void LoadMMap (int gx, int gy)
void LoadVMap (int gx, int gy)
void ProcessRelocationNotifies (const uint32 diff)
void RemoveCreatureFromMoveList (Creature *c)
void RemoveFromActiveHelper (WorldObject *obj)
void RemoveGameObjectFromMoveList (GameObject *go)
void ScriptsProcess ()
 Process queued scripts.
void SendInitSelf (Player *player)
void setGridObjectDataLoaded (bool pLoaded, uint32 x, uint32 y)
void setNGrid (NGridType *grid, uint32 x, uint32 y)
void SetTimer (uint32 t)
void UpdateActiveCells (const float &x, const float &y, const uint32 t_diff)

Private Attributes

UNORDERED_MAP< uint32, time_t > _creatureRespawnTimes
std::vector< Creature * > _creaturesToMove
bool _creatureToMoveLock
std::vector< GameObject * > _gameObjectsToMove
bool _gameObjectsToMoveLock
UNORDERED_MAP< uint32, time_t > _goRespawnTimes
GridMapGridMaps [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
time_t i_gridExpiry
NGridTypei_grids [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
std::set< WorldObject * > i_objectsToRemove
std::map< WorldObject *, bool > i_objectsToSwitch
bool i_scriptLock
std::set< WorldObject * > i_worldObjects
Mapm_parentMap
ScriptScheduleMap m_scriptSchedule
std::bitset< TOTAL_NUMBER_OF_CELLS_PER_MAP *TOTAL_NUMBER_OF_CELLS_PER_MAPmarked_cells

Friends

class MapReference

Detailed Description

Definition at line 237 of file Map.h.

Member Typedef Documentation

◆ ActiveNonPlayers

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

Definition at line 553 of file Map.h.

◆ PlayerList

Definition at line 406 of file Map.h.

◆ ScriptScheduleMap

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

Definition at line 591 of file Map.h.

◆ TransportsContainer

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

Definition at line 558 of file Map.h.

Constructor & Destructor Documentation

◆ Map()

◆ ~Map()

Member Function Documentation

◆ _FindGameObject()

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

◆ _GetScriptCreature()

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

◆ _GetScriptCreatureSourceOrTarget()

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

◆ _GetScriptPlayer()

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

◆ _GetScriptPlayerSourceOrTarget()

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

◆ _GetScriptUnit()

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

◆ _GetScriptWorldObject()

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

◆ _ScriptProcessDoor()

◆ ActiveObjectsNearGrid()

◆ AddCreatureToMoveList()

◆ AddGameObjectToMoveList()

◆ AddObjectToRemoveList()

◆ AddObjectToSwitchList()

◆ AddPlayerToMap()

◆ AddToActive() [1/3]

◆ AddToActive() [2/3]

template<>
void Map::AddToActive ( DynamicObject * d)

Definition at line 2604 of file Map.cpp.

References AddToActiveHelper().

◆ AddToActive() [3/3]

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

Definition at line 2569 of file Map.cpp.

References AddToActiveHelper().

Referenced by AddObjectHelper(), AddToMap(), and WorldObject::setActive().

◆ AddToActiveHelper()

void Map::AddToActiveHelper ( WorldObject * obj)
inlineprivate

Definition at line 601 of file Map.h.

References m_activeNonPlayers.

Referenced by AddToActive(), AddToActive(), and AddToActive().

◆ AddToGrid() [1/3]

◆ AddToGrid() [2/3]

◆ AddToGrid() [3/3]

◆ AddToMap() [1/2]

template<class T>
bool Map::AddToMap ( T * obj)

Definition at line 504 of file Map.cpp.

References AddToActive(), AddToGrid(), ASSERT, Skyfire::ComputeCellCoord(), EnsureGridCreated(), EnsureGridLoadedForActiveObject(), Skyfire::Maps::GetAddObjectAction(), Cell::GridX(), Cell::GridY(), GUID_LOPART(), InitializeObject(), CoordPair< LIMIT >::IsCoordValid(), Skyfire::Maps::MAP_ADD_OBJECT_REFRESH_EXISTING, Skyfire::Maps::MAP_ADD_OBJECT_REJECT_INVALID_COORDS, sBattlePetSpawnMgr, SF_LOG_DEBUG, SF_LOG_ERROR, Object::ToCreature(), UI64FMTD, CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.

Referenced by Battleground::AddCreature(), Battleground::AddObject(), Player::BuildPlayerRepop(), ObjectAccessor::ConvertCorpseForPlayer(), Transport::CreateGOPassenger(), TransportMgr::CreateLocalTransport(), TransportMgr::CreateLocalTransport(), Transport::CreateNPCPassenger(), TransportMgr::CreateTransport(), Spell::EffectCreateTamedPet(), Spell::EffectDuel(), Spell::EffectSummonObject(), Spell::EffectSummonObjectWild(), Spell::EffectTameCreature(), Spell::EffectTransmitted(), Creature::FarTeleportTo(), GameEventMgr::GameEventSpawn(), debug_commandscript::HandleDebugSpawnVehicleCommand(), OutdoorPvPSI::HandleDropFlag(), npc_commandscript::HandleNpcTameCommand(), pet_commandscript::HandlePetCreateCommand(), Pet::LoadPetFromDB(), LuaGlobalFunctions::PerformIngameSpawn(), GameObject::Refresh(), ScriptsProcess(), PoolGroup< T >::Spawn1Object(), Battlefield::SpawnCreature(), Battlefield::SpawnGameObject(), BattlePetWildZonePool::SpawnReplacement(), SpawnSurveyGameObject(), SummonCreature(), WorldObject::SummonGameObject(), Player::SummonPet(), Transport::TeleportTransport(), and GameObject::Update().

◆ AddToMap() [2/2]

◆ AddWorldObject()

void Map::AddWorldObject ( WorldObject * obj)
inline

Definition at line 401 of file Map.h.

References i_worldObjects.

Referenced by AddToGrid(), SwitchGridContainers(), and SwitchGridContainers().

◆ Balance()

void Map::Balance ( )
inline

Definition at line 445 of file Map.h.

References _dynamicTree.

Referenced by EnsureGridLoaded().

◆ buildNGridLinkage()

void Map::buildNGridLinkage ( NGridType * pNGridType)
inlineprivate

◆ CanEnter()

virtual bool Map::CanEnter ( Player * )
inlinevirtual

◆ CanUnload()

bool Map::CanUnload ( uint32 diff)
inline

Definition at line 247 of file Map.h.

References m_unloadTimer.

◆ CheckGridIntegrity()

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

◆ ContainsGameObjectModel()

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

Definition at line 448 of file Map.h.

References _dynamicTree.

◆ CreatureCellRelocation()

◆ CreatureRelocation()

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

◆ CreatureRespawnRelocation()

◆ DelayedUpdate()

◆ DeleteFromWorld() [1/2]

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

References sObjectAccessor.

◆ DeleteFromWorld() [2/2]

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

Definition at line 363 of file Map.cpp.

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

◆ DeleteRespawnTimes()

void Map::DeleteRespawnTimes ( )

◆ DeleteRespawnTimesInDB()

◆ DeleteStateMachine()

void Map::DeleteStateMachine ( )
static

◆ EnsureGridCreated()

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

◆ EnsureGridCreated_i()

◆ EnsureGridLoaded()

◆ EnsureGridLoadedForActiveObject()

◆ ExistMap()

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

Definition at line 75 of file Map.cpp.

References SF_LOG_ERROR, and sWorld.

Referenced by MapManager::ExistMapAndVMap(), and misc_commandscript::HandleGPSCommand().

◆ ExistVMap()

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

◆ GameObjectCellRelocation()

◆ GameObjectRelocation()

◆ GameObjectRespawnRelocation()

◆ GetAreaFlag()

◆ GetAreaId()

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

Definition at line 330 of file Map.h.

References GetAreaFlag(), GetAreaIdByAreaFlag(), and GetId().

Referenced by LuaMap::GetAreaId(), and WorldObject::GetAreaId().

◆ GetAreaIdByAreaFlag()

uint32 Map::GetAreaIdByAreaFlag ( uint16 areaflag,
uint32 map_id )
static

Definition at line 2203 of file Map.cpp.

References GetAreaEntryByAreaFlagAndMap(), and AreaTableEntry::m_ID.

Referenced by GetAreaId(), and MapManager::GetAreaId().

◆ GetAreaInfo()

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

◆ GetCreature()

◆ GetCreatureRespawnTime()

time_t Map::GetCreatureRespawnTime ( uint32 dbGuid) const
inline

Definition at line 456 of file Map.h.

References _creatureRespawnTimes, and UNORDERED_MAP.

Referenced by GetLinkedRespawnTime(), and Creature::LoadCreatureFromDB().

◆ GetDifficulty()

◆ GetDynamicObject()

DynamicObject * Map::GetDynamicObject ( uint64 guid)

Definition at line 3201 of file Map.cpp.

References ObjectAccessor::GetObjectInMap().

◆ GetEntrancePos()

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

Definition at line 379 of file Map.h.

References i_mapEntry.

◆ GetEntry()

MapEntry const * Map::GetEntry ( ) const
inline

◆ GetGameObject()

◆ GetGORespawnTime()

time_t Map::GetGORespawnTime ( uint32 dbGuid) const
inline

Definition at line 465 of file Map.h.

References _goRespawnTimes, and UNORDERED_MAP.

Referenced by GetLinkedRespawnTime(), and GameObject::LoadGameObjectFromDB().

◆ GetGrid()

◆ GetGridExpiry()

time_t Map::GetGridExpiry ( void ) const
inline

Definition at line 299 of file Map.h.

References i_gridExpiry.

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

◆ GetHeight() [1/2]

◆ GetHeight() [2/2]

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

Definition at line 2251 of file Map.cpp.

References _dynamicTree, and GetHeight().

◆ GetId()

uint32 Map::GetId ( void ) const
inline

Definition at line 300 of file Map.h.

References i_mapEntry.

Referenced by AddObjectToRemoveList(), AddObjectToSwitchList(), InstanceMap::AddPlayerToMap(), AddToMap(), InstanceMap::CanEnter(), Player::CanRollForItemInLFG(), GameObject::Create(), MapInstanced::CreateBattleground(), MapInstanced::CreateInstance(), InstanceMap::CreateInstanceData(), MapInstanced::CreateInstanceForPlayer(), TransportMgr::CreateInstanceTransports(), Transport::CreateLocal(), TransportMgr::CreateLocalTransport(), DeleteRespawnTimes(), EnsureGridCreated_i(), EnsureGridLoaded(), EnsureGridLoadedForActiveObject(), GetAreaId(), GetAreaInfo(), GetHeight(), getLiquidStatus(), GetMapDifficulty(), LuaMap::GetMapId(), InstanceMap::GetMaxPlayers(), GetZoneAndAreaId(), GetZoneId(), gobject_commandscript::HandleGameObjectAddCommand(), go_commandscript::HandleGoZoneXYCommand(), WorldSession::HandleMoveWorldportAckOpcode(), npc_commandscript::HandleNpcAddCommand(), wp_commandscript::HandleWpModifyCommand(), wp_commandscript::HandleWpShowCommand(), Player::inRandomLfgDungeon(), isInLineOfSight(), LoadMap(), LoadMMap(), LoadRespawnTimes(), LoadVMap(), AchievementCriteriaData::Meets(), lfg::LFGPlayerScript::OnMapChanged(), LuaGlobalFunctions::PerformIngameSpawn(), RemoveAllPlayers(), RemoveCreatureRespawnTime(), RemoveGORespawnTime(), InstanceMap::Reset(), Player::RewardReputation(), SaveCreatureRespawnTime(), SaveGORespawnTime(), InstanceMap::SendResetWarnings(), Creature::SetInCombatWithZone(), WorldObject::SetMap(), InstanceMap::SetResetSchedule(), TransportMgr::SpawnLocalTransports(), SummonCreatureGroup(), Transport::TeleportTransport(), UnloadGrid(), ActiveState::Update(), IdleState::Update(), RemovalState::Update(), and ~Map().

◆ GetInstanceId()

◆ GetLinkedRespawnTime()

time_t Map::GetLinkedRespawnTime ( uint64 guid) const

◆ getLiquidStatus()

◆ GetMapDifficulty()

MapDifficulty const * Map::GetMapDifficulty ( ) const

◆ GetMapName()

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

References _dynamicTree.

Referenced by WorldObject::MovePositionToFirstCollision().

◆ GetOwnerGuildId()

virtual uint32 Map::GetOwnerGuildId ( uint32 = TEAM_OTHER) const
inlinevirtual

Definition at line 451 of file Map.h.

References TEAM_OTHER.

Referenced by Guild::HandleGuildPartyRequest().

◆ GetParent()

Map const * Map::GetParent ( ) const
inline

Definition at line 308 of file Map.h.

References m_parentMap, and Map().

◆ GetPlayers()

PlayerList const & Map::GetPlayers ( ) const
inline

Definition at line 407 of file Map.h.

References m_mapRefManager.

Referenced by AddToMap(), AggroAllPlayers(), Transport::BuildUpdate(), InstanceMap::CanEnter(), boss_gothik::boss_gothikAI::CheckGroupSplitted(), boss_general_vezax::boss_general_vezaxAI::CheckPlayersInRange(), boss_general_vezax::boss_general_vezaxAI::CheckShamanisticRage(), dummy_dragonAI::DoRaidWhisper(), ScriptedAI::DoTeleportAll(), npc_kalecgos::npc_kalecgosAI::DoWorkaroundForQuestCredit(), CreatureAI::DoZoneInCombat(), boss_lady_vashj::boss_lady_vashjAI::EnterCombat(), npc_gothik_minion::npc_gothik_minionAI::EnterEvadeMode(), LuaGlobalFunctions::GetPlayersInMap(), npc_acolyte_of_shadron::npc_acolyte_of_shadronAI::JustDied(), npc_acolyte_of_vesperon::npc_acolyte_of_vesperonAI::JustDied(), npc_image_of_medivh::npc_image_of_medivhAI::NextStep(), kalecgos_teleporter::OnGossipHello(), boss_headless_horseman::boss_headless_horsemanAI::SelectRandomPlayer(), CreatureTextMgr::SendChatPacket(), CreatureTextMgr::SendNonChatPacket(), instance_hyjal::instance_mount_hyjal_InstanceMapScript::SetData(), Creature::SetInCombatWithZone(), boss_volazj::boss_volazjAI::SummonedCreatureDespawn(), boss_sathrovarr::boss_sathrovarrAI::TeleportAllPlayersBack(), Transport::TeleportTransport(), boss_cthun::cthunAI::UpdateAI(), boss_grandmaster_vorpil::boss_grandmaster_vorpilAI::UpdateAI(), boss_shirrak_the_dead_watcher::boss_shirrak_the_dead_watcherAI::UpdateAI(), boss_the_lurker_below::boss_the_lurker_belowAI::UpdateAI(), npc_barnes::npc_barnesAI::UpdateAI(), npc_ethereal_sphere::npc_ethereal_sphereAI::UpdateAI(), npc_greyheart_spellbinder::npc_greyheart_spellbinderAI::UpdateAI(), npc_highlord_darion_mograine::npc_highlord_darion_mograineAI::UpdateAI(), UpdateWorldState(), and npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI::WaypointReached().

◆ GetPlayersCountExceptGMs()

uint32 Map::GetPlayersCountExceptGMs ( ) const

◆ GetSpawnMode()

◆ GetTerrainType()

uint8 Map::GetTerrainType ( float x,
float y ) const

Definition at line 2102 of file Map.cpp.

References GetGrid(), and Map().

◆ GetTransport()

Transport * Map::GetTransport ( uint64 guid)

◆ GetUnloadLock()

◆ GetVisibilityRange()

◆ GetWaterLevel()

◆ GetWaterOrGroundLevel()

float Map::GetWaterOrGroundLevel ( float x,
float y,
float z,
float * ground = NULL,
bool swim = false ) const

◆ GetZoneAndAreaId()

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

Definition at line 340 of file Map.h.

References GetAreaFlag(), GetId(), and GetZoneAndAreaIdByAreaFlag().

Referenced by WorldObject::GetZoneAndAreaId().

◆ GetZoneAndAreaIdByAreaFlag()

void Map::GetZoneAndAreaIdByAreaFlag ( uint32 & zoneid,
uint32 & areaid,
uint16 areaflag,
uint32 map_id )
static

◆ GetZoneId()

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

Definition at line 335 of file Map.h.

References GetAreaFlag(), GetId(), and GetZoneIdByAreaFlag().

Referenced by WorldObject::GetZoneId().

◆ GetZoneIdByAreaFlag()

uint32 Map::GetZoneIdByAreaFlag ( uint16 areaflag,
uint32 map_id )
static

◆ HavePlayers()

◆ InitializeObject() [1/3]

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

Definition at line 492 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 498 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 489 of file Map.cpp.

Referenced by AddToMap().

◆ InitStateMachine()

void Map::InitStateMachine ( )
static

◆ InitVisibilityDistance()

void Map::InitVisibilityDistance ( )
virtual

◆ InsertGameObjectModel()

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

Definition at line 447 of file Map.h.

References _dynamicTree.

Referenced by GameObject::AddToWorld(), GameObject::UpdateModel(), and GameObject::UpdateModelPosition().

◆ Instanceable()

◆ Is25ManRaid()

◆ IsBattleArena()

bool Map::IsBattleArena ( ) const
inline

Definition at line 377 of file Map.h.

References i_mapEntry.

Referenced by LuaMap::IsArena().

◆ IsBattleground()

bool Map::IsBattleground ( ) const
inline

◆ IsBattlegroundOrArena()

◆ isCellMarked()

bool Map::isCellMarked ( uint32 pCellId)
inline

Definition at line 394 of file Map.h.

References marked_cells.

Referenced by ProcessRelocationNotifies(), and VisitNearbyCellsOf().

◆ IsDungeon()

◆ IsGridLoaded() [1/2]

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

◆ IsGridLoaded() [2/2]

◆ isGridObjectDataLoaded()

bool Map::isGridObjectDataLoaded ( uint32 x,
uint32 y ) const
inlineprivate

◆ IsHeroic()

◆ isInLineOfSight()

bool Map::isInLineOfSight ( float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
uint32 phasemask ) const

◆ IsInstance()

◆ IsInWater()

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

Definition at line 2256 of file Map.cpp.

References getLiquidStatus(), LIQUID_MAP_IN_WATER, LIQUID_MAP_UNDER_WATER, and MAP_ALL_LIQUIDS.

Referenced by Unit::IsInWater().

◆ IsNonRaidInstance()

bool Map::IsNonRaidInstance ( ) const
inline

Definition at line 371 of file Map.h.

References i_mapEntry.

Referenced by WorldSession::HandleSetDungeonDifficultyOpcode(), and Player::RewardReputation().

◆ IsOutdoors()

bool Map::IsOutdoors ( float x,
float y,
float z ) const

◆ IsRaid()

◆ IsRaidOrHeroicDungeon()

bool Map::IsRaidOrHeroicDungeon ( ) const
inline

Definition at line 373 of file Map.h.

References DIFFICULTY_HEROIC, i_spawnMode, and IsRaid().

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

◆ IsRegularDifficulty()

bool Map::IsRegularDifficulty ( ) const
inline

Definition at line 364 of file Map.h.

References GetDifficulty().

Referenced by InstanceMap::GetMaxPlayers().

◆ IsRemovalGrid()

◆ IsScenario()

bool Map::IsScenario ( ) const
inline

Definition at line 370 of file Map.h.

References i_mapEntry.

Referenced by IsInstance().

◆ IsUnderWater()

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

◆ LoadGrid()

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

◆ LoadMap()

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

Definition at line 151 of file Map.cpp.

References GetId(), GridMaps, i_InstanceId, m_parentMap, SF_LOG_ERROR, SF_LOG_INFO, sScriptMgr, and sWorld.

Referenced by LoadMapAndVMap().

◆ LoadMapAndVMap()

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

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

References marked_cells.

Referenced by VisitNearbyCellsOf().

◆ MoveAllCreaturesInMoveList()

◆ MoveAllGameObjectsInMoveList()

◆ PlayerRelocation()

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

◆ PreserveTransportVisibility()

void Map::PreserveTransportVisibility ( std::set< uint64 > & guids) const

Definition at line 2375 of file Map.cpp.

References _transports.

◆ ProcessRelocationNotifies()

◆ RemoveAllObjectsInRemoveList()

◆ RemoveAllPlayers()

◆ RemoveCreatureFromMoveList()

void Map::RemoveCreatureFromMoveList ( Creature * c)
private

◆ RemoveCreatureRespawnTime()

◆ RemoveFromActive() [1/3]

◆ RemoveFromActive() [2/3]

template<>
void Map::RemoveFromActive ( DynamicObject * obj)

Definition at line 2642 of file Map.cpp.

References RemoveFromActiveHelper().

◆ RemoveFromActive() [3/3]

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

Definition at line 2610 of file Map.cpp.

Referenced by RemoveFromMap(), and WorldObject::setActive().

◆ RemoveFromActiveHelper()

void Map::RemoveFromActiveHelper ( WorldObject * obj)
inlineprivate

Definition at line 606 of file Map.h.

References m_activeNonPlayers, and m_activeNonPlayersIter.

Referenced by RemoveFromActive(), and 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 ( const GameObjectModel & model)
inline

◆ RemoveGORespawnTime()

◆ RemovePlayerFromMap()

◆ RemoveWorldObject()

void Map::RemoveWorldObject ( WorldObject * obj)
inline

Definition at line 402 of file Map.h.

References i_worldObjects.

Referenced by SwitchGridContainers(), and SwitchGridContainers().

◆ ResetGridExpiry()

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

◆ resetMarkedCells()

void Map::resetMarkedCells ( )
inline

Definition at line 393 of file Map.h.

References marked_cells.

Referenced by Update().

◆ SaveCreatureRespawnTime()

void Map::SaveCreatureRespawnTime ( uint32 dbGuid,
time_t respawnTime )

◆ SaveGORespawnTime()

void Map::SaveGORespawnTime ( uint32 dbGuid,
time_t respawnTime )

◆ 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
Todo
Allow gameobjects to be targets and casters

Definition at line 274 of file MapScripts.cpp.

References _FindGameObject(), _GetScriptCreature(), _GetScriptCreatureSourceOrTarget(), _GetScriptPlayer(), _GetScriptPlayerSourceOrTarget(), _GetScriptUnit(), _GetScriptWorldObject(), _ScriptProcessDoor(), AddToMap(), ScriptInfo::Amount, Player::AreaExploredOrEventHappens(), ScriptInfo::CallScript, ScriptInfo::CastSpell, Unit::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, Skyfire::ComputeCellCoord(), 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, HashMapHolder< T >::Find(), ScriptInfo::Flags, ScriptInfo::FlagToggle, GAMEOBJECT_TYPE_BUTTON, GAMEOBJECT_TYPE_DOOR, GAMEOBJECT_TYPE_FISHINGNODE, GAMEOBJECT_TYPE_TRAP, GetClosestCreatureWithEntry(), ScriptInfo::GetDebugInfo(), WorldObject::GetDistance(), Object::GetEntry(), GameObject::GetGoType(), WorldObject::GetGridActivationRange(), Object::GetGUID(), Object::GetGUIDLow(), WorldObject::GetMap(), ObjectAccessor::GetObjectInWorld(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), GetScriptsMapByType(), Object::GetTypeId(), GO_READY, ScriptInfo::GOGuid, GUID_HIPART(), HIGHGUID_CORPSE, HIGHGUID_GAMEOBJECT, HIGHGUID_ITEM, HIGHGUID_MO_TRANSPORT, HIGHGUID_PET, HIGHGUID_PLAYER, HIGHGUID_TRANSPORT, HIGHGUID_UNIT, HIGHGUID_VEHICLE, IS_PLAYER_GUID(), ScriptInfo::IsRepeatable, GameObject::isSpawned(), Object::isType(), WorldObject::IsWithinDistInMap(), ScriptInfo::ItemEntry, JUST_DIED, ScriptInfo::Kill, ScriptInfo::KillCredit, LANG_UNIVERSAL, ScriptInfo::LoadPath, m_scriptSchedule, MAKE_NEW_GUID(), ScriptInfo::MapID, ScriptInfo::Model, ScriptInfo::ModelID, Unit::MonsterMoveWithSpeed(), ScriptInfo::MoveTo, ScriptInfo::MovieID, Unit::NearTeleportTo(), NULL_BAG, NULL_SLOT, OBJECT_FIELD_ENTRY_ID, ScriptInfo::Orientation, ScriptAction::ownerGUID, ScriptInfo::PathID, WorldObject::PlayDistanceSound(), ScriptInfo::PlayMovie, ScriptInfo::PlaySound, ScriptInfo::PosX, ScriptInfo::PosY, ScriptInfo::PosZ, ScriptInfo::QuestExplored, ScriptInfo::QuestID, ScriptInfo::RemoveAura, ScriptInfo::RemoveCorpse, ScriptInfo::RespawnGameobject, 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_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_LOG_ERROR, SF_ORIENTATION_FACE_TARGET, SF_PLAYSOUND_DISTANCE_SOUND, SF_PLAYSOUND_TARGET_PLAYER, SF_REMOVEAURA_REVERSE, SF_TALK_USE_PLAYER, SF_TELEPORT_USE_CREATURE, sObjectMgr, ScriptInfo::SoundID, ScriptAction::sourceGUID, ScriptInfo::SpellID, sScriptMgr, sWaypointMgr, sWorld, ScriptInfo::Talk, ScriptAction::targetGUID, ScriptInfo::TeleportTo, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, ScriptInfo::TempSummonCreature, ScriptInfo::TextID, Object::ToGameObject(), Object::ToPlayer(), GameObject::ToTransport(), Object::ToUnit(), ScriptInfo::TravelTime, TYPEID_GAMEOBJECT, TYPEID_PLAYER, TYPEID_UNIT, TYPEMASK_UNIT, UI64FMTD, UNIT_FIELD_NPC_EMOTESTATE, and Cell::Visit().

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 22 of file MapScripts.cpp.

References Object::GetGUID(), Object::GetTypeId(), i_scriptLock, m_scriptSchedule, ScriptAction::ownerGUID, ScriptAction::script, ScriptsProcess(), ScriptAction::sourceGUID, sScriptMgr, sWorld, ScriptAction::targetGUID, and TYPEID_ITEM.

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

◆ SendInitSelf()

◆ SendInitTransports()

◆ SendRemoveTransports()

void Map::SendRemoveTransports ( Player * player)

◆ SendToPlayers()

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

Definition at line 2525 of file Map.cpp.

References m_mapRefManager.

Referenced by boss_ossirian::boss_ossirianAI::EnterCombat().

◆ setGridObjectDataLoaded()

void Map::setGridObjectDataLoaded ( bool pLoaded,
uint32 x,
uint32 y )
inlineprivate

◆ setNGrid()

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

Definition at line 2381 of file Map.cpp.

References ASSERT, i_grids, MAX_NUMBER_OF_GRIDS, and SF_LOG_ERROR.

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

◆ SetTimer()

void Map::SetTimer ( uint32 t)
inlineprivate

Definition at line 494 of file Map.h.

References i_gridExpiry, and MIN_GRID_DELAY.

◆ SetUnloadLock()

◆ SetUnloadReferenceLock()

◆ SummonCreature()

TempSummon * Map::SummonCreature ( uint32 entry,
Position const & pos,
SummonPropertiesEntry const * properties = NULL,
uint32 duration = 0,
Unit * summoner = NULL,
uint32 spellId = 0,
uint32 vehId = 0 )

Definition at line 2564 of file Object.cpp.

References AddToMap(), SummonPropertiesEntry::Category, Creature::Create(), SummonPropertiesEntry::Flags, Position::GetOrientation(), WorldObject::GetPhaseMask(), WorldObject::GetPhases(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Player::GetTeam(), Object::GetTypeId(), HIGHGUID_UNIT, TempSummon::InitStats(), TempSummon::InitSummon(), PHASEMASK_NORMAL, Creature::SetHomePosition(), Unit::SetPhased(), Object::SetUInt32Value(), sObjectMgr, 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_STATUE, SUMMON_TYPE_TOTEM, SUMMON_TYPE_VEHICLE, SUMMON_TYPE_VEHICLE2, Object::ToCreature(), Object::ToPlayer(), SummonPropertiesEntry::Type, TYPEID_PLAYER, UNIT_FIELD_CREATED_BY_SPELL, UNIT_MASK_GUARDIAN, UNIT_MASK_MINION, UNIT_MASK_PUPPET, UNIT_MASK_SUMMON, and UNIT_MASK_TOTEM.

Referenced by spell_halion_damage_aoe_summon::spell_halion_damage_aoe_summon_SpellScript::HandleSummon(), spell_putricide_mutated_transformation::spell_putricide_mutated_transformation_SpellScript::HandleSummon(), at_sindragosa_lair::OnTrigger(), LuaGlobalFunctions::PerformIngameSpawn(), spell_halion_twilight_phasing::spell_halion_twilight_phasing_SpellScript::Phase(), SummonCreatureGroup(), LuaUnit::SummonGuardian(), and Spell::SummonGuardian().

◆ SummonCreatureGroup()

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

Summons group of creatures.

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

Definition at line 2675 of file Object.cpp.

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

◆ SwitchGridContainers() [1/3]

◆ SwitchGridContainers() [2/3]

◆ SwitchGridContainers() [3/3]

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

Definition at line 288 of file Map.cpp.

Referenced by RemoveAllObjectsInRemoveList().

◆ ToInstanceMap() [1/2]

◆ ToInstanceMap() [2/2]

const InstanceMap * Map::ToInstanceMap ( ) const
inline

Definition at line 441 of file Map.h.

References IsInstance().

◆ ToMapInstanced() [1/2]

MapInstanced * Map::ToMapInstanced ( )
inline

Definition at line 437 of file Map.h.

References Instanceable().

◆ ToMapInstanced() [2/2]

const MapInstanced * Map::ToMapInstanced ( ) const
inline

Definition at line 438 of file Map.h.

References Instanceable().

◆ UnloadAll()

◆ UnloadGrid()

◆ Update()

◆ UpdateActiveCells()

void Map::UpdateActiveCells ( const float & x,
const float & y,
const uint32 t_diff )
private

◆ UpdateIteratorBack()

void Map::UpdateIteratorBack ( Player * player)

Definition at line 3206 of file Map.cpp.

References Player::GetMapRef(), and m_mapRefIter.

Referenced by Player::ResetMap().

◆ UpdateObjectsVisibilityFor()

void Map::UpdateObjectsVisibilityFor ( Player * player,
Cell cell,
CellCoord cellpair )

◆ UpdateObjectVisibility()

void Map::UpdateObjectVisibility ( WorldObject * obj,
Cell cell,
CellCoord cellpair )

Definition at line 2290 of file Map.cpp.

References WorldObject::GetVisibilityRange(), Cell::SetNoCreate(), and Cell::Visit().

◆ Visit()

◆ VisitAll()

template<class NOTIFIER>
void Map::VisitAll ( const float & x,
const float & y,
float radius,
NOTIFIER & notifier )
inline

◆ VisitFirstFound()

template<class NOTIFIER>
void Map::VisitFirstFound ( const float & x,
const float & y,
float radius,
NOTIFIER & notifier )
inline

◆ VisitGrid()

template<class NOTIFIER>
void Map::VisitGrid ( const float & x,
const float & y,
float radius,
NOTIFIER & notifier )
inline

◆ VisitNearbyCellsOf()

◆ VisitWorld()

template<class NOTIFIER>
void Map::VisitWorld ( const float & x,
const float & y,
float radius,
NOTIFIER & notifier )
inline

◆ MapReference

friend class MapReference
friend

Definition at line 239 of file Map.h.

References Map(), and MapReference.

Referenced by MapReference.

Member Data Documentation

◆ _creatureRespawnTimes

UNORDERED_MAP<uint32 , time_t> Map::_creatureRespawnTimes
private

◆ _creaturesToMove

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

Definition at line 508 of file Map.h.

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

◆ _creatureToMoveLock

bool Map::_creatureToMoveLock
private

◆ _dynamicTree

◆ _gameObjectsToMove

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

Definition at line 511 of file Map.h.

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

◆ _gameObjectsToMoveLock

bool Map::_gameObjectsToMoveLock
private

◆ _goRespawnTimes

UNORDERED_MAP<uint32 , time_t> Map::_goRespawnTimes
private

◆ _transports

◆ _transportsUpdateIter

TransportsContainer::iterator Map::_transportsUpdateIter
protected

Definition at line 560 of file Map.h.

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

◆ CreatureGroupHolder

CreatureGroupHolderType Map::CreatureGroupHolder

◆ GridLock

std::mutex Map::GridLock
protected

Definition at line 539 of file Map.h.

Referenced by EnsureGridCreated().

◆ GridMaps

Definition at line 579 of file Map.h.

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

◆ i_gridExpiry

time_t Map::i_gridExpiry
private

Definition at line 572 of file Map.h.

Referenced by EnsureGridCreated_i(), GetGridExpiry(), Map(), ResetGridExpiry(), and SetTimer().

◆ i_grids

Definition at line 578 of file Map.h.

Referenced by getNGrid(), and setNGrid().

◆ i_InstanceId

◆ i_mapEntry

◆ i_objectsToRemove

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

Definition at line 587 of file Map.h.

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

◆ i_objectsToSwitch

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

Definition at line 588 of file Map.h.

Referenced by AddObjectToSwitchList(), and RemoveAllObjectsInRemoveList().

◆ i_scriptLock

bool Map::i_scriptLock
private

Definition at line 586 of file Map.h.

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

◆ i_spawnMode

uint8 Map::i_spawnMode
protected

Definition at line 542 of file Map.h.

Referenced by GetSpawnMode(), Is25ManRaid(), IsHeroic(), IsRaidOrHeroicDungeon(), and Map().

◆ i_worldObjects

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

Definition at line 589 of file Map.h.

Referenced by AddWorldObject(), RemoveWorldObject(), and ~Map().

◆ Lock

◆ m_activeNonPlayers

ActiveNonPlayers Map::m_activeNonPlayers
protected

Definition at line 554 of file Map.h.

Referenced by ActiveObjectsNearGrid(), AddToActiveHelper(), Map(), RemoveFromActiveHelper(), and Update().

◆ m_activeNonPlayersIter

ActiveNonPlayers::iterator Map::m_activeNonPlayersIter
protected

Definition at line 555 of file Map.h.

Referenced by Map(), RemoveFromActiveHelper(), and Update().

◆ m_mapRefIter

MapRefManager::iterator Map::m_mapRefIter
protected

Definition at line 549 of file Map.h.

Referenced by Update(), and UpdateIteratorBack().

◆ m_mapRefManager

◆ m_parentMap

Map* Map::m_parentMap
private

Definition at line 576 of file Map.h.

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

◆ m_scriptSchedule

ScriptScheduleMap Map::m_scriptSchedule
private

Definition at line 592 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

◆ marked_cells

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

Definition at line 580 of file Map.h.

Referenced by isCellMarked(), markCell(), and resetMarkedCells().


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