xdh
2019-05-16 1f8b8b7ce9b0a375e3ff62bb209e4f52d054cc9d
6816 【后端】【2.0】仙宝寻主(法宝增加灵根)
2个文件已修改
28 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3463,7 +3463,7 @@
        raise Exception('玩家获得升级属性点异常, curLV = %s PlayerID = %s' % (curLV, curPlayerID))
        return
    
    return int(addPoint)
    return int(addPoint) + GetFabaoAddPoint(curPlayer)
def GetAllPointByLV(curPlayer):
    ##获取当前等级可得到属性点数
@@ -3473,17 +3473,24 @@
        return 0
    # 初始点+升级点+境界点
    setFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
    fabaoAddPoint = GetFabaoAddPoint(curPlayer)
    addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
    for rangLVs, point in addPointDict.items():
        if curLV < rangLVs[0]:
            continue
        setFreePoint += point * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
        setFreePoint += (point + fabaoAddPoint) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
    
    #境界提升点数
    setFreePoint += curPlayer.GetOfficialRank() * IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
    return setFreePoint
def GetFabaoAddPoint(curPlayer):
    #法宝额外增加玩家每级获得的灵根点
    mwID = IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 1)
    if not PlayerMagicWeapon.GetIsActiveMagicWeapon(curPlayer, mwID, lv=1):
        return 0
    return IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 2)
def DoAddPointOpen(curPlayer):
    '''加点功能开启'''
    beforeFreePoint = curPlayer.GetFreePoint()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -108,7 +108,20 @@
        else:
            sysMark = IpyGameDataPY.GetFuncEvalCfg('UnblockTreasure', 2, {}).get(mwID, 'UnblockTreasure')
            PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetName(), mwID])
        if mwID == IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 1):
            addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
            fabaoAddPoint = IpyGameDataPY.GetFuncCfg('FabaoAddPoint', 2)
            curLV = curPlayer.GetLV()
            addFreePoint = 0
            for rangLVs, point in addPointDict.items():
                if curLV < rangLVs[0]:
                    continue
                addFreePoint += fabaoAddPoint * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
            freePoint = curPlayer.GetFreePoint()
            updFreePoint = freePoint + addFreePoint
            curPlayer.SetFreePoint(updFreePoint)
            GameWorld.DebugLog("激活法宝增加自由属性点: freePoint=%s,addFreePoint=%s,curLV=%s,updFreePoint=%s"
                               % (freePoint, addFreePoint, curLV, updFreePoint))
    EventShell.EventRespons_MagicWeaponLV(curPlayer, mwID, mwLV)
    #通知客户端等级