|  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartSuiteLV(Structure):
 | 
 |  |  |     EquipIndex = 0    #(BYTE EquipIndex)
 | 
 |  |  |     Len = 0    #(WORD Len)//长度
 | 
 |  |  |     SuiteLVInfo = ""    #(String SuiteLVInfo)//{套装类型:等级}
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.EquipIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
 | 
 |  |  |         self.SuiteLVInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.EquipIndex = 0
 | 
 |  |  |         self.Len = 0
 | 
 |  |  |         self.SuiteLVInfo = ""
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += len(self.SuiteLVInfo)
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         data = ''
 | 
 |  |  |         data = CommFunc.WriteBYTE(data, self.EquipIndex)
 | 
 |  |  |         data = CommFunc.WriteWORD(data, self.Len)
 | 
 |  |  |         data = CommFunc.WriteString(data, self.Len, self.SuiteLVInfo)
 | 
 |  |  |         return data
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 EquipIndex:%d,
 | 
 |  |  |                                 Len:%d,
 | 
 |  |  |                                 SuiteLVInfo:%s
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.EquipIndex,
 | 
 |  |  |                                 self.Len,
 | 
 |  |  |                                 self.SuiteLVInfo
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartSuiteLVInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Count = 0    #(BYTE Count)// 信息个数
 | 
 |  |  |     InfoList = list()    #(vector<tagMCEquipPartSuiteLV> InfoList)// 信息列表
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA3
 | 
 |  |  |         self.Head.SubCmd = 0x09
 | 
 |  |  |         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 = tagMCEquipPartSuiteLV()
 | 
 |  |  |             _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 = 0x09
 | 
 |  |  |         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_NAtagMCEquipPartSuiteLVInfo=tagMCEquipPartSuiteLVInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartSuiteLVInfo.Head.Cmd,m_NAtagMCEquipPartSuiteLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartSuiteLVInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A3 BB 装备位洗练属性信息 #tagMCEquipPartXLAttrInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartXLAttrValue(Structure):
 |