Core/Maps: Remove unused code

Port From (https://github.com/TrinityCore/TrinityCore/commit/af1b3301c94c9d7842daaac8c2c15bb29faf95ba)
This commit is contained in:
hondacrx
2021-03-08 14:20:57 -05:00
parent 8ada9c99e7
commit 9beef00c3a
+2 -7
View File
@@ -402,9 +402,7 @@ namespace Game.Maps
}
obj.SetCurrentCell(cell);
if (obj.IsTypeId(TypeId.Unit))
obj.ToCreature().m_isTempWorldObject = on;
obj.ToCreature().m_isTempWorldObject = on;
}
void DeleteFromWorld(Player player)
@@ -3015,7 +3013,7 @@ namespace Game.Maps
Cypher.Assert(obj.GetMapId() == GetId() && obj.GetInstanceId() == GetInstanceId());
// i_objectsToSwitch is iterated only in Map::RemoveAllObjectsInRemoveList() and it uses
// the contained objects only if GetTypeId() == TYPEID_UNIT , so we can return in all other cases
if (!obj.IsTypeId(TypeId.Unit) && !obj.IsTypeId(TypeId.GameObject))
if (!obj.IsTypeId(TypeId.Unit))
return;
if (!i_objectsToSwitch.ContainsKey(obj))
@@ -3042,9 +3040,6 @@ namespace Game.Maps
case TypeId.Unit:
SwitchGridContainers(obj.ToCreature(), on);
break;
case TypeId.GameObject:
SwitchGridContainers(obj.ToGameObject(), on);
break;
default:
break;
}