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

#include "GridObjectLoader.h"

Public Member Functions

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

Detailed Description

Member Function Documentation

◆ Visit() [1/2]

void GridObjectUnloader::Visit ( CorpseMapType )
inline
56{ } // corpses are deleted with Map

◆ Visit() [2/2]

template<class T >
void GridObjectUnloader::Visit ( GridRefMgr< T > &  m)
  • object will get delinked from the manager when deleted
107{
108 while (!m.IsEmpty())
109 {
110 T* obj = m.getFirst()->GetSource();
111 // if option set then object already saved at this moment
112 //if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
113 // obj->SaveRespawnTime();
114 //Some creatures may summon other temp summons in CleanupsBeforeDelete()
115 //So we need this even after cleaner (maybe we can remove cleaner)
116 //Example: Flame Leviathan Turret 33139 is summoned when a creature is deleted
117 //TODO: Check if that script has the correct logic. Do we really need to summons something before deleting?
118 obj->CleanupsBeforeDelete();
120 delete obj;
121 }
122}
GridReference< OBJECT > * getFirst()
Definition GridRefMgr.h:32
bool IsEmpty() const
Definition LinkedList.h:97
FROM * GetSource() const
Definition Reference.h:97

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


The documentation for this class was generated from the following files: