From 46fbb9a99444693cdbcd0df7f6de0d0511235d56 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 13 十二月 2021 14:46:53 +0800 Subject: [PATCH] 9265 【BT5】【后端】53、新增幸运云购 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 153 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py index 81983c8..9498bb2 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py @@ -4035,6 +4035,106 @@ #------------------------------------------------------ +# C0 06 查询幸运云购开奖记录 #tagCGQueryLuckyCloudBuyLotteryRec + +class tagCGQueryLuckyCloudBuyLotteryRec(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ZoneID", c_ubyte), #查询分区ID,分区同跨服PK分区 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC0 + self.SubCmd = 0x06 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xC0 + self.SubCmd = 0x06 + self.ZoneID = 0 + return + + def GetLength(self): + return sizeof(tagCGQueryLuckyCloudBuyLotteryRec) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 06 查询幸运云购开奖记录 //tagCGQueryLuckyCloudBuyLotteryRec: + Cmd:%s, + SubCmd:%s, + ZoneID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ZoneID + ) + return DumpString + + +m_NAtagCGQueryLuckyCloudBuyLotteryRec=tagCGQueryLuckyCloudBuyLotteryRec() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryLuckyCloudBuyLotteryRec.Cmd,m_NAtagCGQueryLuckyCloudBuyLotteryRec.SubCmd))] = m_NAtagCGQueryLuckyCloudBuyLotteryRec + + +#------------------------------------------------------ +# C0 05 查询幸运云购购买号码记录 #tagCGQueryLuckyCloudBuyNumRec + +class tagCGQueryLuckyCloudBuyNumRec(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC0 + self.SubCmd = 0x05 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xC0 + self.SubCmd = 0x05 + return + + def GetLength(self): + return sizeof(tagCGQueryLuckyCloudBuyNumRec) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 05 查询幸运云购购买号码记录 //tagCGQueryLuckyCloudBuyNumRec: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagCGQueryLuckyCloudBuyNumRec=tagCGQueryLuckyCloudBuyNumRec() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryLuckyCloudBuyNumRec.Cmd,m_NAtagCGQueryLuckyCloudBuyNumRec.SubCmd))] = m_NAtagCGQueryLuckyCloudBuyNumRec + + +#------------------------------------------------------ # C0 04 查看跨服排行榜 #tagCGViewCrossBillboard class tagCGViewCrossBillboard(Structure): @@ -19213,4 +19313,56 @@ m_NAtagCMExitCrossRealm=tagCMExitCrossRealm() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExitCrossRealm.Cmd,m_NAtagCMExitCrossRealm.SubCmd))] = m_NAtagCMExitCrossRealm \ No newline at end of file +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExitCrossRealm.Cmd,m_NAtagCMExitCrossRealm.SubCmd))] = m_NAtagCMExitCrossRealm + + +#------------------------------------------------------ +# C1 10 幸运云购购买 #tagCMLuckyCloudBuy + +class tagCMLuckyCloudBuy(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BuyCount", c_ushort), # 购买份数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC1 + self.SubCmd = 0x10 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xC1 + self.SubCmd = 0x10 + self.BuyCount = 0 + return + + def GetLength(self): + return sizeof(tagCMLuckyCloudBuy) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C1 10 幸运云购购买 //tagCMLuckyCloudBuy: + Cmd:%s, + SubCmd:%s, + BuyCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BuyCount + ) + return DumpString + + +m_NAtagCMLuckyCloudBuy=tagCMLuckyCloudBuy() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMLuckyCloudBuy.Cmd,m_NAtagCMLuckyCloudBuy.SubCmd))] = m_NAtagCMLuckyCloudBuy \ No newline at end of file -- Gitblit v1.8.0