xdh
2019-06-11 b795c5a06e99e22d74e078e033254b01455194b1
7200 【开发】宗门试炼修改为正常的最终通关时间决定品级
1个文件已修改
107 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MunekadoTrial.py
@@ -651,60 +651,63 @@
## 更新当前副本星级
def __UpdZMSLFBStar(tick, isEnter=False, curPlayer=None):
    #1-D 2-C 3-B 4-A 5-S
    gameFB = GameWorld.GetGameFB()
    curStar = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_Grade)
    if curStar == 1:
        return curStar
    stepStartTick = gameFB.GetGameFBDictByKey(ZMSL_FBStepStartTick)
    if not stepStartTick:
        return curStar
    useSecond = int(math.ceil((tick - stepStartTick) / 1000.0))
    lineID = FBCommon.GetFBPropertyMark()
    starTimeList = IpyGameDataPY.GetFuncEvalCfg('MunekadoTrialStarTime').get(lineID,[])
    wheelNum = gameFB.GetGameFBDictByKey(ZMSL_FBNextRefreshStep)
    if wheelNum > len(starTimeList):
        GameWorld.DebugLog("    MunekadoTrialStarTime 配置错误 与波数不等")
    FBCommon.UpdateFBGrade(tick, FBCommon.GetFBLineGrade(GameWorld.GetGameWorld().GetMapID(), lineID))
        return
    stepStar = gameFB.GetGameFBDictByKey(ZMSL_FBStepStar)
    starTimeInfo = starTimeList[wheelNum-1]
    updStar = stepStar if stepStar else 5
    totalStarTime = 0
    for starTime in starTimeInfo:
        if updStar == 1:
            break
        totalStarTime +=starTime
        if useSecond >= totalStarTime:
            updStar = max(1, updStar-1)
        else:
            break
    diffSecond =max(0, totalStarTime -useSecond)
    if curStar == updStar and not isEnter:
        return curStar
    gameFB.SetGameFBDict(ChConfig.Def_FB_Grade, updStar)
    GameWorld.DebugLog("__UpdFBStar useSecond=%s,curStar=%s,updStar=%s, diffSecond=%s"
                       % (useSecond, curStar, updStar, diffSecond))
    if curPlayer:
        DoFBHelp(curPlayer, tick)
        if updStar != 1:
            curPlayer.Sync_TimeTick(IPY_GameWorld.tttFlagTake, 0, diffSecond * 1000, True)
    else:
        playerManager = GameWorld.GetMapCopyPlayerManager()
        for index in xrange(playerManager.GetPlayerCount()):
            curPlayer = playerManager.GetPlayerByIndex(index)
            if not curPlayer:
                continue
            DoFBHelp(curPlayer, tick)
            if updStar != 1:
                curPlayer.Sync_TimeTick(IPY_GameWorld.tttFlagTake, 0, diffSecond * 1000, True)
    return updStar
    #1-D 2-C 3-B 4-A 5-S
#    gameFB = GameWorld.GetGameFB()
#    curStar = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_Grade)
#    if curStar == 1:
#        return curStar
#    stepStartTick = gameFB.GetGameFBDictByKey(ZMSL_FBStepStartTick)
#    if not stepStartTick:
#        return curStar
#    useSecond = int(math.ceil((tick - stepStartTick) / 1000.0))
#    lineID = FBCommon.GetFBPropertyMark()
#    starTimeList = IpyGameDataPY.GetFuncEvalCfg('MunekadoTrialStarTime').get(lineID,[])
#    wheelNum = gameFB.GetGameFBDictByKey(ZMSL_FBNextRefreshStep)
#    if wheelNum > len(starTimeList):
#        GameWorld.DebugLog("    MunekadoTrialStarTime 配置错误 与波数不等")
#        return
#    stepStar = gameFB.GetGameFBDictByKey(ZMSL_FBStepStar)
#    starTimeInfo = starTimeList[wheelNum-1]
#    updStar = stepStar if stepStar else 5
#    totalStarTime = 0
#    for starTime in starTimeInfo:
#        if updStar == 1:
#            break
#        totalStarTime +=starTime
#        if useSecond >= totalStarTime:
#            updStar = max(1, updStar-1)
#        else:
#            break
#
#    diffSecond =max(0, totalStarTime -useSecond)
#
#    if curStar == updStar and not isEnter:
#        return curStar
#
#    gameFB.SetGameFBDict(ChConfig.Def_FB_Grade, updStar)
#
#    GameWorld.DebugLog("__UpdFBStar useSecond=%s,curStar=%s,updStar=%s, diffSecond=%s"
#                       % (useSecond, curStar, updStar, diffSecond))
#
#    if curPlayer:
#        DoFBHelp(curPlayer, tick)
#        if updStar != 1:
#            curPlayer.Sync_TimeTick(IPY_GameWorld.tttFlagTake, 0, diffSecond * 1000, True)
#    else:
#        playerManager = GameWorld.GetMapCopyPlayerManager()
#        for index in xrange(playerManager.GetPlayerCount()):
#            curPlayer = playerManager.GetPlayerByIndex(index)
#            if not curPlayer:
#                continue
#            DoFBHelp(curPlayer, tick)
#            if updStar != 1:
#                curPlayer.Sync_TimeTick(IPY_GameWorld.tttFlagTake, 0, diffSecond * 1000, True)
#
#
#    return updStar
##副本帮助信息
# @param curPlayer 玩家实例