using System; using System.Collections.Generic; using CodeStage.AntiCheat.ObscuredTypes; using Newtonsoft.Json; [Serializable] public class GachaConfigTableData : TableDataBase { protected ObscuredInt _ID; public int n_ID { get { return _ID; } set { _ID = value; _ID.RandomizeCryptoKey(); } } public int n_Title; public string s_Banner; protected ObscuredInt _GachaPrice; public int n_GachaPrice { get { return _GachaPrice; } set { _GachaPrice = value; _GachaPrice.RandomizeCryptoKey(); } } protected ObscuredInt _GachaGoodsID; public int n_GachaGoodsID { get { return _GachaGoodsID; } set { _GachaGoodsID = value; _GachaGoodsID.RandomizeCryptoKey(); } } protected ObscuredInt _NormalRandombag; public int n_NormalRandombag { get { return _NormalRandombag; } set { _NormalRandombag = value; _NormalRandombag.RandomizeCryptoKey(); } } protected ObscuredInt _Extra10_Randombag; public int n_Extra10_Randombag { get { return _Extra10_Randombag; } set { _Extra10_Randombag = value; _Extra10_Randombag.RandomizeCryptoKey(); } } protected ObscuredInt _Extra50_Randombag; public int n_Extra50_Randombag { get { return _Extra50_Randombag; } set { _Extra50_Randombag = value; _Extra50_Randombag.RandomizeCryptoKey(); } } protected ObscuredInt _PickupReward; public int n_PickupReward { get { return _PickupReward; } set { _PickupReward = value; _PickupReward.RandomizeCryptoKey(); } } } public class table_gachaconfig : table_missionbase { public static table_gachaconfig Ins; List tableDatas; Dictionary dic_Data = new Dictionary(); protected override void Awake() { base.Awake(); Ins = this; } protected override void Start() { tableDatas = JsonConvert.DeserializeObject>(json_last); for (int i = 0; i < Get_DataList().Count; i++) { var temp = Get_DataList()[i]; dic_Data.Add(temp.n_ID, temp); } base.Start(); } public GachaConfigTableData Get_Data_orNull(int id) { return dic_Data.ContainsKey(id) ? dic_Data[id] : null; } public List Get_DataList() { return tableDatas; } }