//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: Wednesday, January 7, 2026
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class GubaoConfig : ConfigBase<int, GubaoConfig>
|
{
|
static GubaoConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int GubaoID;
|
public string Name;
|
public int GubaoQuality;
|
public int UnlockItemID;
|
public int UnlockItemCnt;
|
public int[] BaseAttrIDList;
|
public int[] BaseAttrValueList;
|
public int[] BaseAttrPerStarAddList;
|
public int SpecEffType;
|
public int SpecEffLayerMax;
|
public int SpecAttrID;
|
public int SpecAttrValue;
|
public int SpecAttrPerStarAdd;
|
public int PowerType;
|
public int PowerTypeValue;
|
public int PowerValue;
|
public int PowerPerStarAdd;
|
public string Icon;
|
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 GubaoID);
|
|
Name = tables[1];
|
|
int.TryParse(tables[2],out GubaoQuality);
|
|
int.TryParse(tables[3],out UnlockItemID);
|
|
int.TryParse(tables[4],out UnlockItemCnt);
|
|
if (tables[5].Contains("["))
|
{
|
BaseAttrIDList = JsonMapper.ToObject<int[]>(tables[5]);
|
}
|
else
|
{
|
string[] BaseAttrIDListStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
BaseAttrIDList = new int[BaseAttrIDListStringArray.Length];
|
for (int i=0;i<BaseAttrIDListStringArray.Length;i++)
|
{
|
int.TryParse(BaseAttrIDListStringArray[i],out BaseAttrIDList[i]);
|
}
|
}
|
|
if (tables[6].Contains("["))
|
{
|
BaseAttrValueList = JsonMapper.ToObject<int[]>(tables[6]);
|
}
|
else
|
{
|
string[] BaseAttrValueListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
BaseAttrValueList = new int[BaseAttrValueListStringArray.Length];
|
for (int i=0;i<BaseAttrValueListStringArray.Length;i++)
|
{
|
int.TryParse(BaseAttrValueListStringArray[i],out BaseAttrValueList[i]);
|
}
|
}
|
|
if (tables[7].Contains("["))
|
{
|
BaseAttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[7]);
|
}
|
else
|
{
|
string[] BaseAttrPerStarAddListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
BaseAttrPerStarAddList = new int[BaseAttrPerStarAddListStringArray.Length];
|
for (int i=0;i<BaseAttrPerStarAddListStringArray.Length;i++)
|
{
|
int.TryParse(BaseAttrPerStarAddListStringArray[i],out BaseAttrPerStarAddList[i]);
|
}
|
}
|
|
int.TryParse(tables[8],out SpecEffType);
|
|
int.TryParse(tables[9],out SpecEffLayerMax);
|
|
int.TryParse(tables[10],out SpecAttrID);
|
|
int.TryParse(tables[11],out SpecAttrValue);
|
|
int.TryParse(tables[12],out SpecAttrPerStarAdd);
|
|
int.TryParse(tables[13],out PowerType);
|
|
int.TryParse(tables[14],out PowerTypeValue);
|
|
int.TryParse(tables[15],out PowerValue);
|
|
int.TryParse(tables[16],out PowerPerStarAdd);
|
|
Icon = tables[17];
|
|
Desc = tables[18];
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|