From b2aa714eafbfd5e7e04ac09d1368231701bbcf71 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期四, 30 八月 2018 14:44:44 +0800 Subject: [PATCH] fix: 3007 超值礼包购买调整 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py index d989dba..fabb438 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -20481,6 +20481,62 @@ #------------------------------------------------------ +# AA 16 通知超值礼包信息 #tagMCSuperGiftInfo + +class tagMCSuperGiftInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("GiftID", c_int), #商品ID + ("RemainDay", c_ubyte), #剩余天数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x16 + 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 = 0xAA + self.SubCmd = 0x16 + self.GiftID = 0 + self.RemainDay = 0 + return + + def GetLength(self): + return sizeof(tagMCSuperGiftInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 16 通知超值礼包信息 //tagMCSuperGiftInfo: + Cmd:%s, + SubCmd:%s, + GiftID:%d, + RemainDay:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.GiftID, + self.RemainDay + ) + return DumpString + + +m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Cmd,m_NAtagMCSuperGiftInfo.SubCmd))] = m_NAtagMCSuperGiftInfo + + +#------------------------------------------------------ #AA 01 累计登陆天数信息 #tagMCTotalLoginDayCntInfo class tagMCTotalLoginDayCntInfo(Structure): -- Gitblit v1.8.0