| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 37 请求邮件操作 #tagCMRequestMail
|
| | |
|
| | | class tagCMRequestMail(Structure):
|
| | | Head = tagHead()
|
| | | GUID = "" #(char GUID[36])//邮件GUID,可传空,默认针对个人邮件的批量处理,如批量领取、批量删除已领邮件等;全服邮件暂时限制只能单封邮件处理
|
| | | ReqType = 0 #(BYTE ReqType)//0-设置已读,1-领取邮件,2-删除邮件
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x37
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,36)
|
| | | self.ReqType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x37
|
| | | self.GUID = ""
|
| | | self.ReqType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 36
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 36, self.GUID)
|
| | | data = CommFunc.WriteBYTE(data, self.ReqType)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | GUID:%s,
|
| | | ReqType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.GUID,
|
| | | self.ReqType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMRequestMail=tagCMRequestMail()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequestMail.Head.Cmd,m_NAtagCMRequestMail.Head.SubCmd))] = m_NAtagCMRequestMail
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 68 请求寻宝 #tagCMRequestTreasure
|
| | |
|
| | | class tagCMRequestTreasure(Structure):
|