From 3da8e5eb44d92945d64ddd9bc075b9322a088d94 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 19 三月 2019 17:08:55 +0800
Subject: [PATCH] 6341  【后端】【2.0】境界改版开发单(经验buff)

---
 ServerPython/CoreServerGroup/GameServer/Script/NetPackCommon.py |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/NetPackCommon.py b/ServerPython/CoreServerGroup/GameServer/Script/NetPackCommon.py
index ef9b24e..726429d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/NetPackCommon.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/NetPackCommon.py
@@ -29,7 +29,7 @@
 import ChPyNetSendPack
 import traceback
 import ChMapToGamePyPack
-import MergeChildMsg
+import CrossRealmMsg
 #-------------------------------------------------------------------------------
 #---全局变量---
 
@@ -95,9 +95,13 @@
 #        Log("ReadPyPackTable: moudle: %s"%dir(moudle))
         
         for index in range(regCnt):
+            if not config.get(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)
@@ -298,11 +302,12 @@
 def Recv_MergerChildToCenter(index, tick):
     try:
         packData = IPY_GameServer.IPY_MGMergerChildToCenter().GetData()
-        Log("收到跨服子服自定义封包消息:\r\n%s" % packData)
+        # 不要输出具体封包内容,可能会因为内容导致日志输出报错
+        Log("收到跨服子服自定义封包消息:长度=%s" % len(packData))
         #以下添加后续处理函数
         #...
         #...
-        MergeChildMsg.Recv_MergerChildToCenterProcess(packData, tick)
+        CrossRealmMsg.OnCrossServerReceiveMsg(packData, tick)
     except Exception:
         Log("跨服子服自定义封包消息处理失败")
     return

--
Gitblit v1.8.0