GetTable() public method

public GetTable ( string tablename ) : Hashtable
tablename string
return System.Collections.Hashtable
コード例 #1
0
        public void LoadZones()
        {
            try {
                Logger.LogWarning("Loading zones.");
                zones = new Dictionary <string, Zone2D>();
                Hashtable zht = ZoneStore.GetTable("Zones");
                if (zht == null)
                {
                    return;
                }

                foreach (object zone in zht.Values)
                {
                    var z = zone as SerializedZone2D;
                    if (z == null)
                    {
                        continue;
                    }
                    Logger.LogWarning("Zone found with name: " + z.Name);
                    z.ToZone2D();
                }
            } catch (Exception ex) {
                Debug.LogException(ex);
            }
        }
コード例 #2
0
ファイル: Server.cs プロジェクト: mcjefix/Pluton
        public void LoadOfflinePlayers()
        {
            Hashtable ht = serverData.GetTable("OfflinePlayers");

            if (ht != null)
            {
                foreach (DictionaryEntry entry in ht)
                {
                    server.OfflinePlayers.Add(UInt64.Parse(entry.Key as string), entry.Value as OfflinePlayer);
                }
            }
            else
            {
                Logger.LogWarning("[Server] (GetTable(\"OfflinePalyers\") == null) ... wut?");
            }
            Logger.Log("[Server] " + OfflinePlayers.Count.ToString() + " offlineplayer loaded!");
        }