From 2b34924e06c0c36d77d9ccec4c4f10f1ebd16e84 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 16 九月 2025 19:03:17 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(NPC表加特长字段;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py index ac11826..830f953 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py @@ -84,6 +84,7 @@ ("DWORD", "SuckHPPer", 0), ("DWORD", "SuckHPPerDef", 0), ("dict", "SpecAttrInfo", 0), + ("BYTE", "Specialty", 0), ), "NPCStronger":( @@ -2643,7 +2644,8 @@ def GetParryRateDef(self): return self.attrTuple[23] # 抗格挡概率 DWORD def GetSuckHPPer(self): return self.attrTuple[24] # 吸血比率 DWORD def GetSuckHPPerDef(self): return self.attrTuple[25] # 抗吸血比率 DWORD - def GetSpecAttrInfo(self): return self.attrTuple[26] # 特殊属性信息 {"属性ID":值, ...} dict + def GetSpecAttrInfo(self): return self.attrTuple[26] # 特殊属性信息 {"属性ID":值, ...} dict + def GetSpecialty(self): return self.attrTuple[27] # 特长 BYTE # NPC成长表 class IPY_NPCStronger(): @@ -6915,7 +6917,7 @@ def __StrToList(self, strValue): setList = [] - if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue): + if (strValue.startswith("[") and strValue.endswith("]")) or (strValue.startswith("(") and strValue.endswith(")")): setList = eval(strValue) elif strValue in ["0", "-", ""]: pass @@ -6925,6 +6927,13 @@ for value in strValue.split(ChConfig.Def_Str_Montant): if value.isdigit(): value = int(value) + elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")): + value = eval(value) + else: + try: + value = float(value) + except: + pass setList.append(value) if setList: setList = tuple(setList) -- Gitblit v1.8.0