| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo
|
| | |
|
| | | class tagMCEquipPartStar(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("EquipPackIndex", c_ushort), |
| | | ("Star", 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.EquipPackIndex = 0
|
| | | self.Star = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCEquipPartStar)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 B1 装备部位星数信息 //tagMCEquipPartStarInfo:
|
| | | EquipPackIndex:%d,
|
| | | Star:%d
|
| | | '''\
|
| | | %(
|
| | | self.EquipPackIndex,
|
| | | self.Star
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCEquipPartStarInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)// 信息个数
|
| | | InfoList = list() #(vector<tagMCEquipPartStar> InfoList)// 信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xB1
|
| | | 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):
|
| | | temInfoList = tagMCEquipPartStar()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA3
|
| | | self.Head.SubCmd = 0xB1
|
| | | self.Count = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.InfoList[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.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCEquipPartStarInfo=tagMCEquipPartStarInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarInfo.Head.Cmd,m_NAtagMCEquipPartStarInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo
|
| | |
|
| | | class tagMCEquipPartSuiteLV(Structure):
|