|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <MapInstanced.h>
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< LinkedListElement > | iterator |
Public Member Functions | |
| void | AddGridMapReference (const GridCoord &p) |
| bool | CanEnter (Player *player) OVERRIDE |
| Map * | CreateInstanceForPlayer (const uint32 mapId, Player *player) |
| void | DelayedUpdate (const uint32 diff) OVERRIDE |
| bool | DestroyInstance (InstancedMaps::iterator &itr) |
| Map * | FindInstanceMap (uint32 instanceId) const |
| InstancedMaps & | GetInstancedMaps () |
| 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 |
| Creature * | GetCreature (uint64 guid) |
| time_t | GetCreatureRespawnTime (uint32 dbGuid) const |
| DifficultyID | GetDifficulty () const |
| DynamicObject * | GetDynamicObject (uint64 guid) |
| bool | GetEntrancePos (int32 &mapid, float &x, float &y) |
| MapEntry const * | GetEntry () const |
| GameObject * | GetGameObject (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 |
| Transport * | GetTransport (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) |
| TempSummon * | SummonCreature (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) |
| InstanceMap * | ToInstanceMap () |
| const InstanceMap * | ToInstanceMap () const |
| MapInstanced * | ToMapInstanced () |
| const MapInstanced * | ToMapInstanced () 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 ¬ifier) |
| template<class NOTIFIER> | |
| void | VisitFirstFound (const float &x, const float &y, float radius, NOTIFIER ¬ifier) |
| template<class NOTIFIER> | |
| void | VisitGrid (const float &x, const float &y, float radius, NOTIFIER ¬ifier) |
| 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 ¬ifier) |
| 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 () |
| LinkedListElement * | getFirst () |
| LinkedListElement const * | getFirst () const |
| LinkedListElement * | getLast () |
| 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 | |
| BattlegroundMap * | CreateBattleground (uint32 InstanceId, Battleground *bg) |
| InstanceMap * | CreateInstance (uint32 InstanceId, InstanceSave *save, DifficultyID difficulty) |
Private Attributes | |
| uint16 | GridMapReference [MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS] |
| InstancedMaps | m_InstancedMaps |
Friends | |
| class | MapManager |
Definition at line 13 of file MapInstanced.h.
| typedef UNORDERED_MAP< uint32, Map*> MapInstanced::InstancedMaps |
Definition at line 17 of file MapInstanced.h.
| 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.
|
inline |
Definition at line 20 of file MapInstanced.h.
|
inline |
Definition at line 37 of file MapInstanced.h.
References GridMapReference, Map::SetUnloadReferenceLock(), CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
|
virtual |
Reimplemented from Map.
Definition at line 274 of file MapInstanced.cpp.
|
private |
Definition at line 216 of file MapInstanced.cpp.
References ASSERT, PvPDifficultyEntry::difficulty, GetBattlegroundBracketByLevel(), Map::GetGridExpiry(), Map::GetId(), Battleground::GetMapId(), Battleground::GetMinLevel(), Map::IsBattlegroundOrArena(), Map::Lock, m_InstancedMaps, BattlegroundMap::SetBG(), Battleground::SetBgMap(), SF_LOG_DEBUG, and sTransportMgr.
Referenced by CreateInstanceForPlayer().
|
private |
Definition at line 179 of file MapInstanced.cpp.
References ASSERT, InstanceMap::CreateInstanceData(), GetDownscaledMapDifficultyData(), Map::GetGridExpiry(), Map::GetId(), Map::IsInstance(), Map::LoadRespawnTimes(), Map::Lock, m_InstancedMaps, SF_LOG_DEBUG, SF_LOG_ERROR, sMapStore, sObjectMgr, and sTransportMgr.
Referenced by CreateInstanceForPlayer().
Definition at line 101 of file MapInstanced.cpp.
References CreateBattleground(), CreateInstance(), FindInstanceMap(), Player::GetBattleground(), Player::GetBattlegroundId(), Group::GetBoundInstance(), Player::GetBoundInstance(), Group::GetDifficulty(), InstanceSave::GetDifficulty(), Player::GetDifficulty(), Map::GetEntry(), Player::GetGroup(), Map::GetId(), InstanceSave::GetInstanceId(), Map::IsBattlegroundOrArena(), Map::Map(), InstancePlayerBind::perm, InstanceGroupBind::save, InstancePlayerBind::save, sMapMgr, Player::TeleportToBGEntryPoint(), and Player::UnbindInstance().
|
virtual |
Reimplemented from Map.
Definition at line 64 of file MapInstanced.cpp.
References Map::DelayedUpdate(), and m_InstancedMaps.
| bool MapInstanced::DestroyInstance | ( | InstancedMaps::iterator & | itr | ) |
Definition at line 243 of file MapInstanced.cpp.
References CONFIG_GRID_UNLOAD, MMAP::MMapFactory::createOrGetMMapManager(), VMAP::VMapFactory::createOrGetVMapManager(), m_InstancedMaps, BattlegroundMap::RemoveAllPlayers(), sMapMgr, sWorld, Map::UnloadAll(), MMAP::MMapManager::unloadMap(), and VMAP::IVMapManager::unloadMap().
Referenced by Update().
Definition at line 30 of file MapInstanced.h.
References FindInstanceMap(), m_InstancedMaps, and Map::Map().
Referenced by CreateInstanceForPlayer(), and FindInstanceMap().
|
inline |
Definition at line 50 of file MapInstanced.h.
References m_InstancedMaps.
|
virtual |
|
inline |
Definition at line 43 of file MapInstanced.h.
References GridMapReference, Map::SetUnloadReferenceLock(), CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.
|
virtual |
Reimplemented from Map.
Definition at line 80 of file MapInstanced.cpp.
References m_InstancedMaps, and Map::UnloadAll().
|
virtual |
Reimplemented from Map.
Definition at line 35 of file MapInstanced.cpp.
References DestroyInstance(), m_InstancedMaps, sMapMgr, and Map::Update().
|
friend |
|
private |
Definition at line 59 of file MapInstanced.h.
Referenced by AddGridMapReference(), MapInstanced(), and RemoveGridMapReference().
|
private |
Definition at line 57 of file MapInstanced.h.
Referenced by CreateBattleground(), CreateInstance(), DelayedUpdate(), DestroyInstance(), FindInstanceMap(), GetInstancedMaps(), InitVisibilityDistance(), UnloadAll(), and Update().