From a82c6b75220814b4e498f536754a61d6b28d6de3 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 17 一月 2019 20:58:15 +0800 Subject: [PATCH] 2899 【1.4.100】【1.5】跨服竞技积分超过65535报错 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py index ace558c..ea7febe 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py @@ -99,6 +99,8 @@ diceRandomDict = IpyGameDataPY.GetFuncEvalCfg('DiceRandomList') diceRandomList = diceRandomDict.get(str(result).count('6'), []) + hasAdd = False #是否有增加6的数量 + changeIndex = -1 #非6的索引 for i in range(6): if isChange and GameWorld.GetDataByDigitPlace(result, i) == 6: continue @@ -108,7 +110,14 @@ GameWorld.ErrLog(" 摇骰子没有随机到结果 DiceRandomList异常!") return result = GameWorld.ChangeDataByDigitPlace(result, i, resultNum) + if resultNum == 6: + hasAdd = True + elif changeIndex == -1: + changeIndex = i + #GameWorld.DebugLog(" 摇骰子结果 resultNum=%s, result=%s" % (resultNum, result)) + if isChange and not hasAdd and changeIndex >=0: + result = GameWorld.ChangeDataByDigitPlace(result, changeIndex, 6) GameWorld.DebugLog(" 摇骰子结果 result=%s,isChange=%s" % (result, isChange)) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Dice_Result, result) if result == 666666: -- Gitblit v1.8.0