using System; using System.Collections.Generic; namespace Realmlist { public class GameGateInfo { public int index; public string url; //连接地址 public uint gatesvrId; //连接地址 public int online;//在线,就是网络连接 } public class RealmInfo { public int realmId; public int worldId; public int logicWorldId; public string ip; public RealmConfigOne config; // 运行时的状态 public uint runtimeState; // 开服时间的unix time, 程序自动换算, 已包含timezone public long openTimeSec; public long visibleTimeSec; //public int online; } // 根据对外可见时间分组 public class RealmGroup { public long visibleTime; public List realmList = new List(); //public int minOnline; //public int minRealmId; public RealmInfo minOnline; public RealmInfo maxOnline; //public int maxOnline; //public int maxRealmId; public int avgOnline; public int groupOnline; // 最少在线人数跟平均在线人数的差值 public int avgOnlineDiff; // 顺序推荐的idx public int orderIdxForNewUser; public int orderIdxForOldUser; } // 客户端用来分页显示 public class RealmPage { public int page; public List realms; } public class WorldInfo { public string areaName; public int worldId; public List gameGates = new List(); public List chatGates = new List(); public SortedList worldRealms = new SortedList(); } class RealmGroupComparer : IComparer { public int Compare(long x, long y) { return y.CompareTo(x); } } public class AreaRealm { public string areaName; public int timezone; public string visibleOnlyCliVersion; public int visibleOnlyWhiteList; public bool maintenanceMode; //共享显示的Area public string shareShowAreaRealmList; public AreaRealm shareShowAreaRealm; public string invisibleAreaForNewUser; public List invisibleAreaForNewUserList = new List(); // worldId -> gate list public Dictionary areaWorldDict = new Dictionary(); // 开服时间 -> realmGroup, 根据当前时间查询对应的服务器信息 public SortedList visibleRealmGroup = new SortedList(new RealmGroupComparer()); // realmId -> realmInfo, 根据realmId查询realmInfo public Dictionary realmIndex = new Dictionary(); public List sortedRealms = new List(); } }