| | |
| | | # 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)
|
| | |
| | | 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
|
| | |
|
| | |
|
| | |
| | | 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的沟通包
|