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: # 忽略统计异常,避免影响主流程