using CodeStage.AntiCheat.ObscuredTypes; using Newtonsoft.Json; using System; using System.Collections.Generic; [Serializable] public class AwakenUpgradeTableData : TableDataBase { // ObscuredInt 적용 ObscuredInt _AwakenStep; public int n_AwakenStep { get { return _AwakenStep; } set { _AwakenStep = value; _AwakenStep.RandomizeCryptoKey(); } } // 각성 단계 ObscuredInt _MaxUpgradeLevel; public int n_MaxUpgradeLevel { get { return _MaxUpgradeLevel; } set { _MaxUpgradeLevel = value; _MaxUpgradeLevel.RandomizeCryptoKey(); } } // 다음 단계 승급에 필요한 강화 횟수 ObscuredInt _AwakenGoodsCost; public int n_AwakenGoodsCost { get { return _AwakenGoodsCost; } set { _AwakenGoodsCost = value; _AwakenGoodsCost.RandomizeCryptoKey(); } } // 각성에 필요한 재화 수량 ObscuredInt _DefaultUpgradeCostValue; public int n_DefaultUpgradeCostValue { get { return _DefaultUpgradeCostValue; } set { _DefaultUpgradeCostValue = value; _DefaultUpgradeCostValue.RandomizeCryptoKey(); } } // 1레벨의 능력치 기본 값 // ObscuredFloat 적용 ObscuredFloat _CountPerUpgradeCostValue; public float f_CountPerUpgradeCostValue { get { return _CountPerUpgradeCostValue; } set { _CountPerUpgradeCostValue = value; _CountPerUpgradeCostValue.RandomizeCryptoKey(); } } // 강화 횟수 당 능력치 증가량 ObscuredFloat _BalanceConstant; public float f_BalanceConstant { get { return _BalanceConstant; } set { _BalanceConstant = value; _BalanceConstant.RandomizeCryptoKey(); } } // 밸런스 상수 K값 public float Get_Price(int lv) { return base.Get_Value(lv, f_BalanceConstant, n_DefaultUpgradeCostValue, f_CountPerUpgradeCostValue, true); } } public class table_awakenupgrade : table_missionbase { public static table_awakenupgrade 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_AwakenStep, temp); } base.Start(); } public AwakenUpgradeTableData Get_Data_orNull(int lv) { return dic_Data.ContainsKey(lv) ? dic_Data[lv] : null; } public List Get_DataList() { return tableDatas; } }