53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using Newtonsoft.Json;
|
|
using System.Collections.Generic;
|
|
|
|
public class BattleLevelUpTableData
|
|
{
|
|
ObscuredInt _Lv;
|
|
public int n_Lv
|
|
{
|
|
get { return _Lv; }
|
|
set { _Lv = value; _Lv.RandomizeCryptoKey(); }
|
|
}
|
|
|
|
ObscuredInt _NextRequireExp;
|
|
public int n_NextRequireExp
|
|
{
|
|
get { return _NextRequireExp; }
|
|
set { _NextRequireExp = value; _NextRequireExp.RandomizeCryptoKey(); }
|
|
}
|
|
|
|
ObscuredInt _TotalExp;
|
|
public int n_TotalExp
|
|
{
|
|
get { return _TotalExp; }
|
|
set { _TotalExp = value; _TotalExp.RandomizeCryptoKey(); }
|
|
}
|
|
}
|
|
|
|
public class table_BattleLevelUp : table_base
|
|
{
|
|
public static table_BattleLevelUp Ins;
|
|
|
|
List<BattleLevelUpTableData> tableDatas;
|
|
Dictionary<int, BattleLevelUpTableData> dic_data = new Dictionary<int, BattleLevelUpTableData>();
|
|
|
|
protected override void Awake()
|
|
{
|
|
Ins = this;
|
|
base.Awake();
|
|
}
|
|
|
|
protected override void Start()
|
|
{
|
|
tableDatas = JsonConvert.DeserializeObject<List<BattleLevelUpTableData>>(json_last);
|
|
for (int i = 0; i < tableDatas.Count; i++)
|
|
dic_data.Add(tableDatas[i].n_Lv, tableDatas[i]);
|
|
|
|
base.Start();
|
|
}
|
|
|
|
public List<BattleLevelUpTableData> Get_DataList() { return tableDatas; }
|
|
public BattleLevelUpTableData Get_Data_orNull(int id) { return dic_data.ContainsKey(id) ? dic_data[id] : null; }
|
|
} |