From 82a94e55b5710d50643b3d0bf8581afbb3f58cf2 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 18 六月 2019 16:15:05 +0800
Subject: [PATCH] 7339 子 【开发】【2.0】称号,灵宠,技能附带效果 / 【后端】【2.0】新增效果

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py |   37 +++++++++++++++++++++++--------------
 1 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
index a0c2c21..fd87952 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -110,19 +110,8 @@
             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))
+            __DoFabaoAddPoint(curPlayer)
+            
 
     EventShell.EventRespons_MagicWeaponLV(curPlayer, mwID, mwLV)
     #通知客户端等级
@@ -153,7 +142,27 @@
     DataRecordPack.DR_MagicWeaponActive(curPlayer, mwID, mwLV)
     return True
 
-
+# 获得法宝加点
+def __DoFabaoAddPoint(curPlayer):
+    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_AddPoint):
+        # 未开启前不可加点,因为DoAddPointOpen会一次性补齐,避免意外情况多加了点数
+        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)
+    freePoint = curPlayer.GetFreePoint()
+    updFreePoint = freePoint + addFreePoint
+    curPlayer.SetFreePoint(updFreePoint)
+    GameWorld.DebugLog("获得法宝增加自由属性点: freePoint=%s,addFreePoint=%s,curLV=%s,updFreePoint=%s" 
+                       % (freePoint, addFreePoint, curLV, updFreePoint))
+    
+    return
 def GetWMIpyData(mwID):return IpyGameDataPY.GetIpyGameData('Treasure', mwID)
 
 

--
Gitblit v1.8.0