From 9bc8c9c3e4b48dab63efbca946713465ee30b4cd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 一月 2024 15:47:31 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(副本回合制NPC支持配置精怪技能、神通技能;增加属性强化治疗215、弱化治疗216;NPC支持触发被动效果;被动效果触发方式增加按回合触发-效果ID5000;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NetPackCommon.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NetPackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NetPackCommon.py
index 2eeab27..df5680d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NetPackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NetPackCommon.py
@@ -95,9 +95,13 @@
 #        Log("ReadPyPackTable: moudle: %s"%dir(moudle))
         
         for index in range(regCnt):
+            if not config.has_option(section, "PacketCMD_%s"%(index + 1)):
+                continue
             cmd = config.get(section, "PacketCMD_%s"%(index + 1))
             subCmd = config.get(section, "PacketSubCMD_%s"%(index + 1))
             callFunc = config.get(section, "PacketCallFunc_%s"%(index + 1))
+            if not cmd or not subCmd or not callFunc:
+                continue
             
             cmd = int(cmd, 16)
             subCmd = int(subCmd, 16)
@@ -204,9 +208,7 @@
         curPackHeadRegDict["CallFunc"](index, curPackData, tick)
         
     except Exception:
-        Log("!!!python自定义封包解析失败~~~~~\r\n%s" % traceback.format_exc())
-        if GameWorld.GetGameWorld().GetDebugLevel():
-            raise Exception("python自定义封包解析失败~~~~~\r\n%s" % traceback.format_exc())
+        GameWorld.RaiseException("!!!python自定义封包解析失败\r\n%s" % traceback.format_exc())
         return 
     
     
@@ -278,9 +280,7 @@
         curPackHeadRegDict["CallFunc"](curPackData, tick)
         #Log("RecGamePyPack: curPackHead = %s"%curPackHead)
     except Exception:
-        Log("RecGamePyPack python自定义封包解析失败~~~~~\r\n%s" % traceback.format_exc())
-        if GameWorld.GetGameWorld().GetDebugLevel():
-            raise Exception("RecGamePyPack python自定义封包解析失败~~~~~\r\n%s" % traceback.format_exc())
+        GameWorld.RaiseException("RecGamePyPack python自定义封包解析失败\r\n%s" % traceback.format_exc())
         return 
 #-------------------------------------------------------------------------------
 ##发送Map到GameServer的沟通包

--
Gitblit v1.8.0