public static bool RegionContains(Region region, Mobile m) { #if(RunUO_1_Final) return region.Mobiles.Contains(m); #elif(RunUO_2_RC1) return region.GetMobiles().Contains(m); #endif }
public static bool RegionContains(Server.Region region, Mobile m) { #if (RunUO_1_Final) return(region.Mobiles.Contains(m)); #elif (RunUO_2_RC1) return(region.GetMobiles().Contains(m)); #endif }
public static IEnumerable <Mobile> GetEnumeratedMobiles(this Region region) { List <Mobile> list = region.GetMobiles(); IEnumerable <Mobile> e; lock (_MobileLock) { e = list.AsParallel().Where(m => m != null && m.Region.IsPartOf(region)); } foreach (Mobile m in e) { yield return(m); } ColUtility.Free(list); }
public static bool RegionContains(Region region, Mobile m) { return region.GetMobiles().Contains(m); }