| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年5月19日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class SuccessConfig : ConfigBase<int, SuccessConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int Type; |
| | | public int Group; |
| | | public int NeedCnt; |
| | | public int[] Condition; |
| | | public string Condition2; |
| | | public int Condition3; |
| | | public string AwardItemList; |
| | | public string AwardItemList2; |
| | | public string Money; |
| | | public int Exp; |
| | | public int[] AwardAttribute; |
| | | public int RedPacketID; |
| | | public int MagicWeaponID; |
| | | public string MagicWeaponExp; |
| | | public string Describe; |
| | | public int NeedGoto; |
| | | public int Jump; |
| | | public int ReOrder; |
| | | public int RealmPracticeID; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out ID); |
| | | |
| | | int.TryParse(tables[1],out Type); |
| | | |
| | | int.TryParse(tables[2],out Group); |
| | | |
| | | int.TryParse(tables[3],out NeedCnt); |
| | | |
| | | if (tables[4].Contains("[")) |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年11月6日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class SuccessConfig : ConfigBase<int, SuccessConfig>
|
| | | {
|
| | | static SuccessConfig()
|
| | | {
|
| | | // 访问过静态构造函数
|
| | | visit = true; |
| | | }
|
| | |
|
| | | public int ID;
|
| | | public int Type;
|
| | | public int NeedCnt;
|
| | | public int[] Condition;
|
| | | public int[][] AwardItemList;
|
| | |
|
| | | 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 Type); |
| | |
|
| | | int.TryParse(tables[2],out NeedCnt); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | Condition = JsonMapper.ToObject<int[]>(tables[4]); |
| | | Condition = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] ConditionStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | 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]); |
| | | } |
| | | } |
| | | |
| | | Condition2 = tables[5]; |
| | | |
| | | int.TryParse(tables[6],out Condition3); |
| | | |
| | | AwardItemList = tables[7]; |
| | | |
| | | AwardItemList2 = tables[8]; |
| | | |
| | | Money = tables[9]; |
| | | |
| | | int.TryParse(tables[10],out Exp); |
| | | |
| | | if (tables[11].Contains("[")) |
| | | { |
| | | AwardAttribute = JsonMapper.ToObject<int[]>(tables[11]); |
| | | } |
| | | else |
| | | { |
| | | string[] AwardAttributeStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AwardAttribute = new int[AwardAttributeStringArray.Length]; |
| | | for (int i=0;i<AwardAttributeStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AwardAttributeStringArray[i],out AwardAttribute[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[12],out RedPacketID); |
| | | |
| | | int.TryParse(tables[13],out MagicWeaponID); |
| | | |
| | | MagicWeaponExp = tables[14]; |
| | | |
| | | Describe = tables[15]; |
| | | |
| | | int.TryParse(tables[16],out NeedGoto); |
| | | |
| | | int.TryParse(tables[17],out Jump); |
| | | |
| | | int.TryParse(tables[18],out ReOrder); |
| | | |
| | | int.TryParse(tables[19],out RealmPracticeID); |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | AwardItemList = JsonMapper.ToObject<int[][]>(tables[4].Replace("(", "[").Replace(")", "]")); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|