From 01297d40ef07d9716fe0f957bea46f6c04a50ef5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 30 十二月 2025 10:35:05 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(修复未勾选心愿卡时免费次数不生效的bug;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 36 +++++++++++++++---------------------
1 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index 1ad87c8..c2e6cf7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -428,9 +428,9 @@
if wishPubFreeCntDict:
outTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishLibOut % (treasureType, libID))
freeCnt = wishPubFreeCntDict.get(libIDStr, 0)
- canFreeOut = freeCnt - outTotal
- if canFreeOut > 0:
- canFreeOutWishLibDict[libID] = canFreeOut
+ canFreeOutPub = freeCnt - outTotal
+ if canFreeOutPub > 0:
+ canFreeOutWishLibDict[libID] = canFreeOutPub
for wishIndex in range(selectCnt):
wishID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishSelect % (treasureType, libIDStr, wishIndex))
@@ -443,24 +443,17 @@
# 非心愿物品
continue
+ if libID not in selectWishIDDict:
+ selectWishIDDict[libID] = []
+ selectWishIDList = selectWishIDDict[libID]
+ selectWishIDList.append(wishID)
+
# 公共次数
if wishPubFreeCntDict:
- useWishItemState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishUseItem % (treasureType, libID))
- if not useWishItemState:
- # 未启用该库心愿视为未选择
- continue
- if libID not in selectWishIDDict:
- selectWishIDDict[libID] = []
- selectWishIDList = selectWishIDDict[libID]
- selectWishIDList.append(wishID)
-
+ pass
+
# 独立次数
else:
- if libID not in selectWishIDDict:
- selectWishIDDict[libID] = []
- selectWishIDList = selectWishIDDict[libID]
- selectWishIDList.append(wishID)
-
outCntLimit = libItemIpyData.GetWishOutCnt()
outCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureWishOut % (treasureType, wishID))
canFreeOut = outCntLimit - outCnt
@@ -469,7 +462,8 @@
canFreeOutWishIDict[wishID] = canFreeOut
if wishLibSelect:
- GameWorld.DebugLog("本次可优先产出的心愿库物品: %s, 免费次数:%s" % (selectWishIDDict, canFreeOutWishLibDict), playerID)
+ GameWorld.DebugLog("当前心愿库选择的心愿ID列表: %s" % selectWishIDDict, playerID)
+ GameWorld.DebugLog("还可优先产出的心愿免费次数:%s" % canFreeOutWishLibDict, playerID)
# 单抽产出优先级: 幸运物品 > 必出 > 保底 > 普通
# 连抽没有优先级限制,只要满足条件即可产出
@@ -525,7 +519,7 @@
gridNum = GameWorld.GetResultByRandomList(curRateList)
if gridNum in luckyGridNumList and gridNum in getGridResult:
- GameWorld.DebugLog(" 幸运物品已经出过,不再重复产出! gridNum=%s in %s" % (gridNum, getGridResult))
+ GameWorld.DebugLog(" 幸运物品已经出过,不再重复产出重新随机! gridNum=%s in %s" % (gridNum, getGridResult), playerID)
continue
# 心愿库物品,检查心愿预产出
@@ -535,7 +529,7 @@
wishLibID = gridLibInfoDict[gridNumStr]
if wishPubFreeCntDict:
# 公共心愿默认均可正常产出,只是处理是否优先产出心愿
- __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict, wishPubFreeCntDict,
+ __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict,
preOutWishDict, canFreeOutWishLibDict, wishPubCardDict, wishCardItemLibDict)
#else:
# # 非公共的暂不支持,后续有需要再处理
@@ -767,7 +761,7 @@
Sync_TreasureInfo(curPlayer, [treasureType])
return
-def __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict, wishPubFreeCntDict, preOutWishDict,
+def __prePubWishOut(curPlayer, treasureType, gridNum, wishLibID, selectWishIDDict, preOutWishDict,
canFreeOutWishLibDict, wishPubCardDict, wishCardItemLibDict):
## 公共心愿产出预处理
--
Gitblit v1.8.0