45#include <unordered_set>
82namespace Trinity {
struct ObjectUpdater; }
83namespace Vignettes {
struct VignetteData; }
153#define MIN_UNLOAD_DELAY 1
154#define MAP_INVALID_ZONE 0xFFFFFFFF
186template <
typename ObjectType>
189 using Container = std::unordered_map<ObjectGuid, ObjectType*>;
195 auto [itr, isNew] = container.try_emplace(object->GetGUID(),
object);
196 ASSERT(isNew || itr->second ==
object,
"Object with certain key already in but objects are different!");
202 container.erase(object->GetGUID());
208 return container.size();
213 auto itr = container.find(key);
214 return itr != container.end() ? itr->second :
nullptr;
236 if (m_unloadTimer <= diff)
239 m_unloadTimer -= diff;
243 virtual bool AddPlayerToMap(
Player* player,
bool initPlayer =
true);
244 virtual void RemovePlayerFromMap(
Player*,
bool);
246 template<
class T>
bool AddToMap(T *);
247 template<
class T>
void RemoveFromMap(T *,
bool);
254 virtual void InitVisibilityDistance();
256 void PlayerRelocation(
Player*,
float x,
float y,
float z,
float orientation);
257 void CreatureRelocation(
Creature* creature,
float x,
float y,
float z,
float ang,
bool respawnRelocationOnFail =
true);
258 void GameObjectRelocation(
GameObject* go,
float x,
float y,
float z,
float orientation,
bool respawnRelocationOnFail =
true);
259 void DynamicObjectRelocation(
DynamicObject* go,
float x,
float y,
float z,
float orientation);
260 void AreaTriggerRelocation(
AreaTrigger* at,
float x,
float y,
float z,
float orientation);
262 template<
class T,
class CONTAINER>
278 void LoadGrid(
float x,
float y);
279 void LoadGridForActiveObject(
float x,
float y,
WorldObject const*
object);
281 bool UnloadGrid(
NGridType& ngrid,
bool pForce);
293 static void InitStateMachine();
294 static void DeleteStateMachine();
316 void GetZoneAndAreaId(
PhaseShift const& phaseShift,
uint32& zoneid,
uint32& areaid,
float x,
float y,
float z);
319 float GetMinHeight(
PhaseShift const& phaseShift,
float x,
float y);
320 float GetGridHeight(
PhaseShift const& phaseShift,
float x,
float y);
323 float GetHeight(
PhaseShift const& phaseShift,
float x,
float y,
float z,
bool vmap =
true,
float maxSearchDist =
DEFAULT_HEIGHT_SEARCH) {
return std::max<float>(GetStaticHeight(phaseShift, x, y, z, vmap, maxSearchDist), GetGameObjectFloor(phaseShift, x, y, z, maxSearchDist)); }
326 float GetWaterLevel(
PhaseShift const& phaseShift,
float x,
float y);
327 bool IsInWater(
PhaseShift const& phaseShift,
float x,
float y,
float z,
LiquidData* data =
nullptr);
328 bool IsUnderWater(
PhaseShift const& phaseShift,
float x,
float y,
float z);
330 float GetWaterOrGroundLevel(
PhaseShift const& phaseShift,
float x,
float y,
float z,
float* ground =
nullptr,
bool swim =
false,
float collisionHeight = 2.03128f);
332 void MoveAllCreaturesInMoveList();
333 void MoveAllGameObjectsInMoveList();
334 void MoveAllDynamicObjectsInMoveList();
335 void MoveAllAreaTriggersInMoveList();
336 void RemoveAllObjectsInRemoveList();
337 virtual void RemoveAllPlayers();
340 bool CreatureRespawnRelocation(
Creature* c,
bool diffGridOnly);
341 bool GameObjectRespawnRelocation(
GameObject* go,
bool diffGridOnly);
344 template <
typename T>
345 static bool CheckGridIntegrity(T*
object,
bool moved,
char const* objType);
354 char const* GetMapName()
const;
361 bool Instanceable()
const;
362 bool IsDungeon()
const;
363 bool IsNonRaidDungeon()
const;
366 bool IsNormal()
const;
367 bool IsHeroic()
const;
368 bool IsMythic()
const;
369 bool IsMythicPlus()
const;
370 bool IsHeroicOrHigher()
const;
371 bool Is25ManRaid()
const;
372 bool IsTimewalking()
const;
373 bool IsBattleground()
const;
374 bool IsBattleArena()
const;
375 bool IsBattlegroundOrArena()
const;
376 bool IsScenario()
const;
379 bool IsAlwaysActive()
const;
380 bool GetEntrancePos(
int32& mapid,
float& x,
float& y);
383 void AddObjectToSwitchList(
WorldObject* obj,
bool on);
384 virtual void DelayedUpdate(
uint32 diff);
391 uint32 GetPlayersCountExceptGMs()
const;
392 bool ActiveObjectsNearGrid(
NGridType const& ngrid)
const;
402 template <
typename T>
406 if (
Player* player = ref.GetSource())
411 void ScriptsStart(std::map<
uint32, std::multimap<uint32, ScriptInfo>>
const& scripts,
uint32 id,
Object* source,
Object* target);
420 template<
class T>
void SwitchGridContainers(T* obj,
bool on);
423 void UpdateIteratorBack(
Player* player);
445 return reinterpret_cast<WorldObject*
>(GetCreatureBySpawnId(spawnId));
447 return reinterpret_cast<WorldObject*
>(GetGameObjectBySpawnId(spawnId));
449 return reinterpret_cast<WorldObject*
>(GetAreaTriggerBySpawnId(spawnId));
471 auto itr = _corpsesByCell.find(cellId);
472 if (itr != _corpsesByCell.end())
480 auto itr = _corpsesByPlayer.find(ownerGuid);
481 if (itr != _corpsesByPlayer.end())
500 return _dynamicTree.getHeight(x, y, z, maxSearchDist, phaseShift);
502 bool getObjectHitPos(
PhaseShift const& phaseShift,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float& rx,
float &ry,
float& rz,
float modifyDist);
508 time_t GetLinkedRespawnTime(
ObjectGuid guid)
const;
511 if (
auto map = GetRespawnMapForType(type))
513 auto it = map->find(spawnId);
514 return (it == map->end()) ? 0 : it->second->respawnTime;
521 void UpdatePlayerZoneStats(
uint32 oldZone,
uint32 newZone);
525 void LoadRespawnTimes();
527 void DeleteRespawnTimesInDB();
529 void LoadCorpseData();
530 void DeleteCorpseData();
531 void AddCorpse(
Corpse* corpse);
532 void RemoveCorpse(
Corpse* corpse);
533 Corpse* ConvertCorpseToBones(
ObjectGuid const& ownerGuid,
bool insignia =
false);
534 void RemoveOldCorpses();
536 void SendInitTransports(
Player* player);
537 void SendRemoveTransports(
Player* player);
538 void SendUpdateTransportVisibility(
Player* player);
539 void SendZoneDynamicInfo(
uint32 zoneId,
Player* player)
const;
540 void SendZoneWeather(
uint32 zoneId,
Player* player)
const;
549 void UpdateAreaDependentAuras();
551 template<HighGu
id high>
555 return GetGuidSequenceGenerator(high).Generate();
558 template<HighGu
id high>
562 return GetGuidSequenceGenerator(high).GetNextAfterMaxUsed();
567 _updateObjects.insert(obj);
572 _updateObjects.erase(obj);
577 return m_activeNonPlayers.size();
586 void SendInitSelf(
Player* player);
588 template <
typename T>
589 bool MapObjectCellRelocation(T*
object,
Cell new_cell,
char const* objType);
591 bool CreatureCellRelocation(
Creature* creature,
Cell new_cell);
596 template<
class T>
void InitializeObject(T* obj);
597 void AddCreatureToMoveList(
Creature* c,
float x,
float y,
float z,
float ang);
598 void RemoveCreatureFromMoveList(
Creature* c);
599 void AddGameObjectToMoveList(
GameObject* go,
float x,
float y,
float z,
float ang);
600 void RemoveGameObjectFromMoveList(
GameObject* go);
601 void AddDynamicObjectToMoveList(
DynamicObject* go,
float x,
float y,
float z,
float ang);
603 void AddAreaTriggerToMoveList(
AreaTrigger* at,
float x,
float y,
float z,
float ang);
604 void RemoveAreaTriggerFromMoveList(
AreaTrigger* at);
618 bool IsGridLoaded(
GridCoord const&)
const;
619 void EnsureGridCreated(
GridCoord const&);
620 bool EnsureGridLoaded(
Cell const&);
621 void EnsureGridLoadedForActiveObject(
Cell const&,
WorldObject const*
object);
628 return i_grids[x][y];
635 void ScriptsProcess();
637 void SendObjectUpdates();
640 virtual void LoadGridObjects(
NGridType* grid,
Cell const& cell);
682 std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP>
marked_cells;
686 void ProcessRelocationNotifies(
const uint32 diff);
697 void ProcessRespawns();
707 void UnloadAllRespawnInfos();
714 void GetRespawnInfo(std::vector<RespawnInfo const*>& respawnData,
SpawnObjectTypeMask types)
const;
717 if (
RespawnInfo* info = GetRespawnInfo(type, spawnId))
718 Respawn(info, dbTrans);
722 if (
RespawnInfo* info = GetRespawnInfo(type, spawnId))
723 DeleteRespawnInfo(info, dbTrans);
725 else if (alwaysDeleteFromDB)
726 DeleteRespawnInfoFromDB(type, spawnId, dbTrans);
735 bool IsSpawnGroupActive(
uint32 groupId)
const;
739 bool SpawnGroupSpawn(
uint32 groupId,
bool ignoreRespawn =
false,
bool force =
false, std::vector<WorldObject*>* spawnedObjects =
nullptr);
742 bool SpawnGroupDespawn(
uint32 groupId,
bool deleteRespawnTimes =
false,
size_t* count =
nullptr);
754 void InitSpawnGroupState();
755 void UpdateSpawnGroupConditions();
760 void AddToGrid(T*
object,
Cell const& cell);
763 void DeleteFromWorld(T*);
767 m_activeNonPlayers.insert(obj);
773 if (m_activeNonPlayersIter != m_activeNonPlayers.end())
775 ActiveNonPlayers::iterator itr = m_activeNonPlayers.find(obj);
776 if (itr == m_activeNonPlayers.end())
778 if (itr == m_activeNonPlayersIter)
779 ++m_activeNonPlayersIter;
780 m_activeNonPlayers.erase(itr);
783 m_activeNonPlayers.erase(obj);
796 return &_creatureRespawnTimesBySpawnId;
798 return &_gameObjectRespawnTimesBySpawnId;
810 return &_creatureRespawnTimesBySpawnId;
812 return &_gameObjectRespawnTimesBySpawnId;
818 void SetSpawnGroupActive(
uint32 groupId,
bool state);
848 void UpdatePersonalPhasesForPlayer(
Player const* player);
857 int32 GetWorldStateValue(
int32 worldStateId)
const;
858 void SetWorldStateValue(
int32 worldStateId,
int32 value,
bool hidden);
897 bool AddPlayerToMap(
Player* player,
bool initPlayer =
true)
override;
898 void RemovePlayerFromMap(
Player*,
bool)
override;
900 void CreateInstanceData();
903 std::string
const& GetScriptName()
const;
912 void CreateInstanceLockForPlayer(
Player* player);
915 uint32 GetMaxPlayers()
const;
916 TeamId GetTeamIdInInstance()
const;
920 virtual void InitVisibilityDistance()
override;
923 void TrySetOwningGroup(
Group* group);
942 bool AddPlayerToMap(
Player* player,
bool initPlayer =
true)
override;
943 void RemovePlayerFromMap(
Player*,
bool)
override;
947 void RemoveAllPlayers()
override;
950 virtual void InitVisibilityDistance()
override;
955 std::string
const& GetScriptName()
const;
959 void InitScriptData();
966template<
class T,
class CONTAINER>
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::string GetDebugInfo()
#define DEFAULT_HEIGHT_SEARCH
CoordPair< MAX_NUMBER_OF_GRIDS > GridCoord
#define MAX_NUMBER_OF_GRIDS
std::conditional_t< IntrusiveLink !=nullptr, Trinity::Impl::MPSCQueueIntrusive< T, IntrusiveLink >, Trinity::Impl::MPSCQueueNonIntrusive< T > > MPSCQueue
std::unordered_map< ObjectGuid::LowType, RespawnInfo * > RespawnInfoMap
std::unordered_map< uint32, ZoneDynamicInfo > ZoneDynamicInfoMap
TypeListContainer< MapStoredObjectsUnorderedMap, Creature, GameObject, DynamicObject, Pet, Corpse, AreaTrigger, SceneObject, Conversation > MapStoredObjectTypesContainer
@ TRANSFER_ABORT_TOO_MANY_INSTANCES
@ TRANSFER_ABORT_NOT_CROSS_FACTION_COMPATIBLE
@ TRANSFER_ABORT_XREALM_ZONE_DOWN
@ TRANSFER_ABORT_NOT_FOUND_2
@ TRANSFER_ABORT_DIFFICULTY
@ TRANSFER_ABORT_UNIQUE_MESSAGE
@ TRANSFER_ABORT_MAP_NOT_ALLOWED
@ TRANSFER_ABORT_INSUF_EXPAN_LVL
@ TRANSFER_ABORT_TOO_MANY_REALM_INSTANCES
@ TRANSFER_ABORT_MAX_PLAYERS
@ TRANSFER_ABORT_NOT_FOUND_4
@ TRANSFER_ABORT_ZONE_IN_COMBAT
@ TRANSFER_ABORT_DIFFICULTY_NOT_FOUND
@ TRANSFER_ABORT_ALREADY_COMPLETED_ENCOUNTER
@ TRANSFER_ABORT_SOLO_PLAYER_SWITCH_DIFFICULTY
@ TRANSFER_ABORT_NOT_FOUND
@ TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE
@ TRANSFER_ABORT_NEED_GROUP
@ TRANSFER_ABORT_NOT_FOUND_3
@ TRANSFER_ABORT_REALM_ONLY
static void SummonCreatureGroup(uint32 summonerId, SummonerType summonerType, uint8 group, std::list< TempSummon * > *summoned, SummonCreature summonCreature)
std::optional< T > Optional
Optional helper class to wrap optional values within.
std::unordered_map< int32, int32 > WorldStateValueContainer
BattlegroundScript const * GetBattlegroundScript() const
std::unique_ptr< BattlegroundScript > _battlegroundScript
Battleground * GetBG() const
uint32 GetScriptId() const
void SetBG(Battleground *bg)
BattlegroundScript * GetBattlegroundScript()
Optional< SystemTimePoint > i_instanceExpireEvent
InstanceLock * i_instanceLock
InstanceScript const * GetInstanceScript() const
InstanceScenario * GetInstanceScenario()
InstanceScenario * i_scenario
Optional< uint32 > i_lfgDungeonsId
uint32 GetScriptId() const
Team GetTeamInInstance() const
InstanceLock const * GetInstanceLock() const
GroupInstanceReference i_owningGroupRef
Optional< uint32 > GetLfgDungeonsId() const
void SetInstanceScenario(InstanceScenario *scenario)
InstanceScenario const * GetInstanceScenario() const
Group * GetOwningGroup() const
InstanceScript * GetInstanceScript()
MapEntry const * i_mapEntry
std::map< WorldObject *, bool > i_objectsToSwitch
WorldObject * GetWorldObjectBySpawnId(SpawnObjectType type, ObjectGuid::LowType spawnId) const
std::unordered_map< uint32, uint32 > _zonePlayerCountMap
std::vector< Creature * > _creaturesToMove
uint16 m_forceDisabledNavMeshFilterFlags
CreatureBySpawnIdContainer const & GetCreatureBySpawnIdStore() const
bool IsRemovalGrid(Position const &pos) const
RespawnInfoMap const * GetRespawnMapForType(SpawnObjectType type) const
float GetStaticHeight(PhaseShift const &phaseShift, Position const &pos, bool checkVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
void SetSpawnGroupInactive(uint32 groupId)
std::unordered_set< Corpse * > const * GetCorpsesInCell(uint32 cellId) const
std::unordered_multimap< ObjectGuid::LowType, Creature * > CreatureBySpawnIdContainer
std::unordered_map< ObjectGuid, Corpse * > _corpsesByPlayer
void SetWeakPtr(Trinity::unique_weak_ptr< Map > weakRef)
bool ShouldBeSpawnedOnGridLoad(ObjectGuid::LowType spawnId) const
MapStoredObjectTypesContainer & GetObjectsStore()
TransportsContainer::iterator _transportsUpdateIter
void RemoveForceEnabledNavMeshFilterFlag(uint16 flag)
InstanceMap const * ToInstanceMap() const
uint32 GetAreaId(PhaseShift const &phaseShift, Position const &pos)
void RemoveFromActiveHelper(WorldObject *obj)
void GetZoneAndAreaId(PhaseShift const &phaseShift, uint32 &zoneid, uint32 &areaid, Position const &pos)
std::function< void(Map *)> FarSpellCallback
PeriodicTimer _vignetteUpdateTimer
bool GetUnloadLock(GridCoord const &p) const
void RemoveGameObjectModel(GameObjectModel const &model)
RespawnInfoMap * GetRespawnMapForType(SpawnObjectType type)
virtual TransferAbortParams CannotEnter(Player *)
void DeleteRespawnTimes()
void RemoveUpdateObject(Object *obj)
RespawnInfoMap _gameObjectRespawnTimesBySpawnId
uint16 GetForceDisabledNavMeshFilterFlags() const
bool IsGridLoaded(Position const &pos) const
AreaTriggerBySpawnIdContainer & GetAreaTriggerBySpawnIdStore()
std::bitset< TOTAL_NUMBER_OF_CELLS_PER_MAP *TOTAL_NUMBER_OF_CELLS_PER_MAP > marked_cells
uint32 GetZoneId(PhaseShift const &phaseShift, Position const &pos)
SpawnedPoolData const & GetPoolData() const
virtual ObjectGuid::LowType GetOwnerGuildId(uint32=TEAM_OTHER) const
BattlegroundMap const * ToBattlegroundMap() const
bool CanUnload(uint32 diff)
WorldStateValueContainer _worldStateValues
IntervalTimer _weatherUpdateTimer
void RemoveForceDisabledNavMeshFilterFlag(uint16 flag)
void RemoveRespawnTime(SpawnObjectType type, ObjectGuid::LowType spawnId, CharacterDatabaseTransaction dbTrans=nullptr, bool alwaysDeleteFromDB=false)
bool _dynamicObjectsToMoveLock
NGridType * getNGrid(uint32 x, uint32 y) const
std::shared_ptr< TerrainInfo > m_terrain
void AddToActiveHelper(WorldObject *obj)
bool _gameObjectsToMoveLock
bool ContainsGameObjectModel(GameObjectModel const &model) const
void SetForceEnabledNavMeshFilterFlag(uint16 flag)
uint32 _respawnCheckTimer
WorldStateValueContainer const & GetWorldStateValues() const
bool IsRemovalGrid(float x, float y) const
std::unordered_map< uint32, std::unordered_set< Corpse * > > _corpsesByCell
MapRefManager m_mapRefManager
void Visit(Cell const &cell, TypeContainerVisitor< T, CONTAINER > &visitor)
ScriptScheduleMap m_scriptSchedule
ObjectGuid::LowType GetMaxLowGuid()
void AddWorldObject(WorldObject *obj)
void ResetGridExpiry(NGridType &grid, float factor=1) const
DynamicMapTree _dynamicTree
void Respawn(SpawnObjectType type, ObjectGuid::LowType spawnId, CharacterDatabaseTransaction dbTrans=nullptr)
std::vector< GameObject * > _gameObjectsToMove
ObjectGuid::LowType GenerateLowGuid()
std::unordered_map< ObjectGuid::LowType, CreatureGroup * > CreatureGroupHolder
AreaTriggerBySpawnIdContainer _areaTriggerBySpawnIdStore
int32 m_VisibilityNotifyPeriod
std::unordered_set< Corpse * > _corpseBones
MPSCQueue< FarSpellCallback > _farSpellCallbacks
time_t GetGORespawnTime(ObjectGuid::LowType spawnId) const
uint16 GetForceEnabledNavMeshFilterFlags() const
std::unordered_set< uint32 > _toggledSpawnGroupIds
bool isCellMarked(uint32 pCellId)
uint16 m_forceEnabledNavMeshFilterFlags
time_t GetCreatureRespawnTime(ObjectGuid::LowType spawnId) const
MultiPersonalPhaseTracker & GetMultiPersonalPhaseTracker()
BattlegroundMap * ToBattlegroundMap()
Trinity::unique_weak_ptr< Map > m_weakRef
MultiPersonalPhaseTracker _multiPersonalPhaseTracker
MapRefManager::iterator m_mapRefIter
std::multimap< time_t, ScriptAction > ScriptScheduleMap
std::unique_ptr< RespawnListContainer > _respawnTimes
time_t GetRespawnTime(SpawnObjectType type, ObjectGuid::LowType spawnId) const
ZoneDynamicInfoMap _zoneDynamicInfo
bool _areaTriggersToMoveLock
std::vector< Vignettes::VignetteData * > _infiniteAOIVignettes
std::vector< AreaTrigger * > _areaTriggersToMove
void RemoveWorldObject(WorldObject *obj)
std::set< WorldObject * > i_worldObjects
Difficulty GetDifficultyID() const
ActiveNonPlayers m_activeNonPlayers
GameObjectBySpawnIdContainer & GetGameObjectBySpawnIdStore()
void InsertGameObjectModel(GameObjectModel const &model)
void SetUnloadLock(GridCoord const &p, bool on)
std::set< Transport * > TransportsContainer
std::unordered_set< Object * > _updateObjects
void buildNGridLinkage(NGridType *pNGridType)
MapEntry const * GetEntry() const
Trinity::unique_weak_ptr< Map > GetWeakPtr() const
std::set< WorldObject * > i_objectsToRemove
MapStoredObjectTypesContainer _objectsStore
bool IsGridLoaded(float x, float y) const
std::unordered_multimap< ObjectGuid::LowType, AreaTrigger * > AreaTriggerBySpawnIdContainer
friend class MapReference
float GetVisibilityRange() const
float GetHeight(PhaseShift const &phaseShift, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
InstanceMap * ToInstanceMap()
Corpse * GetCorpseByPlayer(ObjectGuid const &ownerGuid) const
bool IsGridLoaded(uint32 gridId) const
std::set< WorldObject * > ActiveNonPlayers
void markCell(uint32 pCellId)
float GetHeight(PhaseShift const &phaseShift, Position const &pos, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
void SetForceDisabledNavMeshFilterFlag(uint16 flag)
AreaTriggerBySpawnIdContainer const & GetAreaTriggerBySpawnIdStore() const
CreatureBySpawnIdContainer & GetCreatureBySpawnIdStore()
void setGridObjectDataLoaded(bool pLoaded, uint32 x, uint32 y)
bool EnsureGridLoaded(Cell const &)
std::vector< DynamicObject * > _dynamicObjectsToMove
uint32 GetInstanceId() const
TransportsContainer _transports
PlayerList const & GetPlayers() const
GameObjectBySpawnIdContainer const & GetGameObjectBySpawnIdStore() const
SpawnedPoolData & GetPoolData()
void AddUpdateObject(Object *obj)
RespawnInfoMap _creatureRespawnTimesBySpawnId
CreatureBySpawnIdContainer _creatureBySpawnIdStore
std::vector< Vignettes::VignetteData * > const & GetInfiniteAOIVignettes() const
ActiveNonPlayers::iterator m_activeNonPlayersIter
time_t GetGridExpiry() const
std::unordered_multimap< ObjectGuid::LowType, GameObject * > GameObjectBySpawnIdContainer
std::map< HighGuid, std::unique_ptr< ObjectGuidGenerator > > _guidGenerators
bool isGridObjectDataLoaded(uint32 x, uint32 y) const
TerrainInfo * GetTerrain() const
float GetGameObjectFloor(PhaseShift const &phaseShift, float x, float y, float z, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
GameObjectBySpawnIdContainer _gameobjectBySpawnIdStore
std::unique_ptr< SpawnedPoolData > _poolData
size_t GetActiveNonPlayersCount() const
void VisitGrid(uint32 x, uint32 y, TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &visitor)
void ResetTimeTracker(time_t interval)
void link(GridRefManager< NGrid > *pTo)
static ObjectGuid const Empty
TC_GAME_API uint32 GetId(std::string_view username)
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Transport * GetTransport(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API AreaTrigger * GetAreaTrigger(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API DynamicObject * GetDynamicObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Pet * GetPet(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Corpse * GetCorpse(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Conversation * GetConversation(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API SceneObject * GetSceneObject(WorldObject const &u, ObjectGuid const &guid)
static constexpr uint32 BattlegroundMap
GridCoord ComputeGridCoord(float x, float y)
void Update(VignetteData &vignette, WorldObject const *owner)
bool operator()(RespawnInfo const *a, RespawnInfo const *b) const
static std::size_t Size(Container const &container)
std::unordered_map< ObjectGuid, ObjectType * > Container
static bool Insert(Container &container, ValueType object)
static bool Remove(Container &container, ValueType object)
static ValueType Find(Container const &container, KeyType const &key)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr float GetPositionZ() const
ObjectGuid::LowType spawnId
ScriptInfo const * script
owner of source if source is item
int32 MapDifficultyXConditionId
TransferAbortReason Reason
TransferAbortParams(TransferAbortReason reason, uint8 arg=0, int32 mapDifficultyXConditionId=0)
uint32 TransitionMilliseconds
std::vector< LightOverride > LightOverrides
std::unique_ptr< Weather > DefaultWeather