2024-12-15 01:39:39 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2024-12-18 23:42:27 +00:00
|
|
|
using CodeStage.AntiCheat.ObscuredTypes;
|
|
|
|
|
using Newtonsoft.Json;
|
2024-12-15 01:39:39 +00:00
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class AbilityConfigTableData : TableDataBase
|
|
|
|
|
{
|
2024-12-18 23:42:27 +00:00
|
|
|
// 특성을 각각 구분하기 위한 고유 ID
|
|
|
|
|
ObscuredInt _AbilityID;
|
|
|
|
|
public int n_AbilityID
|
|
|
|
|
{
|
|
|
|
|
get { return _AbilityID; }
|
|
|
|
|
set { _AbilityID = value; _AbilityID.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 특성 UI 카테고리 분류를 위한 Enum 값
|
|
|
|
|
public eBattleType e_BattleType { get; set; }
|
|
|
|
|
|
|
|
|
|
// 특성 강화 단계를 의미하며, 단계가 증가할수록 우측으로 점진적으로 배열된다.
|
|
|
|
|
ObscuredInt _AbilityStep;
|
|
|
|
|
public int n_AbilityStep
|
|
|
|
|
{
|
|
|
|
|
get { return _AbilityStep; }
|
|
|
|
|
set { _AbilityStep = value; _AbilityStep.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 특성이 배치 될 상/중/하 분류 위치
|
|
|
|
|
ObscuredInt _AbilityOrder;
|
|
|
|
|
public int n_AbilityOrder
|
|
|
|
|
{
|
|
|
|
|
get { return _AbilityOrder; }
|
|
|
|
|
set { _AbilityOrder = value; _AbilityOrder.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 특성 강화에 요구되는 선행 스킬의 ID1
|
|
|
|
|
ObscuredInt _RequireAbility1;
|
|
|
|
|
public int n_RequireAbility1
|
|
|
|
|
{
|
|
|
|
|
get { return _RequireAbility1; }
|
|
|
|
|
set { _RequireAbility1 = value; _RequireAbility1.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 특성 강화에 요구되는 선행 스킬의 ID2
|
|
|
|
|
ObscuredInt _RequireAbility2;
|
|
|
|
|
public int n_RequireAbility2
|
|
|
|
|
{
|
|
|
|
|
get { return _RequireAbility2; }
|
|
|
|
|
set { _RequireAbility2 = value; _RequireAbility2.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 특성 효과가 적용될 직업군을 분류하기 위한 Enum 값
|
|
|
|
|
public eBattleType e_AbilityTarget { get; set; }
|
|
|
|
|
|
|
|
|
|
// 특성 효과를 구성하기 위한 옵션 타입 값
|
|
|
|
|
public eStat e_OptionType { get; set; }
|
|
|
|
|
|
|
|
|
|
// 1레벨 기준 특성 효과의 기본 값
|
|
|
|
|
ObscuredFloat _DefaultValue;
|
|
|
|
|
public float f_DefaultValue
|
|
|
|
|
{
|
|
|
|
|
get { return _DefaultValue; }
|
|
|
|
|
set { _DefaultValue = value; _DefaultValue.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 레벨 당 특성 효과 증가량을 산출하기 위한 증가량
|
|
|
|
|
ObscuredFloat _LevelPerValue;
|
|
|
|
|
public float f_LevelPerValue
|
|
|
|
|
{
|
|
|
|
|
get { return _LevelPerValue; }
|
|
|
|
|
set { _LevelPerValue = value; _LevelPerValue.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 레벨 당 특성 효과 증가량을 산출하기 위한 밸런스 상수 K 값
|
|
|
|
|
ObscuredFloat _BalanceConstant;
|
|
|
|
|
public float f_BalanceConstant
|
|
|
|
|
{
|
|
|
|
|
get { return _BalanceConstant; }
|
|
|
|
|
set { _BalanceConstant = value; _BalanceConstant.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 특성을 강화할 수 있는 최대 제한 레벨
|
|
|
|
|
ObscuredInt _MaxUpgradeLevel;
|
|
|
|
|
public int n_MaxUpgradeLevel
|
|
|
|
|
{
|
|
|
|
|
get { return _MaxUpgradeLevel; }
|
|
|
|
|
set { _MaxUpgradeLevel = value; _MaxUpgradeLevel.RandomizeCryptoKey(); }
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-15 01:39:39 +00:00
|
|
|
|
|
|
|
|
public float Get_Value(int lv) { return Get_Value(lv, f_BalanceConstant, f_DefaultValue, f_LevelPerValue); }
|
2024-12-22 01:07:25 +00:00
|
|
|
public override string Get_Name() { return table_itemlist.Ins.Get_ItemName(n_AbilityID); }
|
|
|
|
|
public string Get_Desc() { return table_itemlist.Ins.Get_ItemDesc(n_AbilityID); }
|
2024-12-15 01:39:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class table_abilityconfig : table_missionbase
|
|
|
|
|
{
|
|
|
|
|
public static table_abilityconfig Ins;
|
|
|
|
|
List<AbilityConfigTableData> tableDatas;
|
|
|
|
|
Dictionary<int, AbilityConfigTableData> dic_Data = new Dictionary<int, AbilityConfigTableData>();
|
|
|
|
|
|
|
|
|
|
// UI 표시용
|
|
|
|
|
Dictionary<eBattleType, List<AbilityConfigTableData>> dic_typeList = new Dictionary<eBattleType, List<AbilityConfigTableData>>();
|
|
|
|
|
// 스탯 적용용
|
|
|
|
|
Dictionary<eBattleType, List<AbilityConfigTableData>> dic_StatList = new Dictionary<eBattleType, List<AbilityConfigTableData>>();
|
|
|
|
|
|
|
|
|
|
protected override void Awake()
|
|
|
|
|
{
|
|
|
|
|
base.Awake();
|
|
|
|
|
Ins = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Start()
|
|
|
|
|
{
|
|
|
|
|
tableDatas = JsonConvert.DeserializeObject<List<AbilityConfigTableData>>(json_last);
|
|
|
|
|
for (int i = 0; i < Get_DataList().Count; i++)
|
|
|
|
|
{
|
|
|
|
|
var temp = Get_DataList()[i];
|
|
|
|
|
if (!dic_typeList.ContainsKey(temp.e_BattleType))
|
|
|
|
|
dic_typeList.Add(temp.e_BattleType, new List<AbilityConfigTableData>());
|
|
|
|
|
dic_typeList[temp.e_BattleType].Add(temp);
|
|
|
|
|
|
|
|
|
|
if (!dic_StatList.ContainsKey(temp.e_BattleType))
|
|
|
|
|
dic_StatList.Add(temp.e_BattleType, new List<AbilityConfigTableData>());
|
|
|
|
|
dic_StatList[temp.e_BattleType].Add(temp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < Get_DataList().Count; i++)
|
|
|
|
|
{
|
|
|
|
|
var temp = Get_DataList()[i];
|
|
|
|
|
dic_Data.Add(temp.n_AbilityID, temp);
|
|
|
|
|
if (temp.e_AbilityTarget == eBattleType.All)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in dic_StatList)
|
|
|
|
|
item.Value.Add(temp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
base.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public AbilityConfigTableData Get_Data_orNull(int id) { return dic_Data.ContainsKey(id) ? dic_Data[id] : null; }
|
|
|
|
|
public List<AbilityConfigTableData> Get_DataList() { return tableDatas; }
|
|
|
|
|
public List<AbilityConfigTableData> Get_DataList(eBattleType type) { return dic_typeList[type]; }
|
2025-07-18 07:58:48 +00:00
|
|
|
public List<AbilityConfigTableData> Get_RequireDataList(int id)
|
|
|
|
|
{
|
|
|
|
|
var rtnlst = new List<AbilityConfigTableData>();
|
|
|
|
|
var lst = Get_DataList();
|
|
|
|
|
for (int i = 0; i < lst.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
if (lst[i].n_RequireAbility1 == id || lst[i].n_RequireAbility2 == id)
|
|
|
|
|
rtnlst.Add(lst[i]);
|
|
|
|
|
}
|
|
|
|
|
return rtnlst;
|
|
|
|
|
}
|
2024-12-15 01:39:39 +00:00
|
|
|
public List<AbilityConfigTableData> Get_DataList_Stat(eBattleType type)
|
|
|
|
|
{
|
|
|
|
|
if (dic_StatList.ContainsKey(type))
|
|
|
|
|
return dic_StatList[type];
|
|
|
|
|
return new List<AbilityConfigTableData>();
|
|
|
|
|
}
|
|
|
|
|
}
|