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

Port From (https://github.com/TrinityCore/TrinityCore/commit/5a82a0381d704e4b4b9976daf04d541d1130e541)
This commit is contained in:
hondacrx
2022-03-09 12:33:25 -05:00
parent 510a1a0208
commit e65a1e95cf
6 changed files with 31 additions and 10 deletions
+1
View File
@@ -2916,6 +2916,7 @@ namespace Game.Maps
{
Cypher.Assert(obj.GetMapId() == GetId() && obj.GetInstanceId() == GetInstanceId());
obj.SetDestroyedObject(true);
obj.CleanupsBeforeDelete(false); // remove or simplify at least cross referenced links
i_objectsToRemove.Add(obj);