AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Map.h"
Public Member Functions | |
InstanceMap (uint32 id, uint32 InstanceId, uint8 SpawnMode, Map *_parent) | |
~InstanceMap () override | |
bool | AddPlayerToMap (Player *) override |
void | RemovePlayerFromMap (Player *, bool) override |
void | AfterPlayerUnlinkFromMap () override |
void | Update (const uint32, const uint32, bool thread=true) override |
void | CreateInstanceScript (bool load, std::string data, uint32 completedEncounterMask) |
bool | Reset (uint8 method, GuidList *globalSkipList=nullptr) |
uint32 | GetScriptId () const |
std::string const & | GetScriptName () const |
InstanceScript * | GetInstanceScript () |
InstanceScript const * | GetInstanceScript () const |
void | PermBindAllPlayers () |
void | UnloadAll () override |
EnterState | CannotEnter (Player *player, bool loginCheck=false) override |
void | SendResetWarnings (uint32 timeLeft) const |
uint32 | GetMaxPlayers () const |
uint32 | GetMaxResetDelay () const |
void | InitVisibilityDistance () override |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from Map | |
Map (uint32 id, uint32 InstanceId, uint8 SpawnMode, Map *_parent=nullptr) | |
~Map () override | |
MapEntry const * | GetEntry () const |
bool | CanUnload (uint32 diff) |
virtual bool | AddPlayerToMap (Player *) |
virtual void | RemovePlayerFromMap (Player *, bool) |
virtual void | AfterPlayerUnlinkFromMap () |
template<class T > | |
bool | AddToMap (T *, bool checkTransport=false) |
template<class T > | |
void | RemoveFromMap (T *, bool) |
void | VisitNearbyCellsOf (WorldObject *obj, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &gridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &worldVisitor, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &largeGridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &largeWorldVisitor) |
void | VisitNearbyCellsOfPlayer (Player *player, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &gridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &worldVisitor, TypeContainerVisitor< Acore::ObjectUpdater, GridTypeMapContainer > &largeGridVisitor, TypeContainerVisitor< Acore::ObjectUpdater, WorldTypeMapContainer > &largeWorldVisitor) |
virtual void | Update (const uint32, const uint32, bool thread=true) |
float | GetVisibilityRange () const |
void | SetVisibilityRange (float range) |
virtual void | InitVisibilityDistance () |
void | PlayerRelocation (Player *, float x, float y, float z, float o) |
void | CreatureRelocation (Creature *creature, float x, float y, float z, float o) |
void | GameObjectRelocation (GameObject *go, float x, float y, float z, float o) |
void | DynamicObjectRelocation (DynamicObject *go, float x, float y, float z, float o) |
template<class T , class CONTAINER > | |
void | Visit (const Cell &cell, TypeContainerVisitor< T, CONTAINER > &visitor) |
bool | IsRemovalGrid (float x, float y) const |
bool | IsGridLoaded (float x, float y) const |
void | LoadGrid (float x, float y) |
void | LoadAllCells () |
bool | UnloadGrid (NGridType &ngrid) |
virtual void | UnloadAll () |
uint32 | GetId () const |
Map const * | GetParent () const |
std::shared_mutex & | GetMMapLock () const |
void | HandleDelayedVisibility () |
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 | GetMinHeight (float x, float y) const |
Transport * | GetTransportForPos (uint32 phase, float x, float y, float z, WorldObject *worldobject=nullptr) |
void | GetFullTerrainStatusForPosition (uint32 phaseMask, float x, float y, float z, float collisionHeight, PositionFullTerrainStatus &data, uint8 reqLiquidType=MAP_ALL_LIQUIDS) |
LiquidData const | GetLiquidData (uint32 phaseMask, float x, float y, float z, float collisionHeight, uint8 ReqLiquidType) |
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 | GetZoneId (uint32 phaseMask, float x, float y, float z) const |
void | GetZoneAndAreaId (uint32 phaseMask, uint32 &zoneid, uint32 &areaid, float x, float y, float z) const |
float | GetWaterLevel (float x, float y) const |
bool | IsInWater (uint32 phaseMask, float x, float y, float z, float collisionHeight) const |
bool | IsUnderWater (uint32 phaseMask, float x, float y, float z, float collisionHeight) const |
bool | HasEnoughWater (WorldObject const *searcher, float x, float y, float z) const |
bool | HasEnoughWater (WorldObject const *searcher, LiquidData const &liquidData) const |
void | MoveAllCreaturesInMoveList () |
void | MoveAllGameObjectsInMoveList () |
void | MoveAllDynamicObjectsInMoveList () |
void | RemoveAllObjectsInRemoveList () |
virtual void | RemoveAllPlayers () |
uint32 | GetInstanceId () const |
uint8 | GetSpawnMode () const |
virtual EnterState | CannotEnter (Player *, bool) |
const char * | GetMapName () const |
Difficulty | GetDifficulty () const |
bool | IsRegularDifficulty () const |
MapDifficulty const * | GetMapDifficulty () const |
bool | Instanceable () 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 | IsWorldMap () const |
bool | GetEntrancePos (int32 &mapid, float &x, float &y) |
void | AddObjectToRemoveList (WorldObject *obj) |
void | AddObjectToSwitchList (WorldObject *obj, bool on) |
virtual void | DelayedUpdate (const uint32 diff) |
void | resetMarkedCells () |
bool | isCellMarked (uint32 pCellId) |
void | markCell (uint32 pCellId) |
void | resetMarkedCellsLarge () |
bool | isCellMarkedLarge (uint32 pCellId) |
void | markCellLarge (uint32 pCellId) |
bool | HavePlayers () const |
uint32 | GetPlayersCountExceptGMs () const |
void | AddWorldObject (WorldObject *obj) |
void | RemoveWorldObject (WorldObject *obj) |
void | SendToPlayers (WorldPacket const *data) const |
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. More... | |
void | ScriptCommandStart (ScriptInfo const &script, uint32 delay, Object *source, Object *target) |
template<class T > | |
void | AddToActive (T *obj) |
template<class T > | |
void | RemoveFromActive (T *obj) |
template<class T > | |
void | SwitchGridContainers (T *obj, bool on) |
void | UpdateIteratorBack (Player *player) |
TempSummon * | SummonCreature (uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, bool visibleBySummonerOnly=false) |
GameObject * | SummonGameObject (uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true) |
GameObject * | SummonGameObject (uint32 entry, Position const &pos, float rotation0=0.0f, float rotation1=0.0f, float rotation2=0.0f, float rotation3=0.0f, uint32 respawnTime=100, bool checkTransport=true) |
void | SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=nullptr) |
Corpse * | GetCorpse (ObjectGuid const guid) |
Creature * | GetCreature (ObjectGuid const guid) |
GameObject * | GetGameObject (ObjectGuid const guid) |
Transport * | GetTransport (ObjectGuid const guid) |
DynamicObject * | GetDynamicObject (ObjectGuid const guid) |
Pet * | GetPet (ObjectGuid const guid) |
MapStoredObjectTypesContainer & | GetObjectsStore () |
CreatureBySpawnIdContainer & | GetCreatureBySpawnIdStore () |
GameObjectBySpawnIdContainer & | GetGameObjectBySpawnIdStore () |
std::unordered_set< Corpse * > const * | GetCorpsesInCell (uint32 cellId) const |
Corpse * | GetCorpseByPlayer (ObjectGuid const &ownerGuid) const |
MapInstanced * | ToMapInstanced () |
MapInstanced const * | ToMapInstanced () const |
InstanceMap * | ToInstanceMap () |
InstanceMap const * | ToInstanceMap () const |
BattlegroundMap * | ToBattlegroundMap () |
BattlegroundMap const * | ToBattlegroundMap () const |
float | GetWaterOrGroundLevel (uint32 phasemask, float x, float y, float z, float *ground=nullptr, bool swim=false, float collisionHeight=DEFAULT_COLLISION_HEIGHT) const |
float | GetHeight (uint32 phasemask, float x, float y, float z, 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 |
bool | CanReachPositionAndGetValidCoords (WorldObject const *source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision=true, bool failOnSlopes=true) const |
Check if a given source can reach a specific point following a path and normalize the coords. Use this method for long paths, otherwise use the overloaded method with the start coords when you need to do a quick check on small segments. More... | |
bool | CanReachPositionAndGetValidCoords (WorldObject const *source, float &destX, float &destY, float &destZ, bool failOnCollision=true, bool failOnSlopes=true) const |
validate the new destination and set reachable coords Check if a given unit can reach a specific point on a segment and set the correct dest coords NOTE: use this method with small segments. More... | |
bool | CanReachPositionAndGetValidCoords (WorldObject const *source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision=true, bool failOnSlopes=true) const |
bool | CheckCollisionAndGetValidCoords (WorldObject const *source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision=true) const |
validate the new destination and set coords Check if a given unit can face collisions in a specific segment More... | |
void | Balance () |
void | RemoveGameObjectModel (const GameObjectModel &model) |
void | InsertGameObjectModel (const GameObjectModel &model) |
bool | ContainsGameObjectModel (const GameObjectModel &model) const |
DynamicMapTree const & | GetDynamicMapTree () 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) |
float | GetGameObjectFloor (uint32 phasemask, float x, float y, float z, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const |
time_t | GetLinkedRespawnTime (ObjectGuid guid) const |
time_t | GetCreatureRespawnTime (ObjectGuid::LowType dbGuid) const |
time_t | GetGORespawnTime (ObjectGuid::LowType dbGuid) const |
void | SaveCreatureRespawnTime (ObjectGuid::LowType dbGuid, time_t &respawnTime) |
void | RemoveCreatureRespawnTime (ObjectGuid::LowType dbGuid) |
void | SaveGORespawnTime (ObjectGuid::LowType dbGuid, time_t &respawnTime) |
void | RemoveGORespawnTime (ObjectGuid::LowType dbGuid) |
void | LoadRespawnTimes () |
void | DeleteRespawnTimes () |
time_t | GetInstanceResetPeriod () const |
void | ScheduleCreatureRespawn (ObjectGuid, Milliseconds) |
void | LoadCorpseData () |
void | DeleteCorpseData () |
void | AddCorpse (Corpse *corpse) |
void | RemoveCorpse (Corpse *corpse) |
Corpse * | ConvertCorpseToBones (ObjectGuid const ownerGuid, bool insignia=false) |
void | RemoveOldCorpses () |
void | SendInitTransports (Player *player) |
void | SendRemoveTransports (Player *player) |
void | SendZoneDynamicInfo (Player *player) |
void | SendInitSelf (Player *player) |
void | PlayDirectSoundToMap (uint32 soundId, uint32 zoneId=0) |
void | SetZoneMusic (uint32 zoneId, uint32 musicId) |
void | SetZoneWeather (uint32 zoneId, WeatherState weatherId, float weatherGrade) |
void | SetZoneOverrideLight (uint32 zoneId, uint32 lightId, Milliseconds fadeInTime) |
void | UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source) |
void | LogEncounterFinished (EncounterCreditType type, uint32 creditEntry) |
void | DoForAllPlayers (std::function< void(Player *)> exec) |
GridMap * | GetGrid (float x, float y) |
void | EnsureGridCreated (const GridCoord &) |
bool | AllTransportsEmpty () const |
void | AllTransportsRemovePassengers () |
TransportsContainer const & | GetAllTransports () const |
template<HighGuid high> | |
ObjectGuid::LowType | GenerateLowGuid () |
void | AddUpdateObject (Object *obj) |
void | RemoveUpdateObject (Object *obj) |
std::size_t | GetActiveNonPlayersCount () const |
virtual std::string | GetDebugInfo () const |
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 | InitializeObject (Creature *) |
template<> | |
void | InitializeObject (GameObject *) |
template<> | |
bool | AddToMap (MotionTransport *obj, bool) |
template<> | |
void | RemoveFromMap (MotionTransport *obj, bool remove) |
template<> | |
void | AddToActive (Creature *c) |
template<> | |
void | AddToActive (DynamicObject *d) |
template<> | |
void | AddToActive (GameObject *d) |
template<> | |
void | RemoveFromActive (Creature *c) |
template<> | |
void | RemoveFromActive (DynamicObject *obj) |
template<> | |
void | RemoveFromActive (GameObject *obj) |
Public Member Functions inherited from GridRefMgr< NGridType > | |
GridReference< NGridType > * | getFirst () |
GridReference< NGridType > * | getLast () |
iterator | begin () |
iterator | end () |
iterator | rbegin () |
iterator | rend () |
Public Member Functions inherited from RefMgr< TO, FROM > | |
RefMgr ()=default | |
virtual | ~RefMgr () |
Reference< TO, FROM > * | getFirst () |
Reference< TO, FROM > const * | getFirst () const |
Reference< TO, FROM > * | getLast () |
Reference< TO, FROM > const * | getLast () const |
iterator | begin () |
iterator | end () |
iterator | rbegin () |
iterator | rend () |
void | clearReferences () |
Public Member Functions inherited from LinkedListHead | |
LinkedListHead () | |
bool | IsEmpty () const |
LinkedListElement * | getFirst () |
LinkedListElement const * | getFirst () const |
LinkedListElement * | getLast () |
LinkedListElement const * | getLast () const |
void | insertFirst (LinkedListElement *pElem) |
void | insertLast (LinkedListElement *pElem) |
uint32 | getSize () const |
void | incSize () |
void | decSize () |
Private Attributes | |
bool | m_resetAfterUnload |
bool | m_unloadWhenEmpty |
InstanceScript * | instance_data |
uint32 | i_script_id |
References Map::_instanceResetPeriod, CONFIG_INSTANCE_UNLOAD_DELAY, InitVisibilityDistance(), Map::IsRaid(), Map::m_unloadTimer, MIN_UNLOAD_DELAY, sInstanceSaveMgr, and sWorld.
|
override |
References Map::GetInstanceId(), instance_data, and sInstanceSaveMgr.
|
overridevirtual |
Reimplemented from Map.
References Player::AddInstanceEnterTime(), Map::AddPlayerToMap(), InstanceSave::CanReset(), ObjectAccessor::FindConnectedPlayer(), InstanceScript::GetCompletedEncounterMask(), InstanceSave::GetDifficulty(), GameTime::GetGameTime(), Player::GetGroup(), Object::GetGUID(), Map::GetId(), InstanceSave::GetInstanceId(), Map::GetInstanceId(), InstanceSave::GetMapId(), WorldObject::GetName(), Player::GetSession(), Map::GetSpawnMode(), instance_data, Map::IsDungeon(), Group::isLFGGroup(), Group::IsLfgRandomInstance(), LOG_ERROR, m_resetAfterUnload, Map::m_unloadTimer, m_unloadWhenEmpty, InstanceScript::OnPlayerEnter(), InstancePlayerBind::perm, WorldSession::PlayerLoading(), InstancePlayerBind::save, WorldSession::SendPacket(), Player::SetPendingBind(), sInstanceSaveMgr, SMSG_INSTANCE_LOCK_WARNING_QUERY, and ObjectGuid::ToString().
|
overridevirtual |
Reimplemented from Map.
References Map::AfterPlayerUnlinkFromMap(), CONFIG_INSTANCE_UNLOAD_DELAY, Map::HavePlayers(), Map::m_unloadTimer, m_unloadWhenEmpty, MIN_UNLOAD_DELAY, and sWorld.
|
overridevirtual |
Reimplemented from Map.
References MapRefMgr::begin(), Map::CANNOT_ENTER_ALREADY_IN_MAP, Map::CANNOT_ENTER_INSTANCE_BIND_MISMATCH, Map::CANNOT_ENTER_MAX_PLAYERS, Map::CANNOT_ENTER_UNSPECIFIED_REASON, Map::CANNOT_ENTER_ZONE_IN_COMBAT, Map::CannotEnter(), MapRefMgr::end(), Map::GetDifficulty(), Player::GetGroup(), Object::GetGUID(), Map::GetId(), Map::GetInstanceId(), GetInstanceScript(), Map::GetMapName(), Player::GetMapRef(), GetMaxPlayers(), WorldObject::GetName(), Map::GetPlayers(), Map::GetPlayersCountExceptGMs(), Map::GetSpawnMode(), Reference< TO, FROM >::getTarget(), LinkedListHead::IsEmpty(), InstanceScript::IsEncounterInProgress(), Player::IsGameMaster(), Map::IsRaid(), LOG_DEBUG, LOG_ERROR, Player::SendTransferAborted(), sLFGMgr, ObjectGuid::ToString(), TRANSFER_ABORT_MAP_NOT_ALLOWED, TRANSFER_ABORT_MAX_PLAYERS, and TRANSFER_ABORT_ZONE_IN_COMBAT.
void InstanceMap::CreateInstanceScript | ( | bool | load, |
std::string | data, | ||
uint32 | completedEncounterMask | ||
) |
References Map::GetId(), i_script_id, InstanceScript::Initialize(), instance_data, InstanceScript::Load(), InstanceScript::LoadInstanceSavedGameobjectStateData(), InstanceTemplate::ScriptId, InstanceScript::SetCompletedEncountersMask(), sObjectMgr, and sScriptMgr.
Referenced by MapInstanced::CreateInstance().
|
overridevirtual |
Reimplemented from Map.
References Map::GetDebugInfo(), GetScriptId(), and GetScriptName().
|
inline |
References instance_data.
Referenced by CannotEnter(), TransportMgr::CreateTransport(), WorldObject::GetInstanceScript(), instance_commandscript::HandleInstanceGetBossStateCommand(), instance_commandscript::HandleInstanceSaveDataCommand(), instance_commandscript::HandleInstanceSetBossStateCommand(), WorldSession::HandleSetRaidDifficultyOpcode(), InstanceSave::InsertToDB(), Condition::Meets(), and AchievementCriteriaData::Meets().
|
inline |
References instance_data.
uint32 InstanceMap::GetMaxPlayers | ( | ) | const |
References Map::GetEntry(), Map::GetMapDifficulty(), MapEntry::maxPlayers, and MapDifficulty::maxPlayers.
Referenced by CannotEnter(), and AchievementMgr::UpdateAchievementCriteria().
uint32 InstanceMap::GetMaxResetDelay | ( | ) | const |
References Map::GetMapDifficulty(), and MapDifficulty::resetTime.
|
inline |
std::string const & InstanceMap::GetScriptName | ( | ) | const |
References i_script_id, and sObjectMgr.
Referenced by GetDebugInfo().
|
overridevirtual |
Reimplemented from Map.
References Map::GetId(), World::GetMaxVisibleDistanceInInstances(), and Map::m_VisibleDistance.
Referenced by InstanceMap().
void InstanceMap::PermBindAllPlayers | ( | ) |
References MapRefMgr::begin(), DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED, MapRefMgr::end(), InstanceSave::GetDifficulty(), Player::GetGroup(), Object::GetGUID(), Map::GetId(), Map::GetInstanceId(), InstanceSave::GetMapId(), Map::GetMapName(), Player::GetSession(), Map::IsDungeon(), LOG_ERROR, Map::m_mapRefMgr, InstancePlayerBind::perm, WorldSession::SendPacket(), Group::SetDifficultyChangePrevention(), sInstanceSaveMgr, and SMSG_INSTANCE_SAVE_CREATED.
Referenced by boss_flame_leviathan::boss_flame_leviathanAI::BindPlayers(), boss_skeram::JustDied(), Unit::Kill(), instance_karazhan::instance_karazhan_InstanceMapScript::OnUnitDeath(), instance_karazhan::instance_karazhan_InstanceMapScript::SetData(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::SetData(), and instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::Update().
|
overridevirtual |
Reimplemented from Map.
References Map::RemovePlayerFromMap(), and Player::SetPendingBind().
References MapRefMgr::begin(), MapRefMgr::end(), Map::GetId(), Map::HavePlayers(), INSTANCE_RESET_ALL, INSTANCE_RESET_CHANGE_DIFFICULTY, INSTANCE_RESET_GLOBAL, LinkedListHead::IsEmpty(), Map::m_mapRefMgr, m_resetAfterUnload, Map::m_unloadTimer, m_unloadWhenEmpty, and MIN_UNLOAD_DELAY.
Referenced by InstanceSaveMgr::_ResetOrWarnAll(), Player::ResetInstances(), and Group::ResetInstances().
void InstanceMap::SendResetWarnings | ( | uint32 | timeLeft | ) | const |
References MapRefMgr::begin(), MapRefMgr::end(), Map::GetId(), Map::IsRaid(), and Map::m_mapRefMgr.
Referenced by InstanceSaveMgr::_ResetOrWarnAll().
|
overridevirtual |
Reimplemented from Map.
References ASSERT, Map::DeleteCorpseData(), Map::DeleteRespawnTimes(), Map::HavePlayers(), m_resetAfterUnload, and Map::UnloadAll().
|
overridevirtual |
Reimplemented from Map.
References instance_data, Map::Update(), and InstanceScript::Update().
|
private |
Referenced by CreateInstanceScript(), GetScriptId(), and GetScriptName().
|
private |
Referenced by AddPlayerToMap(), CreateInstanceScript(), GetInstanceScript(), Update(), and ~InstanceMap().
|
private |
Referenced by AddPlayerToMap(), Reset(), and UnloadAll().
|
private |
Referenced by AddPlayerToMap(), AfterPlayerUnlinkFromMap(), and Reset().