From e781de21766e3ea4e768eaa9ebab2fc9a694cefe Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 21 十二月 2018 21:10:27 +0800
Subject: [PATCH] 5539 【后端】【1.4】聚魂副本怪物和守卫成长支持新的成长公式

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py           |    3 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py |    3 ++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py           |    3 ++-
 PySysDB/PySysDBPY.h                                                                            |    1 +
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index a534dfc..1cab86e 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -353,6 +353,7 @@
 {
 	DWORD		_NPCID;	//NPCID
 	BYTE		IsStrengthenByPlayerCount;//是否根据人数成长
+	BYTE		LVStrengthenMark;//等级成长属性公式标记
 	BYTE		LVStrengthenType;//等级成长类型, 0-不按等级成长;1-按玩家平均等级;2-按玩家最大等级;3-按世界等级;
 	BYTE		CmpNPCBaseLV;//是否比较NPC表等级, 是的话取NPC表配置等级与成长等级中较大等级
 	DWORD		HitTime;//受击次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 886ecff..28e124a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -298,6 +298,7 @@
                 "NPCStrengthen":(
                         ("DWORD", "NPCID", 1),
                         ("BYTE", "IsStrengthenByPlayerCount", 0),
+                        ("BYTE", "LVStrengthenMark", 0),
                         ("BYTE", "LVStrengthenType", 0),
                         ("BYTE", "CmpNPCBaseLV", 0),
                         ("DWORD", "HitTime", 0),
@@ -1713,6 +1714,7 @@
     def __init__(self):
         self.NPCID = 0
         self.IsStrengthenByPlayerCount = 0
+        self.LVStrengthenMark = 0
         self.LVStrengthenType = 0
         self.CmpNPCBaseLV = 0
         self.HitTime = 0
@@ -1731,6 +1733,7 @@
         
     def GetNPCID(self): return self.NPCID # NPCID
     def GetIsStrengthenByPlayerCount(self): return self.IsStrengthenByPlayerCount # 是否根据人数成长
+    def GetLVStrengthenMark(self): return self.LVStrengthenMark # 等级成长属性公式标记
     def GetLVStrengthenType(self): return self.LVStrengthenType # 等级成长类型, 0-不按等级成长;1-按玩家平均等级;2-按玩家最大等级;3-按世界等级;
     def GetCmpNPCBaseLV(self): return self.CmpNPCBaseLV # 是否比较NPC表等级, 是的话取NPC表配置等级与成长等级中较大等级
     def GetHitTime(self): return self.HitTime # 受击次数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 8971a63..3829654 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -285,7 +285,7 @@
     
     attrDict = {}
     paramDict = attrStrengthenInfo[NPCAttr_ParamDict] # 过程参数公式字典
-    attrStrengthenList = attrStrengthenInfo[NPCAttr_AttrStrengthenList] # 属性成长公式字典
+    attrStrengthenDict = attrStrengthenInfo[NPCAttr_AttrStrengthenList] # 属性成长公式字典
     playerCntCoefficient = attrStrengthenInfo[NPCAttr_PlayerCntCoefficient] # 人数系数
     npcIDPlayerCntCoefficient = attrStrengthenInfo[NPCAttr_NPCPlayerCntCoefficient] # 特殊NPC人数系数
     baseMaxHP = npcData.GetHPEx() * ShareDefine.Def_PerPointValue + npcData.GetHP()
@@ -349,6 +349,7 @@
         MonterHurt = eval(FormulaControl.GetCompileFormula("NPCParam_MonterHurt", paramDict["MonterHurt"])) # 怪物固定伤害
         LostHPPerSecond = eval(FormulaControl.GetCompileFormula("NPCParam_LostHPPerSecond", paramDict["LostHPPerSecond"])) # 玩家每秒掉血量
         
+        attrStrengthenList = attrStrengthenDict.get(strengthenIpyData.GetLVStrengthenMark(), [])
         for attrKey, strengthenFormat in attrStrengthenList:
             strengthenValue = int(eval(FormulaControl.GetCompileFormula("NPCStrengthen_%s" % attrKey, strengthenFormat)))
             #GameWorld.DebugLog("    %s=%s" % (attrKey, strengthenValue))
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
index e9eca08..8aa7baf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
@@ -374,8 +374,9 @@
     return
 
 
-def __GetGatherSoulSplitMaterial(gathersoulID, soulidList=[], soulSplinters=0, soulCore=0):
+def __GetGatherSoulSplitMaterial(gathersoulID):
     ##拆解多属性聚魂 返回单属性聚魂ID,材料
+    soulidList, soulSplinters, soulCore= [], 0, 0
     compoundIpyData = IpyGameDataPY.GetIpyGameDataNotLog('GatherSoulCompound', gathersoulID)
     if compoundIpyData:
         materialList = compoundIpyData.GetNeedItem()

--
Gitblit v1.8.0