From e2e187e1ec82f4fe2979883318fc59278c05bca3 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 26 二月 2026 19:55:15 +0800
Subject: [PATCH] 492 武将登场-客户端 废弃寻宝设定表PackType字段,适配CheckPackList字段
---
Main/System/HappyXB/HappyXBModel.cs | 18 +++++++++++++++---
Main/Config/Configs/TreasureSetConfig.cs | 18 +++++++++++++++---
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/Main/Config/Configs/TreasureSetConfig.cs b/Main/Config/Configs/TreasureSetConfig.cs
index 3e187a5..0eef7c7 100644
--- a/Main/Config/Configs/TreasureSetConfig.cs
+++ b/Main/Config/Configs/TreasureSetConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: YYL
-// [ Date ]: Monday, December 29, 2025
+// [ Date ]: 2026骞�2鏈�26鏃�
//--------------------------------------------------------
using System.Collections.Generic;
@@ -17,7 +17,7 @@
}
public int TreasureType;
- public int PackType;
+ public int[] CheckPackList;
public int DailyMaxCount;
public int DailyFreeCount;
public int[] TreasureCountList;
@@ -50,7 +50,19 @@
string[] tables = input.Split('\t');
int.TryParse(tables[0],out TreasureType);
- int.TryParse(tables[1],out PackType);
+ if (tables[1].Contains("["))
+ {
+ CheckPackList = JsonMapper.ToObject<int[]>(tables[1]);
+ }
+ else
+ {
+ 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);
diff --git a/Main/System/HappyXB/HappyXBModel.cs b/Main/System/HappyXB/HappyXBModel.cs
index 6f63a4f..2b769ec 100644
--- a/Main/System/HappyXB/HappyXBModel.cs
+++ b/Main/System/HappyXB/HappyXBModel.cs
@@ -331,7 +331,19 @@
}
}
-
+ public bool CheckIsEmptyGrid(int[] checkPackList, int needGrid = 1)
+ {
+ if (checkPackList.IsNullOrEmpty())
+ return true;
+ for (int i = 0; i < checkPackList.Length; i++)
+ {
+ if (!CheckIsEmptyGrid((PackType)checkPackList[i], needGrid))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
public bool CheckIsEmptyGrid(PackType type, int needGrid = 1)
{
@@ -374,7 +386,7 @@
}
var funcSet = TreasureSetConfig.Get(xbType);
- if (CheckIsEmptyGrid((PackType)config.PackType))
+ if (CheckIsEmptyGrid(config.CheckPackList))
{
//閬撳叿瀵诲疂
if (funcSet.CostItemID != 0 && IsHaveOneXBTool(xbType))
@@ -429,7 +441,7 @@
}
var funcSet = TreasureSetConfig.Get(xbType);
- if (CheckIsEmptyGrid((PackType)config.PackType, 10))
+ if (CheckIsEmptyGrid(config.CheckPackList, 10))
{
int toolCnt = 0;
int needToolCnt = 0;
--
Gitblit v1.8.0