From cc1a5f172de9ac6b6741b64a49fbbf97a6dfebc5 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 26 二月 2024 11:48:08 +0800 Subject: [PATCH] 9802 9762 【BT9】【后端】藏宝阁修改(修复判断放入背包时是否直接转化为对应数值的物品报错) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 4041 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 3,987 insertions(+), 54 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index 82feceb..bcddf2d 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 #------------------------------------------------------ @@ -4880,6 +5124,215 @@ m_NAtagGCRecommendFriendsInfo=tagGCRecommendFriendsInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRecommendFriendsInfo.Head.Cmd,m_NAtagGCRecommendFriendsInfo.Head.SubCmd))] = m_NAtagGCRecommendFriendsInfo + + +#------------------------------------------------------ +# 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 #------------------------------------------------------ @@ -15140,6 +15593,118 @@ #------------------------------------------------------ +# C0 11 跨服妖魔boss玩家伤害信息 #tagGCCrossYaomoBossPlayerHurtInfo + +class tagGCCrossYaomoBossPlayerHurtInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("HurtTotal", c_int), # 总伤害值,小于亿部分 + ("HurtTotalEx", c_int), # 总伤害值,整除亿部分 + ("AwardState", c_int), # 伤害目标值领奖状态,按奖励记录索引位运算判断是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC0 + 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 = 0xC0 + self.SubCmd = 0x11 + self.HurtTotal = 0 + self.HurtTotalEx = 0 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagGCCrossYaomoBossPlayerHurtInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 11 跨服妖魔boss玩家伤害信息 //tagGCCrossYaomoBossPlayerHurtInfo: + Cmd:%s, + SubCmd:%s, + HurtTotal:%d, + HurtTotalEx:%d, + AwardState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.HurtTotal, + self.HurtTotalEx, + self.AwardState + ) + return DumpString + + +m_NAtagGCCrossYaomoBossPlayerHurtInfo=tagGCCrossYaomoBossPlayerHurtInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossYaomoBossPlayerHurtInfo.Cmd,m_NAtagGCCrossYaomoBossPlayerHurtInfo.SubCmd))] = m_NAtagGCCrossYaomoBossPlayerHurtInfo + + +#------------------------------------------------------ +# C0 10 跨服所属分区信息 #tagGCCrossZoneInfo + +class tagGCCrossZoneInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("CommZoneID", c_ubyte), # 所属常规分区ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC0 + self.SubCmd = 0x10 + 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 = 0xC0 + self.SubCmd = 0x10 + self.CommZoneID = 0 + return + + def GetLength(self): + return sizeof(tagGCCrossZoneInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 10 跨服所属分区信息 //tagGCCrossZoneInfo: + Cmd:%s, + SubCmd:%s, + CommZoneID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.CommZoneID + ) + return DumpString + + +m_NAtagGCCrossZoneInfo=tagGCCrossZoneInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossZoneInfo.Cmd,m_NAtagGCCrossZoneInfo.SubCmd))] = m_NAtagGCCrossZoneInfo + + +#------------------------------------------------------ # C0 14 幸运云购开奖记录 #tagGCLuckyCloudBuyLotteryRecInfo class tagGCLuckyCloudBuyLotteryRec(Structure): @@ -15479,13 +16044,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)// 大奖价值货币类型 @@ -15509,6 +16128,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) @@ -15536,6 +16160,8 @@ self.ZoneID = 0 self.StartDate = "" self.EndtDate = "" + self.RoundTimeCount = 0 + self.RoundTimeList = list() self.RoundID = 0 self.RoundNum = 0 self.SuperItemID = 0 @@ -15555,6 +16181,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 @@ -15577,6 +16206,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) @@ -15598,6 +16230,8 @@ ZoneID:%d, StartDate:%s, EndtDate:%s, + RoundTimeCount:%d, + RoundTimeList:%s, RoundID:%d, RoundNum:%d, SuperItemID:%d, @@ -15615,6 +16249,8 @@ self.ZoneID, self.StartDate, self.EndtDate, + self.RoundTimeCount, + "...", self.RoundID, self.RoundNum, self.SuperItemID, @@ -15691,6 +16327,8 @@ ("RecordID", c_ubyte), ("TodayPayCount", c_ushort), # 今日已购买次数 ("TotalPayCount", c_int), # 累计总购买次数 + ("WeekPayCount", c_ushort), # 周总购买次数 + ("MonthPayCount", c_ushort), # 月总购买次数 ] def __init__(self): @@ -15706,6 +16344,8 @@ self.RecordID = 0 self.TodayPayCount = 0 self.TotalPayCount = 0 + self.WeekPayCount = 0 + self.MonthPayCount = 0 return def GetLength(self): @@ -15718,12 +16358,16 @@ 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 @@ -15802,6 +16446,9 @@ OrderLen = 0 #(BYTE OrderLen) OrderID = "" #(String OrderID)// 订单id Coin = 0 #(DWORD Coin)// 充值的点卷 + RecordID = 0 #(BYTE RecordID)// ctgID + OrderInfoLen = 0 #(BYTE OrderInfoLen) + OrderInfo = "" #(String OrderInfo) data = None def __init__(self): @@ -15816,6 +16463,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.ReadBYTE(_lpData, _pos) + self.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen) return _pos def Clear(self): @@ -15826,6 +16476,9 @@ self.OrderLen = 0 self.OrderID = "" self.Coin = 0 + self.RecordID = 0 + self.OrderInfoLen = 0 + self.OrderInfo = "" return def GetLength(self): @@ -15834,6 +16487,9 @@ length += 1 length += len(self.OrderID) length += 4 + length += 1 + length += 1 + length += len(self.OrderInfo) return length @@ -15843,6 +16499,9 @@ data = CommFunc.WriteBYTE(data, self.OrderLen) data = CommFunc.WriteString(data, self.OrderLen, self.OrderID) data = CommFunc.WriteDWORD(data, self.Coin) + data = CommFunc.WriteBYTE(data, self.RecordID) + data = CommFunc.WriteBYTE(data, self.OrderInfoLen) + data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo) return data def OutputString(self): @@ -15850,13 +16509,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 @@ -17991,6 +18656,7 @@ ("KillCnt", c_int), #击杀次数 ("ItemAddCnt", c_int), #物品增加次数 ("BuyCnt", c_ubyte), #购买次数 + ("KillCntTotal", c_int), #击杀次数 - 累计 ] def __init__(self): @@ -18007,6 +18673,7 @@ self.KillCnt = 0 self.ItemAddCnt = 0 self.BuyCnt = 0 + self.KillCntTotal = 0 return def GetLength(self): @@ -18020,13 +18687,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 @@ -18449,6 +19118,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 #------------------------------------------------------ @@ -20633,6 +21414,338 @@ #------------------------------------------------------ +# A3 C7 古宝信息 #tagMCGubaoInfo + +class tagMCGubao(Structure): + _pack_ = 1 + _fields_ = [ + ("GubaoID", c_ushort), + ("GubaoStar", c_ubyte), + ("GubaoLV", 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.GubaoID = 0 + self.GubaoStar = 0 + self.GubaoLV = 0 + return + + def GetLength(self): + return sizeof(tagMCGubao) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 C7 古宝信息 //tagMCGubaoInfo: + GubaoID:%d, + GubaoStar:%d, + GubaoLV:%d + '''\ + %( + self.GubaoID, + self.GubaoStar, + self.GubaoLV + ) + return DumpString + + +class tagMCGubaoInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + GubaoInfoList = list() #(vector<tagMCGubao> GubaoInfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC7 + 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): + temGubaoInfoList = tagMCGubao() + _pos = temGubaoInfoList.ReadData(_lpData, _pos) + self.GubaoInfoList.append(temGubaoInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC7 + self.Count = 0 + self.GubaoInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.GubaoInfoList[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.GubaoInfoList[i].GetLength(), self.GubaoInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + GubaoInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCGubaoInfo=tagMCGubaoInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoInfo.Head.Cmd,m_NAtagMCGubaoInfo.Head.SubCmd))] = m_NAtagMCGubaoInfo + + +#------------------------------------------------------ +# 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): @@ -20910,6 +22023,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 #------------------------------------------------------ @@ -22065,6 +23286,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): @@ -22081,6 +23303,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): @@ -22090,6 +23313,7 @@ self.ItemAddCnt = 0 self.PassGradeCnt = 0 self.PassGrade = list() + self.EnterCntTotal = 0 return def GetLength(self): @@ -22100,6 +23324,7 @@ length += 2 length += 1 length += 4 * self.PassGradeCnt + length += 4 return length @@ -22112,6 +23337,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): @@ -22121,7 +23347,8 @@ RecoverCnt:%d, ItemAddCnt:%d, PassGradeCnt:%d, - PassGrade:%s + PassGrade:%s, + EnterCntTotal:%d '''\ %( self.FBID, @@ -22129,7 +23356,8 @@ self.RecoverCnt, self.ItemAddCnt, self.PassGradeCnt, - "..." + "...", + self.EnterCntTotal ) return DumpString @@ -22914,6 +24142,185 @@ #------------------------------------------------------ +# A3 C8 神通等级信息 #tagMCShentongLVInfo + +class tagMCShentongLV(Structure): + _pack_ = 1 + _fields_ = [ + ("ShentongID", c_ubyte), + ("ClassLV", c_ubyte), + ("LV", 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.ShentongID = 0 + self.ClassLV = 0 + self.LV = 0 + return + + def GetLength(self): + return sizeof(tagMCShentongLV) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 C8 神通等级信息 //tagMCShentongLVInfo: + ShentongID:%d, + ClassLV:%d, + LV:%d + '''\ + %( + self.ShentongID, + self.ClassLV, + self.LV + ) + return DumpString + + +class tagMCShentongLVInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + ShentongLVList = list() #(vector<tagMCShentongLV> ShentongLVList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC8 + 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): + temShentongLVList = tagMCShentongLV() + _pos = temShentongLVList.ReadData(_lpData, _pos) + self.ShentongLVList.append(temShentongLVList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC8 + self.Count = 0 + self.ShentongLVList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.ShentongLVList[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.ShentongLVList[i].GetLength(), self.ShentongLVList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + ShentongLVList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCShentongLVInfo=tagMCShentongLVInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShentongLVInfo.Head.Cmd,m_NAtagMCShentongLVInfo.Head.SubCmd))] = m_NAtagMCShentongLVInfo + + +#------------------------------------------------------ +# A3 C9 神通技能设置信息 #tagMCShentongSkillInfo + +class tagMCShentongSkillInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + SkillIDList = list() #(vector<DWORD> SkillIDList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC9 + 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): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.SkillIDList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC9 + self.Count = 0 + self.SkillIDList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.Count + + 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.WriteDWORD(data, self.SkillIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + SkillIDList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCShentongSkillInfo=tagMCShentongSkillInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShentongSkillInfo.Head.Cmd,m_NAtagMCShentongSkillInfo.Head.SubCmd))] = m_NAtagMCShentongSkillInfo + + +#------------------------------------------------------ # A3 44 当日累计充值多选一礼包信息 #tagMCSingleGoldGift class tagMCSingleGoldGift(Structure): @@ -23568,6 +24975,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): @@ -23758,6 +25217,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("IsPass", c_ubyte), #是否通关副本 + ("XXZLAwardState", c_int), #修仙之路领奖状态;按二进制位存储每个任务ID是否已领取 ] def __init__(self): @@ -23775,6 +25235,7 @@ self.Cmd = 0xA3 self.SubCmd = 0x11 self.IsPass = 0 + self.XXZLAwardState = 0 return def GetLength(self): @@ -23787,18 +25248,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 #------------------------------------------------------ @@ -24092,10 +25663,12 @@ Head = tagHead() LV = 0 #(BYTE LV)//等阶 EatItemCount = 0 #(DWORD EatItemCount)//当前阶已吃丹个数 - SkinPlusState = 0 #(DWORD SkinPlusState)//幻化激活状态,按位存储是否激活,幻化编号ID对应位 + SkinPlusState = 0 #(DWORD SkinPlusState)//幻化激活状态,按位存储是否激活,幻化编号ID对应位,废弃,使用 SkinPlusStateList TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + SkinPlusStateCount = 0 #(BYTE SkinPlusStateCount)//幻化激活状态值数 + SkinPlusStateList = list() #(vector<DWORD> SkinPlusStateList)//幻化激活状态值列表,按位存储是否激活,幻化编号ID对应位 data = None def __init__(self): @@ -24117,6 +25690,10 @@ for i in range(self.TrainTypes): value,_pos=CommFunc.ReadDWORD(_lpData,_pos) self.TrainItemCountList.append(value) + self.SkinPlusStateCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SkinPlusStateCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.SkinPlusStateList.append(value) return _pos def Clear(self): @@ -24130,6 +25707,8 @@ self.TrainTypes = 0 self.TrainLVList = list() self.TrainItemCountList = list() + self.SkinPlusStateCount = 0 + self.SkinPlusStateList = list() return def GetLength(self): @@ -24141,6 +25720,8 @@ length += 1 length += 4 * self.TrainTypes length += 4 * self.TrainTypes + length += 1 + length += 4 * self.SkinPlusStateCount return length @@ -24155,6 +25736,9 @@ data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) for i in range(self.TrainTypes): data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + data = CommFunc.WriteBYTE(data, self.SkinPlusStateCount) + for i in range(self.SkinPlusStateCount): + data = CommFunc.WriteDWORD(data, self.SkinPlusStateList[i]) return data def OutputString(self): @@ -24165,7 +25749,9 @@ SkinPlusState:%d, TrainTypes:%d, TrainLVList:%s, - TrainItemCountList:%s + TrainItemCountList:%s, + SkinPlusStateCount:%d, + SkinPlusStateList:%s '''\ %( self.Head.OutputString(), @@ -24174,6 +25760,8 @@ self.SkinPlusState, self.TrainTypes, "...", + "...", + self.SkinPlusStateCount, "..." ) return DumpString @@ -24811,6 +26399,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): @@ -24863,6 +26587,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): @@ -24871,6 +26786,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("GetState", c_ubyte), #是否已领取 + ("MoneyDonateCount", c_ubyte), #今日货币捐献次数 ] def __init__(self): @@ -24888,6 +26804,7 @@ self.Cmd = 0xA5 self.SubCmd = 0x06 self.GetState = 0 + self.MoneyDonateCount = 0 return def GetLength(self): @@ -24900,12 +26817,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 @@ -25020,6 +26939,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 #------------------------------------------------------ @@ -28556,6 +30654,702 @@ #------------------------------------------------------ +# 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 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): @@ -29179,6 +31973,424 @@ m_NAtagMCActGarbageTaskInfo=tagMCActGarbageTaskInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageTaskInfo.Head.Cmd,m_NAtagMCActGarbageTaskInfo.Head.SubCmd))] = m_NAtagMCActGarbageTaskInfo + + +#------------------------------------------------------ +# AA 60 天帝礼包活动信息 #tagMCActGodGiftInfo + +class tagMCActGodGiftItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemNum", c_ubyte), # 物品在本库中的编号 + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ("CanChooseTimes", c_ubyte), #可选择次数,0代表不限次数 + ("ChooseTimes", c_ubyte), #已选次数 + ("IsChoose", 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.ItemNum = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + self.CanChooseTimes = 0 + self.ChooseTimes = 0 + self.IsChoose = 0 + return + + def GetLength(self): + return sizeof(tagMCActGodGiftItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 60 天帝礼包活动信息 //tagMCActGodGiftInfo: + ItemNum:%d, + ItemID:%d, + ItemCount:%d, + IsBind:%d, + CanChooseTimes:%d, + ChooseTimes:%d, + IsChoose:%d + '''\ + %( + self.ItemNum, + self.ItemID, + self.ItemCount, + self.IsBind, + self.CanChooseTimes, + self.ChooseTimes, + self.IsChoose + ) + return DumpString + + +class tagMCActGodGiftItemLib(Structure): + ItemLibType = 0 #(BYTE ItemLibType)//物品库类型 + NeedChooseCount = 0 #(BYTE NeedChooseCount)//需要选择个数 + GodGiftItemCount = 0 #(BYTE GodGiftItemCount)//可选择物品个数 + GodGiftItemList = list() #(vector<tagMCActGodGiftItem> GodGiftItemList)//可选物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemLibType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.GodGiftItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GodGiftItemCount): + temGodGiftItemList = tagMCActGodGiftItem() + _pos = temGodGiftItemList.ReadData(_lpData, _pos) + self.GodGiftItemList.append(temGodGiftItemList) + return _pos + + def Clear(self): + self.ItemLibType = 0 + self.NeedChooseCount = 0 + self.GodGiftItemCount = 0 + self.GodGiftItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + length += 1 + for i in range(self.GodGiftItemCount): + length += self.GodGiftItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.ItemLibType) + data = CommFunc.WriteBYTE(data, self.NeedChooseCount) + data = CommFunc.WriteBYTE(data, self.GodGiftItemCount) + for i in range(self.GodGiftItemCount): + data = CommFunc.WriteString(data, self.GodGiftItemList[i].GetLength(), self.GodGiftItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + ItemLibType:%d, + NeedChooseCount:%d, + GodGiftItemCount:%d, + GodGiftItemList:%s + '''\ + %( + self.ItemLibType, + self.NeedChooseCount, + self.GodGiftItemCount, + "..." + ) + return DumpString + + +class tagMCActGodGiftInfo(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)// 限制等级 + CostMoneyType = 0 #(BYTE CostMoneyType)//消耗货币类型 + CostMoneyValueCount = 0 #(BYTE CostMoneyValueCount) + CostMoneyValueList = list() #(vector<DWORD> CostMoneyValueList)//消耗货币值列表 + PrizeMoneyType = 0 #(BYTE PrizeMoneyType)//奖励货币类型 + PrizeMoneyValueCount = 0 #(BYTE PrizeMoneyValueCount) + PrizeMoneyValueList = list() #(vector<DWORD> PrizeMoneyValueList)//奖励货币值列表 + ResetLimitTimes = 0 #(BYTE ResetLimitTimes)//至少抽几次才可重置奖池 + ResetCountMax = 0 #(BYTE ResetCountMax)//最大可重置奖池次数 + IsAwardPoolOK = 0 #(BYTE IsAwardPoolOK)//奖池是否选择完毕,否的话需要先选择奖池才可抽奖 + ItemLibCount = 0 #(BYTE ItemLibCount)//奖池库个数 + ItemLibList = list() #(vector<tagMCActGodGiftItemLib> ItemLibList)//奖池库信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x60 + 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.CostMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CostMoneyValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CostMoneyValueCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.CostMoneyValueList.append(value) + self.PrizeMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PrizeMoneyValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PrizeMoneyValueCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.PrizeMoneyValueList.append(value) + self.ResetLimitTimes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetCountMax,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.IsAwardPoolOK,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ItemLibCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ItemLibCount): + temItemLibList = tagMCActGodGiftItemLib() + _pos = temItemLibList.ReadData(_lpData, _pos) + self.ItemLibList.append(temItemLibList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x60 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.CostMoneyType = 0 + self.CostMoneyValueCount = 0 + self.CostMoneyValueList = list() + self.PrizeMoneyType = 0 + self.PrizeMoneyValueCount = 0 + self.PrizeMoneyValueList = list() + self.ResetLimitTimes = 0 + self.ResetCountMax = 0 + self.IsAwardPoolOK = 0 + self.ItemLibCount = 0 + self.ItemLibList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 2 + length += 1 + length += 1 + length += 4 * self.CostMoneyValueCount + length += 1 + length += 1 + length += 4 * self.PrizeMoneyValueCount + length += 1 + length += 1 + length += 1 + length += 1 + for i in range(self.ItemLibCount): + length += self.ItemLibList[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.CostMoneyType) + data = CommFunc.WriteBYTE(data, self.CostMoneyValueCount) + for i in range(self.CostMoneyValueCount): + data = CommFunc.WriteDWORD(data, self.CostMoneyValueList[i]) + data = CommFunc.WriteBYTE(data, self.PrizeMoneyType) + data = CommFunc.WriteBYTE(data, self.PrizeMoneyValueCount) + for i in range(self.PrizeMoneyValueCount): + data = CommFunc.WriteDWORD(data, self.PrizeMoneyValueList[i]) + data = CommFunc.WriteBYTE(data, self.ResetLimitTimes) + data = CommFunc.WriteBYTE(data, self.ResetCountMax) + data = CommFunc.WriteBYTE(data, self.IsAwardPoolOK) + data = CommFunc.WriteBYTE(data, self.ItemLibCount) + for i in range(self.ItemLibCount): + data = CommFunc.WriteString(data, self.ItemLibList[i].GetLength(), self.ItemLibList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + CostMoneyType:%d, + CostMoneyValueCount:%d, + CostMoneyValueList:%s, + PrizeMoneyType:%d, + PrizeMoneyValueCount:%d, + PrizeMoneyValueList:%s, + ResetLimitTimes:%d, + ResetCountMax:%d, + IsAwardPoolOK:%d, + ItemLibCount:%d, + ItemLibList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.CostMoneyType, + self.CostMoneyValueCount, + "...", + self.PrizeMoneyType, + self.PrizeMoneyValueCount, + "...", + self.ResetLimitTimes, + self.ResetCountMax, + self.IsAwardPoolOK, + self.ItemLibCount, + "..." + ) + return DumpString + + +m_NAtagMCActGodGiftInfo=tagMCActGodGiftInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGodGiftInfo.Head.Cmd,m_NAtagMCActGodGiftInfo.Head.SubCmd))] = m_NAtagMCActGodGiftInfo + + +#------------------------------------------------------ +# AA 61 天帝礼包活动玩家信息 #tagMCActGodGiftPlayerInfo + +class tagMCActGodGiftAwardItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemLibType", c_ubyte), #物品库类型 + ("ItemNum", 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.ItemLibType = 0 + self.ItemNum = 0 + return + + def GetLength(self): + return sizeof(tagMCActGodGiftAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 61 天帝礼包活动玩家信息 //tagMCActGodGiftPlayerInfo: + ItemLibType:%d, + ItemNum:%d + '''\ + %( + self.ItemLibType, + self.ItemNum + ) + return DumpString + + +class tagMCActGodGiftPlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + ResetCount = 0 #(BYTE ResetCount)// 本次活动已重置次数 + AwardItemCount = 0 #(BYTE AwardItemCount)// 本次奖池已抽中奖品个数,也代表本次奖池已抽奖次数 + AwardItemList = list() #(vector<tagMCActGodGiftAwardItem> AwardItemList)// 本次奖池已抽中物品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x61 + 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.ResetCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCActGodGiftAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x61 + self.ActNum = 0 + self.ResetCount = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[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.ResetCount) + data = CommFunc.WriteBYTE(data, self.AwardItemCount) + for i in range(self.AwardItemCount): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + ResetCount:%d, + AwardItemCount:%d, + AwardItemList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.ResetCount, + self.AwardItemCount, + "..." + ) + return DumpString + + +m_NAtagMCActGodGiftPlayerInfo=tagMCActGodGiftPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGodGiftPlayerInfo.Head.Cmd,m_NAtagMCActGodGiftPlayerInfo.Head.SubCmd))] = m_NAtagMCActGodGiftPlayerInfo #------------------------------------------------------ @@ -30300,6 +33512,305 @@ #------------------------------------------------------ +# AA 62 充值抵扣活动信息 #tagMCActRecharegeCouponInfo + +class tagMCActRecharegeCouponItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ("IsMainItem", 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 + self.IsMainItem = 0 + return + + def GetLength(self): + return sizeof(tagMCActRecharegeCouponItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 62 充值抵扣活动信息 //tagMCActRecharegeCouponInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d, + IsMainItem:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind, + self.IsMainItem + ) + return DumpString + + +class tagMCActRecharegeCouponGiftbag(Structure): + GiftID = 0 #(DWORD GiftID)//商城表的物品ID + BuyCountLimit = 0 #(BYTE BuyCountLimit)//限购数 + MoneyType = 0 #(BYTE MoneyType)//消耗货币类型 + MoneyNumber = 0 #(DWORD MoneyNumber)//消耗货币数量 + MoneyOriginal = 0 #(DWORD MoneyOriginal)//原价 + GiftItemCount = 0 #(BYTE GiftItemCount)// 礼包物品数 + ItemInfo = list() #(vector<tagMCActRecharegeCouponItem> ItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.GiftID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BuyCountLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoneyNumber,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MoneyOriginal,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.GiftItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GiftItemCount): + temItemInfo = tagMCActRecharegeCouponItem() + _pos = temItemInfo.ReadData(_lpData, _pos) + self.ItemInfo.append(temItemInfo) + return _pos + + def Clear(self): + self.GiftID = 0 + self.BuyCountLimit = 0 + self.MoneyType = 0 + self.MoneyNumber = 0 + self.MoneyOriginal = 0 + self.GiftItemCount = 0 + self.ItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 1 + length += 4 + length += 4 + length += 1 + for i in range(self.GiftItemCount): + length += self.ItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.GiftID) + data = CommFunc.WriteBYTE(data, self.BuyCountLimit) + data = CommFunc.WriteBYTE(data, self.MoneyType) + data = CommFunc.WriteDWORD(data, self.MoneyNumber) + data = CommFunc.WriteDWORD(data, self.MoneyOriginal) + data = CommFunc.WriteBYTE(data, self.GiftItemCount) + for i in range(self.GiftItemCount): + data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + GiftID:%d, + BuyCountLimit:%d, + MoneyType:%d, + MoneyNumber:%d, + MoneyOriginal:%d, + GiftItemCount:%d, + ItemInfo:%s + '''\ + %( + self.GiftID, + self.BuyCountLimit, + self.MoneyType, + self.MoneyNumber, + self.MoneyOriginal, + self.GiftItemCount, + "..." + ) + return DumpString + + +class tagMCActRecharegeCouponInfo(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)// 限制等级 + CouponMoneyType = 0 #(BYTE CouponMoneyType)//抵扣券对应货币类型 + GiftbagCount = 0 #(BYTE GiftbagCount)// 可购买礼包个数 + GiftbagList = list() #(vector<tagMCActRecharegeCouponGiftbag> GiftbagList)// 可购买礼包顺序列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x62 + 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.CouponMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GiftbagCount): + temGiftbagList = tagMCActRecharegeCouponGiftbag() + _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 = 0x62 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.CouponMoneyType = 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 + 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.CouponMoneyType) + 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, + CouponMoneyType:%d, + GiftbagCount:%d, + GiftbagList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.CouponMoneyType, + self.GiftbagCount, + "..." + ) + return DumpString + + +m_NAtagMCActRecharegeCouponInfo=tagMCActRecharegeCouponInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponInfo.Head.Cmd,m_NAtagMCActRecharegeCouponInfo.Head.SubCmd))] = m_NAtagMCActRecharegeCouponInfo + + +#------------------------------------------------------ +# AA 63 充值抵扣活动玩家信息 #tagMCActRecharegeCouponPlayerInfo + +class tagMCActRecharegeCouponPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("CouponMoney", c_int), # 当前可用抵扣点 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x63 + 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 = 0x63 + self.ActNum = 0 + self.CouponMoney = 0 + return + + def GetLength(self): + return sizeof(tagMCActRecharegeCouponPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 63 充值抵扣活动玩家信息 //tagMCActRecharegeCouponPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + CouponMoney:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.CouponMoney + ) + return DumpString + + +m_NAtagMCActRecharegeCouponPlayerInfo=tagMCActRecharegeCouponPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRecharegeCouponPlayerInfo.Cmd,m_NAtagMCActRecharegeCouponPlayerInfo.SubCmd))] = m_NAtagMCActRecharegeCouponPlayerInfo + + +#------------------------------------------------------ # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo class tagMCActRechargePrize(Structure): @@ -30726,7 +34237,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)// 奖励物品信息 @@ -30739,6 +34251,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): @@ -30749,6 +34262,7 @@ def Clear(self): self.AwardIndex = 0 + self.AwardCountMax = 0 self.SingleRechargeValue = 0 self.AwardItemCount = 0 self.AwardItem = list() @@ -30757,6 +34271,7 @@ def GetLength(self): length = 0 length += 1 + length += 2 length += 4 length += 1 for i in range(self.AwardItemCount): @@ -30767,6 +34282,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): @@ -30776,12 +34292,14 @@ def OutputString(self): DumpString = ''' AwardIndex:%d, + AwardCountMax:%d, SingleRechargeValue:%d, AwardItemCount:%d, AwardItem:%s '''\ %( self.AwardIndex, + self.AwardCountMax, self.SingleRechargeValue, self.AwardItemCount, "..." @@ -30900,20 +34418,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): @@ -30922,39 +34436,102 @@ 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 #------------------------------------------------------ @@ -33492,6 +37069,66 @@ #------------------------------------------------------ +# 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 + + +#------------------------------------------------------ # AA 24 每日免费直购礼包信息 #tagMCDayFreeGoldGiftState class tagMCDayFreeGoldGiftState(Structure): @@ -34073,7 +37710,7 @@ _pack_ = 1 _fields_ = [ ("AwardIndex", c_ubyte), #游历奖励索引 - ("GetAwardCount", c_ubyte), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 + ("GetAwardCount", c_int), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 ] def __init__(self): @@ -39160,6 +42797,7 @@ TodayExpPoint = 0 #(DWORD TodayExpPoint) YestordayExp = 0 #(DWORD YestordayExp) YestordayExpPoint = 0 #(DWORD YestordayExpPoint) + TotalCount = 0 #(DWORD TotalCount)// 累计活跃放置次数 data = None def __init__(self): @@ -39180,6 +42818,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): @@ -39196,6 +42835,7 @@ self.TodayExpPoint = 0 self.YestordayExp = 0 self.YestordayExpPoint = 0 + self.TotalCount = 0 return def GetLength(self): @@ -39206,6 +42846,7 @@ length += 1 length += 1 length += len(self.RewardInfo) + length += 4 length += 4 length += 4 length += 4 @@ -39225,6 +42866,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): @@ -39238,7 +42880,8 @@ TodayExp:%d, TodayExpPoint:%d, YestordayExp:%d, - YestordayExpPoint:%d + YestordayExpPoint:%d, + TotalCount:%d '''\ %( self.Head.OutputString(), @@ -39250,7 +42893,8 @@ self.TodayExp, self.TodayExpPoint, self.YestordayExp, - self.YestordayExpPoint + self.YestordayExpPoint, + self.TotalCount ) return DumpString @@ -40178,6 +43822,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 #------------------------------------------------------ @@ -41439,21 +45209,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): @@ -41463,35 +45232,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 #------------------------------------------------------ @@ -41678,6 +45559,58 @@ #------------------------------------------------------ +# 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 + + +#------------------------------------------------------ # B3 27 情戒信息 #tagMCLoveRingInfo class tagMCLoveRingInfo(Structure): -- Gitblit v1.8.0