| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 56 通天令信息 #tagMCTongTianLingInfo
|
| | |
|
| | | class tagMCTongTianLingInfo(Structure):
|
| | | Head = tagHead()
|
| | | TTLBuyState = 0 #(BYTE TTLBuyState)//通天令是否已购买
|
| | | TTLLV = 0 #(BYTE TTLLV)//通天令等级,从0开始
|
| | | CurPoint = 0 #(DWORD CurPoint)//通天令当前等级经验积分点
|
| | | AwardStateCount = 0 #(BYTE AwardStateCount)//等级领奖记录值数,每个值存31个记录 0-30, 31-61, ...
|
| | | CommAwardStateList = list() #(vector<DWORD> CommAwardStateList)//常规奖励领奖记录,按等级二进制位存储是否领奖
|
| | | XianAwardStateList = list() #(vector<DWORD> XianAwardStateList)//仙品奖励领奖记录,按等级二进制位存储是否领奖
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x56
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.TTLBuyState,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TTLLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.CurPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.AwardStateCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardStateCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.CommAwardStateList.append(value)
|
| | | for i in range(self.AwardStateCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.XianAwardStateList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x56
|
| | | self.TTLBuyState = 0
|
| | | self.TTLLV = 0
|
| | | self.CurPoint = 0
|
| | | self.AwardStateCount = 0
|
| | | self.CommAwardStateList = list()
|
| | | self.XianAwardStateList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4 * self.AwardStateCount
|
| | | length += 4 * self.AwardStateCount
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.TTLBuyState)
|
| | | data = CommFunc.WriteBYTE(data, self.TTLLV)
|
| | | data = CommFunc.WriteDWORD(data, self.CurPoint)
|
| | | data = CommFunc.WriteBYTE(data, self.AwardStateCount)
|
| | | for i in range(self.AwardStateCount):
|
| | | data = CommFunc.WriteDWORD(data, self.CommAwardStateList[i])
|
| | | for i in range(self.AwardStateCount):
|
| | | data = CommFunc.WriteDWORD(data, self.XianAwardStateList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | TTLBuyState:%d,
|
| | | TTLLV:%d,
|
| | | CurPoint:%d,
|
| | | AwardStateCount:%d,
|
| | | CommAwardStateList:%s,
|
| | | XianAwardStateList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.TTLBuyState,
|
| | | self.TTLLV,
|
| | | self.CurPoint,
|
| | | self.AwardStateCount,
|
| | | "...",
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTongTianLingInfo=tagMCTongTianLingInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTongTianLingInfo.Head.Cmd,m_NAtagMCTongTianLingInfo.Head.SubCmd))] = m_NAtagMCTongTianLingInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 58 通天令任务奖励信息 #tagMCTongTianLingTaskAwardInfo
|
| | |
|
| | | class tagMCTongTianLingTaskAwardInfo(Structure):
|
| | | Head = tagHead()
|
| | | AwardStateCount = 0 #(BYTE AwardStateCount)
|
| | | TaskAwardStateList = list() #(vector<DWORD> TaskAwardStateList)//任务领奖记录值个数,按任务ID二进制位存储是否已领取,每个值存31个记录 0-30, 31-61, ...
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x58
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.AwardStateCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.AwardStateCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.TaskAwardStateList.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x58
|
| | | self.AwardStateCount = 0
|
| | | self.TaskAwardStateList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 4 * self.AwardStateCount
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.AwardStateCount)
|
| | | for i in range(self.AwardStateCount):
|
| | | data = CommFunc.WriteDWORD(data, self.TaskAwardStateList[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | AwardStateCount:%d,
|
| | | TaskAwardStateList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.AwardStateCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTongTianLingTaskAwardInfo=tagMCTongTianLingTaskAwardInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTongTianLingTaskAwardInfo.Head.Cmd,m_NAtagMCTongTianLingTaskAwardInfo.Head.SubCmd))] = m_NAtagMCTongTianLingTaskAwardInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 57 通天令任务进度信息 #tagMCTongTianLingTaskValueInfo
|
| | |
|
| | | class tagMCTongTianLingTaskValue(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("TaskType", c_ubyte), #成就类型
|
| | | ("IsDaily", c_ubyte), #是否每日任务
|
| | | ("TaskValue", 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.TaskType = 0
|
| | | self.IsDaily = 0
|
| | | self.TaskValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCTongTianLingTaskValue)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 57 通天令任务进度信息 //tagMCTongTianLingTaskValueInfo:
|
| | | TaskType:%d,
|
| | | IsDaily:%d,
|
| | | TaskValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.TaskType,
|
| | | self.IsDaily,
|
| | | self.TaskValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCTongTianLingTaskValueInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)//信息个数
|
| | | TaskValueList = list() #(vector<tagMCTongTianLingTaskValue> TaskValueList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x57
|
| | | 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):
|
| | | temTaskValueList = tagMCTongTianLingTaskValue()
|
| | | _pos = temTaskValueList.ReadData(_lpData, _pos)
|
| | | self.TaskValueList.append(temTaskValueList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0x57
|
| | | self.Count = 0
|
| | | self.TaskValueList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.TaskValueList[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.TaskValueList[i].GetLength(), self.TaskValueList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | TaskValueList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCTongTianLingTaskValueInfo=tagMCTongTianLingTaskValueInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTongTianLingTaskValueInfo.Head.Cmd,m_NAtagMCTongTianLingTaskValueInfo.Head.SubCmd))] = m_NAtagMCTongTianLingTaskValueInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 01 坐骑培养信息 #tagTrainHorseData
|
| | |
|
| | | class tagTrainHorseData(Structure):
|