| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 24 每日免费直购礼包信息 #tagMCDayFreeGoldGiftState
|
| | |
|
| | | class tagMCDayFreeGoldGiftState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("DayFreeGoldGiftState", c_ubyte), #每日免费直购礼包是否已领奖 0-未领 1-已领
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x24
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x24
|
| | | self.DayFreeGoldGiftState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCDayFreeGoldGiftState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 24 每日免费直购礼包信息 //tagMCDayFreeGoldGiftState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | DayFreeGoldGiftState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.DayFreeGoldGiftState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCDayFreeGoldGiftState=tagMCDayFreeGoldGiftState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDayFreeGoldGiftState.Cmd,m_NAtagMCDayFreeGoldGiftState.SubCmd))] = m_NAtagMCDayFreeGoldGiftState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 42 节日登录奖励活动信息 #tagMCFeastLoginInfo
|
| | |
|
| | | class tagMCFeastLoginDayAwardItem(Structure):
|
| | |
| | |
|
| | | m_NAtagMCNewXJSDRecharge=tagMCNewXJSDRecharge()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewXJSDRecharge.Cmd,m_NAtagMCNewXJSDRecharge.SubCmd))] = m_NAtagMCNewXJSDRecharge
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 04 创角在线充值特惠信息 #tagMCOnlineRechargeTH
|
| | |
|
| | | class tagMCOnlineRechargeTH(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("AwardState", c_ubyte), #是否已领取奖励
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | self.SubCmd = 0x04
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x04
|
| | | self.AwardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCOnlineRechargeTH)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 04 创角在线充值特惠信息 //tagMCOnlineRechargeTH:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | AwardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AwardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCOnlineRechargeTH=tagMCOnlineRechargeTH()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCOnlineRechargeTH.Cmd,m_NAtagMCOnlineRechargeTH.SubCmd))] = m_NAtagMCOnlineRechargeTH
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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):
|