/// <summary> /// /// </summary> /// <param name="region"></param> /// <returns></returns> /// <remarks>Never returns null</remarks> public static InstancedRegion[] GetInstances(MapId region) { var instances = s_instances.Get((uint)region); if (instances == null) { s_instances[(uint)region] = instances = new InstancedRegion[10]; } return instances; }
internal static void RemoveInstance(InstancedRegion region) { var instances = GetInstances(region.Id); RegionCount--; ArrayUtil.Set(ref instances, region.InstanceId, null); }