/// <summary> /// Recycles an entity ID of the given type. /// </summary> /// <param name="lowerEntityId">the lower entity id</param> /// <param name="entityIdType">the type of the entity id</param> public static bool RecycleLowerEntityId(uint lowerEntityId, EntityIdType idType) { if (DoesIdExist(lowerEntityId, idType)) { // TODO: What should we do if it already exists? This is are a serious bug. s_log.Debug(Resources.AlreadyRecycledEntityId, lowerEntityId, idType.ToString()); return(false); } RecycledEntityId eid = new RecycledEntityId(); eid.RecycledEntityIdGuid = Guid.NewGuid(); eid.EntityId = (long)lowerEntityId; eid.EntityType = (int)idType; AddRecycledId(eid); return(true); }
/// <summary> /// Recycles an entity ID of the given type. /// </summary> /// <param name="lowerEntityId">the lower entity id</param> /// <param name="entityIdType">the type of the entity id</param> public static bool RecycleLowerEntityId(uint lowerEntityId, EntityIdType idType) { if (DoesIdExist(lowerEntityId, idType)) { // TODO: What should we do if it already exists? This is are a serious bug. s_log.Debug(Resources.AlreadyRecycledEntityId, lowerEntityId, idType.ToString()); return false; } RecycledEntityId eid = new RecycledEntityId(); eid.RecycledEntityIdGuid = Guid.NewGuid(); eid.EntityId = (long)lowerEntityId; eid.EntityType = (int)idType; AddRecycledId(eid); return true; }