| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 04 冰晶矿脉信息通知 #tagMCIceLodeInfo
|
| | |
|
| | | class tagMCIceLodeInfo(Structure):
|
| | | Head = tagHead()
|
| | | Cnt = 0 #(BYTE Cnt)// 今日玩法数量
|
| | | LineList = list() #(vector<BYTE> LineList)// 玩法列表
|
| | | AwardRecord = 0 #(DWORD AwardRecord)// 领奖记录
|
| | | HasSweep = 0 #(BYTE HasSweep)// 是否已扫荡
|
| | | DayLV = 0 #(WORD DayLV)// 今日等级
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x04
|
| | | 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):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.LineList.append(value)
|
| | | self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.HasSweep,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.DayLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x04
|
| | | self.Cnt = 0
|
| | | self.LineList = list()
|
| | | self.AwardRecord = 0
|
| | | self.HasSweep = 0
|
| | | self.DayLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1 * self.Cnt
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | |
|
| | | 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.WriteBYTE(data, self.LineList[i])
|
| | | data = CommFunc.WriteDWORD(data, self.AwardRecord)
|
| | | data = CommFunc.WriteBYTE(data, self.HasSweep)
|
| | | data = CommFunc.WriteWORD(data, self.DayLV)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Cnt:%d,
|
| | | LineList:%s,
|
| | | AwardRecord:%d,
|
| | | HasSweep:%d,
|
| | | DayLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cnt,
|
| | | "...",
|
| | | self.AwardRecord,
|
| | | self.HasSweep,
|
| | | self.DayLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCIceLodeInfo=tagMCIceLodeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCIceLodeInfo.Head.Cmd,m_NAtagMCIceLodeInfo.Head.SubCmd))] = m_NAtagMCIceLodeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 03 公共副本扫荡信息 #tagMCPubFBSweepData
|
| | |
|
| | | class tagMCPubFBSweep(Structure):
|