From 1d39e3c87c38b8dff5cc463b8f49b840202d0767 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期三, 19 六月 2024 14:14:41 +0800 Subject: [PATCH] 10182 【越南】【香港】【砍树】【主干】玩家数据扩展和排行榜扩展 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 4931 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 4,868 insertions(+), 63 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index f4e1af6..ee24a33 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -985,6 +985,190 @@ #------------------------------------------------------ +# A4 11 传功邀请信息 #tagGCChuangongInviteInfo + +class tagGCChuangongInviteInfo(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)// 发起邀请的玩家ID + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)// 发起邀请的玩家名,size = NameLen + LV = 0 #(WORD LV)// 玩家等级 + Job = 0 #(BYTE Job)// 玩家职业 + RealmLV = 0 #(WORD RealmLV)// 玩家境界等级 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA4 + self.Head.SubCmd = 0x11 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA4 + self.Head.SubCmd = 0x11 + self.PlayerID = 0 + self.NameLen = 0 + self.Name = "" + self.LV = 0 + self.Job = 0 + self.RealmLV = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.Name) + length += 2 + length += 1 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.RealmLV) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + NameLen:%d, + Name:%s, + LV:%d, + Job:%d, + RealmLV:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.NameLen, + self.Name, + self.LV, + self.Job, + self.RealmLV + ) + return DumpString + + +m_NAtagGCChuangongInviteInfo=tagGCChuangongInviteInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChuangongInviteInfo.Head.Cmd,m_NAtagGCChuangongInviteInfo.Head.SubCmd))] = m_NAtagGCChuangongInviteInfo + + +#------------------------------------------------------ +# A4 12 传功开始 #tagGCChuangongStart + +class tagGCChuangongStart(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)// 一起传功的玩家ID + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)// 玩家名,size = NameLen + LV = 0 #(WORD LV)// 玩家等级 + Job = 0 #(BYTE Job)// 玩家职业 + RealmLV = 0 #(WORD RealmLV)// 玩家境界等级 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA4 + self.Head.SubCmd = 0x12 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA4 + self.Head.SubCmd = 0x12 + self.PlayerID = 0 + self.NameLen = 0 + self.Name = "" + self.LV = 0 + self.Job = 0 + self.RealmLV = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.Name) + length += 2 + length += 1 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.RealmLV) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + NameLen:%d, + Name:%s, + LV:%d, + Job:%d, + RealmLV:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.NameLen, + self.Name, + self.LV, + self.Job, + self.RealmLV + ) + return DumpString + + +m_NAtagGCChuangongStart=tagGCChuangongStart() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChuangongStart.Head.Cmd,m_NAtagGCChuangongStart.Head.SubCmd))] = m_NAtagGCChuangongStart + + +#------------------------------------------------------ # A4 0A 假仙盟信息 #tagGCFakeFamilyInfo class tagGCFakeFamilyInfo(Structure): @@ -1240,6 +1424,66 @@ m_NAtagGCFamilyActionInfo=tagGCFamilyActionInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilyActionInfo.Head.Cmd,m_NAtagGCFamilyActionInfo.Head.SubCmd))] = m_NAtagGCFamilyActionInfo + + +#------------------------------------------------------ +# A4 0E 家族boss副本信息 #tagGCFamilyBosFBInfo + +class tagGCFamilyBosFBInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("HurtTotal", c_int), # 仙盟累计伤血,亿求余部分 + ("HurtTotalPoint", c_int), # 仙盟累计伤血,亿整除部分 + ("FightMemCount", c_ubyte), # 目前正在仙盟boss副本中的成员数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA4 + self.SubCmd = 0x0E + 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 = 0xA4 + self.SubCmd = 0x0E + self.HurtTotal = 0 + self.HurtTotalPoint = 0 + self.FightMemCount = 0 + return + + def GetLength(self): + return sizeof(tagGCFamilyBosFBInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A4 0E 家族boss副本信息 //tagGCFamilyBosFBInfo: + Cmd:%s, + SubCmd:%s, + HurtTotal:%d, + HurtTotalPoint:%d, + FightMemCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.HurtTotal, + self.HurtTotalPoint, + self.FightMemCount + ) + return DumpString + + +m_NAtagGCFamilyBosFBInfo=tagGCFamilyBosFBInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilyBosFBInfo.Cmd,m_NAtagGCFamilyBosFBInfo.SubCmd))] = m_NAtagGCFamilyBosFBInfo #------------------------------------------------------ @@ -4883,6 +5127,215 @@ #------------------------------------------------------ +# A9 AD 通知天星塔全服奖励通关玩家信息 #tagGCSkyTowerPassPlayerInfo + +class tagGCSkyTowerPassPlayer(Structure): + PlayerID = 0 #(DWORD PlayerID) + PlayerName = "" #(char PlayerName[33]) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV)//等级 + RealmLV = 0 #(WORD RealmLV)//境界 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerID = 0 + self.PlayerName = "" + self.Job = 0 + self.LV = 0 + self.RealmLV = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 33 + length += 1 + length += 2 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteString(data, 33, self.PlayerName) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteWORD(data, self.RealmLV) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + PlayerName:%s, + Job:%d, + LV:%d, + RealmLV:%d + '''\ + %( + self.PlayerID, + self.PlayerName, + self.Job, + self.LV, + self.RealmLV + ) + return DumpString + + +class tagGCSkyTowerPassFloor(Structure): + FloorID = 0 #(DWORD FloorID)// 层ID + PassPlayerCount = 0 #(BYTE PassPlayerCount)// 通关记录玩家数 + PassPlayerIDList = list() #(vector<DWORD> PassPlayerIDList)// 通关记录玩家ID列表 [第1个通过玩家ID, 第2个, ...] + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.FloorID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PassPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PassPlayerCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.PassPlayerIDList.append(value) + return _pos + + def Clear(self): + self.FloorID = 0 + self.PassPlayerCount = 0 + self.PassPlayerIDList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 4 * self.PassPlayerCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.FloorID) + data = CommFunc.WriteBYTE(data, self.PassPlayerCount) + for i in range(self.PassPlayerCount): + data = CommFunc.WriteDWORD(data, self.PassPlayerIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + FloorID:%d, + PassPlayerCount:%d, + PassPlayerIDList:%s + '''\ + %( + self.FloorID, + self.PassPlayerCount, + "..." + ) + return DumpString + + +class tagGCSkyTowerPassPlayerInfo(Structure): + Head = tagHead() + FloorCount = 0 #(WORD FloorCount) + PassFloorList = list() #(vector<tagGCSkyTowerPassFloor> PassFloorList)// 通关塔层信息列表 + PlayerCount = 0 #(WORD PlayerCount) + PassPlayerList = list() #(vector<tagGCSkyTowerPassPlayer> PassPlayerList)// 通关玩家信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0xAD + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.FloorCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.FloorCount): + temPassFloorList = tagGCSkyTowerPassFloor() + _pos = temPassFloorList.ReadData(_lpData, _pos) + self.PassFloorList.append(temPassFloorList) + self.PlayerCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.PlayerCount): + temPassPlayerList = tagGCSkyTowerPassPlayer() + _pos = temPassPlayerList.ReadData(_lpData, _pos) + self.PassPlayerList.append(temPassPlayerList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0xAD + self.FloorCount = 0 + self.PassFloorList = list() + self.PlayerCount = 0 + self.PassPlayerList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.FloorCount): + length += self.PassFloorList[i].GetLength() + length += 2 + for i in range(self.PlayerCount): + length += self.PassPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.FloorCount) + for i in range(self.FloorCount): + data = CommFunc.WriteString(data, self.PassFloorList[i].GetLength(), self.PassFloorList[i].GetBuffer()) + data = CommFunc.WriteWORD(data, self.PlayerCount) + for i in range(self.PlayerCount): + data = CommFunc.WriteString(data, self.PassPlayerList[i].GetLength(), self.PassPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + FloorCount:%d, + PassFloorList:%s, + PlayerCount:%d, + PassPlayerList:%s + '''\ + %( + self.Head.OutputString(), + self.FloorCount, + "...", + self.PlayerCount, + "..." + ) + return DumpString + + +m_NAtagGCSkyTowerPassPlayerInfo=tagGCSkyTowerPassPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSkyTowerPassPlayerInfo.Head.Cmd,m_NAtagGCSkyTowerPassPlayerInfo.Head.SubCmd))] = m_NAtagGCSkyTowerPassPlayerInfo + + +#------------------------------------------------------ # A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo class tagGCStoreServerBuyCnt(Structure): @@ -7266,6 +7719,566 @@ m_NAtagGCGetAssistThanksGiftPreview=tagGCGetAssistThanksGiftPreview() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCGetAssistThanksGiftPreview.Head.Cmd,m_NAtagGCGetAssistThanksGiftPreview.Head.SubCmd))] = m_NAtagGCGetAssistThanksGiftPreview + + +#------------------------------------------------------ +# B0 34 福地结算奖励信息 #tagGCMineAreaAwardInfo + +class tagGCMineAreaAwardInfo(Structure): + Head = tagHead() + AwardType = 0 #(BYTE AwardType)// 0-通知有奖励,前端下次进入福地可请求进行结算;1-结算奖励结果通知 + AwardLen = 0 #(BYTE AwardLen) + AwardInfo = "" #(String AwardInfo)//奖励信息 [物品ID,个数,是否拍品], ...] + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x34 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AwardType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.AwardLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x34 + self.AwardType = 0 + self.AwardLen = 0 + self.AwardInfo = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += len(self.AwardInfo) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AwardType) + data = CommFunc.WriteBYTE(data, self.AwardLen) + data = CommFunc.WriteString(data, self.AwardLen, self.AwardInfo) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AwardType:%d, + AwardLen:%d, + AwardInfo:%s + '''\ + %( + self.Head.OutputString(), + self.AwardType, + self.AwardLen, + self.AwardInfo + ) + return DumpString + + +m_NAtagGCMineAreaAwardInfo=tagGCMineAreaAwardInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMineAreaAwardInfo.Head.Cmd,m_NAtagGCMineAreaAwardInfo.Head.SubCmd))] = m_NAtagGCMineAreaAwardInfo + + +#------------------------------------------------------ +# B0 33 福地详细信息 #tagGCMineAreaInfo + +class tagGCMineItem(Structure): + Index = 0 #(BYTE Index)// 矿物所在福地位置索引,0~n + MineID = 0 #(WORD MineID)// 矿物ID,对应福地采集表中ID,0代表该索引位置没有矿物 + MineType = 0 #(BYTE MineType)// 矿物类型:0-常规;1-超级 + UpdTime = 0 #(DWORD UpdTime)// 最后一次更新时间戳 + PosLen = 0 #(BYTE PosLen) + Position = "" #(String Position)// 最后一次更新时所在位置百分比,0~100,支持小数,下0上100,可认为分为100格,速度为 x格/秒 + SpeedLen = 0 #(BYTE SpeedLen) + MoveSpeed = "" #(String MoveSpeed)// 移动速度,x格/秒,支持小数 + EndTime = 0 #(DWORD EndTime)// 拉取结束时间戳 + WorkerCount = 0 #(BYTE WorkerCount)// 工人个数,为0时代表福地玩家没有使用工人拉回 + RobPlayerID = 0 #(DWORD RobPlayerID)// 抢夺玩家ID,为0时代表没人抢夺 + RobWorkerCount = 0 #(BYTE RobWorkerCount)// 抢夺工人个数 + RobPlayerName = "" #(char RobPlayerName[33]) + RobFace = 0 #(DWORD RobFace) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Index,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MineID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.MineType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.UpdTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PosLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Position,_pos = CommFunc.ReadString(_lpData, _pos,self.PosLen) + self.SpeedLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoveSpeed,_pos = CommFunc.ReadString(_lpData, _pos,self.SpeedLen) + self.EndTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.WorkerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RobPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RobWorkerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RobPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.RobFace,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Index = 0 + self.MineID = 0 + self.MineType = 0 + self.UpdTime = 0 + self.PosLen = 0 + self.Position = "" + self.SpeedLen = 0 + self.MoveSpeed = "" + self.EndTime = 0 + self.WorkerCount = 0 + self.RobPlayerID = 0 + self.RobWorkerCount = 0 + self.RobPlayerName = "" + self.RobFace = 0 + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 + length += 1 + length += 4 + length += 1 + length += len(self.Position) + length += 1 + length += len(self.MoveSpeed) + length += 4 + length += 1 + length += 4 + length += 1 + length += 33 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.Index) + data = CommFunc.WriteWORD(data, self.MineID) + data = CommFunc.WriteBYTE(data, self.MineType) + data = CommFunc.WriteDWORD(data, self.UpdTime) + data = CommFunc.WriteBYTE(data, self.PosLen) + data = CommFunc.WriteString(data, self.PosLen, self.Position) + data = CommFunc.WriteBYTE(data, self.SpeedLen) + data = CommFunc.WriteString(data, self.SpeedLen, self.MoveSpeed) + data = CommFunc.WriteDWORD(data, self.EndTime) + data = CommFunc.WriteBYTE(data, self.WorkerCount) + data = CommFunc.WriteDWORD(data, self.RobPlayerID) + data = CommFunc.WriteBYTE(data, self.RobWorkerCount) + data = CommFunc.WriteString(data, 33, self.RobPlayerName) + data = CommFunc.WriteDWORD(data, self.RobFace) + return data + + def OutputString(self): + DumpString = ''' + Index:%d, + MineID:%d, + MineType:%d, + UpdTime:%d, + PosLen:%d, + Position:%s, + SpeedLen:%d, + MoveSpeed:%s, + EndTime:%d, + WorkerCount:%d, + RobPlayerID:%d, + RobWorkerCount:%d, + RobPlayerName:%s, + RobFace:%d + '''\ + %( + self.Index, + self.MineID, + self.MineType, + self.UpdTime, + self.PosLen, + self.Position, + self.SpeedLen, + self.MoveSpeed, + self.EndTime, + self.WorkerCount, + self.RobPlayerID, + self.RobWorkerCount, + self.RobPlayerName, + self.RobFace + ) + return DumpString + + +class tagGCMineArea(Structure): + PlayerID = 0 #(DWORD PlayerID)// 福地所属玩家ID,可能是自己或其他玩家ID,当ID小于10000时为假人 + PlayerName = "" #(char PlayerName[33])// 可能为空,如自己或假人 + Face = 0 #(DWORD Face) + MineCount = 0 #(BYTE MineCount) + MineItemList = list() #(vector<tagGCMineItem> MineItemList)// 矿物列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MineCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.MineCount): + temMineItemList = tagGCMineItem() + _pos = temMineItemList.ReadData(_lpData, _pos) + self.MineItemList.append(temMineItemList) + return _pos + + def Clear(self): + self.PlayerID = 0 + self.PlayerName = "" + self.Face = 0 + self.MineCount = 0 + self.MineItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 33 + length += 4 + length += 1 + for i in range(self.MineCount): + length += self.MineItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteString(data, 33, self.PlayerName) + data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteBYTE(data, self.MineCount) + for i in range(self.MineCount): + data = CommFunc.WriteString(data, self.MineItemList[i].GetLength(), self.MineItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + PlayerName:%s, + Face:%d, + MineCount:%d, + MineItemList:%s + '''\ + %( + self.PlayerID, + self.PlayerName, + self.Face, + self.MineCount, + "..." + ) + return DumpString + + +class tagGCMineAreaInfo(Structure): + Head = tagHead() + QueryType = 0 #(BYTE QueryType)// 查询同步类型:0-后端主动同步;1-查看指定福地;2-查看道友福地列表;3-查看周围随机福地列表 + QueryValue = 0 #(DWORD QueryValue)// 查询值,类型1时-发送目标玩家ID;3时-发送是否重新随机 + AreaCount = 0 #(BYTE AreaCount) + AreaList = list() #(vector<tagGCMineArea> AreaList)// 福地列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x33 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.QueryType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.QueryValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AreaCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AreaCount): + temAreaList = tagGCMineArea() + _pos = temAreaList.ReadData(_lpData, _pos) + self.AreaList.append(temAreaList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x33 + self.QueryType = 0 + self.QueryValue = 0 + self.AreaCount = 0 + self.AreaList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 + length += 1 + for i in range(self.AreaCount): + length += self.AreaList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.QueryType) + data = CommFunc.WriteDWORD(data, self.QueryValue) + data = CommFunc.WriteBYTE(data, self.AreaCount) + for i in range(self.AreaCount): + data = CommFunc.WriteString(data, self.AreaList[i].GetLength(), self.AreaList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + QueryType:%d, + QueryValue:%d, + AreaCount:%d, + AreaList:%s + '''\ + %( + self.Head.OutputString(), + self.QueryType, + self.QueryValue, + self.AreaCount, + "..." + ) + return DumpString + + +m_NAtagGCMineAreaInfo=tagGCMineAreaInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMineAreaInfo.Head.Cmd,m_NAtagGCMineAreaInfo.Head.SubCmd))] = m_NAtagGCMineAreaInfo + + +#------------------------------------------------------ +# B0 35 福地记录信息 #tagGCMineAreaRecordInfo + +class tagGCMineAreaRecord(Structure): + RecordType = 0 #(BYTE RecordType)// 记录类型;1-自己拉物品;2-物品被人抢 + TagPlayerID = 0 #(DWORD TagPlayerID)// 目标玩家ID,等于自己玩家ID时代表拉自己的,反之为抢别人的 + RecordTime = 0 #(DWORD RecordTime)// 记录时间戳 + MineID = 0 #(WORD MineID)// 矿物ID,对应福地采集表中ID + TagPlayerName = "" #(char TagPlayerName[33]) + TagFace = 0 #(DWORD TagFace) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TagPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RecordTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MineID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.TagPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.TagFace,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.RecordType = 0 + self.TagPlayerID = 0 + self.RecordTime = 0 + self.MineID = 0 + self.TagPlayerName = "" + self.TagFace = 0 + return + + def GetLength(self): + length = 0 + length += 1 + length += 4 + length += 4 + length += 2 + length += 33 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.RecordType) + data = CommFunc.WriteDWORD(data, self.TagPlayerID) + data = CommFunc.WriteDWORD(data, self.RecordTime) + data = CommFunc.WriteWORD(data, self.MineID) + data = CommFunc.WriteString(data, 33, self.TagPlayerName) + data = CommFunc.WriteDWORD(data, self.TagFace) + return data + + def OutputString(self): + DumpString = ''' + RecordType:%d, + TagPlayerID:%d, + RecordTime:%d, + MineID:%d, + TagPlayerName:%s, + TagFace:%d + '''\ + %( + self.RecordType, + self.TagPlayerID, + self.RecordTime, + self.MineID, + self.TagPlayerName, + self.TagFace + ) + return DumpString + + +class tagGCMineAreaRecordInfo(Structure): + Head = tagHead() + RecordCount = 0 #(BYTE RecordCount) + AreaRecordList = list() #(vector<tagGCMineAreaRecord> AreaRecordList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x35 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + temAreaRecordList = tagGCMineAreaRecord() + _pos = temAreaRecordList.ReadData(_lpData, _pos) + self.AreaRecordList.append(temAreaRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x35 + self.RecordCount = 0 + self.AreaRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.RecordCount): + length += self.AreaRecordList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteString(data, self.AreaRecordList[i].GetLength(), self.AreaRecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RecordCount:%d, + AreaRecordList:%s + '''\ + %( + self.Head.OutputString(), + self.RecordCount, + "..." + ) + return DumpString + + +m_NAtagGCMineAreaRecordInfo=tagGCMineAreaRecordInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMineAreaRecordInfo.Head.Cmd,m_NAtagGCMineAreaRecordInfo.Head.SubCmd))] = m_NAtagGCMineAreaRecordInfo + + +#------------------------------------------------------ +# B0 32 福地物品拉预览结果 #tagGCMineItemPullPreviewRet + +class tagGCMineItemPullPreviewRet(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("PlayerID", c_int), # 福地所属玩家ID,0默认自己 + ("ItemIndex", c_ubyte), # 物品所在位置索引0~n + ("WorkerCount", c_ubyte), # 上工人人数 + ("NeedSeconds", c_int), # 预计需要时间,秒 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB0 + self.SubCmd = 0x32 + 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 = 0xB0 + self.SubCmd = 0x32 + self.PlayerID = 0 + self.ItemIndex = 0 + self.WorkerCount = 0 + self.NeedSeconds = 0 + return + + def GetLength(self): + return sizeof(tagGCMineItemPullPreviewRet) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B0 32 福地物品拉预览结果 //tagGCMineItemPullPreviewRet: + Cmd:%s, + SubCmd:%s, + PlayerID:%d, + ItemIndex:%d, + WorkerCount:%d, + NeedSeconds:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.PlayerID, + self.ItemIndex, + self.WorkerCount, + self.NeedSeconds + ) + return DumpString + + +m_NAtagGCMineItemPullPreviewRet=tagGCMineItemPullPreviewRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMineItemPullPreviewRet.Cmd,m_NAtagGCMineItemPullPreviewRet.SubCmd))] = m_NAtagGCMineItemPullPreviewRet #------------------------------------------------------ @@ -15591,13 +16604,67 @@ return DumpString +class tagGCLuckyCloudBuyRoundTime(Structure): + StartTime = "" #(char StartTime[5])// 开始时间 H:M + EndtTime = "" #(char EndtTime[5])// 结束时间 H:M + RoundMax = 0 #(BYTE RoundMax)// 本时段最大轮次 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.RoundMax,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.StartTime = "" + self.EndtTime = "" + self.RoundMax = 0 + return + + def GetLength(self): + length = 0 + length += 5 + length += 5 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 5, self.StartTime) + data = CommFunc.WriteString(data, 5, self.EndtTime) + data = CommFunc.WriteBYTE(data, self.RoundMax) + return data + + def OutputString(self): + DumpString = ''' + StartTime:%s, + EndtTime:%s, + RoundMax:%d + '''\ + %( + self.StartTime, + self.EndtTime, + self.RoundMax + ) + return DumpString + + class tagGCLuckyCloudBuyRoundInfo(Structure): Head = tagHead() ZoneID = 0 #(BYTE ZoneID)// 所属分区ID StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + RoundTimeCount = 0 #(BYTE RoundTimeCount) + RoundTimeList = list() #(vector<tagGCLuckyCloudBuyRoundTime> RoundTimeList)//轮次时间段 RoundID = 0 #(DWORD RoundID)// 轮次唯一ID标识,当收到的轮次ID变更时,前端需清空购买号码记录缓存 - RoundNum = 0 #(BYTE RoundNum)// 今日第几轮 + RoundNum = 0 #(BYTE RoundNum)// 当前时段第几轮 SuperItemID = 0 #(DWORD SuperItemID)// 大奖物品ID SuperItemCount = 0 #(BYTE SuperItemCount)// 大奖物品个数 SuperItemMoneyType = 0 #(BYTE SuperItemMoneyType)// 大奖价值货币类型 @@ -15621,6 +16688,11 @@ self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.RoundTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RoundTimeCount): + temRoundTimeList = tagGCLuckyCloudBuyRoundTime() + _pos = temRoundTimeList.ReadData(_lpData, _pos) + self.RoundTimeList.append(temRoundTimeList) self.RoundID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.SuperItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) @@ -15648,6 +16720,8 @@ self.ZoneID = 0 self.StartDate = "" self.EndtDate = "" + self.RoundTimeCount = 0 + self.RoundTimeList = list() self.RoundID = 0 self.RoundNum = 0 self.SuperItemID = 0 @@ -15667,6 +16741,9 @@ length += 1 length += 10 length += 10 + length += 1 + for i in range(self.RoundTimeCount): + length += self.RoundTimeList[i].GetLength() length += 4 length += 1 length += 4 @@ -15689,6 +16766,9 @@ data = CommFunc.WriteBYTE(data, self.ZoneID) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.RoundTimeCount) + for i in range(self.RoundTimeCount): + data = CommFunc.WriteString(data, self.RoundTimeList[i].GetLength(), self.RoundTimeList[i].GetBuffer()) data = CommFunc.WriteDWORD(data, self.RoundID) data = CommFunc.WriteBYTE(data, self.RoundNum) data = CommFunc.WriteDWORD(data, self.SuperItemID) @@ -15710,6 +16790,8 @@ ZoneID:%d, StartDate:%s, EndtDate:%s, + RoundTimeCount:%d, + RoundTimeList:%s, RoundID:%d, RoundNum:%d, SuperItemID:%d, @@ -15727,6 +16809,8 @@ self.ZoneID, self.StartDate, self.EndtDate, + self.RoundTimeCount, + "...", self.RoundID, self.RoundNum, self.SuperItemID, @@ -15800,9 +16884,11 @@ class tagMCCoinToGoldCount(Structure): _pack_ = 1 _fields_ = [ - ("RecordID", c_ubyte), + ("RecordID", c_ushort), ("TodayPayCount", c_ushort), # 今日已购买次数 ("TotalPayCount", c_int), # 累计总购买次数 + ("WeekPayCount", c_ushort), # 周总购买次数 + ("MonthPayCount", c_ushort), # 月总购买次数 ] def __init__(self): @@ -15818,6 +16904,8 @@ self.RecordID = 0 self.TodayPayCount = 0 self.TotalPayCount = 0 + self.WeekPayCount = 0 + self.MonthPayCount = 0 return def GetLength(self): @@ -15830,19 +16918,23 @@ DumpString = '''// A1 10 充值购买次数信息 //tagMCCoinToGoldCountInfo: RecordID:%d, TodayPayCount:%d, - TotalPayCount:%d + TotalPayCount:%d, + WeekPayCount:%d, + MonthPayCount:%d '''\ %( self.RecordID, self.TodayPayCount, - self.TotalPayCount + self.TotalPayCount, + self.WeekPayCount, + self.MonthPayCount ) return DumpString class tagMCCoinToGoldCountInfo(Structure): Head = tagHead() - RecordCount = 0 #(BYTE RecordCount) + RecordCount = 0 #(WORD RecordCount) CTGCountInfoList = list() #(vector<tagMCCoinToGoldCount> CTGCountInfoList) data = None @@ -15855,7 +16947,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) - self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RecordCount,_pos = CommFunc.ReadWORD(_lpData, _pos) for i in range(self.RecordCount): temCTGCountInfoList = tagMCCoinToGoldCount() _pos = temCTGCountInfoList.ReadData(_lpData, _pos) @@ -15874,7 +16966,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() - length += 1 + length += 2 for i in range(self.RecordCount): length += self.CTGCountInfoList[i].GetLength() @@ -15883,7 +16975,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.RecordCount) + data = CommFunc.WriteWORD(data, self.RecordCount) for i in range(self.RecordCount): data = CommFunc.WriteString(data, self.CTGCountInfoList[i].GetLength(), self.CTGCountInfoList[i].GetBuffer()) return data @@ -15914,6 +17006,9 @@ OrderLen = 0 #(BYTE OrderLen) OrderID = "" #(String OrderID)// 订单id Coin = 0 #(DWORD Coin)// 充值的点卷 + RecordID = 0 #(WORD RecordID)// ctgID + OrderInfoLen = 0 #(BYTE OrderInfoLen) + OrderInfo = "" #(String OrderInfo) data = None def __init__(self): @@ -15928,6 +17023,9 @@ self.OrderLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.OrderID,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderLen) self.Coin,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RecordID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen) return _pos def Clear(self): @@ -15938,6 +17036,9 @@ self.OrderLen = 0 self.OrderID = "" self.Coin = 0 + self.RecordID = 0 + self.OrderInfoLen = 0 + self.OrderInfo = "" return def GetLength(self): @@ -15946,6 +17047,9 @@ length += 1 length += len(self.OrderID) length += 4 + length += 2 + length += 1 + length += len(self.OrderInfo) return length @@ -15955,6 +17059,9 @@ data = CommFunc.WriteBYTE(data, self.OrderLen) data = CommFunc.WriteString(data, self.OrderLen, self.OrderID) data = CommFunc.WriteDWORD(data, self.Coin) + data = CommFunc.WriteWORD(data, self.RecordID) + data = CommFunc.WriteBYTE(data, self.OrderInfoLen) + data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo) return data def OutputString(self): @@ -15962,13 +17069,19 @@ Head:%s, OrderLen:%d, OrderID:%s, - Coin:%d + Coin:%d, + RecordID:%d, + OrderInfoLen:%d, + OrderInfo:%s '''\ %( self.Head.OutputString(), self.OrderLen, self.OrderID, - self.Coin + self.Coin, + self.RecordID, + self.OrderInfoLen, + self.OrderInfo ) return DumpString @@ -18103,6 +19216,7 @@ ("KillCnt", c_int), #击杀次数 ("ItemAddCnt", c_int), #物品增加次数 ("BuyCnt", c_ubyte), #购买次数 + ("KillCntTotal", c_int), #击杀次数 - 累计 ] def __init__(self): @@ -18119,6 +19233,7 @@ self.KillCnt = 0 self.ItemAddCnt = 0 self.BuyCnt = 0 + self.KillCntTotal = 0 return def GetLength(self): @@ -18132,13 +19247,15 @@ BossType:%d, KillCnt:%d, ItemAddCnt:%d, - BuyCnt:%d + BuyCnt:%d, + KillCntTotal:%d '''\ %( self.BossType, self.KillCnt, self.ItemAddCnt, - self.BuyCnt + self.BuyCnt, + self.KillCntTotal ) return DumpString @@ -18561,6 +19678,118 @@ m_NAtagMCCollectionItemInfo=tagMCCollectionItemInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCollectionItemInfo.Head.Cmd,m_NAtagMCCollectionItemInfo.Head.SubCmd))] = m_NAtagMCCollectionItemInfo + + +#------------------------------------------------------ +# A3 CC 自定义奖励信息 #tagMCCustomAwardInfo + +class tagMCCustomAwardState(Structure): + _pack_ = 1 + _fields_ = [ + ("KeyNum", c_ushort), # 奖励记录key编号,0~255,每个key存31个ID记录 0-30为编号0, 31-61为编号1.. + ("CanGetState", c_int), # 是否可领取;按位记录是否可领取 + ("GetState", c_int), # 是否已领取;按位记录是否已领取 + ] + + def __init__(self): + self.Clear() + 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.KeyNum = 0 + self.CanGetState = 0 + self.GetState = 0 + return + + def GetLength(self): + return sizeof(tagMCCustomAwardState) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 CC 自定义奖励信息 //tagMCCustomAwardInfo: + KeyNum:%d, + CanGetState:%d, + GetState:%d + '''\ + %( + self.KeyNum, + self.CanGetState, + self.GetState + ) + return DumpString + + +class tagMCCustomAwardInfo(Structure): + Head = tagHead() + RecordStateCnt = 0 #(WORD RecordStateCnt)// 记录个数 + RecordStateList = list() #(vector<tagMCCustomAwardState> RecordStateList)// 记录列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCC + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RecordStateCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.RecordStateCnt): + temRecordStateList = tagMCCustomAwardState() + _pos = temRecordStateList.ReadData(_lpData, _pos) + self.RecordStateList.append(temRecordStateList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCC + self.RecordStateCnt = 0 + self.RecordStateList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.RecordStateCnt): + length += self.RecordStateList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.RecordStateCnt) + for i in range(self.RecordStateCnt): + data = CommFunc.WriteString(data, self.RecordStateList[i].GetLength(), self.RecordStateList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RecordStateCnt:%d, + RecordStateList:%s + '''\ + %( + self.Head.OutputString(), + self.RecordStateCnt, + "..." + ) + return DumpString + + +m_NAtagMCCustomAwardInfo=tagMCCustomAwardInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCustomAwardInfo.Head.Cmd,m_NAtagMCCustomAwardInfo.Head.SubCmd))] = m_NAtagMCCustomAwardInfo #------------------------------------------------------ @@ -20857,6 +22086,226 @@ #------------------------------------------------------ +# A3 CA 古宝物品特殊效果信息 #tagMCGubaoItemEffInfo + +class tagMCGubaoItemEff(Structure): + _pack_ = 1 + _fields_ = [ + ("GubaoID", c_ushort), + ("EffType", c_ubyte), # 不同古宝ID允许拥有相同效果类型,进度值每个古宝ID单独统计 + ("EffValue", c_int), # 该效果目前累加值 + ] + + def __init__(self): + self.Clear() + 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.GubaoID = 0 + self.EffType = 0 + self.EffValue = 0 + return + + def GetLength(self): + return sizeof(tagMCGubaoItemEff) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 CA 古宝物品特殊效果信息 //tagMCGubaoItemEffInfo: + GubaoID:%d, + EffType:%d, + EffValue:%d + '''\ + %( + self.GubaoID, + self.EffType, + self.EffValue + ) + return DumpString + + +class tagMCGubaoItemEffInfo(Structure): + Head = tagHead() + Count = 0 #(WORD Count) + ItemEffInfoList = list() #(vector<tagMCGubaoItemEff> ItemEffInfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCA + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temItemEffInfoList = tagMCGubaoItemEff() + _pos = temItemEffInfoList.ReadData(_lpData, _pos) + self.ItemEffInfoList.append(temItemEffInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCA + self.Count = 0 + self.ItemEffInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.Count): + length += self.ItemEffInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ItemEffInfoList[i].GetLength(), self.ItemEffInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + ItemEffInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCGubaoItemEffInfo=tagMCGubaoItemEffInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoItemEffInfo.Head.Cmd,m_NAtagMCGubaoItemEffInfo.Head.SubCmd))] = m_NAtagMCGubaoItemEffInfo + + +#------------------------------------------------------ +# A3 CB 古宝碎片信息 #tagMCGubaoPieceInfo + +class tagMCGubaoPiece(Structure): + _pack_ = 1 + _fields_ = [ + ("GubaoID", c_ushort), + ("PieceCount", c_int), # 当前碎片个数 + ] + + def __init__(self): + self.Clear() + 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.GubaoID = 0 + self.PieceCount = 0 + return + + def GetLength(self): + return sizeof(tagMCGubaoPiece) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 CB 古宝碎片信息 //tagMCGubaoPieceInfo: + GubaoID:%d, + PieceCount:%d + '''\ + %( + self.GubaoID, + self.PieceCount + ) + return DumpString + + +class tagMCGubaoPieceInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + PieceInfoList = list() #(vector<tagMCGubaoPiece> PieceInfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCB + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temPieceInfoList = tagMCGubaoPiece() + _pos = temPieceInfoList.ReadData(_lpData, _pos) + self.PieceInfoList.append(temPieceInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCB + self.Count = 0 + self.PieceInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.PieceInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.PieceInfoList[i].GetLength(), self.PieceInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + PieceInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCGubaoPieceInfo=tagMCGubaoPieceInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoPieceInfo.Head.Cmd,m_NAtagMCGubaoPieceInfo.Head.SubCmd))] = m_NAtagMCGubaoPieceInfo + + +#------------------------------------------------------ # A3 28 历史累积充值奖励领取记录 #tagMCHistoryReChargeAwardRecord class tagMCHistoryReChargeAwardRecord(Structure): @@ -21134,6 +22583,114 @@ m_NAtagMCHorseSkinTimeInfoList=tagMCHorseSkinTimeInfoList() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHorseSkinTimeInfoList.Head.Cmd,m_NAtagMCHorseSkinTimeInfoList.Head.SubCmd))] = m_NAtagMCHorseSkinTimeInfoList + + +#------------------------------------------------------ +# A3 CD 坐骑星级信息 #tagMCHorseStarInfo + +class tagMCHorseStar(Structure): + _pack_ = 1 + _fields_ = [ + ("HorseID", c_int), # 坐骑表ID + ("Star", c_ubyte), # 星级 + ] + + def __init__(self): + self.Clear() + 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.HorseID = 0 + self.Star = 0 + return + + def GetLength(self): + return sizeof(tagMCHorseStar) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 CD 坐骑星级信息 //tagMCHorseStarInfo: + HorseID:%d, + Star:%d + '''\ + %( + self.HorseID, + self.Star + ) + return DumpString + + +class tagMCHorseStarInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + HorseStarList = list() #(vector<tagMCHorseStar> HorseStarList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCD + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temHorseStarList = tagMCHorseStar() + _pos = temHorseStarList.ReadData(_lpData, _pos) + self.HorseStarList.append(temHorseStarList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCD + self.Count = 0 + self.HorseStarList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.HorseStarList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.HorseStarList[i].GetLength(), self.HorseStarList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + HorseStarList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCHorseStarInfo=tagMCHorseStarInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHorseStarInfo.Head.Cmd,m_NAtagMCHorseStarInfo.Head.SubCmd))] = m_NAtagMCHorseStarInfo #------------------------------------------------------ @@ -22289,6 +23846,7 @@ ItemAddCnt = 0 #(WORD ItemAddCnt)//物品增加次数 PassGradeCnt = 0 #(BYTE PassGradeCnt)//星级值对应个数, 每个key存9个lineID PassGrade = list() #(vector<DWORD> PassGrade)//副本线路对应星级值列表 + EnterCntTotal = 0 #(DWORD EnterCntTotal)//累计进入次数 data = None def __init__(self): @@ -22305,6 +23863,7 @@ for i in range(self.PassGradeCnt): value,_pos=CommFunc.ReadDWORD(_lpData,_pos) self.PassGrade.append(value) + self.EnterCntTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -22314,6 +23873,7 @@ self.ItemAddCnt = 0 self.PassGradeCnt = 0 self.PassGrade = list() + self.EnterCntTotal = 0 return def GetLength(self): @@ -22324,6 +23884,7 @@ length += 2 length += 1 length += 4 * self.PassGradeCnt + length += 4 return length @@ -22336,6 +23897,7 @@ data = CommFunc.WriteBYTE(data, self.PassGradeCnt) for i in range(self.PassGradeCnt): data = CommFunc.WriteDWORD(data, self.PassGrade[i]) + data = CommFunc.WriteDWORD(data, self.EnterCntTotal) return data def OutputString(self): @@ -22345,7 +23907,8 @@ RecoverCnt:%d, ItemAddCnt:%d, PassGradeCnt:%d, - PassGrade:%s + PassGrade:%s, + EnterCntTotal:%d '''\ %( self.FBID, @@ -22353,7 +23916,8 @@ self.RecoverCnt, self.ItemAddCnt, self.PassGradeCnt, - "..." + "...", + self.EnterCntTotal ) return DumpString @@ -23971,6 +25535,58 @@ #------------------------------------------------------ +# A3 43 成就积分信息 #tagMCSuccessScoreInfo + +class tagMCSuccessScoreInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ScoreAwardState", c_int), #成就积分领奖记录,按奖励索引位记录是否领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0x43 + 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 = 0x43 + self.ScoreAwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCSuccessScoreInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 43 成就积分信息 //tagMCSuccessScoreInfo: + Cmd:%s, + SubCmd:%s, + ScoreAwardState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ScoreAwardState + ) + return DumpString + + +m_NAtagMCSuccessScoreInfo=tagMCSuccessScoreInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuccessScoreInfo.Cmd,m_NAtagMCSuccessScoreInfo.SubCmd))] = m_NAtagMCSuccessScoreInfo + + +#------------------------------------------------------ #A3 14 通知各功能的祝福值 #tagMCSyncBlessValue class tagMCSyncSingleBlessValue(Structure): @@ -24161,6 +25777,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("IsPass", c_ubyte), #是否通关副本 + ("XXZLAwardState", c_int), #修仙之路领奖状态;按二进制位存储每个任务ID是否已领取 ] def __init__(self): @@ -24178,6 +25795,7 @@ self.Cmd = 0xA3 self.SubCmd = 0x11 self.IsPass = 0 + self.XXZLAwardState = 0 return def GetLength(self): @@ -24190,18 +25808,128 @@ DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo: Cmd:%s, SubCmd:%s, - IsPass:%d + IsPass:%d, + XXZLAwardState:%d '''\ %( self.Cmd, self.SubCmd, - self.IsPass + self.IsPass, + self.XXZLAwardState ) return DumpString m_NAtagMCSyncRealmInfo=tagMCSyncRealmInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmInfo.Cmd,m_NAtagMCSyncRealmInfo.SubCmd))] = m_NAtagMCSyncRealmInfo + + +#------------------------------------------------------ +# A3 CE 称号星级信息 #tagMCTitleStarInfo + +class tagMCTitleStar(Structure): + _pack_ = 1 + _fields_ = [ + ("TitleID", c_int), # 称号ID + ("Star", c_ubyte), # 星级 + ] + + def __init__(self): + self.Clear() + 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.TitleID = 0 + self.Star = 0 + return + + def GetLength(self): + return sizeof(tagMCTitleStar) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 CE 称号星级信息 //tagMCTitleStarInfo: + TitleID:%d, + Star:%d + '''\ + %( + self.TitleID, + self.Star + ) + return DumpString + + +class tagMCTitleStarInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + TitleStarList = list() #(vector<tagMCTitleStar> TitleStarList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCE + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temTitleStarList = tagMCTitleStar() + _pos = temTitleStarList.ReadData(_lpData, _pos) + self.TitleStarList.append(temTitleStarList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xCE + self.Count = 0 + self.TitleStarList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.TitleStarList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.TitleStarList[i].GetLength(), self.TitleStarList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + TitleStarList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCTitleStarInfo=tagMCTitleStarInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTitleStarInfo.Head.Cmd,m_NAtagMCTitleStarInfo.Head.SubCmd))] = m_NAtagMCTitleStarInfo #------------------------------------------------------ @@ -25231,6 +26959,142 @@ #------------------------------------------------------ +# A5 10 传功奖励结果 #tagMCChuangongResult + +class tagMCChuangongItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.ItemCount = 0 + return + + def GetLength(self): + return sizeof(tagMCChuangongItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 10 传功奖励结果 //tagMCChuangongResult: + ItemID:%d, + ItemCount:%d + '''\ + %( + self.ItemID, + self.ItemCount + ) + return DumpString + + +class tagMCChuangongResult(Structure): + Head = tagHead() + FromLV = 0 #(WORD FromLV)// 传功前等级 + ToLV = 0 #(WORD ToLV)// 传功后等级 + Exp = 0 #(DWORD Exp)// 获得经验求余亿部分 + ExpPoint = 0 #(DWORD ExpPoint)// 获得经验整除亿部分 + ItemCount = 0 #(BYTE ItemCount) + AwardItemList = list() #(vector<tagMCChuangongItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x10 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.FromLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ToLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Exp,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ItemCount): + temAwardItemList = tagMCChuangongItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x10 + self.FromLV = 0 + self.ToLV = 0 + self.Exp = 0 + self.ExpPoint = 0 + self.ItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 2 + length += 4 + length += 4 + length += 1 + for i in range(self.ItemCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.FromLV) + data = CommFunc.WriteWORD(data, self.ToLV) + data = CommFunc.WriteDWORD(data, self.Exp) + data = CommFunc.WriteDWORD(data, self.ExpPoint) + data = CommFunc.WriteBYTE(data, self.ItemCount) + for i in range(self.ItemCount): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + FromLV:%d, + ToLV:%d, + Exp:%d, + ExpPoint:%d, + ItemCount:%d, + AwardItemList:%s + '''\ + %( + self.Head.OutputString(), + self.FromLV, + self.ToLV, + self.Exp, + self.ExpPoint, + self.ItemCount, + "..." + ) + return DumpString + + +m_NAtagMCChuangongResult=tagMCChuangongResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChuangongResult.Head.Cmd,m_NAtagMCChuangongResult.Head.SubCmd))] = m_NAtagMCChuangongResult + + +#------------------------------------------------------ # A5 02 家族活跃令兑换结果 #tagMCFamilyActivityExchangeResult class tagMCFamilyActivityExchangeResult(Structure): @@ -25283,6 +27147,197 @@ #------------------------------------------------------ +# A5 08 家族事务信息 #tagMCFamilyAffairInfo + +class tagMCFamilyAffair(Structure): + _pack_ = 1 + _fields_ = [ + ("AffairID", c_ushort), # 事务ID + ("Star", c_ubyte), # 星级 + ("State", c_ubyte), # 状态:0-无;1-进行中;2-已完成 + ("RemainDuration", c_ushort), # 剩余时长,秒,有剩余时间代表进行中 + ] + + def __init__(self): + self.Clear() + 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.AffairID = 0 + self.Star = 0 + self.State = 0 + self.RemainDuration = 0 + return + + def GetLength(self): + return sizeof(tagMCFamilyAffair) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 08 家族事务信息 //tagMCFamilyAffairInfo: + AffairID:%d, + Star:%d, + State:%d, + RemainDuration:%d + '''\ + %( + self.AffairID, + self.Star, + self.State, + self.RemainDuration + ) + return DumpString + + +class tagMCFamilyAffairInfo(Structure): + Head = tagHead() + RefreshFreeCount = 0 #(BYTE RefreshFreeCount)// 今日已免费刷新次数 + Count = 0 #(BYTE Count) + AffairInfoList = list() #(vector<tagMCFamilyAffair> AffairInfoList)// 事务列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x08 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RefreshFreeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAffairInfoList = tagMCFamilyAffair() + _pos = temAffairInfoList.ReadData(_lpData, _pos) + self.AffairInfoList.append(temAffairInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x08 + self.RefreshFreeCount = 0 + self.Count = 0 + self.AffairInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.Count): + length += self.AffairInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RefreshFreeCount) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AffairInfoList[i].GetLength(), self.AffairInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RefreshFreeCount:%d, + Count:%d, + AffairInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.RefreshFreeCount, + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCFamilyAffairInfo=tagMCFamilyAffairInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyAffairInfo.Head.Cmd,m_NAtagMCFamilyAffairInfo.Head.SubCmd))] = m_NAtagMCFamilyAffairInfo + + +#------------------------------------------------------ +# A5 07 家族boss副本玩家信息 #tagMCFamilyBosFBPlayerInfo + +class tagMCFamilyBosFBPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("HurtTotal", c_int), # 累计伤血,亿求余部分 + ("HurtTotalPoint", c_int), # 累计伤血,亿整除部分 + ("FightSeconds", c_int), # 已累计战斗时长,秒 + ("HurtAwardState", c_int), # 个人总伤血领奖记录,按奖励位二进制位运算表示是否已领取 + ("HurtAwardStateFamily", c_int), # 仙盟总伤血领奖记录,按奖励位二进制位运算表示是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA5 + self.SubCmd = 0x07 + 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 = 0xA5 + self.SubCmd = 0x07 + self.HurtTotal = 0 + self.HurtTotalPoint = 0 + self.FightSeconds = 0 + self.HurtAwardState = 0 + self.HurtAwardStateFamily = 0 + return + + def GetLength(self): + return sizeof(tagMCFamilyBosFBPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 07 家族boss副本玩家信息 //tagMCFamilyBosFBPlayerInfo: + Cmd:%s, + SubCmd:%s, + HurtTotal:%d, + HurtTotalPoint:%d, + FightSeconds:%d, + HurtAwardState:%d, + HurtAwardStateFamily:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.HurtTotal, + self.HurtTotalPoint, + self.FightSeconds, + self.HurtAwardState, + self.HurtAwardStateFamily + ) + return DumpString + + +m_NAtagMCFamilyBosFBPlayerInfo=tagMCFamilyBosFBPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyBosFBPlayerInfo.Cmd,m_NAtagMCFamilyBosFBPlayerInfo.SubCmd))] = m_NAtagMCFamilyBosFBPlayerInfo + + +#------------------------------------------------------ # A5 06 仙盟每日福利领取状态 #tagMCFamilyDayAward class tagMCFamilyDayAward(Structure): @@ -25291,6 +27346,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("GetState", c_ubyte), #是否已领取 + ("MoneyDonateCount", c_ubyte), #今日货币捐献次数 ] def __init__(self): @@ -25308,6 +27364,7 @@ self.Cmd = 0xA5 self.SubCmd = 0x06 self.GetState = 0 + self.MoneyDonateCount = 0 return def GetLength(self): @@ -25320,12 +27377,14 @@ DumpString = '''// A5 06 仙盟每日福利领取状态 //tagMCFamilyDayAward: Cmd:%s, SubCmd:%s, - GetState:%d + GetState:%d, + MoneyDonateCount:%d '''\ %( self.Cmd, self.SubCmd, - self.GetState + self.GetState, + self.MoneyDonateCount ) return DumpString @@ -25440,6 +27499,185 @@ m_NAtagMCFamilyRedPacketGoldLimit=tagMCFamilyRedPacketGoldLimit() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyRedPacketGoldLimit.Cmd,m_NAtagMCFamilyRedPacketGoldLimit.SubCmd))] = m_NAtagMCFamilyRedPacketGoldLimit + + +#------------------------------------------------------ +# A5 11 打坐信息 #tagMCFamilySitInfo + +class tagMCFamilySitInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ExpRound", c_ushort), # 已获得经验轮次 + ("Exp", c_int), # 获得经验求余亿部分 + ("ExpPoint", c_int), # 获得经验整除亿部分 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA5 + self.SubCmd = 0x11 + 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 = 0xA5 + self.SubCmd = 0x11 + self.ExpRound = 0 + self.Exp = 0 + self.ExpPoint = 0 + return + + def GetLength(self): + return sizeof(tagMCFamilySitInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 11 打坐信息 //tagMCFamilySitInfo: + Cmd:%s, + SubCmd:%s, + ExpRound:%d, + Exp:%d, + ExpPoint:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ExpRound, + self.Exp, + self.ExpPoint + ) + return DumpString + + +m_NAtagMCFamilySitInfo=tagMCFamilySitInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilySitInfo.Cmd,m_NAtagMCFamilySitInfo.SubCmd))] = m_NAtagMCFamilySitInfo + + +#------------------------------------------------------ +# A5 09 仙盟阵法信息 #tagMCFamilyZhenfaInfo + +class tagMCFamilyZhenfa(Structure): + _pack_ = 1 + _fields_ = [ + ("ZhenfaType", c_ubyte), # 阵法类型 + ("ZhenfaLV", c_ushort), # 阵法等级 + ("ZhenfaExp", c_int), # 阵法经验 + ] + + def __init__(self): + self.Clear() + 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.ZhenfaType = 0 + self.ZhenfaLV = 0 + self.ZhenfaExp = 0 + return + + def GetLength(self): + return sizeof(tagMCFamilyZhenfa) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 09 仙盟阵法信息 //tagMCFamilyZhenfaInfo: + ZhenfaType:%d, + ZhenfaLV:%d, + ZhenfaExp:%d + '''\ + %( + self.ZhenfaType, + self.ZhenfaLV, + self.ZhenfaExp + ) + return DumpString + + +class tagMCFamilyZhenfaInfo(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)// 当前培养阵法的玩家ID,如果有做自动捐献,需等收到的玩家ID为自己的时候才发送下一个捐献包 + Count = 0 #(BYTE Count) + ZhenfaInfoList = list() #(vector<tagMCFamilyZhenfa> ZhenfaInfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x09 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temZhenfaInfoList = tagMCFamilyZhenfa() + _pos = temZhenfaInfoList.ReadData(_lpData, _pos) + self.ZhenfaInfoList.append(temZhenfaInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x09 + self.PlayerID = 0 + self.Count = 0 + self.ZhenfaInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + for i in range(self.Count): + length += self.ZhenfaInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ZhenfaInfoList[i].GetLength(), self.ZhenfaInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + Count:%d, + ZhenfaInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCFamilyZhenfaInfo=tagMCFamilyZhenfaInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyZhenfaInfo.Head.Cmd,m_NAtagMCFamilyZhenfaInfo.Head.SubCmd))] = m_NAtagMCFamilyZhenfaInfo #------------------------------------------------------ @@ -28976,6 +31214,1027 @@ #------------------------------------------------------ +# AA 67 Boss历练活动信息 #tagMCActBossTrialInfo + +class tagMCActBossTrialItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActBossTrialItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 67 Boss历练活动信息 //tagMCActBossTrialInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActBossTrialBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActBossTrialItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.Rank, + self.Count, + "..." + ) + return DumpString + + +class tagMCActBossTrialSubmitInfo(Structure): + RecordIndex = 0 #(BYTE RecordIndex)// 记录索引 + NeedCount = 0 #(WORD NeedCount)// 所需提交个数 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.RecordIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActBossTrialItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.RecordIndex = 0 + self.NeedCount = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.RecordIndex) + data = CommFunc.WriteWORD(data, self.NeedCount) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + RecordIndex:%d, + NeedCount:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.RecordIndex, + self.NeedCount, + self.Count, + "..." + ) + return DumpString + + +class tagMCActBossTrialInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + SubmitCount = 0 #(BYTE SubmitCount) + SubmitInfoList = list() #(vector<tagMCActBossTrialSubmitInfo> SubmitInfoList)// 提交凭证信息列表 + BillardCount = 0 #(BYTE BillardCount) + BillboardInfoList = list() #(vector<tagMCActBossTrialBillard> BillboardInfoList)// 榜单信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x67 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.SubmitCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SubmitCount): + temSubmitInfoList = tagMCActBossTrialSubmitInfo() + _pos = temSubmitInfoList.ReadData(_lpData, _pos) + self.SubmitInfoList.append(temSubmitInfoList) + self.BillardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BillardCount): + temBillboardInfoList = tagMCActBossTrialBillard() + _pos = temBillboardInfoList.ReadData(_lpData, _pos) + self.BillboardInfoList.append(temBillboardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x67 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.SubmitCount = 0 + self.SubmitInfoList = list() + self.BillardCount = 0 + self.BillboardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.SubmitCount): + length += self.SubmitInfoList[i].GetLength() + length += 1 + for i in range(self.BillardCount): + length += self.BillboardInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.SubmitCount) + for i in range(self.SubmitCount): + data = CommFunc.WriteString(data, self.SubmitInfoList[i].GetLength(), self.SubmitInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.BillardCount) + for i in range(self.BillardCount): + data = CommFunc.WriteString(data, self.BillboardInfoList[i].GetLength(), self.BillboardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + SubmitCount:%d, + SubmitInfoList:%s, + BillardCount:%d, + BillboardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.SubmitCount, + "...", + self.BillardCount, + "..." + ) + return DumpString + + +m_NAtagMCActBossTrialInfo=tagMCActBossTrialInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBossTrialInfo.Head.Cmd,m_NAtagMCActBossTrialInfo.Head.SubCmd))] = m_NAtagMCActBossTrialInfo + + +#------------------------------------------------------ +# AA 68 Boss历练活动玩家信息 #tagMCActBossTrialPlayerInfo + +class tagMCActBossTrialPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("SubmitCount", c_ushort), # 已提交凭证个数 + ("SubmitCountAward", c_int), # 提交凭证奖励领奖状态 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x68 + 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 = 0x68 + self.ActNum = 0 + self.SubmitCount = 0 + self.SubmitCountAward = 0 + return + + def GetLength(self): + return sizeof(tagMCActBossTrialPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 68 Boss历练活动玩家信息 //tagMCActBossTrialPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + SubmitCount:%d, + SubmitCountAward:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.SubmitCount, + self.SubmitCountAward + ) + return DumpString + + +m_NAtagMCActBossTrialPlayerInfo=tagMCActBossTrialPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBossTrialPlayerInfo.Cmd,m_NAtagMCActBossTrialPlayerInfo.SubCmd))] = m_NAtagMCActBossTrialPlayerInfo + + +#------------------------------------------------------ +# AA 74 购买次数礼包活动信息 #tagMCActBuyCountGiftInfo + +class tagMCActBuyCountGiftItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActBuyCountGiftItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActBuyCountGift(Structure): + NeedBuyCount = 0 #(BYTE NeedBuyCount)// 所需总购买次数,0为免费领取的档次 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActBuyCountGiftItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActBuyCountGiftItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedBuyCount = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.NeedBuyCount) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedBuyCount:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedBuyCount, + self.Count, + "..." + ) + return DumpString + + +class tagMCActBuyCountCTGID(Structure): + _pack_ = 1 + _fields_ = [ + ("CTGID", c_ushort), # 充值表ID + ("Discount", c_ushort), # 折扣力度百分比 + ] + + def __init__(self): + self.Clear() + 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.CTGID = 0 + self.Discount = 0 + return + + def GetLength(self): + return sizeof(tagMCActBuyCountCTGID) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo: + CTGID:%d, + Discount:%d + '''\ + %( + self.CTGID, + self.Discount + ) + return DumpString + + +class tagMCActBuyCountGiftInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + CTGIDCount = 0 #(BYTE CTGIDCount) + CTGIDInfoList = list() #(vector<tagMCActBuyCountCTGID> CTGIDInfoList)// CTGID信息列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加 + GiftCount = 0 #(BYTE GiftCount) + BuyCountGiftList = list() #(vector<tagMCActBuyCountGift> BuyCountGiftList)// 购买次数礼包列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x74 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CTGIDCount): + temCTGIDInfoList = tagMCActBuyCountCTGID() + _pos = temCTGIDInfoList.ReadData(_lpData, _pos) + self.CTGIDInfoList.append(temCTGIDInfoList) + self.GiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GiftCount): + temBuyCountGiftList = tagMCActBuyCountGift() + _pos = temBuyCountGiftList.ReadData(_lpData, _pos) + self.BuyCountGiftList.append(temBuyCountGiftList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x74 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.CTGIDCount = 0 + self.CTGIDInfoList = list() + self.GiftCount = 0 + self.BuyCountGiftList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.CTGIDCount): + length += self.CTGIDInfoList[i].GetLength() + length += 1 + for i in range(self.GiftCount): + length += self.BuyCountGiftList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.CTGIDCount) + for i in range(self.CTGIDCount): + data = CommFunc.WriteString(data, self.CTGIDInfoList[i].GetLength(), self.CTGIDInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.GiftCount) + for i in range(self.GiftCount): + data = CommFunc.WriteString(data, self.BuyCountGiftList[i].GetLength(), self.BuyCountGiftList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + CTGIDCount:%d, + CTGIDInfoList:%s, + GiftCount:%d, + BuyCountGiftList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.CTGIDCount, + "...", + self.GiftCount, + "..." + ) + return DumpString + + +m_NAtagMCActBuyCountGiftInfo=tagMCActBuyCountGiftInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyCountGiftInfo.Head.Cmd,m_NAtagMCActBuyCountGiftInfo.Head.SubCmd))] = m_NAtagMCActBuyCountGiftInfo + + +#------------------------------------------------------ +# AA 75 购买次数礼包活动玩家信息 #tagMCActBuyCountGiftPlayerInfo + +class tagMCActBuyCountGiftPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("GiftAwardRecord", c_int), # 购买次数礼包领奖记录,直接用购买次数做位运算判断是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x75 + 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 = 0x75 + self.ActNum = 0 + self.GiftAwardRecord = 0 + return + + def GetLength(self): + return sizeof(tagMCActBuyCountGiftPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 75 购买次数礼包活动玩家信息 //tagMCActBuyCountGiftPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + GiftAwardRecord:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.GiftAwardRecord + ) + return DumpString + + +m_NAtagMCActBuyCountGiftPlayerInfo=tagMCActBuyCountGiftPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyCountGiftPlayerInfo.Cmd,m_NAtagMCActBuyCountGiftPlayerInfo.SubCmd))] = m_NAtagMCActBuyCountGiftPlayerInfo + + +#------------------------------------------------------ +# AA 65 买一送多活动信息 #tagMCActBuyOneInfo + +class tagMCActBuyOneInfoFreeItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActBuyOneInfoFreeItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 65 买一送多活动信息 //tagMCActBuyOneInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActBuyOneInfoFreeGift(Structure): + FreeIndex = 0 #(BYTE FreeIndex)// 免费领取索引 + FreeItemCount = 0 #(BYTE FreeItemCount)// 免费礼包数 + FreeItemList = list() #(vector<tagMCActBuyOneInfoFreeItem> FreeItemList)// 免费礼包列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.FreeIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FreeItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.FreeItemCount): + temFreeItemList = tagMCActBuyOneInfoFreeItem() + _pos = temFreeItemList.ReadData(_lpData, _pos) + self.FreeItemList.append(temFreeItemList) + return _pos + + def Clear(self): + self.FreeIndex = 0 + self.FreeItemCount = 0 + self.FreeItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.FreeItemCount): + length += self.FreeItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.FreeIndex) + data = CommFunc.WriteBYTE(data, self.FreeItemCount) + for i in range(self.FreeItemCount): + data = CommFunc.WriteString(data, self.FreeItemList[i].GetLength(), self.FreeItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + FreeIndex:%d, + FreeItemCount:%d, + FreeItemList:%s + '''\ + %( + self.FreeIndex, + self.FreeItemCount, + "..." + ) + return DumpString + + +class tagMCActBuyOneInfoGiftbag(Structure): + CTGID = 0 #(DWORD CTGID)//所需充值ID + RecordIndex = 0 #(BYTE RecordIndex)// 记录索引 + FreeGiftCount = 0 #(BYTE FreeGiftCount)// 免费礼包数 + FreeGiftList = list() #(vector<tagMCActBuyOneInfoFreeGift> FreeGiftList)// 免费礼包列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.CTGID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RecordIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FreeGiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.FreeGiftCount): + temFreeGiftList = tagMCActBuyOneInfoFreeGift() + _pos = temFreeGiftList.ReadData(_lpData, _pos) + self.FreeGiftList.append(temFreeGiftList) + return _pos + + def Clear(self): + self.CTGID = 0 + self.RecordIndex = 0 + self.FreeGiftCount = 0 + self.FreeGiftList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 1 + for i in range(self.FreeGiftCount): + length += self.FreeGiftList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.CTGID) + data = CommFunc.WriteBYTE(data, self.RecordIndex) + data = CommFunc.WriteBYTE(data, self.FreeGiftCount) + for i in range(self.FreeGiftCount): + data = CommFunc.WriteString(data, self.FreeGiftList[i].GetLength(), self.FreeGiftList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + CTGID:%d, + RecordIndex:%d, + FreeGiftCount:%d, + FreeGiftList:%s + '''\ + %( + self.CTGID, + self.RecordIndex, + self.FreeGiftCount, + "..." + ) + return DumpString + + +class tagMCActBuyOneInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + GiftbagCount = 0 #(BYTE GiftbagCount)// 活动礼包个数 + GiftbagList = list() #(vector<tagMCActBuyOneInfoGiftbag> GiftbagList)// 礼包列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x65 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GiftbagCount): + temGiftbagList = tagMCActBuyOneInfoGiftbag() + _pos = temGiftbagList.ReadData(_lpData, _pos) + self.GiftbagList.append(temGiftbagList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x65 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.GiftbagCount = 0 + self.GiftbagList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 2 + length += 1 + for i in range(self.GiftbagCount): + length += self.GiftbagList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.GiftbagCount) + for i in range(self.GiftbagCount): + data = CommFunc.WriteString(data, self.GiftbagList[i].GetLength(), self.GiftbagList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + GiftbagCount:%d, + GiftbagList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.GiftbagCount, + "..." + ) + return DumpString + + +m_NAtagMCActBuyOneInfo=tagMCActBuyOneInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyOneInfo.Head.Cmd,m_NAtagMCActBuyOneInfo.Head.SubCmd))] = m_NAtagMCActBuyOneInfo + + +#------------------------------------------------------ +# AA 66 买一送多活动玩家信息 #tagMCActBuyOnePlayerInfo + +class tagMCActBuyOnePlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + FreeRecordCount = 0 #(BYTE FreeRecordCount)// 免费礼包领奖记录个数 + FreeRecordList = list() #(vector<DWORD> FreeRecordList)// 免费礼包领奖记录列表,按所需充值ID记录索引取记录,每个记录代表每个充值ID对应免费礼包的领取记录,按免费领取索引位运算记录是否已领取 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x66 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FreeRecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.FreeRecordCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.FreeRecordList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x66 + self.ActNum = 0 + self.FreeRecordCount = 0 + self.FreeRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.FreeRecordCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteBYTE(data, self.FreeRecordCount) + for i in range(self.FreeRecordCount): + data = CommFunc.WriteDWORD(data, self.FreeRecordList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + FreeRecordCount:%d, + FreeRecordList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.FreeRecordCount, + "..." + ) + return DumpString + + +m_NAtagMCActBuyOnePlayerInfo=tagMCActBuyOnePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBuyOnePlayerInfo.Head.Cmd,m_NAtagMCActBuyOnePlayerInfo.Head.SubCmd))] = m_NAtagMCActBuyOnePlayerInfo + + +#------------------------------------------------------ # AA 40 集字活动信息 #tagMCActCollectWordsInfo class tagMCActCollectWordsNeedItem(Structure): @@ -30066,7 +33325,7 @@ class tagMCActGrowupBuyCTGInfo(Structure): - CTGID = 0 #(BYTE CTGID)// 充值表ID + CTGID = 0 #(WORD CTGID)// 充值表ID GainItemCount = 0 #(BYTE GainItemCount)// 获得物品数 GainItemList = list() #(vector<tagMCActGrowupBuyCTGItem> GainItemList)// 获得物品列表,替换充值表中的 GainItemList 字段信息 data = None @@ -30077,7 +33336,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - self.CTGID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CTGID,_pos = CommFunc.ReadWORD(_lpData, _pos) self.GainItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.GainItemCount): temGainItemList = tagMCActGrowupBuyCTGItem() @@ -30093,7 +33352,7 @@ def GetLength(self): length = 0 - length += 1 + length += 2 length += 1 for i in range(self.GainItemCount): length += self.GainItemList[i].GetLength() @@ -30102,7 +33361,7 @@ def GetBuffer(self): data = '' - data = CommFunc.WriteBYTE(data, self.CTGID) + data = CommFunc.WriteWORD(data, self.CTGID) data = CommFunc.WriteBYTE(data, self.GainItemCount) for i in range(self.GainItemCount): data = CommFunc.WriteString(data, self.GainItemList[i].GetLength(), self.GainItemList[i].GetBuffer()) @@ -30833,6 +34092,273 @@ m_NAtagMCActLoginAwardPlayerInfo=tagMCActLoginAwardPlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginAwardPlayerInfo.Head.Cmd,m_NAtagMCActLoginAwardPlayerInfo.Head.SubCmd))] = m_NAtagMCActLoginAwardPlayerInfo + + +#------------------------------------------------------ +# AA 69 登录活动信息新 #tagMCActLoginNew + +class tagMCActLoginNewItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActLoginNewItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 69 登录活动信息新 //tagMCActLoginNew: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActLoginNewDay(Structure): + DayNum = 0 #(BYTE DayNum)//天编号,从1开始,过期未签到领取的天可消耗货币补签领取 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActLoginNewItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.DayNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActLoginNewItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.DayNum = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.DayNum) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + DayNum:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.DayNum, + self.Count, + "..." + ) + return DumpString + + +class tagMCActLoginNew(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + RepSignMoneyType = 0 #(BYTE RepSignMoneyType)// 补签消耗货币类型 + RepSignMoneyValue = 0 #(DWORD RepSignMoneyValue)// 补签消耗货币值 + DayCount = 0 #(BYTE DayCount) + AwardDayList = list() #(vector<tagMCActLoginNewDay> AwardDayList)// 奖励天列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x69 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RepSignMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RepSignMoneyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DayCount): + temAwardDayList = tagMCActLoginNewDay() + _pos = temAwardDayList.ReadData(_lpData, _pos) + self.AwardDayList.append(temAwardDayList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x69 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.RepSignMoneyType = 0 + self.RepSignMoneyValue = 0 + self.DayCount = 0 + self.AwardDayList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + length += 4 + length += 1 + for i in range(self.DayCount): + length += self.AwardDayList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.RepSignMoneyType) + data = CommFunc.WriteDWORD(data, self.RepSignMoneyValue) + data = CommFunc.WriteBYTE(data, self.DayCount) + for i in range(self.DayCount): + data = CommFunc.WriteString(data, self.AwardDayList[i].GetLength(), self.AwardDayList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + RepSignMoneyType:%d, + RepSignMoneyValue:%d, + DayCount:%d, + AwardDayList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.RepSignMoneyType, + self.RepSignMoneyValue, + self.DayCount, + "..." + ) + return DumpString + + +m_NAtagMCActLoginNew=tagMCActLoginNew() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginNew.Head.Cmd,m_NAtagMCActLoginNew.Head.SubCmd))] = m_NAtagMCActLoginNew + + +#------------------------------------------------------ +# AA 70 登录活动玩家信息新 #tagMCActLoginPlayerInfoNew + +class tagMCActLoginPlayerInfoNew(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("LoginAward", c_int), # 是否已领取,按天索引0代表第1天记录当天是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x70 + 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 = 0x70 + self.ActNum = 0 + self.LoginAward = 0 + return + + def GetLength(self): + return sizeof(tagMCActLoginPlayerInfoNew) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 70 登录活动玩家信息新 //tagMCActLoginPlayerInfoNew: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + LoginAward:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.LoginAward + ) + return DumpString + + +m_NAtagMCActLoginPlayerInfoNew=tagMCActLoginPlayerInfoNew() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginPlayerInfoNew.Cmd,m_NAtagMCActLoginPlayerInfoNew.SubCmd))] = m_NAtagMCActLoginPlayerInfoNew #------------------------------------------------------ @@ -31863,7 +35389,8 @@ class tagMCActSingleRechargeAward(Structure): - AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 + AwardCountMax = 0 #(WORD AwardCountMax)// 最大领奖次数 SingleRechargeValue = 0 #(DWORD SingleRechargeValue)// 单笔所需充值额度 AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数 AwardItem = list() #(vector<tagMCActSingleRechargeAwardItem> AwardItem)// 奖励物品信息 @@ -31876,6 +35403,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardCountMax,_pos = CommFunc.ReadWORD(_lpData, _pos) self.SingleRechargeValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.AwardItemCount): @@ -31886,6 +35414,7 @@ def Clear(self): self.AwardIndex = 0 + self.AwardCountMax = 0 self.SingleRechargeValue = 0 self.AwardItemCount = 0 self.AwardItem = list() @@ -31894,6 +35423,7 @@ def GetLength(self): length = 0 length += 1 + length += 2 length += 4 length += 1 for i in range(self.AwardItemCount): @@ -31904,6 +35434,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteWORD(data, self.AwardCountMax) data = CommFunc.WriteDWORD(data, self.SingleRechargeValue) data = CommFunc.WriteBYTE(data, self.AwardItemCount) for i in range(self.AwardItemCount): @@ -31913,12 +35444,14 @@ def OutputString(self): DumpString = ''' AwardIndex:%d, + AwardCountMax:%d, SingleRechargeValue:%d, AwardItemCount:%d, AwardItem:%s '''\ %( self.AwardIndex, + self.AwardCountMax, self.SingleRechargeValue, self.AwardItemCount, "..." @@ -32037,20 +35570,16 @@ #------------------------------------------------------ # AA 51 单笔累充活动玩家信息 #tagMCActSingleRechargePlayerInfo -class tagMCActSingleRechargePlayerInfo(Structure): +class tagMCActSingleRechargePlayerAward(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 - ("CanAwardValue", c_int), #可否领奖记录,按奖励索引二进制位存储是否可领取 - ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取 + ("AwardIndex", c_ubyte), # 奖励索引 + ("CanGetCount", c_ushort), # 可领奖次数 + ("GetCount", c_ushort), # 已领奖次数 ] def __init__(self): self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x51 return def ReadData(self, stringData, _pos=0, _len=0): @@ -32059,39 +35588,516 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xAA - self.SubCmd = 0x51 - self.ActNum = 0 - self.CanAwardValue = 0 - self.AwardRecord = 0 + self.AwardIndex = 0 + self.CanGetCount = 0 + self.GetCount = 0 return def GetLength(self): - return sizeof(tagMCActSingleRechargePlayerInfo) + return sizeof(tagMCActSingleRechargePlayerAward) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): DumpString = '''// AA 51 单笔累充活动玩家信息 //tagMCActSingleRechargePlayerInfo: - Cmd:%s, - SubCmd:%s, - ActNum:%d, - CanAwardValue:%d, - AwardRecord:%d + AwardIndex:%d, + CanGetCount:%d, + GetCount:%d '''\ %( - self.Cmd, - self.SubCmd, + self.AwardIndex, + self.CanGetCount, + self.GetCount + ) + return DumpString + + +class tagMCActSingleRechargePlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 + RecordCount = 0 #(BYTE RecordCount) + AwardRecordList = list() #(vector<tagMCActSingleRechargePlayerAward> AwardRecordList)// 领奖次数记录列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x51 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + temAwardRecordList = tagMCActSingleRechargePlayerAward() + _pos = temAwardRecordList.ReadData(_lpData, _pos) + self.AwardRecordList.append(temAwardRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x51 + self.ActNum = 0 + self.RecordCount = 0 + self.AwardRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.RecordCount): + length += self.AwardRecordList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteString(data, self.AwardRecordList[i].GetLength(), self.AwardRecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + RecordCount:%d, + AwardRecordList:%s + '''\ + %( + self.Head.OutputString(), self.ActNum, - self.CanAwardValue, - self.AwardRecord + self.RecordCount, + "..." ) return DumpString m_NAtagMCActSingleRechargePlayerInfo=tagMCActSingleRechargePlayerInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Cmd,m_NAtagMCActSingleRechargePlayerInfo.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Head.Cmd,m_NAtagMCActSingleRechargePlayerInfo.Head.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo + + +#------------------------------------------------------ +# AA 71 任务活动信息 #tagMCActTaskInfo + +class tagMCActTaskItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActTaskItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 71 任务活动信息 //tagMCActTaskInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActTask(Structure): + TaskID = 0 #(DWORD TaskID)// 任务ID,1~n + TaskType = 0 #(BYTE TaskType)// 任务类型 + NeedValue = 0 #(DWORD NeedValue)// 完成任务所需值 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActTaskItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.TaskID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TaskType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActTaskItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.TaskID = 0 + self.TaskType = 0 + self.NeedValue = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.TaskID) + data = CommFunc.WriteBYTE(data, self.TaskType) + data = CommFunc.WriteDWORD(data, self.NeedValue) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + TaskID:%d, + TaskType:%d, + NeedValue:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.TaskID, + self.TaskType, + self.NeedValue, + self.Count, + "..." + ) + return DumpString + + +class tagMCActTaskInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + TaskCount = 0 #(BYTE TaskCount) + TaskList = list() #(vector<tagMCActTask> TaskList)// 任务列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x71 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TaskCount): + temTaskList = tagMCActTask() + _pos = temTaskList.ReadData(_lpData, _pos) + self.TaskList.append(temTaskList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x71 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.TaskCount = 0 + self.TaskList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.TaskCount): + length += self.TaskList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.TaskCount) + for i in range(self.TaskCount): + data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + TaskCount:%d, + TaskList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.TaskCount, + "..." + ) + return DumpString + + +m_NAtagMCActTaskInfo=tagMCActTaskInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTaskInfo.Head.Cmd,m_NAtagMCActTaskInfo.Head.SubCmd))] = m_NAtagMCActTaskInfo + + +#------------------------------------------------------ +# AA 73 任务活动玩家信息 #tagMCActTaskPlayerInfo + +class tagMCActTaskPlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + AwardCount = 0 #(BYTE AwardCount) + AwardRecordList = list() #(vector<DWORD> AwardRecordList)// 任务ID领奖记录值列表,根据任务ID位判断是否已领取,一个记录值存31位 [记录值0, 记录值1, ...] + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x73 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.AwardRecordList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x73 + self.ActNum = 0 + self.AwardCount = 0 + self.AwardRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.AwardCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteDWORD(data, self.AwardRecordList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + AwardCount:%d, + AwardRecordList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCActTaskPlayerInfo=tagMCActTaskPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTaskPlayerInfo.Head.Cmd,m_NAtagMCActTaskPlayerInfo.Head.SubCmd))] = m_NAtagMCActTaskPlayerInfo + + +#------------------------------------------------------ +# AA 72 任务活动玩家任务值 #tagMCActTaskPlayerValueInfo + +class tagMCActTaskPlayerValue(Structure): + _pack_ = 1 + _fields_ = [ + ("TaskType", c_ubyte), # 任务类型 + ("TaskValue", c_int), # 当前任务值,所有相同任务类型共享该进度值 + ] + + def __init__(self): + self.Clear() + 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.TaskType = 0 + self.TaskValue = 0 + return + + def GetLength(self): + return sizeof(tagMCActTaskPlayerValue) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 72 任务活动玩家任务值 //tagMCActTaskPlayerValueInfo: + TaskType:%d, + TaskValue:%d + '''\ + %( + self.TaskType, + self.TaskValue + ) + return DumpString + + +class tagMCActTaskPlayerValueInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + TaskCount = 0 #(BYTE TaskCount) + TaskValueList = list() #(vector<tagMCActTaskPlayerValue> TaskValueList)// 有同步的任务类型直接覆盖即可 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x72 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TaskCount): + temTaskValueList = tagMCActTaskPlayerValue() + _pos = temTaskValueList.ReadData(_lpData, _pos) + self.TaskValueList.append(temTaskValueList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x72 + self.ActNum = 0 + self.TaskCount = 0 + self.TaskValueList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.TaskCount): + length += self.TaskValueList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteBYTE(data, self.TaskCount) + for i in range(self.TaskCount): + data = CommFunc.WriteString(data, self.TaskValueList[i].GetLength(), self.TaskValueList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + TaskCount:%d, + TaskValueList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.TaskCount, + "..." + ) + return DumpString + + +m_NAtagMCActTaskPlayerValueInfo=tagMCActTaskPlayerValueInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTaskPlayerValueInfo.Head.Cmd,m_NAtagMCActTaskPlayerValueInfo.Head.SubCmd))] = m_NAtagMCActTaskPlayerValueInfo #------------------------------------------------------ @@ -34370,6 +38376,7 @@ RMB = 0 #(DWORD RMB)//所需RMB,元 GiftItemCount = 0 #(BYTE GiftItemCount)// 礼包物品数 ItemInfo = list() #(vector<tagMCDailyGiftbagItem> ItemInfo)// 物品信息 + Discount = 0 #(WORD Discount)// 折扣力度百分比 data = None def __init__(self): @@ -34388,6 +38395,7 @@ temItemInfo = tagMCDailyGiftbagItem() _pos = temItemInfo.ReadData(_lpData, _pos) self.ItemInfo.append(temItemInfo) + self.Discount,_pos = CommFunc.ReadWORD(_lpData, _pos) return _pos def Clear(self): @@ -34398,6 +38406,7 @@ self.RMB = 0 self.GiftItemCount = 0 self.ItemInfo = list() + self.Discount = 0 return def GetLength(self): @@ -34410,6 +38419,7 @@ length += 1 for i in range(self.GiftItemCount): length += self.ItemInfo[i].GetLength() + length += 2 return length @@ -34423,6 +38433,7 @@ data = CommFunc.WriteBYTE(data, self.GiftItemCount) for i in range(self.GiftItemCount): data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer()) + data = CommFunc.WriteWORD(data, self.Discount) return data def OutputString(self): @@ -34433,7 +38444,8 @@ BuyCountLimit:%d, RMB:%d, GiftItemCount:%d, - ItemInfo:%s + ItemInfo:%s, + Discount:%d '''\ %( self.GiftID, @@ -34442,7 +38454,8 @@ self.BuyCountLimit, self.RMB, self.GiftItemCount, - "..." + "...", + self.Discount ) return DumpString @@ -34626,6 +38639,66 @@ m_NAtagMCDailyGiftbagPlayerInfo=tagMCDailyGiftbagPlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyGiftbagPlayerInfo.Head.Cmd,m_NAtagMCDailyGiftbagPlayerInfo.Head.SubCmd))] = m_NAtagMCDailyGiftbagPlayerInfo + + +#------------------------------------------------------ +# AA 03 每日打包直购礼包 #tagMCDailyPackBuyGiftInfo + +class tagMCDailyPackBuyGiftInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("PackBuyTime", c_int), # 打包购买的时间戳,如果有该值,代表已经一次性打包购买了,可根据次时间戳算出当前是第几天 + ("BuyStateToday", c_int), # 今日礼包购买状态,按礼包索引二进制位计算代表是否已购买,仅非打包购买状态下有用 + ("AwardState", c_int), # 今日礼包领奖状态,按礼包索引二进制位计算代表是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x03 + 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 = 0x03 + self.PackBuyTime = 0 + self.BuyStateToday = 0 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCDailyPackBuyGiftInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 03 每日打包直购礼包 //tagMCDailyPackBuyGiftInfo: + Cmd:%s, + SubCmd:%s, + PackBuyTime:%d, + BuyStateToday:%d, + AwardState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.PackBuyTime, + self.BuyStateToday, + self.AwardState + ) + return DumpString + + +m_NAtagMCDailyPackBuyGiftInfo=tagMCDailyPackBuyGiftInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyPackBuyGiftInfo.Cmd,m_NAtagMCDailyPackBuyGiftInfo.SubCmd))] = m_NAtagMCDailyPackBuyGiftInfo #------------------------------------------------------ @@ -35210,7 +39283,7 @@ _pack_ = 1 _fields_ = [ ("AwardIndex", c_ubyte), #游历奖励索引 - ("GetAwardCount", c_ubyte), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 + ("GetAwardCount", c_int), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 ] def __init__(self): @@ -40297,6 +44370,7 @@ TodayExpPoint = 0 #(DWORD TodayExpPoint) YestordayExp = 0 #(DWORD YestordayExp) YestordayExpPoint = 0 #(DWORD YestordayExpPoint) + TotalCount = 0 #(DWORD TotalCount)// 累计活跃放置次数 data = None def __init__(self): @@ -40317,6 +44391,7 @@ self.TodayExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.YestordayExp,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.YestordayExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TotalCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -40333,6 +44408,7 @@ self.TodayExpPoint = 0 self.YestordayExp = 0 self.YestordayExpPoint = 0 + self.TotalCount = 0 return def GetLength(self): @@ -40343,6 +44419,7 @@ length += 1 length += 1 length += len(self.RewardInfo) + length += 4 length += 4 length += 4 length += 4 @@ -40362,6 +44439,7 @@ data = CommFunc.WriteDWORD(data, self.TodayExpPoint) data = CommFunc.WriteDWORD(data, self.YestordayExp) data = CommFunc.WriteDWORD(data, self.YestordayExpPoint) + data = CommFunc.WriteDWORD(data, self.TotalCount) return data def OutputString(self): @@ -40375,7 +44453,8 @@ TodayExp:%d, TodayExpPoint:%d, YestordayExp:%d, - YestordayExpPoint:%d + YestordayExpPoint:%d, + TotalCount:%d '''\ %( self.Head.OutputString(), @@ -40387,7 +44466,8 @@ self.TodayExp, self.TodayExpPoint, self.YestordayExp, - self.YestordayExpPoint + self.YestordayExpPoint, + self.TotalCount ) return DumpString @@ -40494,6 +44574,128 @@ m_NAtagMCFishResult=tagMCFishResult() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFishResult.Cmd,m_NAtagMCFishResult.SubCmd))] = m_NAtagMCFishResult + + +#------------------------------------------------------ +# B0 30 玩家福地相关信息 #tagMCPlayerMineAreaInfo + +class tagMCPlayerMineAreaInfo(Structure): + Head = tagHead() + WorkerCount = 0 #(BYTE WorkerCount)// 已雇佣工人数 + EnergyUsed = 0 #(WORD EnergyUsed)// 今日已消耗体力 + RefreshCount = 0 #(DWORD RefreshCount)// 今日福地刷新物品次数 - 普通刷新 + RefreshCountSuper = 0 #(BYTE RefreshCountSuper)// 今日福地刷新物品次数 - 超级刷新 + TreasureCount = 0 #(BYTE TreasureCount)// 聚宝盆类型个数,对应类型 0~n + TreasureState = list() #(vector<BYTE> TreasureState)// 聚宝盆是否已激活列表,[类型0是否已激活, ...] + TreasureAward = list() #(vector<BYTE> TreasureAward)// 聚宝盆奖励是否已领取列表,[类型0是否已领取, ...] + TreasureProgress = list() #(vector<BYTE> TreasureProgress)// 聚宝盆进度值列表,[类型0进度值, ...],满进度100 + HelpAwardCount = 0 #(BYTE HelpAwardCount)// 今日已帮助别人奖励次数 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x30 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.WorkerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.EnergyUsed,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RefreshCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RefreshCountSuper,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TreasureCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TreasureCount): + value,_pos=CommFunc.ReadBYTE(_lpData,_pos) + self.TreasureState.append(value) + for i in range(self.TreasureCount): + value,_pos=CommFunc.ReadBYTE(_lpData,_pos) + self.TreasureAward.append(value) + for i in range(self.TreasureCount): + value,_pos=CommFunc.ReadBYTE(_lpData,_pos) + self.TreasureProgress.append(value) + self.HelpAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x30 + self.WorkerCount = 0 + self.EnergyUsed = 0 + self.RefreshCount = 0 + self.RefreshCountSuper = 0 + self.TreasureCount = 0 + self.TreasureState = list() + self.TreasureAward = list() + self.TreasureProgress = list() + self.HelpAwardCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 2 + length += 4 + length += 1 + length += 1 + length += 1 * self.TreasureCount + length += 1 * self.TreasureCount + length += 1 * self.TreasureCount + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.WorkerCount) + data = CommFunc.WriteWORD(data, self.EnergyUsed) + data = CommFunc.WriteDWORD(data, self.RefreshCount) + data = CommFunc.WriteBYTE(data, self.RefreshCountSuper) + data = CommFunc.WriteBYTE(data, self.TreasureCount) + for i in range(self.TreasureCount): + data = CommFunc.WriteBYTE(data, self.TreasureState[i]) + for i in range(self.TreasureCount): + data = CommFunc.WriteBYTE(data, self.TreasureAward[i]) + for i in range(self.TreasureCount): + data = CommFunc.WriteBYTE(data, self.TreasureProgress[i]) + data = CommFunc.WriteBYTE(data, self.HelpAwardCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + WorkerCount:%d, + EnergyUsed:%d, + RefreshCount:%d, + RefreshCountSuper:%d, + TreasureCount:%d, + TreasureState:%s, + TreasureAward:%s, + TreasureProgress:%s, + HelpAwardCount:%d + '''\ + %( + self.Head.OutputString(), + self.WorkerCount, + self.EnergyUsed, + self.RefreshCount, + self.RefreshCountSuper, + self.TreasureCount, + "...", + "...", + "...", + self.HelpAwardCount + ) + return DumpString + + +m_NAtagMCPlayerMineAreaInfo=tagMCPlayerMineAreaInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerMineAreaInfo.Head.Cmd,m_NAtagMCPlayerMineAreaInfo.Head.SubCmd))] = m_NAtagMCPlayerMineAreaInfo #------------------------------------------------------ @@ -40784,6 +44986,207 @@ m_NAtagMCFuncSysPrivilegeInfoList=tagMCFuncSysPrivilegeInfoList() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFuncSysPrivilegeInfoList.Head.Cmd,m_NAtagMCFuncSysPrivilegeInfoList.Head.SubCmd))] = m_NAtagMCFuncSysPrivilegeInfoList + + +#------------------------------------------------------ +# B1 09 玩家挂机系统信息 #tagMCGuajiInfo + +class tagMCGuajiMoney(Structure): + _pack_ = 1 + _fields_ = [ + ("MoneyType", c_ubyte), + ("MoneyValue", c_int), + ] + + def __init__(self): + self.Clear() + 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.MoneyType = 0 + self.MoneyValue = 0 + return + + def GetLength(self): + return sizeof(tagMCGuajiMoney) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 09 玩家挂机系统信息 //tagMCGuajiInfo: + MoneyType:%d, + MoneyValue:%d + '''\ + %( + self.MoneyType, + self.MoneyValue + ) + return DumpString + + +class tagMCGuajiItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("Count", c_ushort), + ] + + def __init__(self): + self.Clear() + 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.ItemID = 0 + self.Count = 0 + return + + def GetLength(self): + return sizeof(tagMCGuajiItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 09 玩家挂机系统信息 //tagMCGuajiInfo: + ItemID:%d, + Count:%d + '''\ + %( + self.ItemID, + self.Count + ) + return DumpString + + +class tagMCGuajiInfo(Structure): + Head = tagHead() + QuickAwardCount = 0 #(BYTE QuickAwardCount)// 今日已快速挂机收益次数 + AwardType = 0 #(BYTE AwardType)// 收益类型: 0-已累计预览;1-领取结算结果(包含常规领取跟快速领取) + AwardSeconds = 0 #(DWORD AwardSeconds)// 已累计收益时长,秒 + Exp = 0 #(DWORD Exp)// 已累计经验,求余亿部分 + ExpPoint = 0 #(DWORD ExpPoint)// 已累计经验,整除亿部分 + MoneyLen = 0 #(BYTE MoneyLen) + MoneyList = list() #(vector<tagMCGuajiMoney> MoneyList)// 已累计货币 + ItemLen = 0 #(BYTE ItemLen) + ItemList = list() #(vector<tagMCGuajiItem> ItemList)// 已累计物品 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x09 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.QuickAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardSeconds,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Exp,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MoneyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.MoneyLen): + temMoneyList = tagMCGuajiMoney() + _pos = temMoneyList.ReadData(_lpData, _pos) + self.MoneyList.append(temMoneyList) + self.ItemLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ItemLen): + temItemList = tagMCGuajiItem() + _pos = temItemList.ReadData(_lpData, _pos) + self.ItemList.append(temItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x09 + self.QuickAwardCount = 0 + self.AwardType = 0 + self.AwardSeconds = 0 + self.Exp = 0 + self.ExpPoint = 0 + self.MoneyLen = 0 + self.MoneyList = list() + self.ItemLen = 0 + self.ItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 + length += 4 + length += 4 + length += 1 + for i in range(self.MoneyLen): + length += self.MoneyList[i].GetLength() + length += 1 + for i in range(self.ItemLen): + length += self.ItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.QuickAwardCount) + data = CommFunc.WriteBYTE(data, self.AwardType) + data = CommFunc.WriteDWORD(data, self.AwardSeconds) + data = CommFunc.WriteDWORD(data, self.Exp) + data = CommFunc.WriteDWORD(data, self.ExpPoint) + data = CommFunc.WriteBYTE(data, self.MoneyLen) + for i in range(self.MoneyLen): + data = CommFunc.WriteString(data, self.MoneyList[i].GetLength(), self.MoneyList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ItemLen) + for i in range(self.ItemLen): + data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + QuickAwardCount:%d, + AwardType:%d, + AwardSeconds:%d, + Exp:%d, + ExpPoint:%d, + MoneyLen:%d, + MoneyList:%s, + ItemLen:%d, + ItemList:%s + '''\ + %( + self.Head.OutputString(), + self.QuickAwardCount, + self.AwardType, + self.AwardSeconds, + self.Exp, + self.ExpPoint, + self.MoneyLen, + "...", + self.ItemLen, + "..." + ) + return DumpString + + +m_NAtagMCGuajiInfo=tagMCGuajiInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGuajiInfo.Head.Cmd,m_NAtagMCGuajiInfo.Head.SubCmd))] = m_NAtagMCGuajiInfo #------------------------------------------------------ @@ -41315,6 +45718,132 @@ m_NAtagMCYinjiStartTime=tagMCYinjiStartTime() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCYinjiStartTime.Cmd,m_NAtagMCYinjiStartTime.SubCmd))] = m_NAtagMCYinjiStartTime + + +#------------------------------------------------------ +# B1 20 战令信息 #tagMCZhanlingInfo + +class tagMCZhanling(Structure): + _pack_ = 1 + _fields_ = [ + ("NeedValue", c_int), # 奖励所需值 + ("FreeRewardState", c_ubyte), # 免费奖励是否已领取 + ("ZLRewardState", c_ubyte), # 战令奖励是否已领取 + ] + + def __init__(self): + self.Clear() + 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.NeedValue = 0 + self.FreeRewardState = 0 + self.ZLRewardState = 0 + return + + def GetLength(self): + return sizeof(tagMCZhanling) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 20 战令信息 //tagMCZhanlingInfo: + NeedValue:%d, + FreeRewardState:%d, + ZLRewardState:%d + '''\ + %( + self.NeedValue, + self.FreeRewardState, + self.ZLRewardState + ) + return DumpString + + +class tagMCZhanlingInfo(Structure): + Head = tagHead() + ZhanlingType = 0 #(BYTE ZhanlingType)// 战令类型 + IsActivite = 0 #(BYTE IsActivite)// 是否已激活 + RewardCount = 0 #(WORD RewardCount) + RewardList = list() #(vector<tagMCZhanling> RewardList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZhanlingType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.IsActivite,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.RewardCount): + temRewardList = tagMCZhanling() + _pos = temRewardList.ReadData(_lpData, _pos) + self.RewardList.append(temRewardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x20 + self.ZhanlingType = 0 + self.IsActivite = 0 + self.RewardCount = 0 + self.RewardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 2 + for i in range(self.RewardCount): + length += self.RewardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZhanlingType) + data = CommFunc.WriteBYTE(data, self.IsActivite) + data = CommFunc.WriteWORD(data, self.RewardCount) + for i in range(self.RewardCount): + data = CommFunc.WriteString(data, self.RewardList[i].GetLength(), self.RewardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZhanlingType:%d, + IsActivite:%d, + RewardCount:%d, + RewardList:%s + '''\ + %( + self.Head.OutputString(), + self.ZhanlingType, + self.IsActivite, + self.RewardCount, + "..." + ) + return DumpString + + +m_NAtagMCZhanlingInfo=tagMCZhanlingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhanlingInfo.Head.Cmd,m_NAtagMCZhanlingInfo.Head.SubCmd))] = m_NAtagMCZhanlingInfo #------------------------------------------------------ @@ -42576,21 +47105,20 @@ #------------------------------------------------------ -# B2 13 天星塔通关层数 #tagMCSkyTowerInfo +# B2 17 境界塔信息 #tagMCRealmTowerInfo -class tagMCSkyTowerInfo(Structure): +class tagMCRealmTowerInfo(Structure): _pack_ = 1 _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("Floor", c_int), # 已通关层 - ("ServerRewardRecord", c_int), #全服挑战层领奖记录,按奖励记录二进制位存储是否已领取 ] def __init__(self): self.Clear() self.Cmd = 0xB2 - self.SubCmd = 0x13 + self.SubCmd = 0x17 return def ReadData(self, stringData, _pos=0, _len=0): @@ -42600,35 +47128,147 @@ def Clear(self): self.Cmd = 0xB2 - self.SubCmd = 0x13 + self.SubCmd = 0x17 + self.Floor = 0 + return + + def GetLength(self): + return sizeof(tagMCRealmTowerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 17 境界塔信息 //tagMCRealmTowerInfo: + Cmd:%s, + SubCmd:%s, + Floor:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.Floor + ) + return DumpString + + +m_NAtagMCRealmTowerInfo=tagMCRealmTowerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRealmTowerInfo.Cmd,m_NAtagMCRealmTowerInfo.SubCmd))] = m_NAtagMCRealmTowerInfo + + +#------------------------------------------------------ +# B2 13 天星塔通关层数 #tagMCSkyTowerInfo + +class tagMCSkyTowerServerReward(Structure): + _pack_ = 1 + _fields_ = [ + ("Floor", c_int), # 全服奖励层ID + ("ServerRewardRecord", c_int), #该层全服领奖记录,按所需人数作为二进制位进行位运算判断是否已领取 + ] + + def __init__(self): + self.Clear() + 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.Floor = 0 self.ServerRewardRecord = 0 return def GetLength(self): - return sizeof(tagMCSkyTowerInfo) + return sizeof(tagMCSkyTowerServerReward) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): DumpString = '''// B2 13 天星塔通关层数 //tagMCSkyTowerInfo: - Cmd:%s, - SubCmd:%s, Floor:%d, ServerRewardRecord:%d '''\ %( - self.Cmd, - self.SubCmd, self.Floor, self.ServerRewardRecord ) return DumpString +class tagMCSkyTowerInfo(Structure): + Head = tagHead() + Floor = 0 #(DWORD Floor)// 已通关层 + ServerRewardCount = 0 #(WORD ServerRewardCount) + ServerRewardList = list() #(vector<tagMCSkyTowerServerReward> ServerRewardList)// 全服奖励领取记录列表,下发的层记录替换更新即可,领奖记录没有变化时服务端不会下发 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x13 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Floor,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ServerRewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.ServerRewardCount): + temServerRewardList = tagMCSkyTowerServerReward() + _pos = temServerRewardList.ReadData(_lpData, _pos) + self.ServerRewardList.append(temServerRewardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x13 + self.Floor = 0 + self.ServerRewardCount = 0 + self.ServerRewardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 2 + for i in range(self.ServerRewardCount): + length += self.ServerRewardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.Floor) + data = CommFunc.WriteWORD(data, self.ServerRewardCount) + for i in range(self.ServerRewardCount): + data = CommFunc.WriteString(data, self.ServerRewardList[i].GetLength(), self.ServerRewardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Floor:%d, + ServerRewardCount:%d, + ServerRewardList:%s + '''\ + %( + self.Head.OutputString(), + self.Floor, + self.ServerRewardCount, + "..." + ) + return DumpString + + m_NAtagMCSkyTowerInfo=tagMCSkyTowerInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Cmd,m_NAtagMCSkyTowerInfo.SubCmd))] = m_NAtagMCSkyTowerInfo +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Head.Cmd,m_NAtagMCSkyTowerInfo.Head.SubCmd))] = m_NAtagMCSkyTowerInfo #------------------------------------------------------ @@ -42812,6 +47452,58 @@ m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt + + +#------------------------------------------------------ +# B3 30 情缘相关信息 #tagMCLoveInfo + +class tagMCLoveInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("EatCandyToday", c_int), # 今日已吃喜糖次数,包含免费及付费的所有次数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x30 + 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 = 0xB3 + self.SubCmd = 0x30 + self.EatCandyToday = 0 + return + + def GetLength(self): + return sizeof(tagMCLoveInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 30 情缘相关信息 //tagMCLoveInfo: + Cmd:%s, + SubCmd:%s, + EatCandyToday:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.EatCandyToday + ) + return DumpString + + +m_NAtagMCLoveInfo=tagMCLoveInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveInfo.Cmd,m_NAtagMCLoveInfo.SubCmd))] = m_NAtagMCLoveInfo #------------------------------------------------------ @@ -44453,6 +49145,119 @@ #------------------------------------------------------ +# B4 20 回合制战斗状态 #tagMCTurnFightState + +class tagMCTurnFightState(Structure): + Head = tagHead() + MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等) + FuncLineID = 0 #(WORD FuncLineID) + TagType = 0 #(BYTE TagType)// 战斗目标类型,0-NPC,1-玩家,2-队伍 + TagID = 0 #(DWORD TagID)// 战斗目标类型对应的ID + State = 0 #(BYTE State)// 0-起始状态标记;1-准备完毕;2-战斗中;3-战斗结束;4-结算奖励;5-结束状态标记 + TurnNum = 0 #(BYTE TurnNum)// 当前轮次 + TurnMax = 0 #(BYTE TurnMax)// 最大轮次 + Len = 0 #(WORD Len) + Msg = "" #(String Msg)//size = Len + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB4 + self.Head.SubCmd = 0x20 + 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.ReadWORD(_lpData, _pos) + self.TagType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TagID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TurnNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TurnMax,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Msg,_pos = CommFunc.ReadString(_lpData, _pos,self.Len) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB4 + self.Head.SubCmd = 0x20 + self.MapID = 0 + self.FuncLineID = 0 + self.TagType = 0 + self.TagID = 0 + self.State = 0 + self.TurnNum = 0 + self.TurnMax = 0 + self.Len = 0 + self.Msg = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 2 + length += 1 + length += 4 + length += 1 + length += 1 + 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.WriteDWORD(data, self.MapID) + data = CommFunc.WriteWORD(data, self.FuncLineID) + data = CommFunc.WriteBYTE(data, self.TagType) + data = CommFunc.WriteDWORD(data, self.TagID) + data = CommFunc.WriteBYTE(data, self.State) + data = CommFunc.WriteBYTE(data, self.TurnNum) + data = CommFunc.WriteBYTE(data, self.TurnMax) + data = CommFunc.WriteWORD(data, self.Len) + data = CommFunc.WriteString(data, self.Len, self.Msg) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + MapID:%d, + FuncLineID:%d, + TagType:%d, + TagID:%d, + State:%d, + TurnNum:%d, + TurnMax:%d, + Len:%d, + Msg:%s + '''\ + %( + self.Head.OutputString(), + self.MapID, + self.FuncLineID, + self.TagType, + self.TagID, + self.State, + self.TurnNum, + self.TurnMax, + self.Len, + self.Msg + ) + return DumpString + + +m_NAtagMCTurnFightState=tagMCTurnFightState() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightState.Head.Cmd,m_NAtagMCTurnFightState.Head.SubCmd))] = m_NAtagMCTurnFightState + + +#------------------------------------------------------ # C1 09 跨服排位玩家信息 #tagMCChampionshipPlayerInfo class tagMCChampionshipPlayerInfo(Structure): -- Gitblit v1.8.0