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

#include <MapInstanced.h>

Inheritance diagram for MapInstanced:
Collaboration diagram for MapInstanced:

Public Types

typedef UNORDERED_MAP< uint32, Map * > InstancedMaps
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

Public Member Functions

void AddGridMapReference (const GridCoord &p)
bool CanEnter (Player *player) OVERRIDE
MapCreateInstanceForPlayer (const uint32 mapId, Player *player)
void DelayedUpdate (const uint32 diff) OVERRIDE
bool DestroyInstance (InstancedMaps::iterator &itr)
MapFindInstanceMap (uint32 instanceId) const
InstancedMapsGetInstancedMaps ()
virtual void InitVisibilityDistance () OVERRIDE
 MapInstanced (uint32 id, time_t expiry)
void RemoveGridMapReference (GridCoord const &p)
void UnloadAll () OVERRIDE
void Update (const uint32) OVERRIDE
 ~MapInstanced ()
Public Member Functions inherited from Map
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 ()
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)
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)
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
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 Member Functions

BattlegroundMapCreateBattleground (uint32 InstanceId, Battleground *bg)
InstanceMapCreateInstance (uint32 InstanceId, InstanceSave *save, DifficultyID difficulty)

Private Attributes

uint16 GridMapReference [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
InstancedMaps m_InstancedMaps

Friends

class MapManager

Additional Inherited Members

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 13 of file MapInstanced.h.

Member Typedef Documentation

◆ InstancedMaps

Definition at line 17 of file MapInstanced.h.

Constructor & Destructor Documentation

◆ MapInstanced()

MapInstanced::MapInstanced ( uint32 id,
time_t expiry )

Definition at line 18 of file MapInstanced.cpp.

References DIFFICULTY_NORMAL, GridMapReference, Map::Map(), and MAX_NUMBER_OF_GRIDS.

◆ ~MapInstanced()

MapInstanced::~MapInstanced ( )
inline

Definition at line 20 of file MapInstanced.h.

Member Function Documentation

◆ AddGridMapReference()

void MapInstanced::AddGridMapReference ( const GridCoord & p)
inline

◆ CanEnter()

bool MapInstanced::CanEnter ( Player * player)
virtual

Reimplemented from Map.

Definition at line 274 of file MapInstanced.cpp.

◆ CreateBattleground()

◆ CreateInstance()

◆ CreateInstanceForPlayer()

◆ DelayedUpdate()

void MapInstanced::DelayedUpdate ( const uint32 diff)
virtual

Reimplemented from Map.

Definition at line 64 of file MapInstanced.cpp.

References Map::DelayedUpdate(), and m_InstancedMaps.

◆ DestroyInstance()

◆ FindInstanceMap()

Map * MapInstanced::FindInstanceMap ( uint32 instanceId) const
inline

Definition at line 30 of file MapInstanced.h.

References FindInstanceMap(), m_InstancedMaps, and Map::Map().

Referenced by CreateInstanceForPlayer(), and FindInstanceMap().

◆ GetInstancedMaps()

InstancedMaps & MapInstanced::GetInstancedMaps ( )
inline

Definition at line 50 of file MapInstanced.h.

References m_InstancedMaps.

◆ InitVisibilityDistance()

void MapInstanced::InitVisibilityDistance ( )
virtual

Reimplemented from Map.

Definition at line 24 of file MapInstanced.cpp.

References m_InstancedMaps.

◆ RemoveGridMapReference()

void MapInstanced::RemoveGridMapReference ( GridCoord const & p)
inline

◆ UnloadAll()

void MapInstanced::UnloadAll ( )
virtual

Reimplemented from Map.

Definition at line 80 of file MapInstanced.cpp.

References m_InstancedMaps, and Map::UnloadAll().

◆ Update()

void MapInstanced::Update ( const uint32 t)
virtual

Reimplemented from Map.

Definition at line 35 of file MapInstanced.cpp.

References DestroyInstance(), m_InstancedMaps, sMapMgr, and Map::Update().

◆ MapManager

friend class MapManager
friend

Definition at line 15 of file MapInstanced.h.

References MapManager.

Referenced by MapManager.

Member Data Documentation

◆ GridMapReference

uint16 MapInstanced::GridMapReference[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]
private

Definition at line 59 of file MapInstanced.h.

Referenced by AddGridMapReference(), MapInstanced(), and RemoveGridMapReference().

◆ m_InstancedMaps


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