52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
|
|
using CodeStage.AntiCheat.ObscuredTypes;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class RelicUpgradeCostTableData : TableDataBase
|
||
|
|
{
|
||
|
|
public int n_RelicLv;
|
||
|
|
public int n_RequirePiece;
|
||
|
|
public int n_RequireGrade1;
|
||
|
|
public int n_RequireGrade2;
|
||
|
|
public int n_RequireGrade3;
|
||
|
|
public int n_RequireGrade4;
|
||
|
|
|
||
|
|
public Dictionary<int, int> dic_cost = new Dictionary<int, int>();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class table_relicupgradecost : table_missionbase
|
||
|
|
{
|
||
|
|
public static table_relicupgradecost Ins;
|
||
|
|
List<RelicUpgradeCostTableData> tableDatas;
|
||
|
|
public ObscuredInt MaxLv;
|
||
|
|
|
||
|
|
protected override void Awake()
|
||
|
|
{
|
||
|
|
base.Awake();
|
||
|
|
Ins = this;
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void Start()
|
||
|
|
{
|
||
|
|
tableDatas = JsonConvert.DeserializeObject<List<RelicUpgradeCostTableData>>(json_last);
|
||
|
|
for (int i = 0; i < Get_DataList().Count; i++)
|
||
|
|
{
|
||
|
|
var temp = Get_DataList()[i];
|
||
|
|
temp.dic_cost.Add(6, temp.n_RequireGrade1);
|
||
|
|
temp.dic_cost.Add(7, temp.n_RequireGrade2);
|
||
|
|
temp.dic_cost.Add(8, temp.n_RequireGrade3);
|
||
|
|
temp.dic_cost.Add(9, temp.n_RequireGrade4);
|
||
|
|
if (temp.n_RelicLv > MaxLv)
|
||
|
|
MaxLv = temp.n_RelicLv;
|
||
|
|
}
|
||
|
|
MaxLv.RandomizeCryptoKey();
|
||
|
|
|
||
|
|
base.Start();
|
||
|
|
}
|
||
|
|
|
||
|
|
public int Get_MaxLv() { MaxLv.RandomizeCryptoKey(); return MaxLv; }
|
||
|
|
public RelicUpgradeCostTableData Get_Data(int lv) { return Get_DataList().Find(f => f.n_RelicLv == lv); }
|
||
|
|
public List<RelicUpgradeCostTableData> Get_DataList() { return tableDatas; }
|
||
|
|
}
|