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); } }
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!"); }