|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AC 07 骑宠Boss信息 #tagGCHorsePetBossInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCHorsePetBossInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("IsEnd", c_int),    # 是否已结束(按位代表对应线路是否结束) | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAC | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | 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.Cmd = 0xAC | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | self.IsEnd = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagGCHorsePetBossInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AC 07 骑宠Boss信息 //tagGCHorsePetBossInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | IsEnd:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.IsEnd | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCHorsePetBossInfo=tagGCHorsePetBossInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHorsePetBossInfo.Cmd,m_NAtagGCHorsePetBossInfo.SubCmd))] = m_NAtagGCHorsePetBossInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AC 01 通知领地争夺占领情况 #tagGCManorWarInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCManorInfo(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B1 07 玩家点数信息 #tagMCRolePointInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCRolePointInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | PointAttrIDCount = 0    #(BYTE PointAttrIDCount)// 点类型个数 | 
|---|
|  |  |  | PointAttrIDList = list()    #(vector<BYTE> PointAttrIDList)// 点类型列表 | 
|---|
|  |  |  | PointValueList = list()    #(vector<WORD> PointValueList)// 点类型对应已加自由点数列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB1 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.PointAttrIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadBYTE(_lpData,_pos) | 
|---|
|  |  |  | self.PointAttrIDList.append(value) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadWORD(_lpData,_pos) | 
|---|
|  |  |  | self.PointValueList.append(value) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB1 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | self.PointAttrIDCount = 0 | 
|---|
|  |  |  | self.PointAttrIDList = list() | 
|---|
|  |  |  | self.PointValueList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 * self.PointAttrIDCount | 
|---|
|  |  |  | length += 2 * self.PointAttrIDCount | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.PointAttrIDCount) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.PointAttrIDList[i]) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.PointValueList[i]) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | PointAttrIDCount:%d, | 
|---|
|  |  |  | PointAttrIDList:%s, | 
|---|
|  |  |  | PointValueList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.PointAttrIDCount, | 
|---|
|  |  |  | "...", | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCRolePointInfo=tagMCRolePointInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRolePointInfo.Head.Cmd,m_NAtagMCRolePointInfo.Head.SubCmd))] = m_NAtagMCRolePointInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B1 01 玩家技能连击通知 #tagMCSkillCombo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCSkillCombo(Structure): | 
|---|