/// <summary> /// 财富排行榜 /// </summary> public static void RankCoin() { string noticeContent = string.Empty; CacheRank cacheRank = new CacheRank(); var ranksArray = cacheRank.GetUserRankList(); ranksArray.QuickSort((x, y) => { if (x == null && y == null) return 0; if (x != null && y == null) return 1; if (x == null) return -1; return y.GameCoin.CompareTo(x.GameCoin); }); }
/// <summary> /// 战力排行榜 /// </summary> public static void RankCombatNum() { CacheRank cacheRank = new CacheRank(); var ranksArray = cacheRank.GetUserRankList(); ranksArray.QuickSort((x, y) => { if (x == null && y == null) { return(0); } if (x != null && y == null) { return(1); } if (x == null) { return(-1); } return(y.TotalCombatNum.CompareTo(x.TotalCombatNum)); }); }
/// <summary> /// 声望排行榜 /// </summary> public static void RankObtion() { string noticeContent = string.Empty; CacheRank cacheRank = new CacheRank(); var ranksArray = cacheRank.GetUserRankList(); ranksArray.QuickSort((x, y) => { if (x == null && y == null) { return(0); } if (x != null && y == null) { return(1); } if (x == null) { return(-1); } return(y.ObtainNum.CompareTo(x.ObtainNum)); }); }
/// <summary> /// 等级排行榜 /// </summary> public static void RankLv() { CacheRank cacheRank = new CacheRank(); cacheRank.Load(int.MaxValue); List <UserRank> ranksArray = cacheRank.GetUserRankList(); ranksArray.QuickSort((x, y) => { int result; if (x == null && y == null) { return(0); } if (x != null && y == null) { return(1); } if (x == null) { return(-1); } result = (int)y.UserLv.CompareTo(x.UserLv); if (result == 0) { UserGeneral generalx = UserGeneral.GetMainGeneral(x.UserID); UserGeneral generaly = UserGeneral.GetMainGeneral(y.UserID); if (generalx != null && generaly != null) { result = generaly.CurrExperience.CompareTo( generalx.CurrExperience); } } return(result); }); }
/// <summary> /// 等级排行榜 /// </summary> public static void RankLv() { CacheRank cacheRank = new CacheRank(); cacheRank.Load(int.MaxValue); List<UserRank> ranksArray = cacheRank.GetUserRankList(); ranksArray.QuickSort((x, y) => { int result; if (x == null && y == null) return 0; if (x != null && y == null) return 1; if (x == null) return -1; result = (int)y.UserLv.CompareTo(x.UserLv); if (result == 0) { UserGeneral generalx = UserGeneral.GetMainGeneral(x.UserID); UserGeneral generaly = UserGeneral.GetMainGeneral(y.UserID); if (generalx != null && generaly != null) { result = generaly.CurrExperience.CompareTo( generalx.CurrExperience); } } return result; }); }
/// <summary> /// 战力排行榜 /// </summary> public static void RankCombatNum() { CacheRank cacheRank = new CacheRank(); var ranksArray = cacheRank.GetUserRankList(); ranksArray.QuickSort((x, y) => { if (x == null && y == null) return 0; if (x != null && y == null) return 1; if (x == null) return -1; return y.TotalCombatNum.CompareTo(x.TotalCombatNum); }); }