xdh
2018-11-27 b004dbe723a7d7cc426adfba25ab5df3c6fa7a36
2467 【BUG】【1.3】封魔坛次数购买可超过上限BUG
1个文件已修改
9 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1694,7 +1694,12 @@
    canBuyCnt = PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID)
    
    hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_BuyFbCntDay % mapID)
    maxDayTimes = ipyData.GetDayTimes()
    maxCnt = GetEnterFBMaxCnt(curPlayer, mapID)
    enterCnt = GetEnterFBCount(curPlayer, mapID)
    if maxDayTimes and maxCnt - enterCnt >= maxDayTimes:
        GameWorld.DebugLog('当前次数已满,无需购买。。')
        return
    if hasBuyCnt >= canBuyCnt:
        GameWorld.DebugLog("购买次数已经用完mapID=%s"%mapID)
        return
@@ -1716,9 +1721,7 @@
    PlayerControl.NotifyCode(curPlayer, 'FBEnterTimeBuy', [mapID])
    lastRegainTime= curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainStartTime % mapID)
    if lastRegainTime:
        maxDayTimes = ipyData.GetDayTimes()
        maxCnt = GetEnterFBMaxCnt(curPlayer, mapID)
        enterCnt = GetEnterFBCount(curPlayer, mapID)
        if maxCnt - enterCnt == maxDayTimes:
            curTime = int(time.time())
            needTime = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainTotalTime % mapID)