45 ASSERT(!c->
IsPet() &&
"ObjectGridRespawnMover must not be called for pets");
97 if (obj->isActiveObject())
106 for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
115 if (!obj->LoadFromDB(guid, map,
false, phaseOwner.has_value() ))
157 for (
Corpse* corpse : *corpses)
159 corpse->AddToWorld();
161 if (corpse->IsStoredInWorldObjectGridContainer())
196 TC_LOG_DEBUG(
"maps",
"{} GameObjects, {} Creatures, {} AreaTrriggers, and {} Corpses/Bones loaded for grid {} on map {}",
242 obj->CleanupsBeforeDelete();
253 iter->GetSource()->RemoveAllDynObjects();
254 iter->GetSource()->RemoveAllAreaTriggers();
255 if (iter->GetSource()->IsInCombat())
256 iter->GetSource()->CombatStop();
265 iter->GetSource()->SetDestroyedObject(
true);
266 iter->GetSource()->CleanupsBeforeDelete();
280template void ObjectGridCleaner::Visit<Corpse>(
CorpseMapType &);
#define sAreaTriggerDataStore
#define MAX_NUMBER_OF_CELLS
#define TC_LOG_DEBUG(filterType__,...)
void AddObjectHelper(CellCoord &cell, GridRefManager< T > &m, uint32 &count, Map *map, T *obj)
void LoadHelper(CellGuidSet const &guid_set, CellCoord &cell, GridRefManager< T > &m, uint32 &count, Map *map, uint32 phaseId=0, Optional< ObjectGuid > phaseOwner={})
std::set< ObjectGuid::LowType > CellGuidSet
std::optional< T > Optional
Optional helper class to wrap optional values within.
GridReference< OBJECT > * getFirst()
void AddWorldObject(SPECIFIC_OBJECT *obj)
void AddGridObject(SPECIFIC_OBJECT *obj)
void SetCurrentCell(Cell const &cell)
std::unordered_set< Corpse * > const * GetCorpsesInCell(uint32 cellId) const
bool GameObjectRespawnRelocation(GameObject *go, bool diffGridOnly)
MultiPersonalPhaseTracker & GetMultiPersonalPhaseTracker()
Difficulty GetDifficultyID() const
void AddToActive(WorldObject *obj)
bool CreatureRespawnRelocation(Creature *c, bool diffGridOnly)
bool ShouldBeSpawnedOnGridLoad(SpawnObjectType type, ObjectGuid::LowType spawnId) const
uint32 GetGridId(void) const
GridType & GetGridType(const uint32 x, const uint32 y)
void VisitGrid(const uint32 x, const uint32 y, TypeContainerVisitor< T, TypeMapContainer< TT > > &visitor)
void Visit(GridRefManager< T > &)
void Visit(CreatureMapType &m)
static void SetObjectCell(MapObject *obj, CellCoord const &cellCoord)
void Visit(GameObjectMapType &m)
void Visit(CreatureMapType &m)
void Visit(CorpseMapType &)
ObjectWorldLoader(ObjectGridLoader &gloader)
void Visit(CorpseMapType &m)
void Visit(GridRefManager< T > &)
ObjectGuid const & _phaseOwner
void Load(uint32 phaseId)
void Visit(GameObjectMapType &m)
static void InitDbPersonalOwnership(PhaseShift &phaseShift, ObjectGuid const &personalGuid)
CellCoord GetCellCoord() const
struct Cell::@313::@314 Part
void RegisterTrackedObject(uint32 phaseId, ObjectGuid const &phaseOwner, WorldObject *object)