From 54257275bdaa30fb8d38da4144050511825d0d84 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 16 五月 2019 11:01:45 +0800 Subject: [PATCH] 3583 3524 【BUG】【2.0】妖王副本没有boss(进入副本如果boss已经被击杀则弹出结算界面) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 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..e53692f 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDiceEx.py @@ -13,7 +13,8 @@ # # 详细描述: 我要太极 #--------------------------------------------------------------------- -"""Version = 2016-09-26 20:00""" +#"""Version = 2016-09-26 20:00""" +#--------------------------------------------------------------------- import GameWorld import IPY_GameWorld @@ -25,6 +26,7 @@ import ChConfig import IpyGameDataPY import PlayerActivity +import PlayerSuccess import ItemCommon @@ -70,6 +72,7 @@ return if not __DoDicelogic(curPlayer): return + PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_Dice, 1) elif diceType == 1: if not diceResult: @@ -99,6 +102,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 +113,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: @@ -131,7 +143,7 @@ PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371") return # 给物品 - ItemControler.GivePlayerItem(curPlayer, itemInfo[0], itemInfo[1], 1, [IPY_GameWorld.rptItem], + ItemControler.GivePlayerItem(curPlayer, itemInfo[0], itemInfo[1], 0, [IPY_GameWorld.rptItem], event=[ChConfig.ItemGive_DiceEx, False, {}]) reExp = PlayerControl.GetPlayerReExp(curPlayer) exp = eval(prizeInfo.get("exp", '0')) -- Gitblit v1.8.0