From 1cc18bb1950f96281ccc2d9f229874eca1d7b061 Mon Sep 17 00:00:00 2001 From: molanp <104612722+molanp@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:01:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(shop):=20=E4=BF=AE=E6=94=B9=E9=81=93?= =?UTF-8?q?=E5=85=B7=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=97=B6=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF=20(#2061)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将道具不存在时的提示信息从具体的道具名称改为通用提示,避免暴露内部实现细节, 提升用户体验和安全性。 - resolve Bug: 使用道具功能优化 Fixes #2060 --- zhenxun/builtin_plugins/shop/_data_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zhenxun/builtin_plugins/shop/_data_source.py b/zhenxun/builtin_plugins/shop/_data_source.py index e0ee984a..e6a0a076 100644 --- a/zhenxun/builtin_plugins/shop/_data_source.py +++ b/zhenxun/builtin_plugins/shop/_data_source.py @@ -367,7 +367,7 @@ class ShopManage: else: goods_info = await GoodsInfo.get_or_none(goods_name=goods_name) if not goods_info: - return f"{goods_name} 不存在..." + return "对应的道具不存在..." if goods_info.is_passive: return f"{goods_info.goods_name} 是被动道具, 无法使用..." goods = cls.uuid2goods.get(goods_info.uuid)