|  |  | 
 |  |  | #A0 05 同步开服天数 #tagOpenServerDay
 | 
 |  |  | 
 | 
 |  |  | class  tagOpenServerDay(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Day = 0    #(WORD Day)// 已开服天数,从0开始
 | 
 |  |  |     IsMixServer = 0    #(BYTE IsMixServer)//是否是合服服务器
 | 
 |  |  |     MixDay = 0    #(WORD MixDay)// 已合服天数,从0开始
 | 
 |  |  |     OpenServerTime = ""    #(char OpenServerTime[19])//开服时间yyyy-MM-dd HH:mm:ss
 | 
 |  |  |     data = None
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("Day", c_ushort),    # 已开服天数,从0开始
 | 
 |  |  |                   ("IsMixServer", c_ubyte),    #是否是合服服务器
 | 
 |  |  |                   ("MixDay", c_ushort),    # 已合服天数,从0开始
 | 
 |  |  |                   ("OpenWeekday", c_ubyte),    #开服是周几,1代表周一
 | 
 |  |  |                   ("NowYear", c_ushort),    #服务器当前时间 - 年
 | 
 |  |  |                   ("NowMonth", c_ubyte),     | 
 |  |  |                   ("NowDay", c_ubyte),     | 
 |  |  |                   ("NowHour", c_ubyte),     | 
 |  |  |                   ("NowMinute", c_ubyte),     | 
 |  |  |                   ("NowSecond", c_ubyte),     | 
 |  |  |                   ("NowMicSecond", c_int),     | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA0
 | 
 |  |  |         self.Head.SubCmd = 0x05
 | 
 |  |  |         self.Cmd = 0xA0
 | 
 |  |  |         self.SubCmd = 0x05
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |     def ReadData(self, stringData, _pos=0, _len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.Day,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.IsMixServer,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.MixDay,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.OpenServerTime,_pos = CommFunc.ReadString(_lpData, _pos,19)
 | 
 |  |  |         return _pos
 | 
 |  |  |         memmove(addressof(self), stringData[_pos:], self.GetLength())
 | 
 |  |  |         return _pos + self.GetLength()
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA0
 | 
 |  |  |         self.Head.SubCmd = 0x05
 | 
 |  |  |         self.Cmd = 0xA0
 | 
 |  |  |         self.SubCmd = 0x05
 | 
 |  |  |         self.Day = 0
 | 
 |  |  |         self.IsMixServer = 0
 | 
 |  |  |         self.MixDay = 0
 | 
 |  |  |         self.OpenServerTime = ""
 | 
 |  |  |         self.OpenWeekday = 0
 | 
 |  |  |         self.NowYear = 0
 | 
 |  |  |         self.NowMonth = 0
 | 
 |  |  |         self.NowDay = 0
 | 
 |  |  |         self.NowHour = 0
 | 
 |  |  |         self.NowMinute = 0
 | 
 |  |  |         self.NowSecond = 0
 | 
 |  |  |         self.NowMicSecond = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 19
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  |         return sizeof(tagOpenServerDay)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.Day)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.IsMixServer)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.MixDay)
 | 
 |  |  |         data = CommFunc.WriteString(data, 19, self.OpenServerTime)
 | 
 |  |  |         return data
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |         DumpString = '''//A0 05 同步开服天数 //tagOpenServerDay:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 Day:%d,
 | 
 |  |  |                                 IsMixServer:%d,
 | 
 |  |  |                                 MixDay:%d,
 | 
 |  |  |                                 OpenServerTime:%s
 | 
 |  |  |                                 OpenWeekday:%d,
 | 
 |  |  |                                 NowYear:%d,
 | 
 |  |  |                                 NowMonth:%d,
 | 
 |  |  |                                 NowDay:%d,
 | 
 |  |  |                                 NowHour:%d,
 | 
 |  |  |                                 NowMinute:%d,
 | 
 |  |  |                                 NowSecond:%d,
 | 
 |  |  |                                 NowMicSecond:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.Day,
 | 
 |  |  |                                 self.IsMixServer,
 | 
 |  |  |                                 self.MixDay,
 | 
 |  |  |                                 self.OpenServerTime
 | 
 |  |  |                                 self.OpenWeekday,
 | 
 |  |  |                                 self.NowYear,
 | 
 |  |  |                                 self.NowMonth,
 | 
 |  |  |                                 self.NowDay,
 | 
 |  |  |                                 self.NowHour,
 | 
 |  |  |                                 self.NowMinute,
 | 
 |  |  |                                 self.NowSecond,
 | 
 |  |  |                                 self.NowMicSecond
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagOpenServerDay=tagOpenServerDay()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagOpenServerDay.Head.Cmd,m_NAtagOpenServerDay.Head.SubCmd))] = m_NAtagOpenServerDay
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagOpenServerDay.Cmd,m_NAtagOpenServerDay.SubCmd))] = m_NAtagOpenServerDay
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | class  tagGCBossShuntLineState(Structure):
 | 
 |  |  |     BossID = 0    #(DWORD BossID)// bossID
 | 
 |  |  |     DeadLineCount = 0    #(BYTE DeadLineCount)
 | 
 |  |  |     DeadLineList = list()    #(vector<BYTE> DeadLineList)// 已死亡的线路列表
 | 
 |  |  |     LineCount = 0    #(BYTE LineCount)
 | 
 |  |  |     LineIDList = list()    #(vector<BYTE> LineIDList)// 线路ID列表
 | 
 |  |  |     StateList = list()    #(vector<BYTE> StateList)// 对应状态列表, 0-被击杀,1-活着
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.BossID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         self.DeadLineCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.DeadLineCount):
 | 
 |  |  |         self.LineCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.LineCount):
 | 
 |  |  |             value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
 | 
 |  |  |             self.DeadLineList.append(value)
 | 
 |  |  |             self.LineIDList.append(value)
 | 
 |  |  |         for i in range(self.LineCount):
 | 
 |  |  |             value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
 | 
 |  |  |             self.StateList.append(value)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.BossID = 0
 | 
 |  |  |         self.DeadLineCount = 0
 | 
 |  |  |         self.DeadLineList = list()
 | 
 |  |  |         self.LineCount = 0
 | 
 |  |  |         self.LineIDList = list()
 | 
 |  |  |         self.StateList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 4
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 1 * self.DeadLineCount
 | 
 |  |  |         length += 1 * self.LineCount
 | 
 |  |  |         length += 1 * self.LineCount
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.BossID)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.DeadLineCount)
 | 
 |  |  |         for i in range(self.DeadLineCount):
 | 
 |  |  |             data = CommFunc.WriteBYTE(data, self.DeadLineList[i])
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.LineCount)
 | 
 |  |  |         for i in range(self.LineCount):
 | 
 |  |  |             data = CommFunc.WriteBYTE(data, self.LineIDList[i])
 | 
 |  |  |         for i in range(self.LineCount):
 | 
 |  |  |             data = CommFunc.WriteBYTE(data, self.StateList[i])
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 BossID:%d,
 | 
 |  |  |                                 DeadLineCount:%d,
 | 
 |  |  |                                 DeadLineList:%s
 | 
 |  |  |                                 LineCount:%d,
 | 
 |  |  |                                 LineIDList:%s,
 | 
 |  |  |                                 StateList:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.BossID,
 | 
 |  |  |                                 self.DeadLineCount,
 | 
 |  |  |                                 self.LineCount,
 | 
 |  |  |                                 "...",
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 |  |  |     RecordLen = 0    #(WORD RecordLen)// 长度
 | 
 |  |  |     KillRecord = ""    #(String KillRecord)// 最近击杀记录时间玩家名size = RecordLen
 | 
 |  |  |     RefreshSecond = 0    #(DWORD RefreshSecond)// 刷新倒计时, 秒    
 | 
 |  |  |     RefreshCD = 0    #(DWORD RefreshCD)// 刷新总CD时, 秒     | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |         self.RecordLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.KillRecord,_pos = CommFunc.ReadString(_lpData, _pos,self.RecordLen)
 | 
 |  |  |         self.RefreshSecond,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         self.RefreshCD,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  | 
 |  |  |         self.RecordLen = 0
 | 
 |  |  |         self.KillRecord = ""
 | 
 |  |  |         self.RefreshSecond = 0
 | 
 |  |  |         self.RefreshCD = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += len(self.KillRecord)
 | 
 |  |  |         length += 4
 | 
 |  |  |         length += 4
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 |  |  |         data = CommFunc.WriteWORD(data, self.RecordLen)
 | 
 |  |  |         data = CommFunc.WriteString(data, self.RecordLen, self.KillRecord)
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.RefreshSecond)
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.RefreshCD)
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  | 
 |  |  |                                 IsAlive:%d,
 | 
 |  |  |                                 RecordLen:%d,
 | 
 |  |  |                                 KillRecord:%s,
 | 
 |  |  |                                 RefreshSecond:%d
 | 
 |  |  |                                 RefreshSecond:%d,
 | 
 |  |  |                                 RefreshCD:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.BossID,
 | 
 |  |  |                                 self.IsAlive,
 | 
 |  |  |                                 self.RecordLen,
 | 
 |  |  |                                 self.KillRecord,
 | 
 |  |  |                                 self.RefreshSecond
 | 
 |  |  |                                 self.RefreshSecond,
 | 
 |  |  |                                 self.RefreshCD
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagGCStoreServerBuyCnt(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("GoodsID", c_int),    #商品标识
 | 
 |  |  |                   ("BuyCnt", c_int),    #购买次数
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.GoodsID = 0
 | 
 |  |  |         self.BuyCnt = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagGCStoreServerBuyCnt)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// A9 06 商城全服购买次数通知 //tagGCStoreServerBuyCntInfo:
 | 
 |  |  |                                 GoodsID:%d,
 | 
 |  |  |                                 BuyCnt:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.GoodsID,
 | 
 |  |  |                                 self.BuyCnt
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagGCStoreServerBuyCntInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Count = 0    #(WORD Count)//数量
 | 
 |  |  |     InfoList = list()    #(vector<tagGCStoreServerBuyCnt> InfoList)//次数信息
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA9
 | 
 |  |  |         self.Head.SubCmd = 0x06
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             temInfoList = tagGCStoreServerBuyCnt()
 | 
 |  |  |             _pos = temInfoList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.InfoList.append(temInfoList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA9
 | 
 |  |  |         self.Head.SubCmd = 0x06
 | 
 |  |  |         self.Count = 0
 | 
 |  |  |         self.InfoList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 2
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             length += self.InfoList[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.Count)
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 Count:%d,
 | 
 |  |  |                                 InfoList:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.Count,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagGCStoreServerBuyCntInfo=tagGCStoreServerBuyCntInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCStoreServerBuyCntInfo.Head.Cmd,m_NAtagGCStoreServerBuyCntInfo.Head.SubCmd))] = m_NAtagGCStoreServerBuyCntInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | #A9 21 角色改名结果 #tagUpdatePlayerNameResult
 | 
 |  |  | 
 | 
 |  |  | class  tagUpdatePlayerNameResult(Structure):
 | 
 |  |  | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     WorldLV = 0    #(WORD WorldLV)// 世界等级
 | 
 |  |  |     LimitLV = 0    #(WORD LimitLV)// 限制等级
 | 
 |  |  |     ResetType = 0    #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.WorldLV = 0
 | 
 |  |  |         self.LimitLV = 0
 | 
 |  |  |         self.ResetType = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  | 
 |  |  |         length += 10
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.WorldLV)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.LimitLV)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ResetType)
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 WorldLV:%d,
 | 
 |  |  |                                 LimitLV:%d
 | 
 |  |  |                                 LimitLV:%d,
 | 
 |  |  |                                 ResetType:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.WorldLV,
 | 
 |  |  |                                 self.LimitLV
 | 
 |  |  |                                 self.LimitLV,
 | 
 |  |  |                                 self.ResetType
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | m_NAtagGCVoiceChat=tagGCVoiceChat()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCVoiceChat.Head.Cmd,m_NAtagGCVoiceChat.Head.SubCmd))] = m_NAtagGCVoiceChat
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # B9 13 进入组队副本失败原因 #tagGCEnterTeamFBFailReason
 | 
 |  |  | 
 | 
 |  |  | class  tagGCEnterTeamFBFailReason(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("MapID", c_int),    # 请求进入的地图ID
 | 
 |  |  |                   ("AskType", c_ubyte),    # 请求类型: 0-匹配请求;1-进入请求
 | 
 |  |  |                   ("Reason", c_ubyte),    # 失败原因:2-次数不足;3-进入CD中;6-门票不足
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Cmd = 0xB9
 | 
 |  |  |         self.SubCmd = 0x13
 | 
 |  |  |         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 = 0xB9
 | 
 |  |  |         self.SubCmd = 0x13
 | 
 |  |  |         self.MapID = 0
 | 
 |  |  |         self.AskType = 0
 | 
 |  |  |         self.Reason = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagGCEnterTeamFBFailReason)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// B9 13 进入组队副本失败原因 //tagGCEnterTeamFBFailReason:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 MapID:%d,
 | 
 |  |  |                                 AskType:%d,
 | 
 |  |  |                                 Reason:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.MapID,
 | 
 |  |  |                                 self.AskType,
 | 
 |  |  |                                 self.Reason
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagGCEnterTeamFBFailReason=tagGCEnterTeamFBFailReason()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCEnterTeamFBFailReason.Cmd,m_NAtagGCEnterTeamFBFailReason.SubCmd))] = m_NAtagGCEnterTeamFBFailReason
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A3 24 通知绑玉转盘结果 #tagMCBindJadeWheelResult
 | 
 |  |  | 
 | 
 |  |  | class  tagMCBindJadeWheelResult(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("Index", c_ubyte),    # 格子
 | 
 |  |  |                   ("Cnt", c_ubyte),    #今日已转次数
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Cmd = 0xA3
 | 
 |  |  |         self.SubCmd = 0x24
 | 
 |  |  |         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 = 0xA3
 | 
 |  |  |         self.SubCmd = 0x24
 | 
 |  |  |         self.Index = 0
 | 
 |  |  |         self.Cnt = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCBindJadeWheelResult)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// A3 24 通知绑玉转盘结果 //tagMCBindJadeWheelResult:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 Index:%d,
 | 
 |  |  |                                 Cnt:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.Index,
 | 
 |  |  |                                 self.Cnt
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCBindJadeWheelResult=tagMCBindJadeWheelResult()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBindJadeWheelResult.Cmd,m_NAtagMCBindJadeWheelResult.SubCmd))] = m_NAtagMCBindJadeWheelResult
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | #A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
 | 
 |  |  | 
 | 
 |  |  | class  tagMCBossCntInfo(Structure):
 | 
 |  |  | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | #A3 0A 副本鼓舞信息通知 #tagMCFBEncourageInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFBEncourageInfo(Structure):
 | 
 |  |  | class  tagMCFBEncourageCnt(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("Cnt1", c_ubyte),    # 当前铜钱鼓舞次数
 | 
 |  |  |                   ("Cnt2", c_ubyte),    # 当前仙玉鼓舞次数
 | 
 |  |  |                   ("MoneyType", c_ubyte),    # 金钱类型
 | 
 |  |  |                   ("EncourageCnt", c_ubyte),    # 当前鼓舞次数
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Cmd = 0xA3
 | 
 |  |  |         self.SubCmd = 0x0A
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, stringData, _pos=0, _len=0):
 | 
 |  |  | 
 |  |  |         return _pos + self.GetLength()
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Cmd = 0xA3
 | 
 |  |  |         self.SubCmd = 0x0A
 | 
 |  |  |         self.Cnt1 = 0
 | 
 |  |  |         self.Cnt2 = 0
 | 
 |  |  |         self.MoneyType = 0
 | 
 |  |  |         self.EncourageCnt = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCFBEncourageInfo)
 | 
 |  |  |         return sizeof(tagMCFBEncourageCnt)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''//A3 0A 副本鼓舞信息通知 //tagMCFBEncourageInfo:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 Cnt1:%d,
 | 
 |  |  |                                 Cnt2:%d
 | 
 |  |  |                                 MoneyType:%d,
 | 
 |  |  |                                 EncourageCnt:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.Cnt1,
 | 
 |  |  |                                 self.Cnt2
 | 
 |  |  |                                 self.MoneyType,
 | 
 |  |  |                                 self.EncourageCnt
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFBEncourageInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Cnt = 0    #(BYTE Cnt)//  | 
 |  |  |     InfoList = list()    #(vector<tagMCFBEncourageCnt> InfoList)// 次数信息
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA3
 | 
 |  |  |         self.Head.SubCmd = 0x0A
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.Cnt):
 | 
 |  |  |             temInfoList = tagMCFBEncourageCnt()
 | 
 |  |  |             _pos = temInfoList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.InfoList.append(temInfoList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA3
 | 
 |  |  |         self.Head.SubCmd = 0x0A
 | 
 |  |  |         self.Cnt = 0
 | 
 |  |  |         self.InfoList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.Cnt):
 | 
 |  |  |             length += self.InfoList[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.Cnt)
 | 
 |  |  |         for i in range(self.Cnt):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 Cnt:%d,
 | 
 |  |  |                                 InfoList:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.Cnt,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCFBEncourageInfo=tagMCFBEncourageInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Cmd,m_NAtagMCFBEncourageInfo.SubCmd))] = m_NAtagMCFBEncourageInfo
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBEncourageInfo.Head.Cmd,m_NAtagMCFBEncourageInfo.Head.SubCmd))] = m_NAtagMCFBEncourageInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("FuncID", c_ubyte),    # 功能ID
 | 
 |  |  |                   ("State", c_ubyte),    # 是否开启
 | 
 |  |  |                   ("AwardState", c_ubyte),    # 是否已领奖励
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.FuncID = 0
 | 
 |  |  |         self.State = 0
 | 
 |  |  |         self.AwardState = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''//A3 02 功能开通状态 //tagMCFuncOpenStateList:
 | 
 |  |  |                                 FuncID:%d,
 | 
 |  |  |                                 State:%d
 | 
 |  |  |                                 State:%d,
 | 
 |  |  |                                 AwardState:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.FuncID,
 | 
 |  |  |                                 self.State
 | 
 |  |  |                                 self.State,
 | 
 |  |  |                                 self.AwardState
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |                   ("LV", c_ubyte),    
 | 
 |  |  |                   ("Exp", c_int),    
 | 
 |  |  |                   ("State", c_ubyte),    #是否点击法宝认主
 | 
 |  |  |                   ("FBPassLV", c_ubyte),    #副本关卡
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |         self.LV = 0
 | 
 |  |  |         self.Exp = 0
 | 
 |  |  |         self.State = 0
 | 
 |  |  |         self.FBPassLV = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  | 
 |  |  |                                 MWID:%d,
 | 
 |  |  |                                 LV:%d,
 | 
 |  |  |                                 Exp:%d,
 | 
 |  |  |                                 State:%d
 | 
 |  |  |                                 State:%d,
 | 
 |  |  |                                 FBPassLV:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.MWID,
 | 
 |  |  |                                 self.LV,
 | 
 |  |  |                                 self.Exp,
 | 
 |  |  |                                 self.State
 | 
 |  |  |                                 self.State,
 | 
 |  |  |                                 self.FBPassLV
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A7 17 聊天气泡框状态 #tagMCChatBubbleBoxState
 | 
 |  |  | 
 | 
 |  |  | class  tagMCChatBubbleBoxState(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("BoxState", c_int),    # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Cmd = 0xA7
 | 
 |  |  |         self.SubCmd = 0x17
 | 
 |  |  |         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 = 0xA7
 | 
 |  |  |         self.SubCmd = 0x17
 | 
 |  |  |         self.BoxState = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCChatBubbleBoxState)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 BoxState:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.BoxState
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCChatBubbleBoxState=tagMCChatBubbleBoxState()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Cmd,m_NAtagMCChatBubbleBoxState.SubCmd))] = m_NAtagMCChatBubbleBoxState
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A7 13 动态障碍物状态 #tagMCDynamicBarrierState
 | 
 |  |  | 
 | 
 |  |  | class  tagMCDynamicBarrier(Structure):
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | m_NAtagMCGuideState=tagMCGuideState()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGuideState.Head.Cmd,m_NAtagMCGuideState.Head.SubCmd))] = m_NAtagMCGuideState
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A7 16 小助手设置 #tagMCLittleHelperSet
 | 
 |  |  | 
 | 
 |  |  | class  tagMCLittleHelperFuncSet(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("SetNum", c_ubyte),    # 托管功能设置编号1~20,每个编号对应的托管功能前端自定义
 | 
 |  |  |                   ("Value1", c_int),    # 自定义值1,如果存储的是勾选信息, 按二进制位存储代表是否勾选,支持31位,每位代表的含义前端自定义
 | 
 |  |  |                   ("Value2", c_int),    # 自定义值2
 | 
 |  |  |                   ("Value3", c_int),    # 自定义值3
 | 
 |  |  |                   ("Value4", c_int),    # 自定义值4
 | 
 |  |  |                   ("Value5", c_int),    # 自定义值5
 | 
 |  |  |                   ("Value6", c_int),    # 自定义值6
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.SetNum = 0
 | 
 |  |  |         self.Value1 = 0
 | 
 |  |  |         self.Value2 = 0
 | 
 |  |  |         self.Value3 = 0
 | 
 |  |  |         self.Value4 = 0
 | 
 |  |  |         self.Value5 = 0
 | 
 |  |  |         self.Value6 = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCLittleHelperFuncSet)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// A7 16 小助手设置 //tagMCLittleHelperSet:
 | 
 |  |  |                                 SetNum:%d,
 | 
 |  |  |                                 Value1:%d,
 | 
 |  |  |                                 Value2:%d,
 | 
 |  |  |                                 Value3:%d,
 | 
 |  |  |                                 Value4:%d,
 | 
 |  |  |                                 Value5:%d,
 | 
 |  |  |                                 Value6:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.SetNum,
 | 
 |  |  |                                 self.Value1,
 | 
 |  |  |                                 self.Value2,
 | 
 |  |  |                                 self.Value3,
 | 
 |  |  |                                 self.Value4,
 | 
 |  |  |                                 self.Value5,
 | 
 |  |  |                                 self.Value6
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCLittleHelperSet(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     FuncSetCount = 0    #(BYTE FuncSetCount)// 托管功能设置数,暂支持20个
 | 
 |  |  |     FuncSetList = list()    #(vector<tagMCLittleHelperFuncSet> FuncSetList)// 托管功能设置列表
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA7
 | 
 |  |  |         self.Head.SubCmd = 0x16
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.FuncSetCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.FuncSetCount):
 | 
 |  |  |             temFuncSetList = tagMCLittleHelperFuncSet()
 | 
 |  |  |             _pos = temFuncSetList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.FuncSetList.append(temFuncSetList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA7
 | 
 |  |  |         self.Head.SubCmd = 0x16
 | 
 |  |  |         self.FuncSetCount = 0
 | 
 |  |  |         self.FuncSetList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.FuncSetCount):
 | 
 |  |  |             length += self.FuncSetList[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.FuncSetCount)
 | 
 |  |  |         for i in range(self.FuncSetCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.FuncSetList[i].GetLength(), self.FuncSetList[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 FuncSetCount:%d,
 | 
 |  |  |                                 FuncSetList:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.FuncSetCount,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCLittleHelperSet=tagMCLittleHelperSet()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLittleHelperSet.Head.Cmd,m_NAtagMCLittleHelperSet.Head.SubCmd))] = m_NAtagMCLittleHelperSet
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 1D 累计充值活动信息 #tagMCActTotalRechargeInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCTotalRechargeAwardItem(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("ItemID", c_int),     | 
 |  |  |                   ("ItemCount", c_ushort),     | 
 |  |  |                   ("IsBind", c_ubyte),     | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.ItemID = 0
 | 
 |  |  |         self.ItemCount = 0
 | 
 |  |  |         self.IsBind = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCTotalRechargeAwardItem)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 1D 累计充值活动信息 //tagMCActTotalRechargeInfo:
 | 
 |  |  |                                 ItemID:%d,
 | 
 |  |  |                                 ItemCount:%d,
 | 
 |  |  |                                 IsBind:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.ItemID,
 | 
 |  |  |                                 self.ItemCount,
 | 
 |  |  |                                 self.IsBind
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCTotalRechargeAward(Structure):
 | 
 |  |  |     AwardIndex = 0    #(BYTE AwardIndex)// 奖励索引 0~31
 | 
 |  |  |     NeedGold = 0    #(DWORD NeedGold)// 所需仙玉数
 | 
 |  |  |     AwardItemCount = 0    #(BYTE AwardItemCount)// 奖励物品数
 | 
 |  |  |     AwardItem = list()    #(vector<tagMCTotalRechargeAwardItem> AwardItem)// 奖励物品信息
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.NeedGold,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.AwardItemCount):
 | 
 |  |  |             temAwardItem = tagMCTotalRechargeAwardItem()
 | 
 |  |  |             _pos = temAwardItem.ReadData(_lpData, _pos)
 | 
 |  |  |             self.AwardItem.append(temAwardItem)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.AwardIndex = 0
 | 
 |  |  |         self.NeedGold = 0
 | 
 |  |  |         self.AwardItemCount = 0
 | 
 |  |  |         self.AwardItem = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 4
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.AwardItemCount):
 | 
 |  |  |             length += self.AwardItem[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.AwardIndex)
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.NeedGold)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.AwardItemCount)
 | 
 |  |  |         for i in range(self.AwardItemCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.AwardItem[i].GetLength(), self.AwardItem[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 AwardIndex:%d,
 | 
 |  |  |                                 NeedGold:%d,
 | 
 |  |  |                                 AwardItemCount:%d,
 | 
 |  |  |                                 AwardItem:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.AwardIndex,
 | 
 |  |  |                                 self.NeedGold,
 | 
 |  |  |                                 self.AwardItemCount,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCTotalRechargeAwardDay(Structure):
 | 
 |  |  |     AwardCount = 0    #(BYTE AwardCount)// 奖励档数
 | 
 |  |  |     AwardInfo = list()    #(vector<tagMCTotalRechargeAward> AwardInfo)// 奖励档信息
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.AwardCount):
 | 
 |  |  |             temAwardInfo = tagMCTotalRechargeAward()
 | 
 |  |  |             _pos = temAwardInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.AwardInfo.append(temAwardInfo)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.AwardCount = 0
 | 
 |  |  |         self.AwardInfo = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.AwardCount):
 | 
 |  |  |             length += self.AwardInfo[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.AwardCount)
 | 
 |  |  |         for i in range(self.AwardCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.AwardInfo[i].GetLength(), self.AwardInfo[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 AwardCount:%d,
 | 
 |  |  |                                 AwardInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.AwardCount,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCActTotalRechargeInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
 | 
 |  |  |     LimitLV = 0    #(WORD LimitLV)// 限制等级
 | 
 |  |  |     AwardDays = 0    #(BYTE AwardDays)
 | 
 |  |  |     AwardDayInfo = list()    #(vector<tagMCTotalRechargeAwardDay> AwardDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x1D
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.AwardDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.AwardDays):
 | 
 |  |  |             temAwardDayInfo = tagMCTotalRechargeAwardDay()
 | 
 |  |  |             _pos = temAwardDayInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.AwardDayInfo.append(temAwardDayInfo)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x1D
 | 
 |  |  |         self.StartDate = ""
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.IsDayReset = 0
 | 
 |  |  |         self.LimitLV = 0
 | 
 |  |  |         self.AwardDays = 0
 | 
 |  |  |         self.AwardDayInfo = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.AwardDays):
 | 
 |  |  |             length += self.AwardDayInfo[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.StartDate)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.IsDayReset)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.LimitLV)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.AwardDays)
 | 
 |  |  |         for i in range(self.AwardDays):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.AwardDayInfo[i].GetLength(), self.AwardDayInfo[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 IsDayReset:%d,
 | 
 |  |  |                                 LimitLV:%d,
 | 
 |  |  |                                 AwardDays:%d,
 | 
 |  |  |                                 AwardDayInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.IsDayReset,
 | 
 |  |  |                                 self.LimitLV,
 | 
 |  |  |                                 self.AwardDays,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCActTotalRechargeInfo=tagMCActTotalRechargeInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTotalRechargeInfo.Head.Cmd,m_NAtagMCActTotalRechargeInfo.Head.SubCmd))] = m_NAtagMCActTotalRechargeInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 1B 许愿池拖动结果 #tagMCActWishingDragResult
 | 
 |  |  | 
 | 
 |  |  | class  tagMCPlayerWishingDragInfo(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("WellType", c_ubyte),    # 库 0-可选库 1-结果库
 | 
 |  |  |                   ("Index", c_ubyte),    # 索引
 | 
 |  |  |                   ("ItemID", c_int),    # 物品ID
 | 
 |  |  |                   ("ItemCnt", c_ushort),    # 物品数量
 | 
 |  |  |                   ("IsBind", c_ubyte),    # 是否绑定
 | 
 |  |  |                   ("IsSpecial", c_ubyte),    # 是否极品
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.WellType = 0
 | 
 |  |  |         self.Index = 0
 | 
 |  |  |         self.ItemID = 0
 | 
 |  |  |         self.ItemCnt = 0
 | 
 |  |  |         self.IsBind = 0
 | 
 |  |  |         self.IsSpecial = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCPlayerWishingDragInfo)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 1B 许愿池拖动结果 //tagMCActWishingDragResult:
 | 
 |  |  |                                 WellType:%d,
 | 
 |  |  |                                 Index:%d,
 | 
 |  |  |                                 ItemID:%d,
 | 
 |  |  |                                 ItemCnt:%d,
 | 
 |  |  |                                 IsBind:%d,
 | 
 |  |  |                                 IsSpecial:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.WellType,
 | 
 |  |  |                                 self.Index,
 | 
 |  |  |                                 self.ItemID,
 | 
 |  |  |                                 self.ItemCnt,
 | 
 |  |  |                                 self.IsBind,
 | 
 |  |  |                                 self.IsSpecial
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCActWishingDragResult(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Cnt = 0    #(BYTE Cnt)
 | 
 |  |  |     InfoList = list()    #(vector<tagMCPlayerWishingDragInfo> InfoList)
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x1B
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.Cnt):
 | 
 |  |  |             temInfoList = tagMCPlayerWishingDragInfo()
 | 
 |  |  |             _pos = temInfoList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.InfoList.append(temInfoList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x1B
 | 
 |  |  |         self.Cnt = 0
 | 
 |  |  |         self.InfoList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.Cnt):
 | 
 |  |  |             length += self.InfoList[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.Cnt)
 | 
 |  |  |         for i in range(self.Cnt):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 Cnt:%d,
 | 
 |  |  |                                 InfoList:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.Cnt,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCActWishingDragResult=tagMCActWishingDragResult()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingDragResult.Head.Cmd,m_NAtagMCActWishingDragResult.Head.SubCmd))] = m_NAtagMCActWishingDragResult
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 19 许愿池活动信息 #tagMCActWishingWellInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCWishingWellItem(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("ItemID", c_int),    # 物品ID
 | 
 |  |  |                   ("ItemCnt", c_ushort),    # 物品数量
 | 
 |  |  |                   ("IsBind", c_ubyte),    # 是否绑定
 | 
 |  |  |                   ("Mark", c_int),    # 排序标识
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.ItemID = 0
 | 
 |  |  |         self.ItemCnt = 0
 | 
 |  |  |         self.IsBind = 0
 | 
 |  |  |         self.Mark = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCWishingWellItem)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 19 许愿池活动信息 //tagMCActWishingWellInfo:
 | 
 |  |  |                                 ItemID:%d,
 | 
 |  |  |                                 ItemCnt:%d,
 | 
 |  |  |                                 IsBind:%d,
 | 
 |  |  |                                 Mark:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.ItemID,
 | 
 |  |  |                                 self.ItemCnt,
 | 
 |  |  |                                 self.IsBind,
 | 
 |  |  |                                 self.Mark
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCActWishingWellInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
 | 
 |  |  |     ResetType = 0    #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
 | 
 |  |  |     LimitLV = 0    #(WORD LimitLV)// 限制等级
 | 
 |  |  |     Count = 0    #(WORD Count)// 物品数
 | 
 |  |  |     WellItemInfo = list()    #(vector<tagMCWishingWellItem> WellItemInfo)// 随机库物品信息
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x19
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             temWellItemInfo = tagMCWishingWellItem()
 | 
 |  |  |             _pos = temWellItemInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.WellItemInfo.append(temWellItemInfo)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x19
 | 
 |  |  |         self.StartDate = ""
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.IsDayReset = 0
 | 
 |  |  |         self.ResetType = 0
 | 
 |  |  |         self.LimitLV = 0
 | 
 |  |  |         self.Count = 0
 | 
 |  |  |         self.WellItemInfo = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 2
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             length += self.WellItemInfo[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.StartDate)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.IsDayReset)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ResetType)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.LimitLV)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.Count)
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.WellItemInfo[i].GetLength(), self.WellItemInfo[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 IsDayReset:%d,
 | 
 |  |  |                                 ResetType:%d,
 | 
 |  |  |                                 LimitLV:%d,
 | 
 |  |  |                                 Count:%d,
 | 
 |  |  |                                 WellItemInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.IsDayReset,
 | 
 |  |  |                                 self.ResetType,
 | 
 |  |  |                                 self.LimitLV,
 | 
 |  |  |                                 self.Count,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCActWishingWellInfo=tagMCActWishingWellInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingWellInfo.Head.Cmd,m_NAtagMCActWishingWellInfo.Head.SubCmd))] = m_NAtagMCActWishingWellInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 1A 许愿池活动玩家信息 #tagMCActWishingWellPlayerInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCPlayerWishingWellItem(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("ItemID", c_int),    # 物品ID
 | 
 |  |  |                   ("ItemCnt", c_ushort),    # 物品数量
 | 
 |  |  |                   ("IsBind", c_ubyte),    # 是否绑定
 | 
 |  |  |                   ("IsSpecial", c_ubyte),    # 是否极品
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.ItemID = 0
 | 
 |  |  |         self.ItemCnt = 0
 | 
 |  |  |         self.IsBind = 0
 | 
 |  |  |         self.IsSpecial = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCPlayerWishingWellItem)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 1A 许愿池活动玩家信息 //tagMCActWishingWellPlayerInfo:
 | 
 |  |  |                                 ItemID:%d,
 | 
 |  |  |                                 ItemCnt:%d,
 | 
 |  |  |                                 IsBind:%d,
 | 
 |  |  |                                 IsSpecial:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.ItemID,
 | 
 |  |  |                                 self.ItemCnt,
 | 
 |  |  |                                 self.IsBind,
 | 
 |  |  |                                 self.IsSpecial
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCActWishingWellPlayerInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     FreeStartTime = 0    #(DWORD FreeStartTime)// 免费开始倒计时时间
 | 
 |  |  |     WishCnt = 0    #(DWORD WishCnt)// 许愿付费刷新次数
 | 
 |  |  |     WellItemCnt = 0    #(BYTE WellItemCnt)//许愿池物品数量
 | 
 |  |  |     WellItemInfo = list()    #(vector<tagMCPlayerWishingWellItem> WellItemInfo)// 随机库物品信息
 | 
 |  |  |     CurAwardCnt = 0    #(BYTE CurAwardCnt)// 当前奖励物品数量
 | 
 |  |  |     CurAwardItemInfo = list()    #(vector<tagMCPlayerWishingWellItem> CurAwardItemInfo)// 当前奖励物品
 | 
 |  |  |     LastAwardCnt = 0    #(BYTE LastAwardCnt)// 可领取奖励物品数量
 | 
 |  |  |     LastAwardItemInfo = list()    #(vector<tagMCPlayerWishingWellItem> LastAwardItemInfo)// 可领取奖励物品
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x1A
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.FreeStartTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         self.WishCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         self.WellItemCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.WellItemCnt):
 | 
 |  |  |             temWellItemInfo = tagMCPlayerWishingWellItem()
 | 
 |  |  |             _pos = temWellItemInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.WellItemInfo.append(temWellItemInfo)
 | 
 |  |  |         self.CurAwardCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.CurAwardCnt):
 | 
 |  |  |             temCurAwardItemInfo = tagMCPlayerWishingWellItem()
 | 
 |  |  |             _pos = temCurAwardItemInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.CurAwardItemInfo.append(temCurAwardItemInfo)
 | 
 |  |  |         self.LastAwardCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.LastAwardCnt):
 | 
 |  |  |             temLastAwardItemInfo = tagMCPlayerWishingWellItem()
 | 
 |  |  |             _pos = temLastAwardItemInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.LastAwardItemInfo.append(temLastAwardItemInfo)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x1A
 | 
 |  |  |         self.FreeStartTime = 0
 | 
 |  |  |         self.WishCnt = 0
 | 
 |  |  |         self.WellItemCnt = 0
 | 
 |  |  |         self.WellItemInfo = list()
 | 
 |  |  |         self.CurAwardCnt = 0
 | 
 |  |  |         self.CurAwardItemInfo = list()
 | 
 |  |  |         self.LastAwardCnt = 0
 | 
 |  |  |         self.LastAwardItemInfo = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 4
 | 
 |  |  |         length += 4
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.WellItemCnt):
 | 
 |  |  |             length += self.WellItemInfo[i].GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.CurAwardCnt):
 | 
 |  |  |             length += self.CurAwardItemInfo[i].GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.LastAwardCnt):
 | 
 |  |  |             length += self.LastAwardItemInfo[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.FreeStartTime)
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.WishCnt)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.WellItemCnt)
 | 
 |  |  |         for i in range(self.WellItemCnt):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.WellItemInfo[i].GetLength(), self.WellItemInfo[i].GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.CurAwardCnt)
 | 
 |  |  |         for i in range(self.CurAwardCnt):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.CurAwardItemInfo[i].GetLength(), self.CurAwardItemInfo[i].GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.LastAwardCnt)
 | 
 |  |  |         for i in range(self.LastAwardCnt):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.LastAwardItemInfo[i].GetLength(), self.LastAwardItemInfo[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 FreeStartTime:%d,
 | 
 |  |  |                                 WishCnt:%d,
 | 
 |  |  |                                 WellItemCnt:%d,
 | 
 |  |  |                                 WellItemInfo:%s,
 | 
 |  |  |                                 CurAwardCnt:%d,
 | 
 |  |  |                                 CurAwardItemInfo:%s,
 | 
 |  |  |                                 LastAwardCnt:%d,
 | 
 |  |  |                                 LastAwardItemInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.FreeStartTime,
 | 
 |  |  |                                 self.WishCnt,
 | 
 |  |  |                                 self.WellItemCnt,
 | 
 |  |  |                                 "...",
 | 
 |  |  |                                 self.CurAwardCnt,
 | 
 |  |  |                                 "...",
 | 
 |  |  |                                 self.LastAwardCnt,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCActWishingWellPlayerInfo=tagMCActWishingWellPlayerInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingWellPlayerInfo.Head.Cmd,m_NAtagMCActWishingWellPlayerInfo.Head.SubCmd))] = m_NAtagMCActWishingWellPlayerInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 15 仙界盛典全民来嗨玩家信息 #tagMCAllPeoplePartyInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCAllPeoplePartyCount(Structure):
 | 
 |  |  | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     AdvanceMinutes = 0    #(WORD AdvanceMinutes)// 提前显示分钟
 | 
 |  |  |     ActivityTimeCount = 0    #(BYTE ActivityTimeCount)
 | 
 |  |  |     ActivityTime = list()    #(vector<tagMCFlashGiftbagTime> ActivityTime)//活动时间
 | 
 |  |  |     IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
 | 
 |  |  | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.ActivityTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             temActivityTime = tagMCFlashGiftbagTime()
 | 
 |  |  | 
 |  |  |         self.Head.SubCmd = 0x12
 | 
 |  |  |         self.StartDate = ""
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.AdvanceMinutes = 0
 | 
 |  |  |         self.ActivityTimeCount = 0
 | 
 |  |  |         self.ActivityTime = list()
 | 
 |  |  |         self.IsDayReset = 0
 | 
 |  |  | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             length += self.ActivityTime[i].GetLength()
 | 
 |  |  | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.StartDate)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.AdvanceMinutes)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ActivityTimeCount)
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.ActivityTime[i].GetLength(), self.ActivityTime[i].GetBuffer())
 | 
 |  |  | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 AdvanceMinutes:%d,
 | 
 |  |  |                                 ActivityTimeCount:%d,
 | 
 |  |  |                                 ActivityTime:%s,
 | 
 |  |  |                                 IsDayReset:%d,
 | 
 |  |  | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.AdvanceMinutes,
 | 
 |  |  |                                 self.ActivityTimeCount,
 | 
 |  |  |                                 "...",
 | 
 |  |  |                                 self.IsDayReset,
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | m_NAtagMCFlashGiftbagPlayerInfo=tagMCFlashGiftbagPlayerInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFlashGiftbagPlayerInfo.Head.Cmd,m_NAtagMCFlashGiftbagPlayerInfo.Head.SubCmd))] = m_NAtagMCFlashGiftbagPlayerInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 18 限时抢购活动玩家预约信息 #tagMCFlashSaleAppointmentInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFlashSaleAppointmentState(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("GoodsMark", c_int),    # 商品标识
 | 
 |  |  |                   ("State", c_ubyte),    # 是否预约
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.GoodsMark = 0
 | 
 |  |  |         self.State = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCFlashSaleAppointmentState)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 18 限时抢购活动玩家预约信息 //tagMCFlashSaleAppointmentInfo:
 | 
 |  |  |                                 GoodsMark:%d,
 | 
 |  |  |                                 State:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.GoodsMark,
 | 
 |  |  |                                 self.State
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFlashSaleAppointmentInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     IsAll = 0    #(BYTE IsAll)// 是否全部
 | 
 |  |  |     GoodsCount = 0    #(WORD GoodsCount)// 商品数
 | 
 |  |  |     GoodsList = list()    #(vector<tagMCFlashSaleAppointmentState> GoodsList)// 预约的商品
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x18
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.GoodsCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         for i in range(self.GoodsCount):
 | 
 |  |  |             temGoodsList = tagMCFlashSaleAppointmentState()
 | 
 |  |  |             _pos = temGoodsList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.GoodsList.append(temGoodsList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x18
 | 
 |  |  |         self.IsAll = 0
 | 
 |  |  |         self.GoodsCount = 0
 | 
 |  |  |         self.GoodsList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         for i in range(self.GoodsCount):
 | 
 |  |  |             length += self.GoodsList[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.IsAll)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.GoodsCount)
 | 
 |  |  |         for i in range(self.GoodsCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.GoodsList[i].GetLength(), self.GoodsList[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 IsAll:%d,
 | 
 |  |  |                                 GoodsCount:%d,
 | 
 |  |  |                                 GoodsList:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.IsAll,
 | 
 |  |  |                                 self.GoodsCount,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCFlashSaleAppointmentInfo=tagMCFlashSaleAppointmentInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFlashSaleAppointmentInfo.Head.Cmd,m_NAtagMCFlashSaleAppointmentInfo.Head.SubCmd))] = m_NAtagMCFlashSaleAppointmentInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 17 限时抢购活动信息 #tagMCFlashSaleInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFlashSaleGiftbag(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("GiftID", c_int),    #商城表的物品ID
 | 
 |  |  |                   ("BuyCountLimit", c_ubyte),    #限购数
 | 
 |  |  |                   ("ServerBuyCountLimit", c_ushort),    #全服限购数
 | 
 |  |  |                   ("MoneyType", c_ubyte),    #消耗货币类型
 | 
 |  |  |                   ("MoneyNumber", c_int),    #消耗货币数量
 | 
 |  |  |                   ("MoneyOriginal", c_int),    #原价
 | 
 |  |  |                   ("ItemID", c_int),     | 
 |  |  |                   ("ItemCount", c_ushort),     | 
 |  |  |                   ("IsBind", c_ubyte),     | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         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.GiftID = 0
 | 
 |  |  |         self.BuyCountLimit = 0
 | 
 |  |  |         self.ServerBuyCountLimit = 0
 | 
 |  |  |         self.MoneyType = 0
 | 
 |  |  |         self.MoneyNumber = 0
 | 
 |  |  |         self.MoneyOriginal = 0
 | 
 |  |  |         self.ItemID = 0
 | 
 |  |  |         self.ItemCount = 0
 | 
 |  |  |         self.IsBind = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCFlashSaleGiftbag)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 17 限时抢购活动信息 //tagMCFlashSaleInfo:
 | 
 |  |  |                                 GiftID:%d,
 | 
 |  |  |                                 BuyCountLimit:%d,
 | 
 |  |  |                                 ServerBuyCountLimit:%d,
 | 
 |  |  |                                 MoneyType:%d,
 | 
 |  |  |                                 MoneyNumber:%d,
 | 
 |  |  |                                 MoneyOriginal:%d,
 | 
 |  |  |                                 ItemID:%d,
 | 
 |  |  |                                 ItemCount:%d,
 | 
 |  |  |                                 IsBind:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.GiftID,
 | 
 |  |  |                                 self.BuyCountLimit,
 | 
 |  |  |                                 self.ServerBuyCountLimit,
 | 
 |  |  |                                 self.MoneyType,
 | 
 |  |  |                                 self.MoneyNumber,
 | 
 |  |  |                                 self.MoneyOriginal,
 | 
 |  |  |                                 self.ItemID,
 | 
 |  |  |                                 self.ItemCount,
 | 
 |  |  |                                 self.IsBind
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFlashSaleShop(Structure):
 | 
 |  |  |     DayIndex = 0    #(BYTE DayIndex)// 活动第几天
 | 
 |  |  |     TimeIndex = 0    #(BYTE TimeIndex)// 第几个时间段
 | 
 |  |  |     GiftbagCount = 0    #(BYTE GiftbagCount)// 商店礼包数
 | 
 |  |  |     GiftbagInfo = list()    #(vector<tagMCFlashSaleGiftbag> GiftbagInfo)// 礼包信息
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.DayIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.TimeIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.GiftbagCount):
 | 
 |  |  |             temGiftbagInfo = tagMCFlashSaleGiftbag()
 | 
 |  |  |             _pos = temGiftbagInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.GiftbagInfo.append(temGiftbagInfo)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.DayIndex = 0
 | 
 |  |  |         self.TimeIndex = 0
 | 
 |  |  |         self.GiftbagCount = 0
 | 
 |  |  |         self.GiftbagInfo = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.GiftbagCount):
 | 
 |  |  |             length += self.GiftbagInfo[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.DayIndex)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.TimeIndex)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.GiftbagCount)
 | 
 |  |  |         for i in range(self.GiftbagCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.GiftbagInfo[i].GetLength(), self.GiftbagInfo[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 DayIndex:%d,
 | 
 |  |  |                                 TimeIndex:%d,
 | 
 |  |  |                                 GiftbagCount:%d,
 | 
 |  |  |                                 GiftbagInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.DayIndex,
 | 
 |  |  |                                 self.TimeIndex,
 | 
 |  |  |                                 self.GiftbagCount,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFlashSaleTime(Structure):
 | 
 |  |  |     StartTime = ""    #(char StartTime[5])// 开始时间 H:M
 | 
 |  |  |     EndtTime = ""    #(char EndtTime[5])// 结束时间 H:M
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
 | 
 |  |  |         self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.StartTime = ""
 | 
 |  |  |         self.EndtTime = ""
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 5
 | 
 |  |  |         length += 5
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, 5, self.StartTime)
 | 
 |  |  |         data = CommFunc.WriteString(data, 5, self.EndtTime)
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 StartTime:%s,
 | 
 |  |  |                                 EndtTime:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.StartTime,
 | 
 |  |  |                                 self.EndtTime
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCFlashSaleInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     AdvanceMinutes = 0    #(WORD AdvanceMinutes)// 提前显示分钟
 | 
 |  |  |     ActivityTimeCount = 0    #(BYTE ActivityTimeCount)
 | 
 |  |  |     ActivityTime = list()    #(vector<tagMCFlashSaleTime> ActivityTime)//活动时间
 | 
 |  |  |     IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
 | 
 |  |  |     LimitLV = 0    #(WORD LimitLV)// 限制等级
 | 
 |  |  |     ShopCount = 0    #(BYTE ShopCount)// 商店数
 | 
 |  |  |     ShopInfo = list()    #(vector<tagMCFlashSaleShop> ShopInfo)// 商店信息, 当有多个商店且有多个活动时间段时则每个时间段对应一个商店;
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x17
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.ActivityTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             temActivityTime = tagMCFlashSaleTime()
 | 
 |  |  |             _pos = temActivityTime.ReadData(_lpData, _pos)
 | 
 |  |  |             self.ActivityTime.append(temActivityTime)
 | 
 |  |  |         self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.ShopCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.ShopCount):
 | 
 |  |  |             temShopInfo = tagMCFlashSaleShop()
 | 
 |  |  |             _pos = temShopInfo.ReadData(_lpData, _pos)
 | 
 |  |  |             self.ShopInfo.append(temShopInfo)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x17
 | 
 |  |  |         self.StartDate = ""
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.AdvanceMinutes = 0
 | 
 |  |  |         self.ActivityTimeCount = 0
 | 
 |  |  |         self.ActivityTime = list()
 | 
 |  |  |         self.IsDayReset = 0
 | 
 |  |  |         self.LimitLV = 0
 | 
 |  |  |         self.ShopCount = 0
 | 
 |  |  |         self.ShopInfo = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             length += self.ActivityTime[i].GetLength()
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.ShopCount):
 | 
 |  |  |             length += self.ShopInfo[i].GetLength()
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.StartDate)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.AdvanceMinutes)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ActivityTimeCount)
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.ActivityTime[i].GetLength(), self.ActivityTime[i].GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.IsDayReset)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.LimitLV)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ShopCount)
 | 
 |  |  |         for i in range(self.ShopCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.ShopInfo[i].GetLength(), self.ShopInfo[i].GetBuffer())
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 AdvanceMinutes:%d,
 | 
 |  |  |                                 ActivityTimeCount:%d,
 | 
 |  |  |                                 ActivityTime:%s,
 | 
 |  |  |                                 IsDayReset:%d,
 | 
 |  |  |                                 LimitLV:%d,
 | 
 |  |  |                                 ShopCount:%d,
 | 
 |  |  |                                 ShopInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.AdvanceMinutes,
 | 
 |  |  |                                 self.ActivityTimeCount,
 | 
 |  |  |                                 "...",
 | 
 |  |  |                                 self.IsDayReset,
 | 
 |  |  |                                 self.LimitLV,
 | 
 |  |  |                                 self.ShopCount,
 | 
 |  |  |                                 "..."
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCFlashSaleInfo=tagMCFlashSaleInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFlashSaleInfo.Head.Cmd,m_NAtagMCFlashSaleInfo.Head.SubCmd))] = m_NAtagMCFlashSaleInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     AdvanceMinutes = 0    #(WORD AdvanceMinutes)// 提前显示分钟
 | 
 |  |  |     ActivityTimeCount = 0    #(BYTE ActivityTimeCount)
 | 
 |  |  |     ActivityTime = list()    #(vector<tagMCSpringSaleTime> ActivityTime)//活动时间
 | 
 |  |  |     IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
 | 
 |  |  | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.ActivityTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             temActivityTime = tagMCSpringSaleTime()
 | 
 |  |  | 
 |  |  |         self.Head.SubCmd = 0x11
 | 
 |  |  |         self.StartDate = ""
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.AdvanceMinutes = 0
 | 
 |  |  |         self.ActivityTimeCount = 0
 | 
 |  |  |         self.ActivityTime = list()
 | 
 |  |  |         self.IsDayReset = 0
 | 
 |  |  | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             length += self.ActivityTime[i].GetLength()
 | 
 |  |  | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.StartDate)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.AdvanceMinutes)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ActivityTimeCount)
 | 
 |  |  |         for i in range(self.ActivityTimeCount):
 | 
 |  |  |             data = CommFunc.WriteString(data, self.ActivityTime[i].GetLength(), self.ActivityTime[i].GetBuffer())
 | 
 |  |  | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 AdvanceMinutes:%d,
 | 
 |  |  |                                 ActivityTimeCount:%d,
 | 
 |  |  |                                 ActivityTime:%s,
 | 
 |  |  |                                 IsDayReset:%d,
 | 
 |  |  | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.AdvanceMinutes,
 | 
 |  |  |                                 self.ActivityTimeCount,
 | 
 |  |  |                                 "...",
 | 
 |  |  |                                 self.IsDayReset,
 | 
 |  |  | 
 |  |  | # AA 16 通知超值礼包信息 #tagMCSuperGiftInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCSuperGiftInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     GiftID = 0    #(DWORD GiftID)//商品ID
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     data = None
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("StartTime", c_int),     | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x16
 | 
 |  |  |         self.Cmd = 0xAA
 | 
 |  |  |         self.SubCmd = 0x16
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |     def ReadData(self, stringData, _pos=0, _len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         return _pos
 | 
 |  |  |         memmove(addressof(self), stringData[_pos:], self.GetLength())
 | 
 |  |  |         return _pos + self.GetLength()
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xAA
 | 
 |  |  |         self.Head.SubCmd = 0x16
 | 
 |  |  |         self.GiftID = 0
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.Cmd = 0xAA
 | 
 |  |  |         self.SubCmd = 0x16
 | 
 |  |  |         self.StartTime = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 4
 | 
 |  |  |         length += 10
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  |         return sizeof(tagMCSuperGiftInfo)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteDWORD(data, self.GiftID)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         return data
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 GiftID:%d,
 | 
 |  |  |                                 EndtDate:%s
 | 
 |  |  |         DumpString = '''// AA 16 通知超值礼包信息 //tagMCSuperGiftInfo:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 StartTime:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.GiftID,
 | 
 |  |  |                                 self.EndtDate
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.StartTime
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Head.Cmd,m_NAtagMCSuperGiftInfo.Head.SubCmd))] = m_NAtagMCSuperGiftInfo
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Cmd,m_NAtagMCSuperGiftInfo.SubCmd))] = m_NAtagMCSuperGiftInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | m_NAtagMCTotalLoginDayCntInfo=tagMCTotalLoginDayCntInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTotalLoginDayCntInfo.Cmd,m_NAtagMCTotalLoginDayCntInfo.SubCmd))] = m_NAtagMCTotalLoginDayCntInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # AA 1C 累计充值玩家活动信息 #tagMCTotalRechargePlayerInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCTotalRechargePlayerInfo(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("GoldTotal", c_int),    #本次活动已累计充值仙玉数
 | 
 |  |  |                   ("AwardRecord", c_int),    #奖励领奖记录,按奖励索引二进制位存储是否已领取
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Cmd = 0xAA
 | 
 |  |  |         self.SubCmd = 0x1C
 | 
 |  |  |         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 = 0x1C
 | 
 |  |  |         self.GoldTotal = 0
 | 
 |  |  |         self.AwardRecord = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCTotalRechargePlayerInfo)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// AA 1C 累计充值玩家活动信息 //tagMCTotalRechargePlayerInfo:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 GoldTotal:%d,
 | 
 |  |  |                                 AwardRecord:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.GoldTotal,
 | 
 |  |  |                                 self.AwardRecord
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCTotalRechargePlayerInfo=tagMCTotalRechargePlayerInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTotalRechargePlayerInfo.Cmd,m_NAtagMCTotalRechargePlayerInfo.SubCmd))] = m_NAtagMCTotalRechargePlayerInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
 | 
 |  |  |     EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
 | 
 |  |  |     ResetType = 0    #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
 | 
 |  |  |     LimitLV = 0    #(WORD LimitLV)// 限制等级
 | 
 |  |  |     TaskCnt = 0    #(BYTE TaskCnt)
 | 
 |  |  |     TaskInfo = list()    #(vector<tagMCBossRebornTaskInfo> TaskInfo)
 | 
 |  |  | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
 | 
 |  |  |         self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.TaskCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.TaskCnt):
 | 
 |  |  | 
 |  |  |         self.Head.SubCmd = 0x04
 | 
 |  |  |         self.StartDate = ""
 | 
 |  |  |         self.EndtDate = ""
 | 
 |  |  |         self.ResetType = 0
 | 
 |  |  |         self.LimitLV = 0
 | 
 |  |  |         self.TaskCnt = 0
 | 
 |  |  |         self.TaskInfo = list()
 | 
 |  |  | 
 |  |  |         length += self.Head.GetLength()
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 10
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += 1
 | 
 |  |  |         for i in range(self.TaskCnt):
 | 
 |  |  | 
 |  |  |         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.StartDate)
 | 
 |  |  |         data = CommFunc.WriteString(data, 10, self.EndtDate)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.ResetType)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.LimitLV)
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.TaskCnt)
 | 
 |  |  |         for i in range(self.TaskCnt):
 | 
 |  |  | 
 |  |  |                                 Head:%s,
 | 
 |  |  |                                 StartDate:%s,
 | 
 |  |  |                                 EndtDate:%s,
 | 
 |  |  |                                 ResetType:%d,
 | 
 |  |  |                                 LimitLV:%d,
 | 
 |  |  |                                 TaskCnt:%d,
 | 
 |  |  |                                 TaskInfo:%s
 | 
 |  |  | 
 |  |  |                                 self.Head.OutputString(),
 | 
 |  |  |                                 self.StartDate,
 | 
 |  |  |                                 self.EndtDate,
 | 
 |  |  |                                 self.ResetType,
 | 
 |  |  |                                 self.LimitLV,
 | 
 |  |  |                                 self.TaskCnt,
 | 
 |  |  |                                 "..."
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove
 | 
 |  |  | 
 | 
 |  |  | class  tagMCNotifyPlayerMove(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("Cmd", c_ubyte),
 | 
 |  |  |                   ("SubCmd", c_ubyte),
 | 
 |  |  |                   ("PosX", c_int),     | 
 |  |  |                   ("PosY", c_int),     | 
 |  |  |                   ("NPCID", c_int),    #目标点寻路NPCID, 可能为0
 | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Cmd = 0xB1
 | 
 |  |  |         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 = 0xB1
 | 
 |  |  |         self.SubCmd = 0x06
 | 
 |  |  |         self.PosX = 0
 | 
 |  |  |         self.PosY = 0
 | 
 |  |  |         self.NPCID = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCNotifyPlayerMove)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// B1 06 通知玩家向目标点移动 //tagMCNotifyPlayerMove:
 | 
 |  |  |                                 Cmd:%s,
 | 
 |  |  |                                 SubCmd:%s,
 | 
 |  |  |                                 PosX:%d,
 | 
 |  |  |                                 PosY:%d,
 | 
 |  |  |                                 NPCID:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.Cmd,
 | 
 |  |  |                                 self.SubCmd,
 | 
 |  |  |                                 self.PosX,
 | 
 |  |  |                                 self.PosY,
 | 
 |  |  |                                 self.NPCID
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCNotifyPlayerMove=tagMCNotifyPlayerMove()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNotifyPlayerMove.Cmd,m_NAtagMCNotifyPlayerMove.SubCmd))] = m_NAtagMCNotifyPlayerMove
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # B1 03 通知玩家死亡时间 #tagMCPlayerDeadTime
 | 
 |  |  | 
 | 
 |  |  | class  tagMCPlayerDeadTime(Structure):
 |