| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 19 分包下载奖励记录 #tagMCPackDownloadRecord
|
| | |
|
| | | class tagMCPackDownloadRecord(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Record", c_ubyte), # 0-未领取 1-已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x19
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x19
|
| | | self.Record = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCPackDownloadRecord)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A3 19 分包下载奖励记录 //tagMCPackDownloadRecord:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Record:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Record
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCPackDownloadRecord=tagMCPackDownloadRecord()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPackDownloadRecord.Cmd,m_NAtagMCPackDownloadRecord.SubCmd))] = m_NAtagMCPackDownloadRecord
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 0B 玩家等级奖励领取记录信息 #tagMCPlayerLVAwardGetRecord
|
| | |
|
| | | class tagMCPlayerLVAwardGetRecord(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 31 战斗战报结果 #tagSCTurnFightRet
|
| | |
|
| | | class tagSCTurnFightRet(Structure):
|
| | | Head = tagHead()
|
| | | MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗地图场景功能(如主线boss、爬塔、竞技场等)
|
| | | FuncLineID = 0 #(DWORD FuncLineID)// MapID对应的扩展值,如具体某个关卡等
|
| | | TagType = 0 #(BYTE TagType)// 目标类型,0-NPC阵容,1-玩家
|
| | | TagID = 0 #(DWORD TagID)// 目标类型对应的ID,如玩家ID
|
| | | ValueCount = 0 #(BYTE ValueCount)
|
| | | ValueList = list() #(vector<DWORD> ValueList)// 附加值列表,可选,具体含义由MapID决定
|
| | | IsWin = 0 #(BYTE IsWin)//是否获胜
|
| | | AwardLen = 0 #(WORD AwardLen)
|
| | | AwardMsg = "" #(String AwardMsg)//功能结算奖励信息,不含战斗相关统计信息
|
| | | BatLen = 0 #(WORD BatLen)
|
| | | BatStatMsg = "" #(String BatStatMsg)//战斗相关统计信息
|
| | | PathDate = "" #(char PathDate[8])//战报路径日期, yyyyMMdd, 为空时代表公共类的战报,不为空时为玩家个人类战报
|
| | | GUID = "" #(char GUID[40])//战报guid,前端根据功能MapID判断是否跨服功能,是的话从跨服服务器下载战报,否的话从本服下载
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x31
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TagType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TagID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.ValueCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.ValueList.append(value)
|
| | | self.IsWin,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.AwardLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.AwardMsg,_pos = CommFunc.ReadString(_lpData, _pos,self.AwardLen)
|
| | | self.BatLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.BatStatMsg,_pos = CommFunc.ReadString(_lpData, _pos,self.BatLen)
|
| | | self.PathDate,_pos = CommFunc.ReadString(_lpData, _pos,8)
|
| | | self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB4
|
| | | self.Head.SubCmd = 0x31
|
| | | self.MapID = 0
|
| | | self.FuncLineID = 0
|
| | | self.TagType = 0
|
| | | self.TagID = 0
|
| | | self.ValueCount = 0
|
| | | self.ValueList = list()
|
| | | self.IsWin = 0
|
| | | self.AwardLen = 0
|
| | | self.AwardMsg = ""
|
| | | self.BatLen = 0
|
| | | self.BatStatMsg = ""
|
| | | self.PathDate = ""
|
| | | self.GUID = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4
|
| | | length += 1
|
| | | length += 4 * self.ValueCount
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.AwardMsg)
|
| | | length += 2
|
| | | length += len(self.BatStatMsg)
|
| | | length += 8
|
| | | length += 40
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteDWORD(data, self.FuncLineID)
|
| | | data = CommFunc.WriteBYTE(data, self.TagType)
|
| | | data = CommFunc.WriteDWORD(data, self.TagID)
|
| | | data = CommFunc.WriteBYTE(data, self.ValueCount)
|
| | | for i in range(self.ValueCount):
|
| | | data = CommFunc.WriteDWORD(data, self.ValueList[i])
|
| | | data = CommFunc.WriteBYTE(data, self.IsWin)
|
| | | data = CommFunc.WriteWORD(data, self.AwardLen)
|
| | | data = CommFunc.WriteString(data, self.AwardLen, self.AwardMsg)
|
| | | data = CommFunc.WriteWORD(data, self.BatLen)
|
| | | data = CommFunc.WriteString(data, self.BatLen, self.BatStatMsg)
|
| | | data = CommFunc.WriteString(data, 8, self.PathDate)
|
| | | data = CommFunc.WriteString(data, 40, self.GUID)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | MapID:%d,
|
| | | FuncLineID:%d,
|
| | | TagType:%d,
|
| | | TagID:%d,
|
| | | ValueCount:%d,
|
| | | ValueList:%s,
|
| | | IsWin:%d,
|
| | | AwardLen:%d,
|
| | | AwardMsg:%s,
|
| | | BatLen:%d,
|
| | | BatStatMsg:%s,
|
| | | PathDate:%s,
|
| | | GUID:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.MapID,
|
| | | self.FuncLineID,
|
| | | self.TagType,
|
| | | self.TagID,
|
| | | self.ValueCount,
|
| | | "...",
|
| | | self.IsWin,
|
| | | self.AwardLen,
|
| | | self.AwardMsg,
|
| | | self.BatLen,
|
| | | self.BatStatMsg,
|
| | | self.PathDate,
|
| | | self.GUID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSCTurnFightRet=tagSCTurnFightRet()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTurnFightRet.Head.Cmd,m_NAtagSCTurnFightRet.Head.SubCmd))] = m_NAtagSCTurnFightRet
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 20 回合制战斗状态 #tagMCTurnFightState
|
| | |
|
| | | class tagMCTurnFightState(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C2 02 跨服通用信息包 #tagSSCommMsg
|
| | |
|
| | | class tagSSCommMsg(Structure):
|
| | | Head = tagHead()
|
| | | FromServerID = 0 #(DWORD FromServerID)//哪个服发的
|
| | | ServerTime = 0 #(DWORD ServerTime)//来源服务器时间戳
|
| | | TypeLen = 0 #(BYTE TypeLen)
|
| | | MsgType = "" #(String MsgType)
|
| | | Len = 0 #(DWORD Len)
|
| | | Data = "" #(String Data)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xC2
|
| | | self.Head.SubCmd = 0x02
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FromServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ServerTime,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TypeLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.MsgType,_pos = CommFunc.ReadString(_lpData, _pos,self.TypeLen)
|
| | | self.Len,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Data,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xC2
|
| | | self.Head.SubCmd = 0x02
|
| | | self.FromServerID = 0
|
| | | self.ServerTime = 0
|
| | | self.TypeLen = 0
|
| | | self.MsgType = ""
|
| | | self.Len = 0
|
| | | self.Data = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.MsgType)
|
| | | length += 4
|
| | | length += len(self.Data)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.FromServerID)
|
| | | data = CommFunc.WriteDWORD(data, self.ServerTime)
|
| | | data = CommFunc.WriteBYTE(data, self.TypeLen)
|
| | | data = CommFunc.WriteString(data, self.TypeLen, self.MsgType)
|
| | | data = CommFunc.WriteDWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Data)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FromServerID:%d,
|
| | | ServerTime:%d,
|
| | | TypeLen:%d,
|
| | | MsgType:%s,
|
| | | Len:%d,
|
| | | Data:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FromServerID,
|
| | | self.ServerTime,
|
| | | self.TypeLen,
|
| | | self.MsgType,
|
| | | self.Len,
|
| | | self.Data
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagSSCommMsg=tagSSCommMsg()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSSCommMsg.Head.Cmd,m_NAtagSSCommMsg.Head.SubCmd))] = m_NAtagSSCommMsg
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C2 01 跨服服务器间的测试包 #tagSSTest
|
| | |
|
| | | class tagSSTest(Structure):
|