Ejemplo n.º 1
0
		/// <summary>
		/// Gets an instance
		/// </summary>
		/// <returns>the <see cref="Region" /> object; null if the ID is not valid</returns>s
		public static InstancedRegion GetInstance(IRegionId mapId)
		{
			var instances = GetInstances(mapId.RegionId);
			if (instances != null)
			{
				return instances.Get(mapId.InstanceId);
			}
			return null;
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Gets a normal Region by its Id
		/// </summary>
		/// <returns>the <see cref="Region" /> object; null if the ID is not valid</returns>
		public static Region GetRegion(IRegionId mapId)
		{
			if (mapId.InstanceId > 0)
			{
				return GetInstance(mapId);
			}
			return s_Regions.Get((uint)mapId.RegionId);
		}