xdh
2019-06-20 345583c976863943932363dde9ff4aab01f41e94
7446 【后端】灵根称号修改为每级增加多少点
3个文件已修改
30 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3451,8 +3451,7 @@
    if addPoint == None:
        raise Exception('玩家获得升级属性点异常, curLV = %s PlayerID = %s' % (curLV, curPlayerID))
        return
    multiple = GetLVAddPointMultiple(curPlayer)
    return int(addPoint+ GetFabaoAddPoint(curPlayer)) * multiple
    return int(addPoint+ GetFabaoAddPoint(curPlayer) + GetTitleAddExtraPoint(curPlayer))
def GetAllPointByLV(curPlayer):
    ##获取当前等级可得到属性点数
@@ -3463,24 +3462,23 @@
    # 初始点+(升级点+法宝效果)*称号效果倍数+境界点
    setFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
    fabaoAddPoint = GetFabaoAddPoint(curPlayer)
    multiple = GetLVAddPointMultiple(curPlayer)
    titleAddPoint = GetTitleAddExtraPoint(curPlayer)
    addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
    for rangLVs, point in addPointDict.items():
        if curLV < rangLVs[0]:
            continue
        setFreePoint += (point + fabaoAddPoint) * multiple * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
        setFreePoint += (point + fabaoAddPoint + titleAddPoint) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
    
    #境界提升点数
    setFreePoint += curPlayer.GetOfficialRank() * IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
    return setFreePoint
def GetLVAddPointMultiple(curPlayer):
    # 获取等级加点的倍数
    multiple = 1
def GetTitleAddExtraPoint(curPlayer):
    # 称号额外增加玩家每级获得的灵根点
    titleID = IpyGameDataPY.GetFuncCfg("TitleAddPoint")
    if titleID and curPlayer.GetDienstgradManager().GetDienstgrad(titleID):
        multiple = IpyGameDataPY.GetFuncCfg("TitleAddPoint", 2) or 1
    return multiple
        return IpyGameDataPY.GetFuncCfg("TitleAddPoint", 2)
    return 0
def GetFabaoAddPoint(curPlayer):
    #法宝额外增加玩家每级获得的灵根点
@@ -4043,7 +4041,8 @@
            if aftLV > befLV:
                curPlayer.SetLV(aftLV, False) # 这里不再通知GameServer
                PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_HeroLV, aftLV)
                PlayerActivity.DoAddActivity(curPlayer, (aftLV - befLV)*IpyGameDataPY.GetFuncCfg('ImmortalDomainActivePoint',3))
                PlayerActivity.DoAddActivityByLV(curPlayer, befLV, aftLV)
            if aftFreePoint > befFreePoint:
                curPlayer.SetFreePoint(aftFreePoint)
                #NotifyCode(curPlayer, "ObtainAttributeDot", [aftFreePoint - befFreePoint])
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py
@@ -150,14 +150,15 @@
        # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
        return
    addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
    fabaoAddPoint = PlayerControl.GetFabaoAddPoint(curPlayer)
    multiple = PlayerControl.GetLVAddPointMultiple(curPlayer)
    titleAddPoint = PlayerControl.GetTitleAddExtraPoint(curPlayer)
    if titleAddPoint <=0:
        return
    curLV = curPlayer.GetLV()
    addFreePoint = 0
    for rangLVs, point in addPointDict.items():
        if curLV < rangLVs[0]:
            continue
        addFreePoint += (fabaoAddPoint + point) * (multiple-1) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
        addFreePoint += titleAddPoint * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
    freePoint = curPlayer.GetFreePoint()
    updFreePoint = freePoint + addFreePoint
    curPlayer.SetFreePoint(updFreePoint)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -149,13 +149,13 @@
        return
    addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
    fabaoAddPoint = PlayerControl.GetFabaoAddPoint(curPlayer)
    multiple = PlayerControl.GetLVAddPointMultiple(curPlayer)
    curLV = curPlayer.GetLV()
    addFreePoint = 0
    for rangLVs, point in addPointDict.items():
        if curLV < rangLVs[0]:
            continue
        addFreePoint += fabaoAddPoint * multiple * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
        addFreePoint += fabaoAddPoint * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
    freePoint = curPlayer.GetFreePoint()
    updFreePoint = freePoint + addFreePoint
    curPlayer.SetFreePoint(updFreePoint)