AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ObjectGridUnloader Class Reference

#include "ObjectGridLoader.h"

Public Member Functions

void Visit (CorpseMapType &)
 
template<class T >
void Visit (GridRefMgr< T > &m)
 

Detailed Description

Member Function Documentation

◆ Visit() [1/2]

void ObjectGridUnloader::Visit ( CorpseMapType )
inline
67{ } // corpses are deleted with Map

◆ Visit() [2/2]

template<class T >
void ObjectGridUnloader::Visit ( GridRefMgr< T > &  m)
  • object will get delinked from the manager when deleted
201{
202 while (!m.IsEmpty())
203 {
204 T* obj = m.getFirst()->GetSource();
205 // if option set then object already saved at this moment
206 //if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
207 // obj->SaveRespawnTime();
208 //Some creatures may summon other temp summons in CleanupsBeforeDelete()
209 //So we need this even after cleaner (maybe we can remove cleaner)
210 //Example: Flame Leviathan Turret 33139 is summoned when a creature is deleted
211 //TODO: Check if that script has the correct logic. Do we really need to summons something before deleting?
212 obj->CleanupsBeforeDelete();
214 delete obj;
215 }
216}
bool IsEmpty() const
Definition: LinkedList.h:97
FROM * GetSource() const
Definition: Reference.h:97
GridReference< OBJECT > * getFirst()
Definition: GridRefMgr.h:32

References GridRefMgr< OBJECT >::getFirst(), and LinkedListHead::IsEmpty().