TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ObjectGridUnloader Class Reference

#include <ObjectGridLoader.h>

Public Member Functions

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

Member Function Documentation

void ObjectGridUnloader::Visit ( CorpseMapType )
inline
86 { } // corpses are deleted with Map
template<class T >
void ObjectGridUnloader::Visit ( GridRefManager< T > &  m)
Todo:
Check if that script has the correct logic. Do we really need to summons something before deleting?
  • object will get delinked from the manager when deleted
197 {
198  while (!m.isEmpty())
199  {
200  T *obj = m.getFirst()->GetSource();
201  // if option set then object already saved at this moment
202  if (!sWorld->getBoolConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY))
203  obj->SaveRespawnTime();
204  //Some creatures may summon other temp summons in CleanupsBeforeDelete()
205  //So we need this even after cleaner (maybe we can remove cleaner)
206  //Example: Flame Leviathan Turret 33139 is summoned when a creature is deleted
208  obj->CleanupsBeforeDelete();
210  delete obj;
211  }
212 }
GridReference< OBJECT > * getFirst()
Definition: GridRefManager.h:33
#define sWorld
Definition: World.h:887
bool isEmpty() const
Definition: LinkedList.h:102
FROM * GetSource() const
Definition: Reference.h:96

+ Here is the call graph for this function:


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