//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: 2026年1月6日
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class GubaoStarConfig : ConfigBase<int, GubaoStarConfig>
|
{
|
static GubaoStarConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int ID;
|
public int GubaoQuality;
|
public int GubaoStar;
|
public int[] Condition;
|
public int StarUPNeedSelfCnt;
|
public int[][] StarUPNeedItemList;
|
|
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 ID);
|
|
int.TryParse(tables[1],out GubaoQuality);
|
|
int.TryParse(tables[2],out GubaoStar);
|
|
if (tables[3].Contains("["))
|
{
|
Condition = JsonMapper.ToObject<int[]>(tables[3]);
|
}
|
else
|
{
|
string[] ConditionStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
Condition = new int[ConditionStringArray.Length];
|
for (int i=0;i<ConditionStringArray.Length;i++)
|
{
|
int.TryParse(ConditionStringArray[i],out Condition[i]);
|
}
|
}
|
|
int.TryParse(tables[4],out StarUPNeedSelfCnt);
|
|
StarUPNeedItemList = JsonMapper.ToObject<int[][]>(tables[5].Replace("(", "[").Replace(")", "]"));
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|