//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: Tuesday, June 9, 2026
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class HeroTrialConfig : ConfigBase<int, HeroTrialConfig>
|
{
|
static HeroTrialConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int CfgID;
|
public int HeroID;
|
public int LevelNum;
|
public int LVLimit;
|
public int RealmLimit;
|
public int[][] PassAwardList;
|
public int[] LineupIDList;
|
public int NPCLV;
|
public float Difficulty;
|
public long FightPower;
|
public int SortOrder;
|
|
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 CfgID);
|
|
int.TryParse(tables[1],out HeroID);
|
|
int.TryParse(tables[2],out LevelNum);
|
|
int.TryParse(tables[3],out LVLimit);
|
|
int.TryParse(tables[4],out RealmLimit);
|
|
PassAwardList = JsonMapper.ToObject<int[][]>(tables[5].Replace("(", "[").Replace(")", "]"));
|
|
if (tables[6].Contains("["))
|
{
|
LineupIDList = JsonMapper.ToObject<int[]>(tables[6]);
|
}
|
else
|
{
|
string[] LineupIDListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
LineupIDList = new int[LineupIDListStringArray.Length];
|
for (int i=0;i<LineupIDListStringArray.Length;i++)
|
{
|
int.TryParse(LineupIDListStringArray[i],out LineupIDList[i]);
|
}
|
}
|
|
int.TryParse(tables[7],out NPCLV);
|
|
float.TryParse(tables[8],out Difficulty);
|
|
long.TryParse(tables[9],out FightPower);
|
|
int.TryParse(tables[10],out SortOrder);
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|