From 180eab3510f793ed008e9504976c3b3063f7ca6d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 18 十一月 2025 18:21:52 +0800
Subject: [PATCH] 110 【主界面】仙树升级-服务端(免费减时修改为充能减时;特权支持充能额外上限;广告奖励支持领取充能奖励;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 32 +++++++++++++++++++++++++++++---
1 files changed, 29 insertions(+), 3 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 1fca1bb..d2f2a7a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -78,6 +78,7 @@
ItemControler.RecycleItem(curPlayer, costItemID, recycleItemMail)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureFreeCount % (treasureType), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType), 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCountEx % (treasureType), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCountToday % (treasureType), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureLuck % (treasureType), 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCntAward % (treasureType), 0)
@@ -240,6 +241,18 @@
gridNumCountInfo[int(gridNumStr)] = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureGridCnt % (treasureType, gridNumStr))
GameWorld.DebugLog("gridNumMaxLimitInfo=%s,gridNumCountInfo=%s" % (gridNumMaxLimitInfo, gridNumCountInfo), playerID)
+ treasureCountEx = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCountEx % (treasureType)) # 当前第x次单抽、x抽
+ curIndexCount, maxIndexCount = 0, 0
+ beSureCountByIndexDict = {}
+ beSureCountByIndexList = ipyData.GetGridItemRateList4() # 第x次x抽必出,最多支持定制到9次
+ if beSureCountByIndexList and treasureIndex < len(beSureCountByIndexList):
+ beSureCountByIndexDict = beSureCountByIndexList[treasureIndex]
+ maxIndexCount = min(9, max(beSureCountByIndexDict))
+ curIndexCount = GameWorld.GetDataByDigitPlace(treasureCountEx, treasureIndex) + 1
+ beSureCountByIndexCfg = []
+ if curIndexCount <= maxIndexCount and curIndexCount in beSureCountByIndexDict:
+ beSureCountByIndexCfg = beSureCountByIndexDict[curIndexCount]
+
# 单抽产出优先级: 幸运物品 > 必出 > 保底 > 普通
# 连抽没有优先级限制,只要满足条件即可产出
getGridResult = []
@@ -260,8 +273,17 @@
curRateList = [] # 可能会改变饼图,每次抽奖使用新的饼图对象,不要改变配置的饼图概率
+ # 第x次x抽必出,优先级最高,无视其他
+ if not curRateList and beSureCountByIndexCfg:
+ if tIndex == 0:
+ curRateList = [[10000, beSureCountByIndexCfg[0]]]
+ else:
+ curRateList = beSureCountByIndexCfg[1]
+ GameWorld.DebugLog(" 【第x次x抽必出】: treasureIndex=%s,curIndexCount=%s,%s"
+ % (treasureIndex, curIndexCount, curRateList), playerID)
+
# 满幸运必出
- if stageLuck and updLuck >= stageLuck and luckItemRateList:
+ if not curRateList and stageLuck and updLuck >= stageLuck and luckItemRateList:
curRateList = GetRemoveLimitGridRateList(luckItemRateList, gridNumCountInfo, gridNumMaxLimitInfo)
GameWorld.DebugLog(" 【满幸运必出饼图】: %s" % curRateList, playerID)
@@ -388,6 +410,10 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureLuck % (treasureType), updLuck)
for gridNum, updCount in gridNumCountInfo.items():
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureGridCnt % (treasureType, gridNum), updCount)
+ if curIndexCount <= maxIndexCount:
+ treasureCountEx = GameWorld.ChangeDataByDigitPlace(treasureCountEx, treasureIndex, curIndexCount)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCountEx % (treasureType), treasureCountEx)
+ GameWorld.DebugLog("更新第x次x抽次数: treasureIndex=%s,curIndexCount=%s,maxIndexCount=%s,treasureCountEx=%s" % (treasureIndex, curIndexCount, maxIndexCount, treasureCountEx))
addScoreType = setIpyData.GetAwardMoneyType() # 额外奖励货币类型
addScore = setIpyData.GetAwardMoneyValue() # 单次奖励货币数
@@ -436,8 +462,8 @@
if mailItemList:
PlayerControl.SendMailByKey("HappyXBUnEnough", [playerID], mailItemList)
- GameWorld.DebugLog("寻宝成功: treasureType=%s,updTreasureCount=%s(%s),updLuck=%s,addScoreType=%s,addScore=%s,gridNumCountInfo=%s"
- % (treasureType, updTreasureCount, updTreasureCountToday, updLuck, addScoreType, addScore, gridNumCountInfo), playerID)
+ GameWorld.DebugLog("寻宝成功: treasureType=%s,updTreasureCount=%s(%s),updLuck=%s,addScoreType=%s,addScore=%s,gridNumCountInfo=%s,treasureCountEx=%s"
+ % (treasureType, updTreasureCount, updTreasureCountToday, updLuck, addScoreType, addScore, gridNumCountInfo, treasureCountEx), playerID)
GameWorld.DebugLog(" treasureResult=%s" % (treasureResult), playerID)
GameWorld.DebugLog(" mailItemList=%s" % (mailItemList), playerID)
--
Gitblit v1.8.0