From 7ec0a058391a01ba15cae725a1754305d92e6cc4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 04 七月 2019 16:47:16 +0800
Subject: [PATCH] 7813 【后端】【主干】npc时间掉血增加成长型标准战力
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 3 +++
PySysDB/PySysDBPY.h | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 17 ++++++++++++++++-
3 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index dd58c54..6cd2bb0 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -420,6 +420,7 @@
DWORD LostHPPerSecond; //单人每秒掉血量
BYTE MaxPlayerCount; //最大人数
DWORD LostHPPerSecondEx; //每增加一人附加掉血量
+ BYTE FightPowerMinByLV; //标准战力是否取等级表
DWORD FightPowerMin; //标准战力
DWORD FightPowerMax; //上限战力
DWORD EveryFightPower; //每x点战力
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index c1d7228..da9e5c2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1798,11 +1798,26 @@
lostHPPerSecond = ipyData.GetLostHPPerSecond()
maxPlayerCount = ipyData.GetMaxPlayerCount()
lostHPPerSecondEx = ipyData.GetLostHPPerSecondEx()
+ fightPowerMinByLV = ipyData.GetFightPowerMinByLV()
fightPowerMin = ipyData.GetFightPowerMin()
fightPowerMax = ipyData.GetFightPowerMax()
everyFightPower = ipyData.GetEveryFightPower()
everyFightPowerLostHPEx = ipyData.GetEveryFightPowerLostHPEx()
-
+ if fightPowerMinByLV and fightPowerMin:
+ npcLV = NPCCommon.GetNPCLV(curNPC)
+ playerCurLVIpyData = PlayerControl.GetPlayerLVIpyData(npcLV)
+ if not playerCurLVIpyData:
+ return
+ ReFightPower = playerCurLVIpyData.GetReFightPower() # 战斗力
+ reRate = ReFightPower / float(fightPowerMin)
+ #GameWorld.DebugLog("标准战力需要取等级表: fightPowerMin=%s,fightPowerMax=%s,everyFightPower=%s,npcLV=%s,ReFightPower=%s,reRate=%s"
+ # % (fightPowerMin, fightPowerMax, everyFightPower, npcLV, ReFightPower, reRate))
+ fightPowerMin = ReFightPower
+ fightPowerMax = int(fightPowerMax * reRate)
+ everyFightPower = int(everyFightPower * reRate)
+ #GameWorld.DebugLog("按比例更新战力值信息: fightPowerMin=%s,fightPowerMax=%s,everyFightPower=%s"
+ # % (fightPowerMin, fightPowerMax, everyFightPower))
+
effFightPower = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPFightPower)
effPlayerCount = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCount)
refreshPlayerCountTick = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_TimeLostHPPlayerCountTick)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 33f12e5..1d22f27 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -352,6 +352,7 @@
("DWORD", "LostHPPerSecond", 0),
("BYTE", "MaxPlayerCount", 0),
("DWORD", "LostHPPerSecondEx", 0),
+ ("BYTE", "FightPowerMinByLV", 0),
("DWORD", "FightPowerMin", 0),
("DWORD", "FightPowerMax", 0),
("DWORD", "EveryFightPower", 0),
@@ -2142,6 +2143,7 @@
self.LostHPPerSecond = 0
self.MaxPlayerCount = 0
self.LostHPPerSecondEx = 0
+ self.FightPowerMinByLV = 0
self.FightPowerMin = 0
self.FightPowerMax = 0
self.EveryFightPower = 0
@@ -2152,6 +2154,7 @@
def GetLostHPPerSecond(self): return self.LostHPPerSecond # 单人每秒掉血量
def GetMaxPlayerCount(self): return self.MaxPlayerCount # 最大人数
def GetLostHPPerSecondEx(self): return self.LostHPPerSecondEx # 每增加一人附加掉血量
+ def GetFightPowerMinByLV(self): return self.FightPowerMinByLV # 标准战力是否取等级表
def GetFightPowerMin(self): return self.FightPowerMin # 标准战力
def GetFightPowerMax(self): return self.FightPowerMax # 上限战力
def GetEveryFightPower(self): return self.EveryFightPower # 每x点战力
--
Gitblit v1.8.0