49 lines
2.2 KiB
C#
49 lines
2.2 KiB
C#
|
|
using CodeStage.AntiCheat.ObscuredTypes;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
|
||
|
|
public class PCEvolutionTableData : TableDataBase
|
||
|
|
{
|
||
|
|
public eStat e_Stat1, e_Stat2, e_Stat3, e_Stat4;
|
||
|
|
ObscuredInt _PCID; public int n_PCID { get { return _PCID; } set { _PCID = value; _PCID.RandomizeCryptoKey(); } }
|
||
|
|
ObscuredInt _Star; public int n_Star { get { return _Star; } set { _Star = value; _Star.RandomizeCryptoKey(); } }
|
||
|
|
ObscuredInt _AttackValue; public int n_AttackValue { get { return _AttackValue; } set { _AttackValue = value; _AttackValue.RandomizeCryptoKey(); } }
|
||
|
|
ObscuredInt _MaxHPValue; public int n_MaxHPValue { get { return _MaxHPValue; } set { _MaxHPValue = value; _MaxHPValue.RandomizeCryptoKey(); } }
|
||
|
|
ObscuredInt _MaxShieldValue; public int n_MaxShieldValue { get { return _MaxShieldValue; } set { _MaxShieldValue = value; _MaxShieldValue.RandomizeCryptoKey(); } }
|
||
|
|
ObscuredInt _HitRateValue; public int n_HitRateValue { get { return _HitRateValue; } set { _HitRateValue = value; _HitRateValue.RandomizeCryptoKey(); } }
|
||
|
|
}
|
||
|
|
|
||
|
|
public class table_PCEvolution : table_base
|
||
|
|
{
|
||
|
|
public static table_PCEvolution Ins;
|
||
|
|
|
||
|
|
List<PCEvolutionTableData> tableDatas;
|
||
|
|
Dictionary<int, List<PCEvolutionTableData>> dic_Datas = new Dictionary<int, List<PCEvolutionTableData>>();
|
||
|
|
Dictionary<(int, int), PCEvolutionTableData> dic_Data = new Dictionary<(int, int), PCEvolutionTableData>();
|
||
|
|
|
||
|
|
protected override void Awake()
|
||
|
|
{
|
||
|
|
Ins = this;
|
||
|
|
base.Awake();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void Start()
|
||
|
|
{
|
||
|
|
tableDatas = JsonConvert.DeserializeObject<List<PCEvolutionTableData>>(json_last);
|
||
|
|
for (int i = 0; i < tableDatas.Count; i++)
|
||
|
|
{
|
||
|
|
var temp = tableDatas[i];
|
||
|
|
|
||
|
|
if (!dic_Datas.ContainsKey(temp.n_PCID)) dic_Datas.Add(temp.n_PCID, new List<PCEvolutionTableData>());
|
||
|
|
dic_Datas[temp.n_PCID].Add(temp);
|
||
|
|
|
||
|
|
dic_Data.Add((temp.n_PCID, temp.n_Star), temp);
|
||
|
|
}
|
||
|
|
|
||
|
|
base.Start();
|
||
|
|
}
|
||
|
|
|
||
|
|
public List<PCEvolutionTableData> Get_DataList() { return tableDatas; }
|
||
|
|
public PCEvolutionTableData Get_Data(int pcid, int star) { return dic_Data[(pcid, star)]; }
|
||
|
|
public List<PCEvolutionTableData> Get_Datas(int pcid) { return dic_Datas[pcid]; }
|
||
|
|
}
|