예제 #1
0
        public static Zone3D GlobalContains(Player p)
        {
            Hashtable table = DataStore.GetInstance().GetTable("3DZonesList");

            if (table != null)
            {
                IEnumerator enumerator = table.Values.GetEnumerator();
                Zone3D      result;
                try
                {
                    while (enumerator.MoveNext())
                    {
                        object current = enumerator.Current;
                        Zone3D zone3D  = current as Zone3D;
                        if (zone3D.Contains(p))
                        {
                            result = zone3D;
                            return(result);
                        }
                    }
                    goto IL_61;
                }
                finally
                {
                    IDisposable disposable = enumerator as IDisposable;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }
                return(result);
            }
IL_61:
            return(null);
        }
예제 #2
0
        public static Zone3D GlobalContains(Player p)
        {
            Hashtable table = DataStore.GetInstance().GetTable("3DZonesList");
            Zone3D    result;

            if (table != null)
            {
                foreach (object current in table.Values)
                {
                    Zone3D zone3D = current as Zone3D;
                    if (zone3D.Contains(p))
                    {
                        Zone3D zone3D2 = zone3D;
                        result = zone3D2;
                        return(result);
                    }
                }
            }
            result = null;
            return(result);
        }