114 lines
3.9 KiB
C#
114 lines
3.9 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
[Serializable]
|
|
public class EquipmentSlotUpgradeTableData : TableDataBase
|
|
{
|
|
public eItem e_EquipParts { get; set; } // 장비 파츠 타입 (enum 값)
|
|
|
|
public eAttackType e_EquipAttribute { get; set; } // 장비 파츠 속성 (enum 값)
|
|
|
|
ObscuredInt _EquipSlotName;
|
|
public int n_EquipSlotName
|
|
{
|
|
get { return _EquipSlotName; }
|
|
set { _EquipSlotName = value; _EquipSlotName.RandomizeCryptoKey(); }
|
|
} // 장비 파츠 및 속성에 따른 텍스트 정보
|
|
|
|
public eStat e_OptionType { get; set; } // 부여할 주 스텟 능력치 타입 (enum 값)
|
|
|
|
ObscuredInt _DefaultValue;
|
|
public int n_DefaultValue
|
|
{
|
|
get { return _DefaultValue; }
|
|
set { _DefaultValue = value; _DefaultValue.RandomizeCryptoKey(); }
|
|
} // 1레벨의 능력치 기본 값
|
|
|
|
ObscuredFloat _LevelPerValue;
|
|
public float f_LevelPerValue
|
|
{
|
|
get { return _LevelPerValue; }
|
|
set { _LevelPerValue = value; _LevelPerValue.RandomizeCryptoKey(); }
|
|
} // 레벨당 능력치 증가량
|
|
|
|
ObscuredFloat _BalanceConstant;
|
|
public float f_BalanceConstant
|
|
{
|
|
get { return _BalanceConstant; }
|
|
set { _BalanceConstant = value; _BalanceConstant.RandomizeCryptoKey(); }
|
|
} // 밸런스 상수 K값
|
|
|
|
ObscuredInt _ConsumeGoodsID;
|
|
public int n_ConsumeGoodsID
|
|
{
|
|
get { return _ConsumeGoodsID; }
|
|
set { _ConsumeGoodsID = value; _ConsumeGoodsID.RandomizeCryptoKey(); }
|
|
} // 강화에 사용될 재화 ID
|
|
|
|
ObscuredInt _DefaultValuePrice;
|
|
public int n_DefaultValuePrice
|
|
{
|
|
get { return _DefaultValuePrice; }
|
|
set { _DefaultValuePrice = value; _DefaultValuePrice.RandomizeCryptoKey(); }
|
|
} // 1레벨의 기본 재화 소모량
|
|
|
|
ObscuredFloat _LevelPerValuePrice;
|
|
public float f_LevelPerValuePrice
|
|
{
|
|
get { return _LevelPerValuePrice; }
|
|
set { _LevelPerValuePrice = value; _LevelPerValuePrice.RandomizeCryptoKey(); }
|
|
} // 레벨당 재화 소모 증가량
|
|
|
|
ObscuredFloat _BalanceConstantPrice;
|
|
public float f_BalanceConstantPrice
|
|
{
|
|
get { return _BalanceConstantPrice; }
|
|
set { _BalanceConstantPrice = value; _BalanceConstantPrice.RandomizeCryptoKey(); }
|
|
} // 재화 소모 밸런스 상수 K값
|
|
|
|
public float Get_MainStatValue(int lv) { return Get_Value(lv, f_BalanceConstant, n_DefaultValue, f_LevelPerValue); }
|
|
public float Get_Price(int lv) { return Get_Value(lv, f_BalanceConstantPrice, n_DefaultValuePrice, f_LevelPerValuePrice); }
|
|
}
|
|
|
|
public class table_equipslotupgrade : table_missionbase
|
|
{
|
|
public static table_equipslotupgrade Ins;
|
|
List<EquipmentSlotUpgradeTableData> tableDatas;
|
|
Dictionary<eItem, List<EquipmentSlotUpgradeTableData>> dic_itemlist = new Dictionary<eItem, List<EquipmentSlotUpgradeTableData>>();
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
Ins = this;
|
|
}
|
|
|
|
protected override void Start()
|
|
{
|
|
tableDatas = JsonConvert.DeserializeObject<List<EquipmentSlotUpgradeTableData>>(json_last);
|
|
|
|
for (int i = 0; i < tableDatas.Count; i++)
|
|
{
|
|
var itemtype = tableDatas[i].e_EquipParts;
|
|
if (!dic_itemlist.ContainsKey(itemtype))
|
|
dic_itemlist.Add(itemtype, new List<EquipmentSlotUpgradeTableData>());
|
|
dic_itemlist[itemtype].Add(tableDatas[i]);
|
|
}
|
|
|
|
base.Start();
|
|
}
|
|
|
|
public List<EquipmentSlotUpgradeTableData> Get_DataList() { return tableDatas; }
|
|
public List<EquipmentSlotUpgradeTableData> Get_DataList(eItem item) { return dic_itemlist[item]; }
|
|
public EquipmentSlotUpgradeTableData Get_Data(eItem item, eAttackType attribute)
|
|
{
|
|
var lst = Get_DataList(item);
|
|
for (int i = 0; i < lst.Count; i++)
|
|
{
|
|
if (lst[i].e_EquipAttribute == attribute)
|
|
return lst[i];
|
|
}
|
|
return null;
|
|
}
|
|
} |