From 1cbfc536951a446b6eb6a02ae6abde333c69dc1a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 31 十月 2025 19:30:29 +0800
Subject: [PATCH] 0312 修复商店中购买武将的拥有数量(主体不算-1);公会大厅入口

---
 Main/System/Store/BuyItemWin.cs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Main/System/Store/BuyItemWin.cs b/Main/System/Store/BuyItemWin.cs
index c4c99b9..ad0a322 100644
--- a/Main/System/Store/BuyItemWin.cs
+++ b/Main/System/Store/BuyItemWin.cs
@@ -103,6 +103,12 @@
             return UIHelper.GetMoneyCnt(config.EffectValueB1);
         }
 
-        return PackManager.Instance.GetItemCountByID(PackType.Item, id);
+        var count = PackManager.Instance.GetItemCountByID(GeneralDefine.GetPackTypeByItemType(config.Type), id);
+        if (config.Type == 150)
+        {
+            count = Math.Max(0, count - 1);
+        }
+        
+        return count;
     }
 }

--
Gitblit v1.8.0