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

#include <Map.h>

Inheritance diagram for InstanceMap:
Collaboration diagram for InstanceMap:

Public Member Functions

bool AddPlayerToMap (Player *) OVERRIDE
bool CanEnter (Player *player) OVERRIDE
void CreateInstanceData (bool load)
InstanceScriptGetInstanceScript ()
uint32 GetMaxPlayers () const
uint32 GetMaxResetDelay () const
uint32 GetScriptId () const
virtual void InitVisibilityDistance () OVERRIDE
 InstanceMap (uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map *_parent)
void PermBindAllPlayers (Player *source)
void RemovePlayerFromMap (Player *, bool) OVERRIDE
bool Reset (InstanceResetMethod method)
void SendResetWarnings (uint32 timeLeft) const
void SetResetSchedule (bool on)
void UnloadAll () OVERRIDE
void Update (const uint32) OVERRIDE
 ~InstanceMap ()
Public Member Functions inherited from Map
bool ActiveObjectsNearGrid (NGridType const &ngrid) const
void AddObjectToRemoveList (WorldObject *obj)
void AddObjectToSwitchList (WorldObject *obj, bool on)
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 ()
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)
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)
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
bool UnloadGrid (NGridType &ngrid, bool pForce)
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 ()

Private Attributes

InstanceScripti_data
uint32 i_script_id
bool m_resetAfterUnload
bool m_unloadWhenEmpty

Additional Inherited Members

Public Types inherited from Map
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
Static Public Member Functions inherited from Map
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 inherited from Map
CreatureGroupHolderType CreatureGroupHolder
Protected Types inherited from Map
typedef std::set< WorldObject * > ActiveNonPlayers
typedef std::set< Transport * > TransportsContainer
Protected Member Functions inherited from Map
void SetUnloadReferenceLock (const GridCoord &p, bool on)
Protected Attributes inherited from Map
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

Detailed Description

Definition at line 636 of file Map.h.

Constructor & Destructor Documentation

◆ InstanceMap()

InstanceMap::InstanceMap ( uint32 id,
time_t expiry,
uint32 InstanceId,
uint8 SpawnMode,
Map * _parent )

◆ ~InstanceMap()

InstanceMap::~InstanceMap ( )

Definition at line 2674 of file Map.cpp.

References i_data.

Member Function Documentation

◆ AddPlayerToMap()

◆ CanEnter()

◆ CreateInstanceData()

◆ GetInstanceScript()

InstanceScript * InstanceMap::GetInstanceScript ( )
inline

Definition at line 647 of file Map.h.

References i_data.

Referenced by CanEnter(), and TransportMgr::CreateTransport().

◆ GetMaxPlayers()

uint32 InstanceMap::GetMaxPlayers ( ) const

◆ GetMaxResetDelay()

uint32 InstanceMap::GetMaxResetDelay ( ) const

Definition at line 3097 of file Map.cpp.

References Map::GetMapDifficulty(), and MapDifficulty::resetTime.

◆ GetScriptId()

uint32 InstanceMap::GetScriptId ( ) const
inline

◆ InitVisibilityDistance()

void InstanceMap::InitVisibilityDistance ( )
virtual

◆ PermBindAllPlayers()

◆ RemovePlayerFromMap()

void InstanceMap::RemovePlayerFromMap ( Player * player,
bool remove )
virtual

◆ Reset()

◆ SendResetWarnings()

void InstanceMap::SendResetWarnings ( uint32 timeLeft) const

Definition at line 3018 of file Map.cpp.

References Map::GetEntry(), Map::GetId(), and Map::m_mapRefManager.

◆ SetResetSchedule()

◆ UnloadAll()

void InstanceMap::UnloadAll ( )
virtual

Reimplemented from Map.

Definition at line 3008 of file Map.cpp.

References ASSERT, Map::DeleteRespawnTimes(), Map::HavePlayers(), m_resetAfterUnload, and Map::UnloadAll().

◆ Update()

void InstanceMap::Update ( const uint32 t_diff)
virtual

Reimplemented from Map.

Definition at line 2874 of file Map.cpp.

References i_data, and Map::Update().

Member Data Documentation

◆ i_data

InstanceScript* InstanceMap::i_data
private

◆ i_script_id

uint32 InstanceMap::i_script_id
private

Definition at line 662 of file Map.h.

Referenced by CreateInstanceData(), GetScriptId(), and InstanceMap().

◆ m_resetAfterUnload

bool InstanceMap::m_resetAfterUnload
private

Definition at line 659 of file Map.h.

Referenced by AddPlayerToMap(), InstanceMap(), Reset(), and UnloadAll().

◆ m_unloadWhenEmpty

bool InstanceMap::m_unloadWhenEmpty
private

Definition at line 660 of file Map.h.

Referenced by AddPlayerToMap(), InstanceMap(), RemovePlayerFromMap(), and Reset().


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