|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #03 01 天梯竞技场玩家挑战结果同步#tagGMHighLadderChallengeReuslt | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGMHighLadderChallengeReuslt(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | PlayerID = 0    #(DWORD PlayerID)//玩家ID | 
|---|
|  |  |  | Result = 0    #(BYTE Result)//结果 | 
|---|
|  |  |  | PlusInfoSize = 0    #(WORD PlusInfoSize) | 
|---|
|  |  |  | PlusInfo = ""    #(String PlusInfo)//附带信息 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0x03 | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.PlusInfoSize,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.PlusInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusInfoSize) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0x03 | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | self.PlayerID = 0 | 
|---|
|  |  |  | self.Result = 0 | 
|---|
|  |  |  | self.PlusInfoSize = 0 | 
|---|
|  |  |  | self.PlusInfo = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.PlusInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.PlayerID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.Result) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.PlusInfoSize) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.PlusInfoSize, self.PlusInfo) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | PlayerID:%d, | 
|---|
|  |  |  | Result:%d, | 
|---|
|  |  |  | PlusInfoSize:%d, | 
|---|
|  |  |  | PlusInfo:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.PlayerID, | 
|---|
|  |  |  | self.Result, | 
|---|
|  |  |  | self.PlusInfoSize, | 
|---|
|  |  |  | self.PlusInfo | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGMHighLadderChallengeReuslt=tagGMHighLadderChallengeReuslt() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMHighLadderChallengeReuslt.Head.Cmd,m_NAtagGMHighLadderChallengeReuslt.Head.SubCmd))] = m_NAtagGMHighLadderChallengeReuslt | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #02 01 查询玩家是否可以添加交易所物品结果#tagGMCheckAddPlayerBourseItemResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGMCheckAddPlayerBourseItemResult(Structure): | 
|---|