From f4bb83fc7902cf87ba43b918c87c1d96ee5dbc14 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 07 八月 2025 15:01:30 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/KnapSack/Logic/ItemLogicUtility.cs | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Main/System/KnapSack/Logic/ItemLogicUtility.cs b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
index dd5fd08..ed36659 100644
--- a/Main/System/KnapSack/Logic/ItemLogicUtility.cs
+++ b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -1392,18 +1392,19 @@
getItemEventName = "";
}
- public void UseItem(string guid, int useCnt = 1, int extra = 0)
+ public bool UseItem(string guid, int useCnt = 1, int extra = 0)
{
var item = packModel.GetItemByGuid(guid);
if (item == null)
{
- return;
+ return false;
}
var error = 0;
if (CanUseItem(guid, useCnt, out error))
{
UseItemSendServer(guid, useCnt, extra);
+ return true;
}
else
{
@@ -1421,6 +1422,7 @@
default:
break;
}
+ return false;
}
}
--
Gitblit v1.8.0