263 【主界面】头像系统(内政-幻境阁系统)-服务端(玩家改名)
| | |
| | |
|
| | | class tagSCRenameResult(Structure):
|
| | | Head = tagHead()
|
| | | PlayerName = "" #(char PlayerName[33])//size = 14
|
| | | Result = 0 #(BYTE Result)//角色改名结果
|
| | | PlayerName = "" #(char PlayerName[33])// 新名字
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | 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.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
|
| | |
|
| | |
| | | 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
|
| | | PlayerName:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PlayerName,
|
| | | self.Result
|
| | | self.PlayerName
|
| | | )
|
| | | return DumpString
|
| | |
|