Core/Objects: Properly choose between "Destroyed" or "OutOfRange" during visibility update

This commit is contained in:
Shauren
2022-01-29 16:01:57 +01:00
parent 472384e757
commit 5a82a0381d
7 changed files with 34 additions and 5 deletions

View File

@@ -282,7 +282,10 @@ template<class T>
void ObjectGridCleaner::Visit(GridRefManager<T> &m)
{
for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
iter->GetSource()->SetDestroyedObject(true);
iter->GetSource()->CleanupsBeforeDelete();
}
}
template void ObjectGridUnloader::Visit(CreatureMapType &);