| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 21 角色改名结果 #tagSCRenameResult
|
| | |
|
| | | class tagSCRenameResult(Structure):
|
| | | Head = tagHead()
|
| | | PlayerName = "" #(char PlayerName[33])//size = 14
|
| | | Result = 0 #(BYTE Result)//角色改名结果
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x21
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | | self.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x21
|
| | | self.PlayerName = ""
|
| | | self.Result = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 33
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | | data = CommFunc.WriteBYTE(data, self.Result)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PlayerName:%s,
|
| | | Result:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerName,
|
| | | self.Result
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCRenameResult=tagSCRenameResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCRenameResult.Head.Cmd,m_NAtagSCRenameResult.Head.SubCmd))] = m_NAtagSCRenameResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
|
| | |
|
| | | class tagGCStoreServerBuyCnt(Structure):
|
| | |
| | |
|
| | | m_NAtagGCStoreServerBuyCntInfo=tagGCStoreServerBuyCntInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCStoreServerBuyCntInfo.Head.Cmd,m_NAtagGCStoreServerBuyCntInfo.Head.SubCmd))] = m_NAtagGCStoreServerBuyCntInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A9 21 角色改名结果 #tagUpdatePlayerNameResult
|
| | |
|
| | | class tagUpdatePlayerNameResult(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Result", c_ubyte), #角色改名结果
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA9
|
| | | self.SubCmd = 0x21
|
| | | 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 = 0xA9
|
| | | self.SubCmd = 0x21
|
| | | self.Result = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagUpdatePlayerNameResult)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A9 21 角色改名结果 //tagUpdatePlayerNameResult:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Result:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Result
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagUpdatePlayerNameResult=tagUpdatePlayerNameResult()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagUpdatePlayerNameResult.Cmd,m_NAtagUpdatePlayerNameResult.SubCmd))] = m_NAtagUpdatePlayerNameResult
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|