| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2026年3月5日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class TreasureSetConfig : ConfigBase<int, TreasureSetConfig>
|
| | | {
|
| | | static TreasureSetConfig()
|
| | | {
|
| | | // 访问过静态构造函数
|
| | | visit = true; |
| | | }
|
| | |
|
| | | public int TreasureType;
|
| | | public int PackType;
|
| | | public int[] CheckPackList;
|
| | | public int DailyMaxCount;
|
| | | public int DailyMaxCountMoney;
|
| | | public int DailyFreeCount;
|
| | | public int[] TreasureCountList;
|
| | | public int CostItemID;
|
| | |
| | | public int[] CostMoneyList;
|
| | | public int EnsureCount;
|
| | | public int OnceLucky;
|
| | | public int FullLucky;
|
| | | public int LuckyGridNum;
|
| | | public string GridNumMaxLimitInfo;
|
| | | public Dictionary<int, int> GridNumMaxLimitInfo;
|
| | | public int AwardMoneyType;
|
| | | public int AwardMoneyValue;
|
| | | public int WishOpen;
|
| | | public int WishReset;
|
| | | public Dictionary<int, int> WishLibSelect;
|
| | | public Dictionary<int, int> WishLibPubFreeCnt;
|
| | | public Dictionary<int, int> WishLibCard;
|
| | | public string ProbabilityDisplay;
|
| | |
|
| | | public override int LoadKey(string _key)
|
| | |
| | | string[] tables = input.Split('\t');
|
| | | int.TryParse(tables[0],out TreasureType);
|
| | |
|
| | | int.TryParse(tables[1],out PackType); |
| | |
|
| | | int.TryParse(tables[2],out DailyMaxCount); |
| | |
|
| | | int.TryParse(tables[3],out DailyFreeCount); |
| | |
|
| | | if (tables[4].Contains("[")) |
| | | if (tables[1].Contains("[")) |
| | | { |
| | | TreasureCountList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | CheckPackList = JsonMapper.ToObject<int[]>(tables[1]); |
| | | } |
| | | else |
| | | { |
| | | string[] TreasureCountListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] CheckPackListStringArray = tables[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | CheckPackList = new int[CheckPackListStringArray.Length]; |
| | | for (int i=0;i<CheckPackListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(CheckPackListStringArray[i],out CheckPackList[i]); |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[2],out DailyMaxCount); |
| | |
|
| | | int.TryParse(tables[3],out DailyMaxCountMoney); |
| | |
|
| | | int.TryParse(tables[4],out DailyFreeCount); |
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | TreasureCountList = JsonMapper.ToObject<int[]>(tables[5]); |
| | | } |
| | | else |
| | | { |
| | | string[] TreasureCountListStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | TreasureCountList = new int[TreasureCountListStringArray.Length]; |
| | | for (int i=0;i<TreasureCountListStringArray.Length;i++) |
| | | { |
| | |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[5],out CostItemID); |
| | | int.TryParse(tables[6],out CostItemID); |
| | |
|
| | | if (tables[6].Contains("[")) |
| | | if (tables[7].Contains("[")) |
| | | { |
| | | CostItemCountList = JsonMapper.ToObject<int[]>(tables[6]); |
| | | CostItemCountList = JsonMapper.ToObject<int[]>(tables[7]); |
| | | } |
| | | else |
| | | { |
| | | string[] CostItemCountListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] CostItemCountListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | CostItemCountList = new int[CostItemCountListStringArray.Length]; |
| | | for (int i=0;i<CostItemCountListStringArray.Length;i++) |
| | | { |
| | |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[7],out CostMoneyType); |
| | | int.TryParse(tables[8],out CostMoneyType); |
| | |
|
| | | if (tables[8].Contains("[")) |
| | | if (tables[9].Contains("[")) |
| | | { |
| | | CostMoneyList = JsonMapper.ToObject<int[]>(tables[8]); |
| | | CostMoneyList = JsonMapper.ToObject<int[]>(tables[9]); |
| | | } |
| | | else |
| | | { |
| | | string[] CostMoneyListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] CostMoneyListStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | CostMoneyList = new int[CostMoneyListStringArray.Length]; |
| | | for (int i=0;i<CostMoneyListStringArray.Length;i++) |
| | | { |
| | |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[9],out EnsureCount); |
| | | int.TryParse(tables[10],out EnsureCount); |
| | |
|
| | | int.TryParse(tables[10],out OnceLucky); |
| | |
|
| | | int.TryParse(tables[11],out FullLucky); |
| | | int.TryParse(tables[11],out OnceLucky); |
| | |
|
| | | int.TryParse(tables[12],out LuckyGridNum);
|
| | |
|
| | | GridNumMaxLimitInfo = tables[13];
|
| | | GridNumMaxLimitInfo = ConfigParse.ParseIntDict(tables[13]); |
| | |
|
| | | int.TryParse(tables[14],out AwardMoneyType);
|
| | |
|
| | | int.TryParse(tables[15],out AwardMoneyValue);
|
| | |
|
| | | ProbabilityDisplay = tables[16];
|
| | | int.TryParse(tables[16],out WishOpen); |
| | |
|
| | | int.TryParse(tables[17],out WishReset); |
| | |
|
| | | WishLibSelect = ConfigParse.ParseIntDict(tables[18]); |
| | |
|
| | | WishLibPubFreeCnt = ConfigParse.ParseIntDict(tables[19]); |
| | |
|
| | | WishLibCard = ConfigParse.ParseIntDict(tables[20]); |
| | |
|
| | | ProbabilityDisplay = tables[21];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|