From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Config/Configs/StoreConfig.cs | 211 ++++++++++++++++++----------------------------------
1 files changed, 74 insertions(+), 137 deletions(-)
diff --git a/Main/Config/Configs/StoreConfig.cs b/Main/Config/Configs/StoreConfig.cs
index a56dd90..26eb7c6 100644
--- a/Main/Config/Configs/StoreConfig.cs
+++ b/Main/Config/Configs/StoreConfig.cs
@@ -1,137 +1,74 @@
-锘�//--------------------------------------------------------
-// [Author]: YYL
-// [ Date ]: Friday, June 27, 2025
-//--------------------------------------------------------
-
-using System.Collections.Generic;
-using System.IO;
-using System.Threading;
-using System;
-using UnityEngine;
-using LitJson;
-
-public partial class StoreConfig : ConfigBase<int, StoreConfig>
-{
-
- public int ID;
- public int ShopType;
- public int[] SecondType;
- public int ShopSort;
- public int ItemID;
- public int ItemCnt;
- public int IsBind;
- public string ItemListEx;
- public int MainItemID;
- public string JobItem;
- public int RefreshType;
- public int[] VIPLV;
- public int LV;
- public int LVSee;
- public int[] GoumaiNumber;
- public int MoneyType;
- public int MoneyNumber;
- public int MoneyOriginal;
- public int LimitValue;
- public string SalesStatus;
- public int TheOnlyShop;
- public int RemindSuccess;
- public int IsHideSellOut;
-
- 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 ShopType);
-
- if (tables[2].Contains("["))
- {
- SecondType = JsonMapper.ToObject<int[]>(tables[2]);
- }
- else
- {
- string[] SecondTypeStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
- SecondType = new int[SecondTypeStringArray.Length];
- for (int i=0;i<SecondTypeStringArray.Length;i++)
- {
- int.TryParse(SecondTypeStringArray[i],out SecondType[i]);
- }
- }
-
- int.TryParse(tables[3],out ShopSort);
-
- int.TryParse(tables[4],out ItemID);
-
- int.TryParse(tables[5],out ItemCnt);
-
- int.TryParse(tables[6],out IsBind);
-
- ItemListEx = tables[7];
-
- int.TryParse(tables[8],out MainItemID);
-
- JobItem = tables[9];
-
- int.TryParse(tables[10],out RefreshType);
-
- if (tables[11].Contains("["))
- {
- VIPLV = JsonMapper.ToObject<int[]>(tables[11]);
- }
- else
- {
- string[] VIPLVStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
- VIPLV = new int[VIPLVStringArray.Length];
- for (int i=0;i<VIPLVStringArray.Length;i++)
- {
- int.TryParse(VIPLVStringArray[i],out VIPLV[i]);
- }
- }
-
- int.TryParse(tables[12],out LV);
-
- int.TryParse(tables[13],out LVSee);
-
- if (tables[14].Contains("["))
- {
- GoumaiNumber = JsonMapper.ToObject<int[]>(tables[14]);
- }
- else
- {
- string[] GoumaiNumberStringArray = tables[14].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
- GoumaiNumber = new int[GoumaiNumberStringArray.Length];
- for (int i=0;i<GoumaiNumberStringArray.Length;i++)
- {
- int.TryParse(GoumaiNumberStringArray[i],out GoumaiNumber[i]);
- }
- }
-
- int.TryParse(tables[15],out MoneyType);
-
- int.TryParse(tables[16],out MoneyNumber);
-
- int.TryParse(tables[17],out MoneyOriginal);
-
- int.TryParse(tables[18],out LimitValue);
-
- SalesStatus = tables[19];
-
- int.TryParse(tables[20],out TheOnlyShop);
-
- int.TryParse(tables[21],out RemindSuccess);
-
- int.TryParse(tables[22],out IsHideSellOut);
- }
- catch (Exception exception)
- {
- Debug.LogError(exception);
- }
- }
-}
+锘�//--------------------------------------------------------
+// [Author]: YYL
+// [ Date ]: 2025骞�10鏈�28鏃�
+//--------------------------------------------------------
+
+using System.Collections.Generic;
+using System;
+using UnityEngine;
+using LitJson;
+
+public partial class StoreConfig : ConfigBase<int, StoreConfig>
+{
+ static StoreConfig()
+ {
+ // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
+ visit = true;
+ }
+
+ public int ID;
+ public int ShopType;
+ public int ShopSort;
+ public int ItemID;
+ public int ItemCnt;
+ public int[][] ItemListEx;
+ public int ResetType;
+ public int LimitCnt;
+ public int MoneyType;
+ public int MoneyNum;
+ public int MoneyOriginal;
+ public int UnlockType;
+ public int UnlockValue;
+
+ 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 ShopType);
+
+ int.TryParse(tables[2],out ShopSort);
+
+ int.TryParse(tables[3],out ItemID);
+
+ int.TryParse(tables[4],out ItemCnt);
+
+ ItemListEx = JsonMapper.ToObject<int[][]>(tables[5].Replace("(", "[").Replace(")", "]"));
+
+ int.TryParse(tables[6],out ResetType);
+
+ int.TryParse(tables[7],out LimitCnt);
+
+ int.TryParse(tables[8],out MoneyType);
+
+ int.TryParse(tables[9],out MoneyNum);
+
+ int.TryParse(tables[10],out MoneyOriginal);
+
+ int.TryParse(tables[11],out UnlockType);
+
+ int.TryParse(tables[12],out UnlockValue);
+ }
+ catch (Exception exception)
+ {
+ Debug.LogError(exception);
+ }
+ }
+}
--
Gitblit v1.8.0