public bool ResetRank()
        {
            RankConfigData rankData = rankConfigModel.GetRankForXp(0);

            if (rankData != null)
            {
                _data.rankIndex = rankData.index;
            }
            return(Save());
        }
        private bool UpdateRank()
        {
            RankConfigData rankData = rankConfigModel.GetRankForXp(_data.xp);

            // Check if reached a new rank
            if (rankData != null && _data.rankIndex < rankData.index)
            {
                _data.rankIndex = rankData.index;
                rankUpSignal.Dispatch(rankData.index);
                return(Save());
            }

            return(false);
        }
        public IConfigData Clone()
        {
            RankConfigData c = new RankConfigData();

            c.id           = id;
            c.name         = name;
            c.xp           = xp;
            c.rankUpTextId = rankUpTextId;
            c.index        = index;
            c.restrictions = new List <GameElementData>(restrictions.Clone());
            c.properties   = new List <GenericPropertyData>(properties.Clone());

            return(c);
        }