// Token: 0x060050F7 RID: 20727 RVA: 0x00182130 File Offset: 0x00180330
        public static RankingListInfo PBRankingListToRankingList(ProRankingListInfo proRankingList)
        {
            if (proRankingList == null)
            {
                return(null);
            }
            RankingListInfo rankingListInfo = new RankingListInfo
            {
                Type           = (RankingListType)proRankingList.Type,
                Score          = proRankingList.Score,
                CurrRank       = proRankingList.CurrRank,
                LastRank       = proRankingList.LastRank,
                ChampionHeroId = proRankingList.ChampionHeroId,
                PlayerList     = new List <RankingTargetPlayerInfo>()
            };

            foreach (ProRankingPlayerInfo proRankingPlayerInfo in proRankingList.PlayerList)
            {
                RankingTargetPlayerInfo item = new RankingTargetPlayerInfo
                {
                    Score      = proRankingPlayerInfo.Score,
                    PlayerInfo = RankingPlayerInfo.PBRankingPlayerToRankingPlayer(proRankingPlayerInfo)
                };
                rankingListInfo.PlayerList.Add(item);
            }
            return(rankingListInfo);
        }
Beispiel #2
0
 // Token: 0x060050E0 RID: 20704 RVA: 0x00181F10 File Offset: 0x00180110
 public static ProRankingPlayerInfo RankingPlayerToPBRankingPlayer(RankingPlayerInfo playerInfo, int score)
 {
     return(new ProRankingPlayerInfo
     {
         HeadIcon = playerInfo.HeadIcon,
         Level = playerInfo.Level,
         Name = playerInfo.Name,
         ChampionHeroId = playerInfo.ChampionHeroId,
         Score = score
     });
 }
        // Token: 0x060050F6 RID: 20726 RVA: 0x00182064 File Offset: 0x00180264
        public static ProRankingListInfo RankingListToPBRankingList(RankingListInfo rankingList)
        {
            if (rankingList == null)
            {
                return(null);
            }
            ProRankingListInfo proRankingListInfo = new ProRankingListInfo
            {
                Type           = (int)rankingList.Type,
                Score          = rankingList.Score,
                CurrRank       = rankingList.CurrRank,
                LastRank       = rankingList.LastRank,
                ChampionHeroId = rankingList.ChampionHeroId
            };

            if (rankingList.PlayerList != null)
            {
                foreach (RankingTargetPlayerInfo rankingTargetPlayerInfo in rankingList.PlayerList)
                {
                    proRankingListInfo.PlayerList.Add(RankingPlayerInfo.RankingPlayerToPBRankingPlayer(rankingTargetPlayerInfo.PlayerInfo, rankingTargetPlayerInfo.Score));
                }
            }
            return(proRankingListInfo);
        }