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/PlayerMagicWeapon.py | 15 ++++++++++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 13 ++++++++++---
2 files changed, 24 insertions(+), 4 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()
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 6e8e0f0..145a8af 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/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)
#通知客户端等级
--
Gitblit v1.8.0