| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C0 10 跨服所属分区信息 #tagGCCrossZoneInfo
|
| | |
|
| | | class tagGCCrossZoneInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("CommZoneID", c_ubyte), # 所属常规分区ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xC0
|
| | | self.SubCmd = 0x10
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xC0
|
| | | self.SubCmd = 0x10
|
| | | self.CommZoneID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCCrossZoneInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// C0 10 跨服所属分区信息 //tagGCCrossZoneInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | CommZoneID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.CommZoneID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCCrossZoneInfo=tagGCCrossZoneInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossZoneInfo.Cmd,m_NAtagGCCrossZoneInfo.SubCmd))] = m_NAtagGCCrossZoneInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C0 14 幸运云购开奖记录 #tagGCLuckyCloudBuyLotteryRecInfo
|
| | |
|
| | | class tagGCLuckyCloudBuyLotteryRec(Structure):
|
| | |
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCLuckyCloudBuyRoundTime(Structure):
|
| | | StartTime = "" #(char StartTime[5])// 开始时间 H:M
|
| | | EndtTime = "" #(char EndtTime[5])// 结束时间 H:M
|
| | | RoundMax = 0 #(BYTE RoundMax)// 本时段最大轮次
|
| | | 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)
|
| | | self.RoundMax,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.StartTime = ""
|
| | | self.EndtTime = ""
|
| | | self.RoundMax = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 5
|
| | | length += 5
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, 5, self.StartTime)
|
| | | data = CommFunc.WriteString(data, 5, self.EndtTime)
|
| | | data = CommFunc.WriteBYTE(data, self.RoundMax)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | StartTime:%s,
|
| | | EndtTime:%s,
|
| | | RoundMax:%d
|
| | | '''\
|
| | | %(
|
| | | self.StartTime,
|
| | | self.EndtTime,
|
| | | self.RoundMax
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCLuckyCloudBuyRoundInfo(Structure):
|
| | | Head = tagHead()
|
| | | ZoneID = 0 #(BYTE ZoneID)// 所属分区ID
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | RoundTimeCount = 0 #(BYTE RoundTimeCount)
|
| | | RoundTimeList = list() #(vector<tagGCLuckyCloudBuyRoundTime> RoundTimeList)//轮次时间段
|
| | | RoundID = 0 #(DWORD RoundID)// 轮次唯一ID标识,当收到的轮次ID变更时,前端需清空购买号码记录缓存
|
| | | RoundNum = 0 #(BYTE RoundNum)// 今日第几轮
|
| | | RoundNum = 0 #(BYTE RoundNum)// 当前时段第几轮
|
| | | SuperItemID = 0 #(DWORD SuperItemID)// 大奖物品ID
|
| | | SuperItemCount = 0 #(BYTE SuperItemCount)// 大奖物品个数
|
| | | SuperItemMoneyType = 0 #(BYTE SuperItemMoneyType)// 大奖价值货币类型
|
| | |
| | | self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
|
| | | self.RoundTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.RoundTimeCount):
|
| | | temRoundTimeList = tagGCLuckyCloudBuyRoundTime()
|
| | | _pos = temRoundTimeList.ReadData(_lpData, _pos)
|
| | | self.RoundTimeList.append(temRoundTimeList)
|
| | | self.RoundID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SuperItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | |
| | | self.ZoneID = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.RoundTimeCount = 0
|
| | | self.RoundTimeList = list()
|
| | | self.RoundID = 0
|
| | | self.RoundNum = 0
|
| | | self.SuperItemID = 0
|
| | |
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | for i in range(self.RoundTimeCount):
|
| | | length += self.RoundTimeList[i].GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.ZoneID)
|
| | | data = CommFunc.WriteString(data, 10, self.StartDate)
|
| | | data = CommFunc.WriteString(data, 10, self.EndtDate)
|
| | | data = CommFunc.WriteBYTE(data, self.RoundTimeCount)
|
| | | for i in range(self.RoundTimeCount):
|
| | | data = CommFunc.WriteString(data, self.RoundTimeList[i].GetLength(), self.RoundTimeList[i].GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.RoundID)
|
| | | data = CommFunc.WriteBYTE(data, self.RoundNum)
|
| | | data = CommFunc.WriteDWORD(data, self.SuperItemID)
|
| | |
| | | ZoneID:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | RoundTimeCount:%d,
|
| | | RoundTimeList:%s,
|
| | | RoundID:%d,
|
| | | RoundNum:%d,
|
| | | SuperItemID:%d,
|
| | |
| | | self.ZoneID,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.RoundTimeCount,
|
| | | "...",
|
| | | self.RoundID,
|
| | | self.RoundNum,
|
| | | self.SuperItemID,
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 C7 古宝信息 #tagMCGubaoInfo
|
| | |
|
| | | class tagMCGubao(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GubaoID", c_ushort), |
| | | ("GubaoStar", c_ubyte), |
| | | ("GubaoLV", 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.GubaoID = 0
|
| | | self.GubaoStar = 0
|
| | | self.GubaoLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGubao)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 C7 古宝信息 //tagMCGubaoInfo:
|
| | | GubaoID:%d,
|
| | | GubaoStar:%d,
|
| | | GubaoLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.GubaoID,
|
| | | self.GubaoStar,
|
| | | self.GubaoLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGubaoInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | GubaoInfoList = list() #(vector<tagMCGubao> GubaoInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xC7
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temGubaoInfoList = tagMCGubao()
|
| | | _pos = temGubaoInfoList.ReadData(_lpData, _pos)
|
| | | self.GubaoInfoList.append(temGubaoInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xC7
|
| | | self.Count = 0
|
| | | self.GubaoInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.GubaoInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.GubaoInfoList[i].GetLength(), self.GubaoInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | GubaoInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGubaoInfo=tagMCGubaoInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoInfo.Head.Cmd,m_NAtagMCGubaoInfo.Head.SubCmd))] = m_NAtagMCGubaoInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 CA 古宝物品特殊效果信息 #tagMCGubaoItemEffInfo
|
| | |
|
| | | class tagMCGubaoItemEff(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GubaoID", c_ushort), |
| | | ("EffType", c_ubyte), # 不同古宝ID允许拥有相同效果类型,进度值每个古宝ID单独统计
|
| | | ("EffValue", 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.GubaoID = 0
|
| | | self.EffType = 0
|
| | | self.EffValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGubaoItemEff)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 CA 古宝物品特殊效果信息 //tagMCGubaoItemEffInfo:
|
| | | GubaoID:%d,
|
| | | EffType:%d,
|
| | | EffValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.GubaoID,
|
| | | self.EffType,
|
| | | self.EffValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGubaoItemEffInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)
|
| | | ItemEffInfoList = list() #(vector<tagMCGubaoItemEff> ItemEffInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCA
|
| | | 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):
|
| | | temItemEffInfoList = tagMCGubaoItemEff()
|
| | | _pos = temItemEffInfoList.ReadData(_lpData, _pos)
|
| | | self.ItemEffInfoList.append(temItemEffInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCA
|
| | | self.Count = 0
|
| | | self.ItemEffInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.ItemEffInfoList[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.ItemEffInfoList[i].GetLength(), self.ItemEffInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ItemEffInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGubaoItemEffInfo=tagMCGubaoItemEffInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoItemEffInfo.Head.Cmd,m_NAtagMCGubaoItemEffInfo.Head.SubCmd))] = m_NAtagMCGubaoItemEffInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 CB 古宝碎片信息 #tagMCGubaoPieceInfo
|
| | |
|
| | | class tagMCGubaoPiece(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GubaoID", c_ushort), |
| | | ("PieceCount", 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.GubaoID = 0
|
| | | self.PieceCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCGubaoPiece)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 CB 古宝碎片信息 //tagMCGubaoPieceInfo:
|
| | | GubaoID:%d,
|
| | | PieceCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.GubaoID,
|
| | | self.PieceCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCGubaoPieceInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | PieceInfoList = list() #(vector<tagMCGubaoPiece> PieceInfoList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCB
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temPieceInfoList = tagMCGubaoPiece()
|
| | | _pos = temPieceInfoList.ReadData(_lpData, _pos)
|
| | | self.PieceInfoList.append(temPieceInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xCB
|
| | | self.Count = 0
|
| | | self.PieceInfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.PieceInfoList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.PieceInfoList[i].GetLength(), self.PieceInfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | PieceInfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCGubaoPieceInfo=tagMCGubaoPieceInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoPieceInfo.Head.Cmd,m_NAtagMCGubaoPieceInfo.Head.SubCmd))] = m_NAtagMCGubaoPieceInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 28 历史累积充值奖励领取记录 #tagMCHistoryReChargeAwardRecord
|
| | |
|
| | | class tagMCHistoryReChargeAwardRecord(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 C8 神通等级信息 #tagMCShentongLVInfo
|
| | |
|
| | | class tagMCShentongLV(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ShentongID", c_ubyte), |
| | | ("ClassLV", c_ubyte), |
| | | ("LV", 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.ShentongID = 0
|
| | | self.ClassLV = 0
|
| | | self.LV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCShentongLV)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 C8 神通等级信息 //tagMCShentongLVInfo:
|
| | | ShentongID:%d,
|
| | | ClassLV:%d,
|
| | | LV:%d
|
| | | '''\
|
| | | %(
|
| | | self.ShentongID,
|
| | | self.ClassLV,
|
| | | self.LV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCShentongLVInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | ShentongLVList = list() #(vector<tagMCShentongLV> ShentongLVList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xC8
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temShentongLVList = tagMCShentongLV()
|
| | | _pos = temShentongLVList.ReadData(_lpData, _pos)
|
| | | self.ShentongLVList.append(temShentongLVList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xC8
|
| | | self.Count = 0
|
| | | self.ShentongLVList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.ShentongLVList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.ShentongLVList[i].GetLength(), self.ShentongLVList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ShentongLVList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCShentongLVInfo=tagMCShentongLVInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShentongLVInfo.Head.Cmd,m_NAtagMCShentongLVInfo.Head.SubCmd))] = m_NAtagMCShentongLVInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 C9 神通技能设置信息 #tagMCShentongSkillInfo
|
| | |
|
| | | class tagMCShentongSkillInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | SkillIDList = list() #(vector<DWORD> SkillIDList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xC9
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.SkillIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xC9
|
| | | self.Count = 0
|
| | | self.SkillIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 4 * self.Count
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteDWORD(data, self.SkillIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | SkillIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCShentongSkillInfo=tagMCShentongSkillInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShentongSkillInfo.Head.Cmd,m_NAtagMCShentongSkillInfo.Head.SubCmd))] = m_NAtagMCShentongSkillInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 44 当日累计充值多选一礼包信息 #tagMCSingleGoldGift
|
| | |
|
| | | class tagMCSingleGoldGift(Structure):
|
| | |
| | |
|
| | | m_NAtagMCSuccessInfoList=tagMCSuccessInfoList()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuccessInfoList.Head.Cmd,m_NAtagMCSuccessInfoList.Head.SubCmd))] = m_NAtagMCSuccessInfoList
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 43 成就积分信息 #tagMCSuccessScoreInfo
|
| | |
|
| | | class tagMCSuccessScoreInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ScoreAwardState", c_int), #成就积分领奖记录,按奖励索引位记录是否领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x43
|
| | | 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 = 0x43
|
| | | self.ScoreAwardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCSuccessScoreInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 43 成就积分信息 //tagMCSuccessScoreInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ScoreAwardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ScoreAwardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCSuccessScoreInfo=tagMCSuccessScoreInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuccessScoreInfo.Cmd,m_NAtagMCSuccessScoreInfo.SubCmd))] = m_NAtagMCSuccessScoreInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 62 充值抵扣活动信息 #tagMCActRecharegeCouponInfo
|
| | |
|
| | | class tagMCActRecharegeCouponItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("ItemID", c_int), |
| | | ("ItemCount", c_ushort), |
| | | ("IsBind", c_ubyte), |
| | | ("IsMainItem", 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
|
| | | self.IsMainItem = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRecharegeCouponItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 62 充值抵扣活动信息 //tagMCActRecharegeCouponInfo:
|
| | | ItemID:%d,
|
| | | ItemCount:%d,
|
| | | IsBind:%d,
|
| | | IsMainItem:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCount,
|
| | | self.IsBind,
|
| | | self.IsMainItem
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRecharegeCouponGiftbag(Structure):
|
| | | GiftID = 0 #(DWORD GiftID)//商城表的物品ID
|
| | | BuyCountLimit = 0 #(BYTE BuyCountLimit)//限购数
|
| | | MoneyType = 0 #(BYTE MoneyType)//消耗货币类型
|
| | | MoneyNumber = 0 #(DWORD MoneyNumber)//消耗货币数量
|
| | | MoneyOriginal = 0 #(DWORD MoneyOriginal)//原价
|
| | | GiftItemCount = 0 #(BYTE GiftItemCount)// 礼包物品数
|
| | | ItemInfo = list() #(vector<tagMCActRecharegeCouponItem> ItemInfo)// 物品信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.BuyCountLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MoneyNumber,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MoneyOriginal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.GiftItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftItemCount):
|
| | | temItemInfo = tagMCActRecharegeCouponItem()
|
| | | _pos = temItemInfo.ReadData(_lpData, _pos)
|
| | | self.ItemInfo.append(temItemInfo)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.GiftID = 0
|
| | | self.BuyCountLimit = 0
|
| | | self.MoneyType = 0
|
| | | self.MoneyNumber = 0
|
| | | self.MoneyOriginal = 0
|
| | | self.GiftItemCount = 0
|
| | | self.ItemInfo = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | for i in range(self.GiftItemCount):
|
| | | length += self.ItemInfo[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteDWORD(data, self.GiftID)
|
| | | data = CommFunc.WriteBYTE(data, self.BuyCountLimit)
|
| | | data = CommFunc.WriteBYTE(data, self.MoneyType)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyNumber)
|
| | | data = CommFunc.WriteDWORD(data, self.MoneyOriginal)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftItemCount)
|
| | | for i in range(self.GiftItemCount):
|
| | | data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | GiftID:%d,
|
| | | BuyCountLimit:%d,
|
| | | MoneyType:%d,
|
| | | MoneyNumber:%d,
|
| | | MoneyOriginal:%d,
|
| | | GiftItemCount:%d,
|
| | | ItemInfo:%s
|
| | | '''\
|
| | | %(
|
| | | self.GiftID,
|
| | | self.BuyCountLimit,
|
| | | self.MoneyType,
|
| | | self.MoneyNumber,
|
| | | self.MoneyOriginal,
|
| | | self.GiftItemCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCActRecharegeCouponInfo(Structure):
|
| | | Head = tagHead()
|
| | | ActNum = 0 #(BYTE ActNum)//活动编号
|
| | | StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
|
| | | EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
|
| | | IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
|
| | | LimitLV = 0 #(WORD LimitLV)// 限制等级
|
| | | CouponMoneyType = 0 #(BYTE CouponMoneyType)//抵扣券对应货币类型
|
| | | GiftbagCount = 0 #(BYTE GiftbagCount)// 可购买礼包个数
|
| | | GiftbagList = list() #(vector<tagMCActRecharegeCouponGiftbag> GiftbagList)// 可购买礼包顺序列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x62
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ActNum,_pos = CommFunc.ReadBYTE(_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.CouponMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.GiftbagCount):
|
| | | temGiftbagList = tagMCActRecharegeCouponGiftbag()
|
| | | _pos = temGiftbagList.ReadData(_lpData, _pos)
|
| | | self.GiftbagList.append(temGiftbagList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x62
|
| | | self.ActNum = 0
|
| | | self.StartDate = ""
|
| | | self.EndtDate = ""
|
| | | self.IsDayReset = 0
|
| | | self.LimitLV = 0
|
| | | self.CouponMoneyType = 0
|
| | | self.GiftbagCount = 0
|
| | | self.GiftbagList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 10
|
| | | length += 10
|
| | | length += 1
|
| | | length += 2
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.GiftbagCount):
|
| | | length += self.GiftbagList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ActNum)
|
| | | 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.CouponMoneyType)
|
| | | data = CommFunc.WriteBYTE(data, self.GiftbagCount)
|
| | | for i in range(self.GiftbagCount):
|
| | | data = CommFunc.WriteString(data, self.GiftbagList[i].GetLength(), self.GiftbagList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ActNum:%d,
|
| | | StartDate:%s,
|
| | | EndtDate:%s,
|
| | | IsDayReset:%d,
|
| | | LimitLV:%d,
|
| | | CouponMoneyType:%d,
|
| | | GiftbagCount:%d,
|
| | | GiftbagList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ActNum,
|
| | | self.StartDate,
|
| | | self.EndtDate,
|
| | | self.IsDayReset,
|
| | | self.LimitLV,
|
| | | self.CouponMoneyType,
|
| | | self.GiftbagCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRecharegeCouponInfo=tagMCActRecharegeCouponInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponInfo.Head.Cmd,m_NAtagMCActRecharegeCouponInfo.Head.SubCmd))] = m_NAtagMCActRecharegeCouponInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 63 充值抵扣活动玩家信息 #tagMCActRecharegeCouponPlayerInfo
|
| | |
|
| | | class tagMCActRecharegeCouponPlayerInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActNum", c_ubyte), # 活动编号
|
| | | ("CouponMoney", c_int), # 当前可用抵扣点
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x63
|
| | | 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 = 0x63
|
| | | self.ActNum = 0
|
| | | self.CouponMoney = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCActRecharegeCouponPlayerInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 63 充值抵扣活动玩家信息 //tagMCActRecharegeCouponPlayerInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActNum:%d,
|
| | | CouponMoney:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActNum,
|
| | | self.CouponMoney
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCActRecharegeCouponPlayerInfo=tagMCActRecharegeCouponPlayerInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponPlayerInfo.Cmd,m_NAtagMCActRecharegeCouponPlayerInfo.SubCmd))] = m_NAtagMCActRecharegeCouponPlayerInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo
|
| | |
|
| | | class tagMCActRechargePrize(Structure):
|