public int RatingToLevel(int rating)
        {
            List <IconUpgradeVO> sortedFactionIconData = this.GetSortedFactionIconData();
            int count  = sortedFactionIconData.Count;
            int result = 0;

            if (count > 0)
            {
                int           i             = 0;
                IconUpgradeVO iconUpgradeVO = sortedFactionIconData[i];
                result = iconUpgradeVO.Level;
                for (i = 1; i < count; i++)
                {
                    iconUpgradeVO = sortedFactionIconData[i];
                    if (rating < iconUpgradeVO.Rating)
                    {
                        break;
                    }
                    result = iconUpgradeVO.Level;
                }
                if (i == count)
                {
                    result = sortedFactionIconData[count - 1].Level;
                }
            }
            return(result);
        }
        public int GetTotalVictoryRatingToCurrentLevel()
        {
            List <IconUpgradeVO> sortedFactionIconData = this.GetSortedFactionIconData();
            int count  = sortedFactionIconData.Count;
            int result = 0;
            int num    = this.RatingToLevel(this.GetCurrentPlayerVictoryRating());

            if (count > 0 && num > 0)
            {
                IconUpgradeVO iconUpgradeVO = sortedFactionIconData[num];
                result = iconUpgradeVO.Rating;
            }
            return(result);
        }
 private int SortAscending(IconUpgradeVO a, IconUpgradeVO b)
 {
     return(a.Level.CompareTo(b.Level));
 }