xdh
2019-01-05 80ae6dde9cfe57fbdea20f90508177df28c40065
5713 【后端】【1.4.100】我要天机每次改投最少增加一个天机
1个文件已修改
11 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,9 +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 str(result).count('6') == 0:
        result = GameWorld.ChangeDataByDigitPlace(result, 0, 6)
    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: