From 36e7c8d580f3dc76bcc3c215c1a724aad572374f Mon Sep 17 00:00:00 2001 From: Mualamx Date: Mon, 27 Oct 2025 11:41:23 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E9=AB=98?= =?UTF-8?q?=E6=98=9F=E4=BD=9C=E7=89=A9=E7=9A=84=E6=94=B6=E8=8E=B7=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E4=B8=8D=E5=9C=A8=E5=8E=9F=E4=BD=9C=E7=89=A9=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/database/userSoil.py | 2 +- core/farm.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/database/userSoil.py b/core/database/userSoil.py index 32ab53d..05319b6 100644 --- a/core/database/userSoil.py +++ b/core/database/userSoil.py @@ -37,7 +37,7 @@ class CUserSoilDB(CSqlManager): Args: soilIndex (int): 地块索引 从1开始 """ - if not g_bIsDebug: + if g_bIsDebug: return soilInfo = await cls.getUserSoil(uid, soilIndex) diff --git a/core/farm.py b/core/farm.py index 1770fa9..019cca2 100644 --- a/core/farm.py +++ b/core/farm.py @@ -631,8 +631,15 @@ class CFarmManager: # 统计收获次数 try: + # 统一处理星级植物名称 + plant_name = soilInfo["plantName"] + + # 简单判断是否包含"星",如果包含则分割取后半部分 + if "星" in plant_name: + plant_name = plant_name.split("星", 1)[-1] + await g_pDBService.userPlantCount.addUserPlantCountByUid( - uid, soilInfo["plantName"] + uid, plant_name ) except Exception: # 忽略统计异常,避免影响主流程