From 1f8b8b7ce9b0a375e3ff62bb209e4f52d054cc9d Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 16 五月 2019 20:23:36 +0800
Subject: [PATCH] 6816 【后端】【2.0】仙宝寻主(法宝增加灵根)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 8d5d0dc..18f7198 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/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()

--
Gitblit v1.8.0