mirror of
https://github.com/Shu-Ying/main_plugin_farm.git
synced 2026-10-28 13:10:02 +08:00
🐛 修复高星作物的收获次数不在原作物统计
This commit is contained in:
@@ -37,7 +37,7 @@ class CUserSoilDB(CSqlManager):
|
|||||||
Args:
|
Args:
|
||||||
soilIndex (int): 地块索引 从1开始
|
soilIndex (int): 地块索引 从1开始
|
||||||
"""
|
"""
|
||||||
if not g_bIsDebug:
|
if g_bIsDebug:
|
||||||
return
|
return
|
||||||
|
|
||||||
soilInfo = await cls.getUserSoil(uid, soilIndex)
|
soilInfo = await cls.getUserSoil(uid, soilIndex)
|
||||||
|
|||||||
+8
-1
@@ -631,8 +631,15 @@ class CFarmManager:
|
|||||||
|
|
||||||
# 统计收获次数
|
# 统计收获次数
|
||||||
try:
|
try:
|
||||||
|
# 统一处理星级植物名称
|
||||||
|
plant_name = soilInfo["plantName"]
|
||||||
|
|
||||||
|
# 简单判断是否包含"星",如果包含则分割取后半部分
|
||||||
|
if "星" in plant_name:
|
||||||
|
plant_name = plant_name.split("星", 1)[-1]
|
||||||
|
|
||||||
await g_pDBService.userPlantCount.addUserPlantCountByUid(
|
await g_pDBService.userPlantCount.addUserPlantCountByUid(
|
||||||
uid, soilInfo["plantName"]
|
uid, plant_name
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
# 忽略统计异常,避免影响主流程
|
# 忽略统计异常,避免影响主流程
|
||||||
|
|||||||
Reference in New Issue
Block a user