From ef24f527ec8215a5053f1b33be33b8fe5b05d3ff Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 20 六月 2019 19:56:03 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 伤害值防止小于0的情况
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py
index 66c8424..d13fe57 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerDienstgrad.py
@@ -26,6 +26,8 @@
import PassiveBuffEffMng
import DataRecordPack
import CrossPlayerData
+import GameFuncComm
+import ShareDefine
import time
#-------------------------------------------------------------
@@ -132,7 +134,8 @@
__GiveSkill(curPlayer, skillID)
CrossPlayerData.OnDienstgradChange(curPlayer, dienstgradID, 1)
-
+ if dienstgradID == IpyGameDataPY.GetFuncCfg("TitleAddPoint"):
+ __DoTitleAddPoint(curPlayer)
#重新刷新角色属性
if isRefreshAttr:
CalcAllDienstgradAttr(curPlayer)
@@ -141,6 +144,28 @@
return True
+# 获得称号加点
+def __DoTitleAddPoint(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 + point) * (multiple-1) * (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 __GiveSkill(curPlayer, skillResID):
--
Gitblit v1.8.0