//--------------------------------------------------------  
 | 
//    [Author]:           YYL  
 | 
//    [  Date ]:           2025年8月5日  
 | 
//--------------------------------------------------------  
 | 
  
 | 
using System.Collections.Generic;  
 | 
using System;  
 | 
using UnityEngine;  
 | 
using LitJson;  
 | 
  
 | 
public partial class DienstgradConfig : ConfigBase<int, DienstgradConfig>  
 | 
{  
 | 
    static DienstgradConfig()  
 | 
    {  
 | 
        // 访问过静态构造函数  
 | 
        visit = true;   
 | 
    }  
 | 
  
 | 
    public int ID;  
 | 
    public string Name;  
 | 
    public int Type;  
 | 
    public int Prescription;  
 | 
    public string OutTimeDesc;  
 | 
    public int[] LightType;  
 | 
    public int[] LightAttribute;  
 | 
    public string Image;  
 | 
    public string Content;  
 | 
    public int[] Skills;  
 | 
    public int gotoId;  
 | 
    public int missionId;  
 | 
    public int order;  
 | 
  
 | 
    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);   
 | 
  
 | 
            Name = tables[1];  
 | 
  
 | 
            int.TryParse(tables[2],out Type);   
 | 
  
 | 
            int.TryParse(tables[3],out Prescription);   
 | 
  
 | 
            OutTimeDesc = tables[4];  
 | 
  
 | 
            if (tables[5].Contains("[")) 
 | 
            { 
 | 
                LightType = JsonMapper.ToObject<int[]>(tables[5]); 
 | 
            } 
 | 
            else 
 | 
            { 
 | 
                string[] LightTypeStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); 
 | 
                LightType = new int[LightTypeStringArray.Length]; 
 | 
                for (int i=0;i<LightTypeStringArray.Length;i++) 
 | 
                { 
 | 
                     int.TryParse(LightTypeStringArray[i],out LightType[i]); 
 | 
                } 
 | 
            }  
 | 
  
 | 
            if (tables[6].Contains("[")) 
 | 
            { 
 | 
                LightAttribute = JsonMapper.ToObject<int[]>(tables[6]); 
 | 
            } 
 | 
            else 
 | 
            { 
 | 
                string[] LightAttributeStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); 
 | 
                LightAttribute = new int[LightAttributeStringArray.Length]; 
 | 
                for (int i=0;i<LightAttributeStringArray.Length;i++) 
 | 
                { 
 | 
                     int.TryParse(LightAttributeStringArray[i],out LightAttribute[i]); 
 | 
                } 
 | 
            }  
 | 
  
 | 
            Image = tables[7];  
 | 
  
 | 
            Content = tables[8];  
 | 
  
 | 
            if (tables[9].Contains("[")) 
 | 
            { 
 | 
                Skills = JsonMapper.ToObject<int[]>(tables[9]); 
 | 
            } 
 | 
            else 
 | 
            { 
 | 
                string[] SkillsStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); 
 | 
                Skills = new int[SkillsStringArray.Length]; 
 | 
                for (int i=0;i<SkillsStringArray.Length;i++) 
 | 
                { 
 | 
                     int.TryParse(SkillsStringArray[i],out Skills[i]); 
 | 
                } 
 | 
            }  
 | 
  
 | 
            int.TryParse(tables[10],out gotoId);   
 | 
  
 | 
            int.TryParse(tables[11],out missionId);   
 | 
  
 | 
            int.TryParse(tables[12],out order);   
 | 
        }  
 | 
        catch (Exception exception)  
 | 
        {  
 | 
            Debug.LogError(exception);  
 | 
        }  
 | 
    }  
 | 
}  
 |