| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 69 刷新寻宝免费次数 #tagCMRefreshTreasureFreeCnt
|
| | |
|
| | | class tagCMRefreshTreasureFreeCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x69
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x69
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMRefreshTreasureFreeCnt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 69 刷新寻宝免费次数 //tagCMRefreshTreasureFreeCnt:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMRefreshTreasureFreeCnt=tagCMRefreshTreasureFreeCnt()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshTreasureFreeCnt.Cmd,m_NAtagCMRefreshTreasureFreeCnt.SubCmd))] = m_NAtagCMRefreshTreasureFreeCnt
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 37 请求邮件操作 #tagCMRequestMail
|
| | |
|
| | | class tagCMRequestMail(Structure):
|
| | |
| | |
|
| | | m_NAtagCMTakeOutRealmExp=tagCMTakeOutRealmExp()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTakeOutRealmExp.Cmd,m_NAtagCMTakeOutRealmExp.SubCmd))] = m_NAtagCMTakeOutRealmExp
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 69 寻宝心愿物品选择 #tagCSTreasureWishSelect
|
| | |
|
| | | class tagCSTreasureWishSelect(Structure):
|
| | | Head = tagHead()
|
| | | TreasureType = 0 #(BYTE TreasureType)//寻宝类型
|
| | | WishCnt = 0 #(BYTE WishCnt)
|
| | | WishIDList = list() #(vector<DWORD> WishIDList)// 选择的寻宝物品库中的数据ID,注意不是库ID
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x69
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.TreasureType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.WishCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.WishCnt):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.WishIDList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA5
|
| | | self.Head.SubCmd = 0x69
|
| | | self.TreasureType = 0
|
| | | self.WishCnt = 0
|
| | | self.WishIDList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4 * self.WishCnt
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.TreasureType)
|
| | | data = CommFunc.WriteBYTE(data, self.WishCnt)
|
| | | for i in range(self.WishCnt):
|
| | | data = CommFunc.WriteDWORD(data, self.WishIDList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | TreasureType:%d,
|
| | | WishCnt:%d,
|
| | | WishIDList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.TreasureType,
|
| | | self.WishCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSTreasureWishSelect=tagCSTreasureWishSelect()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSTreasureWishSelect.Head.Cmd,m_NAtagCSTreasureWishSelect.Head.SubCmd))] = m_NAtagCSTreasureWishSelect
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 41 武将宿缘 #tagCSHeroFates
|
| | |
|
| | | class tagCSHeroFates(Structure):
|
| | | Head = tagHead()
|
| | | FatesID = 0 #(BYTE FatesID)// 宿缘ID
|
| | | OPType = 0 #(BYTE OPType)// 0-激活领奖;1-升级
|
| | | IndexCnt = 0 #(BYTE IndexCnt)
|
| | | ItemIndexList = list() #(vector<WORD> ItemIndexList)// 升级时消耗的材料卡在武将背包索引列表,升级时才发
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x41
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FatesID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.OPType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IndexCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.IndexCnt):
|
| | | value,_pos=CommFunc.ReadWORD(_lpData,_pos)
|
| | | self.ItemIndexList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x41
|
| | | self.FatesID = 0
|
| | | self.OPType = 0
|
| | | self.IndexCnt = 0
|
| | | self.ItemIndexList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2 * self.IndexCnt
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.FatesID)
|
| | | data = CommFunc.WriteBYTE(data, self.OPType)
|
| | | data = CommFunc.WriteBYTE(data, self.IndexCnt)
|
| | | for i in range(self.IndexCnt):
|
| | | data = CommFunc.WriteWORD(data, self.ItemIndexList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FatesID:%d,
|
| | | OPType:%d,
|
| | | IndexCnt:%d,
|
| | | ItemIndexList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FatesID,
|
| | | self.OPType,
|
| | | self.IndexCnt,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCSHeroFates=tagCSHeroFates()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroFates.Head.Cmd,m_NAtagCSHeroFates.Head.SubCmd))] = m_NAtagCSHeroFates
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B2 38 武将锁定 #tagCSHeroLock
|
| | |
|
| | | class tagCSHeroLock(Structure):
|