|  |  | 
 |  |  | import ChPyNetSendPack
 | 
 |  |  | import traceback
 | 
 |  |  | import ChMapToGamePyPack
 | 
 |  |  | import MergeChildMsg
 | 
 |  |  | import CrossRealmMsg
 | 
 |  |  | #-------------------------------------------------------------------------------
 | 
 |  |  | #---全局变量---
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  | #        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)
 | 
 |  |  | 
 |  |  |         #以下添加后续处理函数
 | 
 |  |  |         #...
 | 
 |  |  |         #...
 | 
 |  |  |         MergeChildMsg.Recv_MergerChildToCenterProcess(packData, tick)
 | 
 |  |  |         CrossRealmMsg.OnCrossServerReceiveMsg(packData, tick)
 | 
 |  |  |     except Exception:
 | 
 |  |  |         Log("跨服子服自定义封包消息处理失败")
 | 
 |  |  |     return
 |