|  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo
 | 
 |  |  | # A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartSuiteLV(Structure):
 | 
 |  |  |     EquipIndex = 0    #(BYTE EquipIndex)
 | 
 |  |  |     Len = 0    #(WORD Len)//长度
 | 
 |  |  |     SuiteLVInfo = ""    #(String SuiteLVInfo)//{套装类型:等级}
 | 
 |  |  |     data = None
 | 
 |  |  | class  tagMCEquipPartStar(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("EquipPackIndex", c_ushort),     | 
 |  |  |                   ("Star", c_ubyte),     | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  |     def ReadData(self, stringData, _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
 | 
 |  |  |         memmove(addressof(self), stringData[_pos:], self.GetLength())
 | 
 |  |  |         return _pos + self.GetLength()
 | 
 |  |  | 
 | 
 |  |  |     def Clear(self):
 | 
 |  |  |         self.EquipIndex = 0
 | 
 |  |  |         self.Len = 0
 | 
 |  |  |         self.SuiteLVInfo = ""
 | 
 |  |  |         self.EquipPackIndex = 0
 | 
 |  |  |         self.Star = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         length = 0
 | 
 |  |  |         length += 1
 | 
 |  |  |         length += 2
 | 
 |  |  |         length += len(self.SuiteLVInfo)
 | 
 |  |  | 
 | 
 |  |  |         return length
 | 
 |  |  |         return sizeof(tagMCEquipPartStar)
 | 
 |  |  | 
 | 
 |  |  |     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
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''
 | 
 |  |  |                                 EquipIndex:%d,
 | 
 |  |  |                                 Len:%d,
 | 
 |  |  |                                 SuiteLVInfo:%s
 | 
 |  |  |         DumpString = '''// A3 B1 装备部位星数信息 //tagMCEquipPartStarInfo:
 | 
 |  |  |                                 EquipPackIndex:%d,
 | 
 |  |  |                                 Star:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.EquipIndex,
 | 
 |  |  |                                 self.Len,
 | 
 |  |  |                                 self.SuiteLVInfo
 | 
 |  |  |                                 self.EquipPackIndex,
 | 
 |  |  |                                 self.Star
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartSuiteLVInfo(Structure):
 | 
 |  |  | class  tagMCEquipPartStarInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Count = 0    #(BYTE Count)// 信息个数
 | 
 |  |  |     InfoList = list()    #(vector<tagMCEquipPartSuiteLV> InfoList)// 信息列表
 | 
 |  |  |     InfoList = list()    #(vector<tagMCEquipPartStar> InfoList)// 信息列表
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  |         self.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA3
 | 
 |  |  |         self.Head.SubCmd = 0x09
 | 
 |  |  |         self.Head.SubCmd = 0xB1
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def ReadData(self, _lpData, _pos=0, _Len=0):
 | 
 |  |  | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             temInfoList = tagMCEquipPartSuiteLV()
 | 
 |  |  |             temInfoList = tagMCEquipPartStar()
 | 
 |  |  |             _pos = temInfoList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.InfoList.append(temInfoList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 |  |  |         self.Head = tagHead()
 | 
 |  |  |         self.Head.Clear()
 | 
 |  |  |         self.Head.Cmd = 0xA3
 | 
 |  |  |         self.Head.SubCmd = 0x09
 | 
 |  |  |         self.Head.SubCmd = 0xB1
 | 
 |  |  |         self.Count = 0
 | 
 |  |  |         self.InfoList = list()
 | 
 |  |  |         return
 | 
 |  |  | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCEquipPartSuiteLVInfo=tagMCEquipPartSuiteLVInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartSuiteLVInfo.Head.Cmd,m_NAtagMCEquipPartSuiteLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartSuiteLVInfo
 | 
 |  |  | m_NAtagMCEquipPartStarInfo=tagMCEquipPartStarInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarInfo.Head.Cmd,m_NAtagMCEquipPartStarInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 | 
 |  |  | # A3 B3 装备部位星级信息 #tagMCEquipPartStarLVInfo
 | 
 |  |  | # A3 B3 装备部位强化信息 #tagMCEquipPartPlusInfo
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartStarLV(Structure):
 | 
 |  |  | class  tagMCEquipPartPlusLV(Structure):
 | 
 |  |  |     _pack_ = 1
 | 
 |  |  |     _fields_ = [
 | 
 |  |  |                   ("PackType", c_ubyte),    
 | 
 |  |  |                   ("EquipIndex", c_ubyte),    
 | 
 |  |  |                   ("EquipPartStarLV", c_ushort),    
 | 
 |  |  |                   ("Proficiency", c_int),    
 | 
 |  |  |                   ("EvolveLV", c_ubyte),     | 
 |  |  |                   ]
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |         self.EquipIndex = 0
 | 
 |  |  |         self.EquipPartStarLV = 0
 | 
 |  |  |         self.Proficiency = 0
 | 
 |  |  |         self.EvolveLV = 0
 | 
 |  |  |         return
 | 
 |  |  | 
 | 
 |  |  |     def GetLength(self):
 | 
 |  |  |         return sizeof(tagMCEquipPartStarLV)
 | 
 |  |  |         return sizeof(tagMCEquipPartPlusLV)
 | 
 |  |  | 
 | 
 |  |  |     def GetBuffer(self):
 | 
 |  |  |         return string_at(addressof(self), self.GetLength())
 | 
 |  |  | 
 | 
 |  |  |     def OutputString(self):
 | 
 |  |  |         DumpString = '''// A3 B3 装备部位星级信息 //tagMCEquipPartStarLVInfo:
 | 
 |  |  |         DumpString = '''// A3 B3 装备部位强化信息 //tagMCEquipPartPlusInfo:
 | 
 |  |  |                                 PackType:%d,
 | 
 |  |  |                                 EquipIndex:%d,
 | 
 |  |  |                                 EquipPartStarLV:%d,
 | 
 |  |  |                                 Proficiency:%d
 | 
 |  |  |                                 Proficiency:%d,
 | 
 |  |  |                                 EvolveLV:%d
 | 
 |  |  |                                 '''\
 | 
 |  |  |                                 %(
 | 
 |  |  |                                 self.PackType,
 | 
 |  |  |                                 self.EquipIndex,
 | 
 |  |  |                                 self.EquipPartStarLV,
 | 
 |  |  |                                 self.Proficiency
 | 
 |  |  |                                 self.Proficiency,
 | 
 |  |  |                                 self.EvolveLV
 | 
 |  |  |                                 )
 | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | class  tagMCEquipPartStarLVInfo(Structure):
 | 
 |  |  | class  tagMCEquipPartPlusInfo(Structure):
 | 
 |  |  |     Head = tagHead()
 | 
 |  |  |     Count = 0    #(BYTE Count)// 信息个数
 | 
 |  |  |     InfoList = list()    #(vector<tagMCEquipPartStarLV> InfoList)// 信息列表
 | 
 |  |  |     InfoList = list()    #(vector<tagMCEquipPartPlusLV> InfoList)// 信息列表
 | 
 |  |  |     data = None
 | 
 |  |  | 
 | 
 |  |  |     def __init__(self):
 | 
 |  |  | 
 |  |  |         _pos = self.Head.ReadData(_lpData, _pos)
 | 
 |  |  |         self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
 | 
 |  |  |         for i in range(self.Count):
 | 
 |  |  |             temInfoList = tagMCEquipPartStarLV()
 | 
 |  |  |             temInfoList = tagMCEquipPartPlusLV()
 | 
 |  |  |             _pos = temInfoList.ReadData(_lpData, _pos)
 | 
 |  |  |             self.InfoList.append(temInfoList)
 | 
 |  |  |         return _pos
 | 
 |  |  | 
 |  |  |         return DumpString
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | m_NAtagMCEquipPartStarLVInfo=tagMCEquipPartStarLVInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarLVInfo.Head.Cmd,m_NAtagMCEquipPartStarLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarLVInfo
 | 
 |  |  | m_NAtagMCEquipPartPlusInfo=tagMCEquipPartPlusInfo()
 | 
 |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartPlusInfo.Head.Cmd,m_NAtagMCEquipPartPlusInfo.Head.SubCmd))] = m_NAtagMCEquipPartPlusInfo
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | #------------------------------------------------------
 |