From 0b9b8df6390890cb8a8d00235be5651c40a9c47d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 06 三月 2023 14:22:10 +0800
Subject: [PATCH] 1111 【bt7】【bt8】【bt9】【主干】【后端】装备评分计算总战力超过20亿支持;master

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py                |    4 ++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py        |   12 ++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                    |    1 +
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 07b6fa0..3823843 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3254,6 +3254,7 @@
 Def_PlayerKey_MFPFightPower = "MFPFightPower_%s"        #模块战斗力, 参数(模块类型索引)
 Def_PlayerKey_MFPSkill = "MFPSkill_%s"        #技能附加战斗力, 参数(模块类型索引)
 Def_PlayerKey_MFPEx = "MFPEx_%s"        #模块附加战斗力, 参数(模块类型索引)
+Def_PlayerKey_MFPExPoint = "MFPExPoint_%s"        #模块附加战斗力, 参数(模块类型索引)
 Def_PlayerKey_AtkWithoutBuff = "AtkWithoutBuff"        #玩家无buff状态下的攻击值
 Def_PlayerKey_DefWithoutBuff = "DefWithoutBuff"        #玩家无buff状态下的防御值
 Def_PlayerKey_HPWithoutBuff = "HPWithoutBuff"        #玩家无buff状态下的生命值
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
index 2b220f3..aae630b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
@@ -53,7 +53,7 @@
     for mfpType in ChConfig.MFPTypeAttrFuncIndexDict.keys():
         fightPower = PlayerControl.GetMFPFightPower(curPlayer, mfpType)
         mfpSkillFP = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPSkill % mfpType)
-        mfpEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPEx % mfpType)
+        mfpEx = PlayerControl.GetMFPExFightPower(curPlayer, mfpType)
         name = mfpTypeName.get(mfpType, "模块%s" % mfpType)
         if mfpSkillFP or mfpEx:
             GameWorld.DebugAnswer(curPlayer, "%s战力(%s): %s,技能:%s, Ex=%s" % (name, mfpType, fightPower, mfpSkillFP, mfpEx))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index 510ee42..cb39531 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -830,7 +830,7 @@
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PeerlessWeapon2Train, peerlessWeapon2TrainAttrList)
     
     lqFightPowerEx = eval(IpyGameDataPY.GetFuncCompileCfg("FightpowerFormula", 2))
-    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_LingQi, lqFightPowerEx)
+    PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_LingQi, lqFightPowerEx)
     
     #GameWorld.DebugLog("灵器属性1: %s" % allAttrList)
     #GameWorld.DebugLog("灵器属性2: %s" % lingQiAttrList)
@@ -1102,7 +1102,7 @@
 #    GameWorld.DebugLog("    所有阶强化属性: %s, 内部加成=%s" % (allClassAttrListPlus, allClassInsideAttrDictPlus))
 #    GameWorld.DebugLog("    所有阶宝石属性: %s, 内部加成=%s" % (allClassAttrListStone, allClassInsideAttrDictStone))
 #    GameWorld.DebugLog("    所有阶洗练属性: %s, 内部加成=%s" % (allClassAttrListWash, allClassInsideAttrDictWash))
-    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_Equip, allClassEquipFightPowerEx)
+    PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_Equip, allClassEquipFightPowerEx)
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Equip, allClassAttrListEquip, allClassInsideAttrDictEquip, customAttrDict=customAttrDictEquip)
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Star, allClassAttrListStar, allClassInsideAttrDictStar, customAttrDict=customAttrDictStar)
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Plus, allClassAttrListPlus, allClassInsideAttrDictPlus, customAttrDict=customAttrDictPlus)
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 d477dd1..fa809f8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -4841,6 +4841,7 @@
             mfpValue = 0 if not fpParam else mfpObj.GetModuleFightPower(fpParam, curPlayer)
             mfpSkill = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPSkill % mfpObj.mfpType)
             mfpEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPEx % mfpObj.mfpType)
+            mfpEx = GetMFPExFightPower(curPlayer, mfpType)
             mfpTotal = mfpValue + mfpSkill + mfpEx
             mfpDict[mfpObj.mfpType] = min(mfpTotal, ChConfig.Def_UpperLimit_DWord)
             
@@ -6364,6 +6365,17 @@
 ## 获取模块战斗力
 def GetMFPFightPower(curPlayer, mfpType):
     return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPFightPower % mfpType)
+
+## 设置模块附加战斗力,支持超过20E
+def SetMFPExFightPower(curPlayer, mfpType, fightPower):
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % mfpType, fightPower % ChConfig.Def_PerPointValue)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPExPoint % mfpType, fightPower / ChConfig.Def_PerPointValue)
+    return
+
+## 获取模块附加战斗力
+def GetMFPExFightPower(curPlayer, mfpType):
+    return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPExPoint % mfpType) * ChConfig.Def_PerPointValue + \
+        curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MFPEx % mfpType)
 #===============================================================================
 ##获取玩家分线信息
 # @param curPlayer 玩家实例

--
Gitblit v1.8.0