43 ASSERT(!c->
IsPet() &&
"ObjectGridRespawnMover must not be called for pets");
70 if (obj->isActiveObject())
88 if (!obj->LoadFromDB(guid, map,
false, phaseOwner.has_value() ))
121 for (
Corpse* corpse : *corpses)
124 TC_LOG_DEBUG(
"maps",
"{} GameObjects, {} Creatures, {} AreaTrriggers, and {} Corpses/Bones loaded for grid {} on map {}",
142 T* obj = m.
front()->GetSource();
147 obj->CleanupsBeforeDelete();
158 iter->GetSource()->RemoveAllDynObjects();
159 iter->GetSource()->RemoveAllAreaTriggers();
160 if (iter->GetSource()->IsInCombat())
161 iter->GetSource()->CombatStop();
170 iter->GetSource()->SetDestroyedObject(
true);
171 iter->GetSource()->CleanupsBeforeDelete();
190template void ObjectGridCleaner::Visit<Corpse>(
CorpseMapType &);
#define sAreaTriggerDataStore
#define TC_LOG_DEBUG(filterType__, message__,...)
void LoadHelper(GridGuidSet const &guid_set, uint32 &count, Map *map, uint32 phaseId=0, Optional< ObjectGuid > phaseOwner={})
std::optional< T > Optional
Optional helper class to wrap optional values within.
bool GameObjectRespawnRelocation(GameObject *go, bool diffGridOnly)
MultiPersonalPhaseTracker & GetMultiPersonalPhaseTracker()
Difficulty GetDifficultyID() const
void AddToGrid(T *object, Cell const &cell)
void AddToActive(WorldObject *obj)
std::unordered_set< Corpse * > const * GetCorpsesInGrid(uint32 cellId) const
bool CreatureRespawnRelocation(Creature *c, bool diffGridOnly)
bool ShouldBeSpawnedOnGridLoad(SpawnObjectType type, ObjectGuid::LowType spawnId) const
uint32 GetGridId(void) const
void Visit(GridRefManager< T > &)
void Visit(CreatureMapType &m)
static void AddToMap(T *obj, Map *map, uint32 &objectCount)
void Visit(CreatureMapType &m)
void Visit(CorpseMapType &)
void Load(uint32 phaseId)
static void InitDbPersonalOwnership(PhaseShift &phaseShift, ObjectGuid const &personalGuid)
typename KeyContainer::const_iterator const_iterator
constexpr CellCoord ComputeCellCoord(float x, float y)
void RegisterTrackedObject(uint32 phaseId, ObjectGuid const &phaseOwner, WorldObject *object)