Example #1
0
        public List <ItemData> GetReturnItemList()
        {
            if (!this.IsValid() || !this.IsEquiped())
            {
                return((List <ItemData>)null);
            }
            RarityEquipEnhanceParam equipEnhanceParam = this.RarityParam == null ? (RarityEquipEnhanceParam)null : this.RarityParam.EquipEnhanceParam;

            if (equipEnhanceParam == null || equipEnhanceParam.ranks == null)
            {
                return((List <ItemData>)null);
            }
            RarityEquipEnhanceParam.RankParam rankParam = equipEnhanceParam.GetRankParam(this.Rank);
            if (rankParam == null || rankParam.return_item == null)
            {
                return((List <ItemData>)null);
            }
            ReturnItem[]    returnItem   = rankParam.return_item;
            List <ItemData> itemDataList = new List <ItemData>();

            for (int index = 0; index < returnItem.Length; ++index)
            {
                if (!string.IsNullOrEmpty(returnItem[index].iname) && (int)returnItem[index].num > 0)
                {
                    ItemData itemData = new ItemData();
                    itemData.Setup(0L, returnItem[index].iname, (int)returnItem[index].num);
                    itemDataList.Add(itemData);
                }
            }
            return(itemDataList);
        }
Example #2
0
        public int GetNeedExp(int rank)
        {
            RarityEquipEnhanceParam equipEnhanceParam = this.RarityParam == null ? (RarityEquipEnhanceParam)null : this.RarityParam.EquipEnhanceParam;

            DebugUtility.Assert((rank <= 0 ? 0 : (rank <= (int)equipEnhanceParam.rankcap ? 1 : 0)) != 0, "アイテムのレアリティ" + (object)this.mItemParam.rare + "には指定ランク" + (object)rank + "の情報に存在しない。");
            int num = 0;

            for (int index = 0; index < rank; ++index)
            {
                num += (int)equipEnhanceParam.ranks[index].need_point;
            }
            return(num);
        }
Example #3
0
        public int GetNextExp(int rank)
        {
            RarityEquipEnhanceParam equipEnhanceParam = this.RarityParam == null ? (RarityEquipEnhanceParam)null : this.RarityParam.EquipEnhanceParam;

            DebugUtility.Assert((rank <= 0 ? 0 : (rank <= (int)equipEnhanceParam.rankcap ? 1 : 0)) != 0, "アイテムのレアリティ" + (object)this.mItemParam.rare + "には指定ランク" + (object)rank + "の情報に存在しない。");
            int index = rank - 1;

            if (index < (int)equipEnhanceParam.rankcap)
            {
                return((int)equipEnhanceParam.ranks[index].need_point);
            }
            return(0);
        }