//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: 2025年12月23日
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class BeautyConfig : ConfigBase<int, BeautyConfig>
|
{
|
static BeautyConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int BeautyID;
|
public string Name;
|
public int BeautyQuality;
|
public int UnlockWay;
|
public int UnlockValue;
|
public int UnlockNeedCnt;
|
public int ExclusiveItemID;
|
public int[] TalentAttrIDList;
|
public int[] TalentAttrValueList;
|
public int[] TalentPerLVAddList;
|
public int EffType;
|
public int EffTypeValue;
|
public int EffValue;
|
public int EffPerLVAdd;
|
public string Desc;
|
|
public override int LoadKey(string _key)
|
{
|
int key = GetKey(_key);
|
return key;
|
}
|
|
public override void LoadConfig(string input)
|
{
|
try {
|
string[] tables = input.Split('\t');
|
int.TryParse(tables[0],out BeautyID);
|
|
Name = tables[1];
|
|
int.TryParse(tables[2],out BeautyQuality);
|
|
int.TryParse(tables[3],out UnlockWay);
|
|
int.TryParse(tables[4],out UnlockValue);
|
|
int.TryParse(tables[5],out UnlockNeedCnt);
|
|
int.TryParse(tables[6],out ExclusiveItemID);
|
|
if (tables[7].Contains("["))
|
{
|
TalentAttrIDList = JsonMapper.ToObject<int[]>(tables[7]);
|
}
|
else
|
{
|
string[] TalentAttrIDListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
TalentAttrIDList = new int[TalentAttrIDListStringArray.Length];
|
for (int i=0;i<TalentAttrIDListStringArray.Length;i++)
|
{
|
int.TryParse(TalentAttrIDListStringArray[i],out TalentAttrIDList[i]);
|
}
|
}
|
|
if (tables[8].Contains("["))
|
{
|
TalentAttrValueList = JsonMapper.ToObject<int[]>(tables[8]);
|
}
|
else
|
{
|
string[] TalentAttrValueListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
TalentAttrValueList = new int[TalentAttrValueListStringArray.Length];
|
for (int i=0;i<TalentAttrValueListStringArray.Length;i++)
|
{
|
int.TryParse(TalentAttrValueListStringArray[i],out TalentAttrValueList[i]);
|
}
|
}
|
|
if (tables[9].Contains("["))
|
{
|
TalentPerLVAddList = JsonMapper.ToObject<int[]>(tables[9]);
|
}
|
else
|
{
|
string[] TalentPerLVAddListStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
TalentPerLVAddList = new int[TalentPerLVAddListStringArray.Length];
|
for (int i=0;i<TalentPerLVAddListStringArray.Length;i++)
|
{
|
int.TryParse(TalentPerLVAddListStringArray[i],out TalentPerLVAddList[i]);
|
}
|
}
|
|
int.TryParse(tables[10],out EffType);
|
|
int.TryParse(tables[11],out EffTypeValue);
|
|
int.TryParse(tables[12],out EffValue);
|
|
int.TryParse(tables[13],out EffPerLVAdd);
|
|
Desc = tables[14];
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|