|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 C2 大师强化等级激活信息 #tagMCMasterPlusLVInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMasterPlusLV(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("ClassLV", c_ubyte), | 
|---|
|  |  |  | ("MasterPlusLV", c_ushort),    # 已经激活的最高大师强化等级,向下兼容 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.ClassLV = 0 | 
|---|
|  |  |  | self.MasterPlusLV = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCMasterPlusLV) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 C2 大师强化等级激活信息 //tagMCMasterPlusLVInfo: | 
|---|
|  |  |  | ClassLV:%d, | 
|---|
|  |  |  | MasterPlusLV:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ClassLV, | 
|---|
|  |  |  | self.MasterPlusLV | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMasterPlusLVInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Count = 0    #(BYTE Count)// 信息个数 | 
|---|
|  |  |  | MasterPlusLVInfoList = list()    #(vector<tagMCMasterPlusLV> MasterPlusLVInfoList)// 信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0xC2 | 
|---|
|  |  |  | 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): | 
|---|
|  |  |  | temMasterPlusLVInfoList = tagMCMasterPlusLV() | 
|---|
|  |  |  | _pos = temMasterPlusLVInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.MasterPlusLVInfoList.append(temMasterPlusLVInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0xC2 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.MasterPlusLVInfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | length += self.MasterPlusLVInfoList[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.MasterPlusLVInfoList[i].GetLength(), self.MasterPlusLVInfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | MasterPlusLVInfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCMasterPlusLVInfo=tagMCMasterPlusLVInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMasterPlusLVInfo.Head.Cmd,m_NAtagMCMasterPlusLVInfo.Head.SubCmd))] = m_NAtagMCMasterPlusLVInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #A3 1B 玩家自动战斗设置储存信息通知#tagMCAutoFightSetting | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCAutoFightSetting(Structure): | 
|---|