| | |
| | | szSex = "" #(char szSex[3])//性别
|
| | | Age = 0 #(WORD Age)//年龄
|
| | | Birthday = "" #(char Birthday[21])//生日
|
| | | QQ = "" #(char QQ[19])// QQ号 |
| | | QQ = "" #(char QQ[19])// QQ号 |
| | | Mail = "" #(char Mail[41])// 邮箱
|
| | | Province = "" #(char Province[11])//省份
|
| | | City = "" #(char City[11])//城市 |
| | | City = "" #(char City[11])//城市 |
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PlayerID", c_int), #目标玩家
|
| | | ("MemberLV", c_ubyte), #玩家队伍等级 TTeamMemberLV
|
| | | ("MemberLV", c_ubyte), #玩家队伍等级 TTeamMemberLV
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TecID", c_int), #科技ID
|
| | | ("TmpLV", c_ubyte), #加持等级 |
| | | ("TmpLV", c_ubyte), #加持等级 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #答题类型
|
| | | ("QuestionNO", c_ushort), # 答题号
|
| | | ("FunctionNO", c_ubyte), # 功能号 |
| | | ("FunctionNO", c_ubyte), # 功能号 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("SubjectIndex", c_ubyte), #当前是第几题
|
| | | ("Answer", c_ubyte), #回答index, 1开始, 小助手回答: EXAM_ANSWER_USE_HELP
|
| | | ("ExtraOpt1", c_ubyte), #附加选项1
|
| | | ("ExtraOpt2", c_ubyte), #附加选项2 |
| | | ("ExtraOpt2", c_ubyte), #附加选项2 |
| | | ("ExtraOpt3", c_ubyte), #附加选项3
|
| | | ("ExtraOpt4", c_ubyte), #附加选项4
|
| | | ]
|
| | |
| | |
|
| | | class tagCGameServerGeneralPack(Structure):
|
| | | Head = tagHead()
|
| | | DataLen = 0 #(BYTE DataLen)//GameServer通用包长度
|
| | | DataLen = 0 #(WORD DataLen)//GameServer通用包长度
|
| | | Data = "" #(String Data)//GameServer统用包数据
|
| | | data = None
|
| | |
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.DataLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.DataLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Data,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
|
| | | return _pos
|
| | |
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Data)
|
| | |
|
| | | return length
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.DataLen)
|
| | | data = CommFunc.WriteWORD(data, self.DataLen)
|
| | | data = CommFunc.WriteString(data, self.DataLen, self.Data)
|
| | | return data
|
| | |
|
| | |
| | |
|
| | | class tagCAddLabelToFriend(Structure):
|
| | | Head = tagHead()
|
| | | PlayerID = 0 #(DWORD PlayerID)// 好友ID |
| | | PlayerID = 0 #(DWORD PlayerID)// 好友ID |
| | | LabelContent = "" #(char LabelContent[21])//标签内容
|
| | | data = None
|
| | |
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("PlayerID", c_int), # 好友ID |
| | | ("PlayerID", c_int), # 好友ID |
| | | ("LabelID", c_int), # 系统标签ID
|
| | | ]
|
| | |
|
| | |
| | | RoomType = 0 #(BYTE RoomType)// 房间类型
|
| | | VSValueMode = 0 #(BYTE VSValueMode)// 决斗值模式
|
| | | VSMode = 0 #(BYTE VSMode)// 决斗模式
|
| | | Pws = "" #(char Pws[7])// 密码 |
| | | Pws = "" #(char Pws[7])// 密码 |
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | class tagCJoinVsRoom(Structure):
|
| | | Head = tagHead()
|
| | | dwRoomId = 0 #(DWORD dwRoomId)// 房间ID
|
| | | Pws = "" #(char Pws[7])// 密码 |
| | | Pws = "" #(char Pws[7])// 密码 |
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | Phone = 0 #(BYTE Phone)//是否绑定手机
|
| | | ServerID = 0 #(DWORD ServerID)//服务器ID
|
| | | Adult = 0 #(BYTE Adult)//是否成年 0未成年 1成年
|
| | | ExtraLen = 0 #(WORD ExtraLen)//扩展长度
|
| | | Extra = "" #(String Extra)//扩展内容,根据不同平台而定
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Phone,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Adult,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ExtraLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Extra,_pos = CommFunc.ReadString(_lpData, _pos,self.ExtraLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.Phone = 0
|
| | | self.ServerID = 0
|
| | | self.Adult = 0
|
| | | self.ExtraLen = 0
|
| | | self.Extra = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Extra)
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.Phone)
|
| | | data = CommFunc.WriteDWORD(data, self.ServerID)
|
| | | data = CommFunc.WriteBYTE(data, self.Adult)
|
| | | data = CommFunc.WriteWORD(data, self.ExtraLen)
|
| | | data = CommFunc.WriteString(data, self.ExtraLen, self.Extra)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | TokenExpire:%s,
|
| | | Phone:%d,
|
| | | ServerID:%d,
|
| | | Adult:%d
|
| | | Adult:%d,
|
| | | ExtraLen:%d,
|
| | | Extra:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.TokenExpire,
|
| | | self.Phone,
|
| | | self.ServerID,
|
| | | self.Adult
|
| | | self.Adult,
|
| | | self.ExtraLen,
|
| | | self.Extra
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | |
|
| | | class tagCSetSignature(Structure):
|
| | | Head = tagHead()
|
| | | Signature = "" #(char Signature[101])// 心情签名 |
| | | Signature = "" #(char Signature[101])// 心情签名 |
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | |
|
| | | class tagCFakePack(Structure):
|
| | | Head = tagHead()
|
| | | MsgLen = 0 #(BYTE MsgLen)
|
| | | MsgLen = 0 #(WORD MsgLen)
|
| | | Msg = "" #(String Msg)//size = MsgLen
|
| | | data = None
|
| | |
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MsgLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MsgLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Msg,_pos = CommFunc.ReadString(_lpData, _pos,self.MsgLen)
|
| | | return _pos
|
| | |
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Msg)
|
| | |
|
| | | return length
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.MsgLen)
|
| | | data = CommFunc.WriteWORD(data, self.MsgLen)
|
| | | data = CommFunc.WriteString(data, self.MsgLen, self.Msg)
|
| | | return data
|
| | |
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #无意义 |
| | | ("Type", c_ubyte), #无意义 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("SrcBackpack", c_ubyte), #源背包类型
|
| | | ("DesBackPack", c_ubyte), #目标背包类型
|
| | | ("SrcIndex", c_ushort), #起始位置
|
| | | ("DestIndex", c_ushort), #目标位置 |
| | | ("Count", c_ushort), #物品数量 |
| | | ("DestIndex", c_ushort), #目标位置 |
| | | ("Count", c_ushort), #物品数量 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("OperateType", c_ubyte), #背包操作类型,由EBackpackOperate定义
|
| | | ("SrcIndex", c_ushort), #起始位置
|
| | | ("DestIndex", c_ushort), #目标位置 |
| | | ("DestIndex", c_ushort), #目标位置 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("SrcBackpack", c_ubyte), #源背包类型
|
| | | ("DesBackPack", c_ubyte), #目标背包类型
|
| | | ("SrcIndex", c_ushort), #起始位置
|
| | | ("DestIndex", c_ushort), #目标位置 |
| | | ("DestIndex", c_ushort), #目标位置 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RoleEquipType", c_ubyte), #角色装备类型 |
| | | ("RoleEquipType", c_ubyte), #角色装备类型 |
| | | ("ItemIndex", c_ubyte), #物品在物品背包的索引
|
| | | ]
|
| | |
|
| | |
| | | ("StuffIndex1", c_int), #装备索引
|
| | | ("StuffIndex2", c_int), #装备索引
|
| | | ("StuffIndex3", c_int), #装备索引
|
| | | ("AutoBuy", c_ubyte), #是否自动购买结魂灯 |
| | | ("AutoBuy", c_ubyte), #是否自动购买结魂灯 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("VSOrder", c_int), #要挑战的排位 |
| | | ("VSOrder", c_int), #要挑战的排位 |
| | | ]
|
| | |
|
| | | def __init__(self):
|