//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: 2026年2月7日
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class SkillConfig : ConfigBase<int, SkillConfig>
|
{
|
static SkillConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int SkillID;
|
public int SkillTypeID;
|
public int SkillLV;
|
public int SkillMaxLV;
|
public string SkillName;
|
public string Description;
|
public int FuncType;
|
public int SkillType;
|
public int HurtType;
|
public int AtkType;
|
public int TagAim;
|
public int TagFriendly;
|
public int TagAffect;
|
public int TagCount;
|
public int HappenRate;
|
public int CoolDownTime;
|
public int[] BuffStateLimit;
|
public int BuffState;
|
public int FightPower;
|
public string IconName;
|
public string BuffIconName;
|
public string SkillTipsName;
|
public int Scattering;
|
public int ClientTriggerTiming;
|
|
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 SkillID);
|
|
int.TryParse(tables[1],out SkillTypeID);
|
|
int.TryParse(tables[2],out SkillLV);
|
|
int.TryParse(tables[3],out SkillMaxLV);
|
|
SkillName = tables[4];
|
|
Description = tables[5];
|
|
int.TryParse(tables[6],out FuncType);
|
|
int.TryParse(tables[7],out SkillType);
|
|
int.TryParse(tables[8],out HurtType);
|
|
int.TryParse(tables[9],out AtkType);
|
|
int.TryParse(tables[10],out TagAim);
|
|
int.TryParse(tables[11],out TagFriendly);
|
|
int.TryParse(tables[12],out TagAffect);
|
|
int.TryParse(tables[13],out TagCount);
|
|
int.TryParse(tables[14],out HappenRate);
|
|
int.TryParse(tables[15],out CoolDownTime);
|
|
if (tables[16].Contains("["))
|
{
|
BuffStateLimit = JsonMapper.ToObject<int[]>(tables[16]);
|
}
|
else
|
{
|
string[] BuffStateLimitStringArray = tables[16].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
BuffStateLimit = new int[BuffStateLimitStringArray.Length];
|
for (int i=0;i<BuffStateLimitStringArray.Length;i++)
|
{
|
int.TryParse(BuffStateLimitStringArray[i],out BuffStateLimit[i]);
|
}
|
}
|
|
int.TryParse(tables[17],out BuffState);
|
|
int.TryParse(tables[18],out FightPower);
|
|
IconName = tables[19];
|
|
BuffIconName = tables[20];
|
|
SkillTipsName = tables[21];
|
|
int.TryParse(tables[22],out Scattering);
|
|
int.TryParse(tables[23],out ClientTriggerTiming);
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|