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
65{ } // 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
214{
215 while (!m.IsEmpty())
216 {
217 T* obj = m.getFirst()->GetSource();
218 // if option set then object already saved at this moment
219 //if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
220 // obj->SaveRespawnTime();
221 //Some creatures may summon other temp summons in CleanupsBeforeDelete()
222 //So we need this even after cleaner (maybe we can remove cleaner)
223 //Example: Flame Leviathan Turret 33139 is summoned when a creature is deleted
224 //TODO: Check if that script has the correct logic. Do we really need to summons something before deleting?
225 obj->CleanupsBeforeDelete();
227 delete obj;
228 }
229}
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().