From 84d41bd256d53ebafab1ca79b35a9f91d459366a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 13 四月 2021 16:16:17 +0800 Subject: [PATCH] 8896 【BT2】【主干】【后端】特权令(同步冲突;及修改B209 B210 封包 为B211 B212) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 4732 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 4,665 insertions(+), 67 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index a65ae36..9764be9 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -346,6 +346,7 @@ ("NowMinute", c_ubyte), ("NowSecond", c_ubyte), ("NowMicSecond", c_int), + ("WeekOfYear", c_ubyte), #一年中的第几周 ] def __init__(self): @@ -373,6 +374,7 @@ self.NowMinute = 0 self.NowSecond = 0 self.NowMicSecond = 0 + self.WeekOfYear = 0 return def GetLength(self): @@ -395,7 +397,8 @@ NowHour:%d, NowMinute:%d, NowSecond:%d, - NowMicSecond:%d + NowMicSecond:%d, + WeekOfYear:%d '''\ %( self.Cmd, @@ -410,7 +413,8 @@ self.NowHour, self.NowMinute, self.NowSecond, - self.NowMicSecond + self.NowMicSecond, + self.WeekOfYear ) return DumpString @@ -829,7 +833,7 @@ Head = tagHead() Type = 0 #(BYTE Type)//类型 Count = 0 #(WORD Count)//数量 - UniversalGameRec = list() #(vector<tagUniversalGameRec> UniversalGameRec)///size = Count + UniversalGameRec = list() #(vector<tagUniversalGameRec> UniversalGameRec)///size = Count data = None def __init__(self): @@ -1133,7 +1137,7 @@ FamilyID = 0 #(DWORD FamilyID)//家族ID ActionType = 0 #(BYTE ActionType)//类型 Count = 0 #(WORD Count)//数量 - FamilyActionList = list() #(vector<tagGCFamilyAction> FamilyActionList)//size = Count + FamilyActionList = list() #(vector<tagGCFamilyAction> FamilyActionList)//size = Count data = None def __init__(self): @@ -1402,7 +1406,7 @@ Time = 0 #(DWORD Time)//时间 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 MoneyType = 0 #(BYTE MoneyType)//金钱类型 - MoneyNum = 0 #(WORD MoneyNum)//金钱数量 + MoneyNum = 0 #(DWORD MoneyNum)//金钱数量 GetWay = 0 #(BYTE GetWay)//获得途径 PacketCnt = 0 #(BYTE PacketCnt)//可抢个数 State = 0 #(BYTE State)//0未发,1未领取,2已领取,3全部领完 @@ -1421,7 +1425,7 @@ self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.MoneyNum,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.MoneyNum,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.GetWay,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.PacketCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos) @@ -1450,7 +1454,7 @@ length += 4 length += 1 length += 1 - length += 2 + length += 4 length += 1 length += 1 length += 1 @@ -1466,7 +1470,7 @@ data = CommFunc.WriteDWORD(data, self.Time) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteBYTE(data, self.MoneyType) - data = CommFunc.WriteWORD(data, self.MoneyNum) + data = CommFunc.WriteDWORD(data, self.MoneyNum) data = CommFunc.WriteBYTE(data, self.GetWay) data = CommFunc.WriteBYTE(data, self.PacketCnt) data = CommFunc.WriteBYTE(data, self.State) @@ -2181,7 +2185,8 @@ Name = "" #(String Name)//size=NameLen PlayerLV = 0 #(WORD PlayerLV)//玩家等级 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 - PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力 + PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力,求余亿部分 + PlayeFightPowerEx = 0 #(DWORD PlayeFightPowerEx)//玩家战斗力,整除亿部分,1代表1亿 RequestTime = 0 #(DWORD RequestTime)//申请时间 IsOnLine = 0 #(BYTE IsOnLine)//是否在线 data = None @@ -2198,6 +2203,7 @@ self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.PlayeFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayeFightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.RequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.IsOnLine,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos @@ -2209,6 +2215,7 @@ self.PlayerLV = 0 self.PlayeJob = 0 self.PlayeFightPower = 0 + self.PlayeFightPowerEx = 0 self.RequestTime = 0 self.IsOnLine = 0 return @@ -2220,6 +2227,7 @@ length += len(self.Name) length += 2 length += 1 + length += 4 length += 4 length += 4 length += 1 @@ -2234,6 +2242,7 @@ data = CommFunc.WriteWORD(data, self.PlayerLV) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteDWORD(data, self.PlayeFightPower) + data = CommFunc.WriteDWORD(data, self.PlayeFightPowerEx) data = CommFunc.WriteDWORD(data, self.RequestTime) data = CommFunc.WriteBYTE(data, self.IsOnLine) return data @@ -2246,6 +2255,7 @@ PlayerLV:%d, PlayeJob:%d, PlayeFightPower:%d, + PlayeFightPowerEx:%d, RequestTime:%d, IsOnLine:%d '''\ @@ -2256,6 +2266,7 @@ self.PlayerLV, self.PlayeJob, self.PlayeFightPower, + self.PlayeFightPowerEx, self.RequestTime, self.IsOnLine ) @@ -2326,6 +2337,325 @@ m_NAtagGCViewFamilyRequestInfo=tagGCViewFamilyRequestInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCViewFamilyRequestInfo.Head.Cmd,m_NAtagGCViewFamilyRequestInfo.Head.SubCmd))] = m_NAtagGCViewFamilyRequestInfo + + +#------------------------------------------------------ +# A9 23 竞技场对战记录列表 #tagGCArenaBattleRecordList + +class tagGCArenaBattleRecord(Structure): + PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID + PlayerName = "" #(char PlayerName[33]) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV)//等级 + RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界 + FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力 + AddScoreLen = 0 #(BYTE AddScoreLen) + AddScore = "" #(String AddScore)//本次对战增加的积分,有正负 + IsWin = 0 #(BYTE IsWin)//是否获胜 + Time = 0 #(DWORD Time)//时间戳 + 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) + self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AddScoreLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AddScore,_pos = CommFunc.ReadString(_lpData, _pos,self.AddScoreLen) + self.IsWin,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerID = 0 + self.PlayerName = "" + self.Job = 0 + self.LV = 0 + self.RealmLV = 0 + self.FightPower = 0 + self.AddScoreLen = 0 + self.AddScore = "" + self.IsWin = 0 + self.Time = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 33 + length += 1 + length += 2 + length += 2 + length += 4 + length += 1 + length += len(self.AddScore) + length += 1 + length += 4 + + 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) + data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteBYTE(data, self.AddScoreLen) + data = CommFunc.WriteString(data, self.AddScoreLen, self.AddScore) + data = CommFunc.WriteBYTE(data, self.IsWin) + data = CommFunc.WriteDWORD(data, self.Time) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + PlayerName:%s, + Job:%d, + LV:%d, + RealmLV:%d, + FightPower:%d, + AddScoreLen:%d, + AddScore:%s, + IsWin:%d, + Time:%d + '''\ + %( + self.PlayerID, + self.PlayerName, + self.Job, + self.LV, + self.RealmLV, + self.FightPower, + self.AddScoreLen, + self.AddScore, + self.IsWin, + self.Time + ) + return DumpString + + +class tagGCArenaBattleRecordList(Structure): + Head = tagHead() + RecordCount = 0 #(BYTE RecordCount) + BattleRecordList = list() #(vector<tagGCArenaBattleRecord> BattleRecordList)// 对战列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + temBattleRecordList = tagGCArenaBattleRecord() + _pos = temBattleRecordList.ReadData(_lpData, _pos) + self.BattleRecordList.append(temBattleRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x23 + self.RecordCount = 0 + self.BattleRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.RecordCount): + length += self.BattleRecordList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteString(data, self.BattleRecordList[i].GetLength(), self.BattleRecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RecordCount:%d, + BattleRecordList:%s + '''\ + %( + self.Head.OutputString(), + self.RecordCount, + "..." + ) + return DumpString + + +m_NAtagGCArenaBattleRecordList=tagGCArenaBattleRecordList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaBattleRecordList.Head.Cmd,m_NAtagGCArenaBattleRecordList.Head.SubCmd))] = m_NAtagGCArenaBattleRecordList + + +#------------------------------------------------------ +# A9 22 竞技场匹配玩家列表 #tagGCArenaMatchList + +class tagGCArenaMatchInfo(Structure): + PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID + PlayerName = "" #(char PlayerName[33]) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV)//等级 + RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界 + FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力 + Score = 0 #(DWORD Score)//积分 + 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) + self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerID = 0 + self.PlayerName = "" + self.Job = 0 + self.LV = 0 + self.RealmLV = 0 + self.FightPower = 0 + self.Score = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 33 + length += 1 + length += 2 + length += 2 + length += 4 + length += 4 + + 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) + data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteDWORD(data, self.Score) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + PlayerName:%s, + Job:%d, + LV:%d, + RealmLV:%d, + FightPower:%d, + Score:%d + '''\ + %( + self.PlayerID, + self.PlayerName, + self.Job, + self.LV, + self.RealmLV, + self.FightPower, + self.Score + ) + return DumpString + + +class tagGCArenaMatchList(Structure): + Head = tagHead() + MatchCount = 0 #(BYTE MatchCount) + MatchList = list() #(vector<tagGCArenaMatchInfo> MatchList)// 匹配列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x22 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.MatchCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.MatchCount): + temMatchList = tagGCArenaMatchInfo() + _pos = temMatchList.ReadData(_lpData, _pos) + self.MatchList.append(temMatchList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x22 + self.MatchCount = 0 + self.MatchList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.MatchCount): + length += self.MatchList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.MatchCount) + for i in range(self.MatchCount): + data = CommFunc.WriteString(data, self.MatchList[i].GetLength(), self.MatchList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + MatchCount:%d, + MatchList:%s + '''\ + %( + self.Head.OutputString(), + self.MatchCount, + "..." + ) + return DumpString + + +m_NAtagGCArenaMatchList=tagGCArenaMatchList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaMatchList.Head.Cmd,m_NAtagGCArenaMatchList.Head.SubCmd))] = m_NAtagGCArenaMatchList #------------------------------------------------------ @@ -3033,8 +3363,8 @@ IsAlive = 0 #(BYTE IsAlive)// 是否存活 RecordLen = 0 #(WORD RecordLen)// 长度 KillRecord = "" #(String KillRecord)// 最近击杀记录时间玩家名size = RecordLen - RefreshSecond = 0 #(DWORD RefreshSecond)// 刷新倒计时, 秒 - RefreshCD = 0 #(DWORD RefreshCD)// 刷新总CD时, 秒 + RefreshSecond = 0 #(DWORD RefreshSecond)// 刷新倒计时, 秒 + RefreshCD = 0 #(DWORD RefreshCD)// 刷新总CD时, 秒 data = None def __init__(self): @@ -3473,7 +3803,7 @@ EvolveLV = 0 #(BYTE EvolveLV)//进化等级 WashLV = 0 #(BYTE WashLV)//洗练等级 WashValueCount = 0 #(BYTE WashValueCount) - WashValueList = list() #(vector<WORD> WashValueList)//洗练值 + WashValueList = list() #(vector<DWORD> WashValueList)//洗练值 StoneIDCount = 0 #(BYTE StoneIDCount) StoneIDList = list() #(vector<DWORD> StoneIDList)//宝石 ClassEquipCount = 0 #(BYTE ClassEquipCount) @@ -3497,7 +3827,7 @@ self.WashLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.WashValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.WashValueCount): - value,_pos=CommFunc.ReadWORD(_lpData,_pos) + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) self.WashValueList.append(value) self.StoneIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.StoneIDCount): @@ -3539,7 +3869,7 @@ length += 1 length += 1 length += 1 - length += 2 * self.WashValueCount + length += 4 * self.WashValueCount length += 1 length += 4 * self.StoneIDCount length += 1 @@ -3559,7 +3889,7 @@ data = CommFunc.WriteBYTE(data, self.WashLV) data = CommFunc.WriteBYTE(data, self.WashValueCount) for i in range(self.WashValueCount): - data = CommFunc.WriteWORD(data, self.WashValueList[i]) + data = CommFunc.WriteDWORD(data, self.WashValueList[i]) data = CommFunc.WriteBYTE(data, self.StoneIDCount) for i in range(self.StoneIDCount): data = CommFunc.WriteDWORD(data, self.StoneIDList[i]) @@ -3999,7 +4329,7 @@ Count = 0 #(DWORD Count)//数量 IsBind = 0 #(BYTE IsBind)//是否绑定 UserDataLen = 0 #(DWORD UserDataLen) - UserData = "" #(String UserData)//自定义数据 + UserData = "" #(String UserData)//自定义数据 data = None def __init__(self): @@ -4240,7 +4570,7 @@ Name = "" #(char Name[33]) LV = 0 #(DWORD LV)//等级 Job = 0 #(BYTE Job) - RealmLV = 0 #(WORD RealmLV)//境界 + RealmLV = 0 #(WORD RealmLV)//境界 data = None def __init__(self): @@ -4693,7 +5023,8 @@ ("SubCmd", c_ubyte), ("Point", c_int), # 复活点数 ("TotalPoint", c_int), # 复活总点数 - ("RebornCnt", c_ushort), # 复活次数 + ("RebornCnt", c_ushort), # 今日已复活次数 + ("TotalRebornCnt", c_ushort), # 每日可复活总次数,0为不限制 ] def __init__(self): @@ -4713,6 +5044,7 @@ self.Point = 0 self.TotalPoint = 0 self.RebornCnt = 0 + self.TotalRebornCnt = 0 return def GetLength(self): @@ -4727,20 +5059,86 @@ SubCmd:%s, Point:%d, TotalPoint:%d, - RebornCnt:%d + RebornCnt:%d, + TotalRebornCnt:%d '''\ %( self.Cmd, self.SubCmd, self.Point, self.TotalPoint, - self.RebornCnt + self.RebornCnt, + self.TotalRebornCnt ) return DumpString m_NAtagGCBossRebornPoint=tagGCBossRebornPoint() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCBossRebornPoint.Cmd,m_NAtagGCBossRebornPoint.SubCmd))] = m_NAtagGCBossRebornPoint + + +#------------------------------------------------------ +# AC 12 跨服运营活动结束 # tagGCCrossActEnd + +class tagGCCrossActEnd(Structure): + Head = tagHead() + ActNameLen = 0 #(BYTE ActNameLen) + ActName = "" #(String ActName) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x12 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ActName,_pos = CommFunc.ReadString(_lpData, _pos,self.ActNameLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x12 + self.ActNameLen = 0 + self.ActName = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.ActName) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNameLen) + data = CommFunc.WriteString(data, self.ActNameLen, self.ActName) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNameLen:%d, + ActName:%s + '''\ + %( + self.Head.OutputString(), + self.ActNameLen, + self.ActName + ) + return DumpString + + +m_NAtagGCCrossActEnd=tagGCCrossActEnd() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossActEnd.Head.Cmd,m_NAtagGCCrossActEnd.Head.SubCmd))] = m_NAtagGCCrossActEnd #------------------------------------------------------ @@ -6263,7 +6661,7 @@ class tagFamilyArrestOverStateInfo(Structure): Head = tagHead() Count = 0 #(WORD Count) - ArrestOverStateInfo = list() #(vector<tagFamilyArrestOverState> ArrestOverStateInfo)///size = Count + ArrestOverStateInfo = list() #(vector<tagFamilyArrestOverState> ArrestOverStateInfo)///size = Count data = None def __init__(self): @@ -7330,7 +7728,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("PlayerID", c_int), - ("RefreshType", c_ubyte), #参考CDBPlayerRefresh__ + ("RefreshType", c_ubyte), #参考CDBPlayerRefresh__ ("Value", c_int), ] @@ -7386,7 +7784,7 @@ class tagGCVoiceChat(Structure): Head = tagHead() - ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 5 区域 + ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 5 区域 SrcNameLen = 0 #(BYTE SrcNameLen) SrcName = "" #(String SrcName)//size = SrcNameLen PlayerID = 0 #(DWORD PlayerID) @@ -7857,7 +8255,7 @@ ItemID = 0 #(DWORD ItemID) ItemCount = 0 #(WORD ItemCount) AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss - BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + BidderPrice = 0 #(DWORD BidderPrice)//竞拍玩家出价 BiddingTime = "" #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss UserDataLen = 0 #(WORD UserDataLen) UserData = "" #(String UserData)//自定义数据 @@ -7874,7 +8272,7 @@ self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) - self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) @@ -7899,7 +8297,7 @@ length += 4 length += 2 length += 19 - length += 2 + length += 4 length += 19 length += 2 length += len(self.UserData) @@ -7913,7 +8311,7 @@ data = CommFunc.WriteDWORD(data, self.ItemID) data = CommFunc.WriteWORD(data, self.ItemCount) data = CommFunc.WriteString(data, 19, self.AddTime) - data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteDWORD(data, self.BidderPrice) data = CommFunc.WriteString(data, 19, self.BiddingTime) data = CommFunc.WriteWORD(data, self.UserDataLen) data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) @@ -8020,7 +8418,7 @@ ItemID = 0 #(DWORD ItemID) ItemCount = 0 #(WORD ItemCount) AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss - BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + BidderPrice = 0 #(DWORD BidderPrice)//竞拍玩家出价 BiddingTime = "" #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss UserDataLen = 0 #(WORD UserDataLen) UserData = "" #(String UserData)//自定义数据 @@ -8037,7 +8435,7 @@ self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) - self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) @@ -8062,7 +8460,7 @@ length += 4 length += 2 length += 19 - length += 2 + length += 4 length += 19 length += 2 length += len(self.UserData) @@ -8076,7 +8474,7 @@ data = CommFunc.WriteDWORD(data, self.ItemID) data = CommFunc.WriteWORD(data, self.ItemCount) data = CommFunc.WriteString(data, 19, self.AddTime) - data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteDWORD(data, self.BidderPrice) data = CommFunc.WriteString(data, 19, self.BiddingTime) data = CommFunc.WriteWORD(data, self.UserDataLen) data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) @@ -8260,7 +8658,7 @@ ItemCount = 0 #(WORD ItemCount) AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss BidderID = 0 #(DWORD BidderID)//竞拍玩家ID,也就是当前最高竞价玩家ID - BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + BidderPrice = 0 #(DWORD BidderPrice)//竞拍玩家出价 BiddingTime = "" #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss UserDataLen = 0 #(WORD UserDataLen) UserData = "" #(String UserData)//自定义数据 @@ -8278,7 +8676,7 @@ self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) self.BidderID,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) @@ -8305,7 +8703,7 @@ length += 2 length += 19 length += 4 - length += 2 + length += 4 length += 19 length += 2 length += len(self.UserData) @@ -8320,7 +8718,7 @@ data = CommFunc.WriteWORD(data, self.ItemCount) data = CommFunc.WriteString(data, 19, self.AddTime) data = CommFunc.WriteDWORD(data, self.BidderID) - data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteDWORD(data, self.BidderPrice) data = CommFunc.WriteString(data, 19, self.BiddingTime) data = CommFunc.WriteWORD(data, self.UserDataLen) data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) @@ -8539,7 +8937,7 @@ ("EquipPlace", c_ubyte), #当前要升星的装备位 ("CurStar", c_ubyte), #当前星级 ("CurRate", c_ubyte), #当前自动购买后的总概率,不满100则代表拍品库存不足 - ("AutoBuyCostMoney", c_ushort), #自动购买所需总消耗 + ("AutoBuyCostMoney", c_int), #自动购买所需总消耗 ] def __init__(self): @@ -8604,7 +9002,7 @@ ItemID = 0 #(DWORD ItemID) ItemCount = 0 #(WORD ItemCount) AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss - BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + BidderPrice = 0 #(DWORD BidderPrice)//竞拍玩家出价 BiddingTime = "" #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss UserDataLen = 0 #(WORD UserDataLen) UserData = "" #(String UserData)//自定义数据 @@ -8624,7 +9022,7 @@ self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) - self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) @@ -8655,7 +9053,7 @@ length += 4 length += 2 length += 19 - length += 2 + length += 4 length += 19 length += 2 length += len(self.UserData) @@ -8672,7 +9070,7 @@ data = CommFunc.WriteDWORD(data, self.ItemID) data = CommFunc.WriteWORD(data, self.ItemCount) data = CommFunc.WriteString(data, 19, self.AddTime) - data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteDWORD(data, self.BidderPrice) data = CommFunc.WriteString(data, 19, self.BiddingTime) data = CommFunc.WriteWORD(data, self.UserDataLen) data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) @@ -8788,7 +9186,7 @@ ItemID = 0 #(DWORD ItemID) ItemCount = 0 #(WORD ItemCount) AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss - BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + BidderPrice = 0 #(DWORD BidderPrice)//竞拍玩家出价 BiddingTime = "" #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss UserDataLen = 0 #(WORD UserDataLen) UserData = "" #(String UserData)//自定义数据 @@ -8805,7 +9203,7 @@ self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) - self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) @@ -8830,7 +9228,7 @@ length += 4 length += 2 length += 19 - length += 2 + length += 4 length += 19 length += 2 length += len(self.UserData) @@ -8844,7 +9242,7 @@ data = CommFunc.WriteDWORD(data, self.ItemID) data = CommFunc.WriteWORD(data, self.ItemCount) data = CommFunc.WriteString(data, 19, self.AddTime) - data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteDWORD(data, self.BidderPrice) data = CommFunc.WriteString(data, 19, self.BiddingTime) data = CommFunc.WriteWORD(data, self.UserDataLen) data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) @@ -9126,7 +9524,7 @@ ItemGUID = "" #(char ItemGUID[40]) AuctionType = 0 #(BYTE AuctionType)//拍品类型,0-全服拍品,1-仙盟拍品 AddTime = "" #(char AddTime[19])//上架时间 - BidderID = 0 #(DWORD BidderID)//最高竞拍玩家ID,也就是当前最高竞价玩家ID + BidderID = 0 #(DWORD BidderID)//最高竞拍玩家ID,也就是当前最高竞价玩家ID BidderPrice = 0 #(DWORD BidderPrice)//最高竞拍价格 BiddingTime = "" #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss data = None @@ -10717,6 +11115,190 @@ #------------------------------------------------------ +# C0 07 跨服排行榜信息 #tagGCCrossBillboardInfo + +class tagGCCrossBillboardData(Structure): + ID = 0 #(DWORD ID) + Name1 = "" #(char Name1[33])//名字1,用来显示排序对象名字 + Name2 = "" #(char Name2[33])//名字2 + Type2 = 0 #(BYTE Type2)//附加类型,用来表示排序对象的类型,比如,玩家所属职业门派,宠物类型等 + Value1 = 0 #(DWORD Value1)//自定义值1 + Value2 = 0 #(DWORD Value2)//自定义值2 + CmpValue = 0 #(DWORD CmpValue)// 比较权值 + CmpValue2 = 0 #(DWORD CmpValue2)// 比较权值 + CmpValue3 = 0 #(DWORD CmpValue3)// 比较权值 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Name1,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.Name2,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.Type2,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Value1,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Value2,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CmpValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CmpValue2,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CmpValue3,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.ID = 0 + self.Name1 = "" + self.Name2 = "" + self.Type2 = 0 + self.Value1 = 0 + self.Value2 = 0 + self.CmpValue = 0 + self.CmpValue2 = 0 + self.CmpValue3 = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 33 + length += 33 + length += 1 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.ID) + data = CommFunc.WriteString(data, 33, self.Name1) + data = CommFunc.WriteString(data, 33, self.Name2) + data = CommFunc.WriteBYTE(data, self.Type2) + data = CommFunc.WriteDWORD(data, self.Value1) + data = CommFunc.WriteDWORD(data, self.Value2) + data = CommFunc.WriteDWORD(data, self.CmpValue) + data = CommFunc.WriteDWORD(data, self.CmpValue2) + data = CommFunc.WriteDWORD(data, self.CmpValue3) + return data + + def OutputString(self): + DumpString = ''' + ID:%d, + Name1:%s, + Name2:%s, + Type2:%d, + Value1:%d, + Value2:%d, + CmpValue:%d, + CmpValue2:%d, + CmpValue3:%d + '''\ + %( + self.ID, + self.Name1, + self.Name2, + self.Type2, + self.Value1, + self.Value2, + self.CmpValue, + self.CmpValue2, + self.CmpValue3 + ) + return DumpString + + +class tagGCCrossBillboardInfo(Structure): + Head = tagHead() + Type = 0 #(BYTE Type)//榜单类型 + GroupValue1 = 0 #(BYTE GroupValue1)// 分组值1 + GroupValue2 = 0 #(BYTE GroupValue2)// 分组值2,与分组值1组合归为同组榜单数据 + BillboardCount = 0 #(BYTE BillboardCount) + CrossBillboardDataList = list() #(vector<tagGCCrossBillboardData> CrossBillboardDataList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x07 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.GroupValue2,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.BillboardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BillboardCount): + temCrossBillboardDataList = tagGCCrossBillboardData() + _pos = temCrossBillboardDataList.ReadData(_lpData, _pos) + self.CrossBillboardDataList.append(temCrossBillboardDataList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x07 + self.Type = 0 + self.GroupValue1 = 0 + self.GroupValue2 = 0 + self.BillboardCount = 0 + self.CrossBillboardDataList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 1 + length += 1 + for i in range(self.BillboardCount): + length += self.CrossBillboardDataList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Type) + data = CommFunc.WriteBYTE(data, self.GroupValue1) + data = CommFunc.WriteBYTE(data, self.GroupValue2) + data = CommFunc.WriteBYTE(data, self.BillboardCount) + for i in range(self.BillboardCount): + data = CommFunc.WriteString(data, self.CrossBillboardDataList[i].GetLength(), self.CrossBillboardDataList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Type:%d, + GroupValue1:%d, + GroupValue2:%d, + BillboardCount:%d, + CrossBillboardDataList:%s + '''\ + %( + self.Head.OutputString(), + self.Type, + self.GroupValue1, + self.GroupValue2, + self.BillboardCount, + "..." + ) + return DumpString + + +m_NAtagGCCrossBillboardInfo=tagGCCrossBillboardInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossBillboardInfo.Head.Cmd,m_NAtagGCCrossBillboardInfo.Head.SubCmd))] = m_NAtagGCCrossBillboardInfo + + +#------------------------------------------------------ # C0 05 跨服PK赛季排行榜 #tagGCCrossRealmPKBillboardInfo class tagGCCrossRealmPKBillboardData(Structure): @@ -10808,8 +11390,8 @@ class tagGCCrossRealmPKBillboardInfo(Structure): Head = tagHead() - ZoneID = 0 #(BYTE ZoneID)// 赛区ID - SeasonID = 0 #(BYTE SeasonID)// 赛季ID + ZoneID = 0 #(BYTE ZoneID)// 赛区ID + SeasonID = 0 #(BYTE SeasonID)// 赛季ID Count = 0 #(WORD Count) PKBillboardList = list() #(vector<tagGCCrossRealmPKBillboardData> PKBillboardList) data = None @@ -10895,7 +11477,8 @@ PlayerName = "" #(String PlayerName)// 跨服名字 Job = 0 #(BYTE Job) LV = 0 #(WORD LV) - MaxHP = 0 #(DWORD MaxHP)// 默认满血 + MaxHP = 0 #(DWORD MaxHP)// 默认满血,求余亿部分 + MaxHPEx = 0 #(DWORD MaxHPEx)// 默认满血,整除亿部分 MaxProDef = 0 #(DWORD MaxProDef)// 最大护盾 data = None @@ -10911,6 +11494,7 @@ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.MaxHP,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MaxHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.MaxProDef,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos @@ -10921,6 +11505,7 @@ self.Job = 0 self.LV = 0 self.MaxHP = 0 + self.MaxHPEx = 0 self.MaxProDef = 0 return @@ -10931,6 +11516,7 @@ length += len(self.PlayerName) length += 1 length += 2 + length += 4 length += 4 length += 4 @@ -10944,6 +11530,7 @@ data = CommFunc.WriteBYTE(data, self.Job) data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteDWORD(data, self.MaxHP) + data = CommFunc.WriteDWORD(data, self.MaxHPEx) data = CommFunc.WriteDWORD(data, self.MaxProDef) return data @@ -10955,6 +11542,7 @@ Job:%d, LV:%d, MaxHP:%d, + MaxHPEx:%d, MaxProDef:%d '''\ %( @@ -10964,6 +11552,7 @@ self.Job, self.LV, self.MaxHP, + self.MaxHPEx, self.MaxProDef ) return DumpString @@ -11826,7 +12415,7 @@ BackpackLV = 0 #(BYTE BackpackLV)//背包等级 WarehouseLV = 0 #(BYTE WarehouseLV)//仓库等级 TeamID = 0 #(DWORD TeamID)//队伍ID - UseGoldType = 0 #(BYTE UseGoldType)//默认用金子/金票 类型为MoneyType + UseGoldType = 0 #(BYTE UseGoldType)//默认用金子/金票 类型为MoneyType UseSilverType = 0 #(BYTE UseSilverType)//默认用的银子/银票 AttackMode = 0 #(BYTE AttackMode)//攻击模式 LastWeekOnlineTime = 0 #(DWORD LastWeekOnlineTime)//上周在线时间 @@ -11866,6 +12455,7 @@ ExAttr18 = 0 #(DWORD ExAttr18)//预留的扩展属性字段,用来存放项目特定的属性 ExAttr19 = 0 #(DWORD ExAttr19)//预留的扩展属性字段,用来存放项目特定的属性 ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性 + HPEx = 0 #(DWORD HPEx)//当前血量 超过E的记录 data = None def __init__(self): @@ -11971,6 +12561,7 @@ self.ExAttr18,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ExAttr19,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.HPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -12072,6 +12663,7 @@ self.ExAttr18 = 0 self.ExAttr19 = 0 self.ExAttr20 = 0 + self.HPEx = 0 return def GetLength(self): @@ -12164,6 +12756,7 @@ length += 4 length += 4 length += 15 + length += 4 length += 4 length += 4 length += 4 @@ -12271,6 +12864,7 @@ data = CommFunc.WriteDWORD(data, self.ExAttr18) data = CommFunc.WriteDWORD(data, self.ExAttr19) data = CommFunc.WriteDWORD(data, self.ExAttr20) + data = CommFunc.WriteDWORD(data, self.HPEx) return data def OutputString(self): @@ -12369,7 +12963,8 @@ ExAttr17:%d, ExAttr18:%d, ExAttr19:%d, - ExAttr20:%d + ExAttr20:%d, + HPEx:%d '''\ %( self.Head.OutputString(), @@ -12466,7 +13061,8 @@ self.ExAttr17, self.ExAttr18, self.ExAttr19, - self.ExAttr20 + self.ExAttr20, + self.HPEx ) return DumpString @@ -13546,6 +14142,74 @@ m_NAtagMCAllEquipAttrActiveInfo=tagMCAllEquipAttrActiveInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAllEquipAttrActiveInfo.Head.Cmd,m_NAtagMCAllEquipAttrActiveInfo.Head.SubCmd))] = m_NAtagMCAllEquipAttrActiveInfo + + +#------------------------------------------------------ +# A3 C3 竞技场玩家信息 #tagMCArenaPlayerInfo + +class tagMCArenaPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("IsReset", c_ubyte), #是否是重置的 + ("Score", c_int), #当前积分 + ("BattleCountToday", c_ubyte), #今日已挑战次数 + ("MatchRefreshCount", c_ubyte), #当前已刷新匹配列表次数,每次挑战后会重置 + ("ItemAddBattleCountToday", c_ubyte), #今日已使用物品增加的挑战次数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0xC3 + 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 = 0xC3 + self.IsReset = 0 + self.Score = 0 + self.BattleCountToday = 0 + self.MatchRefreshCount = 0 + self.ItemAddBattleCountToday = 0 + return + + def GetLength(self): + return sizeof(tagMCArenaPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 C3 竞技场玩家信息 //tagMCArenaPlayerInfo: + Cmd:%s, + SubCmd:%s, + IsReset:%d, + Score:%d, + BattleCountToday:%d, + MatchRefreshCount:%d, + ItemAddBattleCountToday:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.IsReset, + self.Score, + self.BattleCountToday, + self.MatchRefreshCount, + self.ItemAddBattleCountToday + ) + return DumpString + + +m_NAtagMCArenaPlayerInfo=tagMCArenaPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCArenaPlayerInfo.Cmd,m_NAtagMCArenaPlayerInfo.SubCmd))] = m_NAtagMCArenaPlayerInfo #------------------------------------------------------ @@ -14952,7 +15616,7 @@ class tagMCEquipPartXLAttr(Structure): - EquipPlace = 0 #(BYTE EquipPlace)// 装备位 + EquipPlace = 0 #(BYTE EquipPlace)// 装备位 XLAttrLV = 0 #(BYTE XLAttrLV)// 洗练等级 XLAttrCnt = 0 #(BYTE XLAttrCnt)// 属性条数 XLAttrList = list() #(vector<tagMCEquipPartXLAttrValue> XLAttrList)// 属性列表,索引0的代表属性1,依次递增 @@ -16495,6 +17159,97 @@ #------------------------------------------------------ +# A3 38 投资理财信息 #tagMCInvestInfo + +class tagMCInvestInfo(Structure): + Head = tagHead() + InvestType = 0 #(BYTE InvestType)// 投资类型 + CurDay = 0 #(WORD CurDay)// 当前天数,投资第一天为1 + ValueCount = 0 #(BYTE ValueCount) + RewardValue = list() #(vector<DWORD> RewardValue)//领奖记录值,按投资回报索引位记录是否已领取 + ProgressValue = list() #(vector<DWORD> ProgressValue)//投资相关可领取进度记录值: 9登录投资-记录已登录天数;11Boss投资-按回报索引位记录是否已击杀该boss + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x38 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.InvestType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CurDay,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ValueCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.RewardValue.append(value) + for i in range(self.ValueCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.ProgressValue.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x38 + self.InvestType = 0 + self.CurDay = 0 + self.ValueCount = 0 + self.RewardValue = list() + self.ProgressValue = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 2 + length += 1 + length += 4 * self.ValueCount + length += 4 * self.ValueCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.InvestType) + data = CommFunc.WriteWORD(data, self.CurDay) + data = CommFunc.WriteBYTE(data, self.ValueCount) + for i in range(self.ValueCount): + data = CommFunc.WriteDWORD(data, self.RewardValue[i]) + for i in range(self.ValueCount): + data = CommFunc.WriteDWORD(data, self.ProgressValue[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + InvestType:%d, + CurDay:%d, + ValueCount:%d, + RewardValue:%s, + ProgressValue:%s + '''\ + %( + self.Head.OutputString(), + self.InvestType, + self.CurDay, + self.ValueCount, + "...", + "..." + ) + return DumpString + + +m_NAtagMCInvestInfo=tagMCInvestInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCInvestInfo.Head.Cmd,m_NAtagMCInvestInfo.Head.SubCmd))] = m_NAtagMCInvestInfo + + +#------------------------------------------------------ # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo class tagMCMagicWeaponInfo(Structure): @@ -17070,7 +17825,8 @@ class tagMCModuleFightPowerInfo(Structure): Head = tagHead() - TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力 + TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力,求余亿部分 + TotalFightPoweEx = 0 #(DWORD TotalFightPoweEx)//总战斗力,整除亿部分,1代表1亿 MFPCnt = 0 #(BYTE MFPCnt)//模块战斗力总数 MFPList = list() #(vector<tagMCModuleFightPower> MFPList) data = None @@ -17085,6 +17841,7 @@ self.Clear() _pos = self.Head.ReadData(_lpData, _pos) self.TotalFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TotalFightPoweEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.MFPCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.MFPCnt): temMFPList = tagMCModuleFightPower() @@ -17098,6 +17855,7 @@ self.Head.Cmd = 0xA3 self.Head.SubCmd = 0xA1 self.TotalFightPower = 0 + self.TotalFightPoweEx = 0 self.MFPCnt = 0 self.MFPList = list() return @@ -17105,6 +17863,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 4 length += 4 length += 1 for i in range(self.MFPCnt): @@ -17116,6 +17875,7 @@ data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteDWORD(data, self.TotalFightPower) + data = CommFunc.WriteDWORD(data, self.TotalFightPoweEx) data = CommFunc.WriteBYTE(data, self.MFPCnt) for i in range(self.MFPCnt): data = CommFunc.WriteString(data, self.MFPList[i].GetLength(), self.MFPList[i].GetBuffer()) @@ -17125,12 +17885,14 @@ DumpString = ''' Head:%s, TotalFightPower:%d, + TotalFightPoweEx:%d, MFPCnt:%d, MFPList:%s '''\ %( self.Head.OutputString(), self.TotalFightPower, + self.TotalFightPoweEx, self.MFPCnt, "..." ) @@ -17439,7 +18201,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("Record", c_ubyte), #0-未领取 1-已领取 + ("Record", c_ubyte), #0-未领取 1-已领取 ] def __init__(self): @@ -17930,7 +18692,7 @@ StoveLV = 0 #(BYTE StoveLV)// 炼丹炉等级 StoveExp = 0 #(DWORD StoveExp)// 炼丹炉经验 ItemID = 0 #(DWORD ItemID)// 合成物品id - ItemCnt = 0 #(BYTE ItemCnt)// 丹药数量 + ItemCnt = 0 #(WORD ItemCnt)// 丹药数量 StoveCnt = 0 #(WORD StoveCnt)// 丹药数量 InfoList = list() #(vector<tagMCPlayerStoveInfo> InfoList) data = None @@ -17947,7 +18709,7 @@ self.StoveLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.StoveExp,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.ItemCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ItemCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) self.StoveCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) for i in range(self.StoveCnt): temInfoList = tagMCPlayerStoveInfo() @@ -17974,7 +18736,7 @@ length += 1 length += 4 length += 4 - length += 1 + length += 2 length += 2 for i in range(self.StoveCnt): length += self.InfoList[i].GetLength() @@ -17987,7 +18749,7 @@ data = CommFunc.WriteBYTE(data, self.StoveLV) data = CommFunc.WriteDWORD(data, self.StoveExp) data = CommFunc.WriteDWORD(data, self.ItemID) - data = CommFunc.WriteBYTE(data, self.ItemCnt) + data = CommFunc.WriteWORD(data, self.ItemCnt) data = CommFunc.WriteWORD(data, self.StoveCnt) for i in range(self.StoveCnt): data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) @@ -18763,6 +19525,7 @@ _fields_ = [ ("RecordIndex", c_ushort), #第几个记录值 每个key存31个succid 0-30为0, 31-61为1.. ("Record", c_int), #对应是否领取值 + ("PassportRecord", c_int), #通行证奖励是否领取值 ] def __init__(self): @@ -18777,6 +19540,7 @@ def Clear(self): self.RecordIndex = 0 self.Record = 0 + self.PassportRecord = 0 return def GetLength(self): @@ -18788,11 +19552,13 @@ def OutputString(self): DumpString = '''//A3 42 成就完成领奖记录列表 //tagMCSuccessFinishAwardRecordList: RecordIndex:%d, - Record:%d + Record:%d, + PassportRecord:%d '''\ %( self.RecordIndex, - self.Record + self.Record, + self.PassportRecord ) return DumpString @@ -19234,7 +20000,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("LV", c_ubyte), #等阶 - ("EatItemCount", c_ushort), #当前阶已吃丹个数 + ("EatItemCount", c_int), #当前阶已吃丹个数 ("SkinPlusState", c_int), #幻化激活状态,按位存储是否激活,幻化编号ID对应位 ] @@ -20977,6 +21743,58 @@ #------------------------------------------------------ +# A7 20 创角奖励领奖状态 #tagMCCreateRoleAwardState + +class tagMCCreateRoleAwardState(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("GetState", c_ubyte), # 是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA7 + self.SubCmd = 0x20 + 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 = 0xA7 + self.SubCmd = 0x20 + self.GetState = 0 + return + + def GetLength(self): + return sizeof(tagMCCreateRoleAwardState) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A7 20 创角奖励领奖状态 //tagMCCreateRoleAwardState: + Cmd:%s, + SubCmd:%s, + GetState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.GetState + ) + return DumpString + + +m_NAtagMCCreateRoleAwardState=tagMCCreateRoleAwardState() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCreateRoleAwardState.Cmd,m_NAtagMCCreateRoleAwardState.SubCmd))] = m_NAtagMCCreateRoleAwardState + + +#------------------------------------------------------ # A7 13 动态障碍物状态 #tagMCDynamicBarrierState class tagMCDynamicBarrier(Structure): @@ -22024,7 +22842,7 @@ PlayerID = 0 #(DWORD PlayerID)//玩家ID EquipClassLV = 0 #(BYTE EquipClassLV) ItemDataSize = 0 #(WORD ItemDataSize) - ItemData = "" #(String ItemData)//物品记录 + ItemData = "" #(String ItemData)//物品记录 data = None def __init__(self): @@ -22323,7 +23141,7 @@ ItemDataSize = 0 #(DWORD ItemDataSize) ItemData = "" #(String ItemData)//物品记录 PlusDataSize = 0 #(DWORD PlusDataSize) - PlusData = "" #(String PlusData)//扩展记录 + PlusData = "" #(String PlusData)//扩展记录 data = None def __init__(self): @@ -22471,6 +23289,7 @@ _fields_ = [ ("RefreshType", c_ubyte), ("Value", c_int), + ("ValueEx", c_int), ] def __init__(self): @@ -22485,6 +23304,7 @@ def Clear(self): self.RefreshType = 0 self.Value = 0 + self.ValueEx = 0 return def GetLength(self): @@ -22496,11 +23316,13 @@ def OutputString(self): DumpString = '''//A7 09 周围对象刷新合并包 //tagObjInfoListRefresh: RefreshType:%d, - Value:%d + Value:%d, + ValueEx:%d '''\ %( self.RefreshType, - self.Value + self.Value, + self.ValueEx ) return DumpString @@ -22820,7 +23642,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("MakeType", c_ubyte), #类型 TMakeItemType + ("MakeType", c_ubyte), #类型 TMakeItemType ("Result", c_ubyte), #是否成功 ("MakeItemID", c_int), #合成的物品ID ] @@ -23437,6 +24259,600 @@ #------------------------------------------------------ +# AA 40 集字活动信息 #tagMCActCollectWordsInfo + +class tagMCActCollectWordsNeedItem(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(tagMCActCollectWordsNeedItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 40 集字活动信息 //tagMCActCollectWordsInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActCollectWordsExchangeItem(Structure): + ExchangeNum = 0 #(BYTE ExchangeNum)//兑换编号 + ExchangeCountMax = 0 #(WORD ExchangeCountMax)//最大兑换次数,0不限制 + ItemID = 0 #(DWORD ItemID)//目标物品 + ItemCount = 0 #(WORD ItemCount) + IsBind = 0 #(BYTE IsBind) + NeedItemCount = 0 #(BYTE NeedItemCount) + NeedItemList = list() #(vector<tagMCActCollectWordsNeedItem> NeedItemList)// 所需物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ExchangeNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ExchangeCountMax,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsBind,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.NeedItemCount): + temNeedItemList = tagMCActCollectWordsNeedItem() + _pos = temNeedItemList.ReadData(_lpData, _pos) + self.NeedItemList.append(temNeedItemList) + return _pos + + def Clear(self): + self.ExchangeNum = 0 + self.ExchangeCountMax = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + self.NeedItemCount = 0 + self.NeedItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 + length += 4 + length += 2 + length += 1 + length += 1 + for i in range(self.NeedItemCount): + length += self.NeedItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.ExchangeNum) + data = CommFunc.WriteWORD(data, self.ExchangeCountMax) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteBYTE(data, self.IsBind) + data = CommFunc.WriteBYTE(data, self.NeedItemCount) + for i in range(self.NeedItemCount): + data = CommFunc.WriteString(data, self.NeedItemList[i].GetLength(), self.NeedItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + ExchangeNum:%d, + ExchangeCountMax:%d, + ItemID:%d, + ItemCount:%d, + IsBind:%d, + NeedItemCount:%d, + NeedItemList:%s + '''\ + %( + self.ExchangeNum, + self.ExchangeCountMax, + self.ItemID, + self.ItemCount, + self.IsBind, + self.NeedItemCount, + "..." + ) + return DumpString + + +class tagMCActCollectWordsInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号,1 或 2,相互独立的活动,可同时开启 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + LastDayOnlyExchange = 0 #(BYTE LastDayOnlyExchange)//最后一天是否仅兑换 + ExchangeCount = 0 #(BYTE ExchangeCount) + ExchangeItemList = list() #(vector<tagMCActCollectWordsExchangeItem> ExchangeItemList)//兑换组合列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x40 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LastDayOnlyExchange,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ExchangeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ExchangeCount): + temExchangeItemList = tagMCActCollectWordsExchangeItem() + _pos = temExchangeItemList.ReadData(_lpData, _pos) + self.ExchangeItemList.append(temExchangeItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x40 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.LastDayOnlyExchange = 0 + self.ExchangeCount = 0 + self.ExchangeItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.ExchangeCount): + length += self.ExchangeItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.LastDayOnlyExchange) + data = CommFunc.WriteBYTE(data, self.ExchangeCount) + for i in range(self.ExchangeCount): + data = CommFunc.WriteString(data, self.ExchangeItemList[i].GetLength(), self.ExchangeItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + LastDayOnlyExchange:%d, + ExchangeCount:%d, + ExchangeItemList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.LastDayOnlyExchange, + self.ExchangeCount, + "..." + ) + return DumpString + + +m_NAtagMCActCollectWordsInfo=tagMCActCollectWordsInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActCollectWordsInfo.Head.Cmd,m_NAtagMCActCollectWordsInfo.Head.SubCmd))] = m_NAtagMCActCollectWordsInfo + + +#------------------------------------------------------ +# AA 41 集字活动玩家信息 #tagMCActCollectWordsPlayerInfo + +class tagMCActCollectWordsExchangeInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("ExchangeNum", c_ubyte), #兑换编号 + ("ExchangeCount", 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.ExchangeNum = 0 + self.ExchangeCount = 0 + return + + def GetLength(self): + return sizeof(tagMCActCollectWordsExchangeInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 41 集字活动玩家信息 //tagMCActCollectWordsPlayerInfo: + ExchangeNum:%d, + ExchangeCount:%d + '''\ + %( + self.ExchangeNum, + self.ExchangeCount + ) + return DumpString + + +class tagMCActCollectWordsPlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号,1 或 2,相互独立的活动,可同时开启 + ExchangeCount = 0 #(BYTE ExchangeCount) + ExchangeInfoList = list() #(vector<tagMCActCollectWordsExchangeInfo> ExchangeInfoList)//兑换数据列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x41 + 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.ExchangeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ExchangeCount): + temExchangeInfoList = tagMCActCollectWordsExchangeInfo() + _pos = temExchangeInfoList.ReadData(_lpData, _pos) + self.ExchangeInfoList.append(temExchangeInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x41 + self.ActNum = 0 + self.ExchangeCount = 0 + self.ExchangeInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.ExchangeCount): + length += self.ExchangeInfoList[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.ExchangeCount) + for i in range(self.ExchangeCount): + data = CommFunc.WriteString(data, self.ExchangeInfoList[i].GetLength(), self.ExchangeInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + ExchangeCount:%d, + ExchangeInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.ExchangeCount, + "..." + ) + return DumpString + + +m_NAtagMCActCollectWordsPlayerInfo=tagMCActCollectWordsPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActCollectWordsPlayerInfo.Head.Cmd,m_NAtagMCActCollectWordsPlayerInfo.Head.SubCmd))] = m_NAtagMCActCollectWordsPlayerInfo + + +#------------------------------------------------------ +# AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo + +class tagMCActGrowupBuyCTGItem(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(tagMCActGrowupBuyCTGItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 31 成长必买活动信息 //tagMCActGrowupBuyInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActGrowupBuyCTGInfo(Structure): + CTGID = 0 #(BYTE CTGID)// 充值表ID + GainItemCount = 0 #(BYTE GainItemCount)// 获得物品数 + GainItemList = list() #(vector<tagMCActGrowupBuyCTGItem> GainItemList)// 获得物品列表,替换充值表中的 GainItemList 字段信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.CTGID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.GainItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GainItemCount): + temGainItemList = tagMCActGrowupBuyCTGItem() + _pos = temGainItemList.ReadData(_lpData, _pos) + self.GainItemList.append(temGainItemList) + return _pos + + def Clear(self): + self.CTGID = 0 + self.GainItemCount = 0 + self.GainItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.GainItemCount): + length += self.GainItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.CTGID) + data = CommFunc.WriteBYTE(data, self.GainItemCount) + for i in range(self.GainItemCount): + data = CommFunc.WriteString(data, self.GainItemList[i].GetLength(), self.GainItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + CTGID:%d, + GainItemCount:%d, + GainItemList:%s + '''\ + %( + self.CTGID, + self.GainItemCount, + "..." + ) + return DumpString + + +class tagMCActGrowupBuyGroup(Structure): + BuyCount = 0 #(BYTE BuyCount)// 循环购买礼包数 + BuyCTGIDList = list() #(vector<tagMCActGrowupBuyCTGInfo> BuyCTGIDList)// 循环购买礼包充值ID信息列表 + PlayerBuyIndex = 0 #(BYTE PlayerBuyIndex)// 玩家当前可购买的礼包充值ID在列表中索引 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.BuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BuyCount): + temBuyCTGIDList = tagMCActGrowupBuyCTGInfo() + _pos = temBuyCTGIDList.ReadData(_lpData, _pos) + self.BuyCTGIDList.append(temBuyCTGIDList) + self.PlayerBuyIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.BuyCount = 0 + self.BuyCTGIDList = list() + self.PlayerBuyIndex = 0 + return + + def GetLength(self): + length = 0 + length += 1 + for i in range(self.BuyCount): + length += self.BuyCTGIDList[i].GetLength() + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.BuyCount) + for i in range(self.BuyCount): + data = CommFunc.WriteString(data, self.BuyCTGIDList[i].GetLength(), self.BuyCTGIDList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.PlayerBuyIndex) + return data + + def OutputString(self): + DumpString = ''' + BuyCount:%d, + BuyCTGIDList:%s, + PlayerBuyIndex:%d + '''\ + %( + self.BuyCount, + "...", + self.PlayerBuyIndex + ) + return DumpString + + +class tagMCActGrowupBuyInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + GroupCount = 0 #(BYTE GroupCount)// 循环购买礼包组数 + GroupList = list() #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x31 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.GroupCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GroupCount): + temGroupList = tagMCActGrowupBuyGroup() + _pos = temGroupList.ReadData(_lpData, _pos) + self.GroupList.append(temGroupList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x31 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.GroupCount = 0 + self.GroupList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + for i in range(self.GroupCount): + length += self.GroupList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.GroupCount) + for i in range(self.GroupCount): + data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + GroupCount:%d, + GroupList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.GroupCount, + "..." + ) + return DumpString + + +m_NAtagMCActGrowupBuyInfo=tagMCActGrowupBuyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGrowupBuyInfo.Head.Cmd,m_NAtagMCActGrowupBuyInfo.Head.SubCmd))] = m_NAtagMCActGrowupBuyInfo + + +#------------------------------------------------------ # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo class tagMCActLoginAwardAction(Structure): @@ -23864,6 +25280,959 @@ #------------------------------------------------------ +# AA 48 多日连充活动信息 #tagMCActManyDayRechargeInfo + +class tagMCActManyDayRechargeItem(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(tagMCActManyDayRechargeItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 48 多日连充活动信息 //tagMCActManyDayRechargeInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActManyDayRechargeAward(Structure): + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + NeedRecharge = 0 #(DWORD NeedRecharge)// 单天所需充值额度 + NeedDays = 0 #(BYTE NeedDays)// 所需充值天数 + AwardItemCount = 0 #(BYTE AwardItemCount) + AwardItemList = list() #(vector<tagMCActManyDayRechargeItem> AwardItemList)// 奖励物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedRecharge,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NeedDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCActManyDayRechargeItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.AwardIndex = 0 + self.NeedRecharge = 0 + self.NeedDays = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 4 + length += 1 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteDWORD(data, self.NeedRecharge) + data = CommFunc.WriteBYTE(data, self.NeedDays) + 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 = ''' + AwardIndex:%d, + NeedRecharge:%d, + NeedDays:%d, + AwardItemCount:%d, + AwardItemList:%s + '''\ + %( + self.AwardIndex, + self.NeedRecharge, + self.NeedDays, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCActManyDayRechargeInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + AwardCount = 0 #(BYTE AwardCount) + AwardList = list() #(vector<tagMCActManyDayRechargeAward> AwardList)// 奖励信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x48 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + temAwardList = tagMCActManyDayRechargeAward() + _pos = temAwardList.ReadData(_lpData, _pos) + self.AwardList.append(temAwardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x48 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.AwardCount = 0 + self.AwardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + for i in range(self.AwardCount): + length += self.AwardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + AwardCount:%d, + AwardList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCActManyDayRechargeInfo=tagMCActManyDayRechargeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActManyDayRechargeInfo.Head.Cmd,m_NAtagMCActManyDayRechargeInfo.Head.SubCmd))] = m_NAtagMCActManyDayRechargeInfo + + +#------------------------------------------------------ +# AA 49 多日连充活动玩家信息 #tagMCActManyDayRechargePlayerInfo + +class tagMCActManyDayRechargePlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + Days = 0 #(BYTE Days) + DayRechargeValues = list() #(vector<DWORD> DayRechargeValues)//活动每天充值列表 + RecordCount = 0 #(BYTE RecordCount) + AwardRecord = list() #(vector<DWORD> AwardRecord)//奖励领奖记录,按奖励索引二进制位存储是否已领取 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x49 + 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.Days,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Days): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.DayRechargeValues.append(value) + self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.AwardRecord.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x49 + self.ActNum = 0 + self.Days = 0 + self.DayRechargeValues = list() + self.RecordCount = 0 + self.AwardRecord = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.Days + length += 1 + length += 4 * self.RecordCount + + 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.Days) + for i in range(self.Days): + data = CommFunc.WriteDWORD(data, self.DayRechargeValues[i]) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteDWORD(data, self.AwardRecord[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + Days:%d, + DayRechargeValues:%s, + RecordCount:%d, + AwardRecord:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.Days, + "...", + self.RecordCount, + "..." + ) + return DumpString + + +m_NAtagMCActManyDayRechargePlayerInfo=tagMCActManyDayRechargePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActManyDayRechargePlayerInfo.Head.Cmd,m_NAtagMCActManyDayRechargePlayerInfo.Head.SubCmd))] = m_NAtagMCActManyDayRechargePlayerInfo + + +#------------------------------------------------------ +# AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo + +class tagMCActRechargePrize(Structure): + _pack_ = 1 + _fields_ = [ + ("CTGID", c_ushort), # 对应充值表充值ID + ("GoldPrize", c_int), #返利仙玉数 + ("PrizeCountLimit", 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.CTGID = 0 + self.GoldPrize = 0 + self.PrizeCountLimit = 0 + return + + def GetLength(self): + return sizeof(tagMCActRechargePrize) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 27 充值返利活动信息 //tagMCActRechargePrizeInfo: + CTGID:%d, + GoldPrize:%d, + PrizeCountLimit:%d + '''\ + %( + self.CTGID, + self.GoldPrize, + self.PrizeCountLimit + ) + return DumpString + + +class tagMCActRechargePrizeDay(Structure): + Prizes = 0 #(BYTE Prizes)// 返利档数 + PrizeInfo = list() #(vector<tagMCActRechargePrize> PrizeInfo)// 返利档信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Prizes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Prizes): + temPrizeInfo = tagMCActRechargePrize() + _pos = temPrizeInfo.ReadData(_lpData, _pos) + self.PrizeInfo.append(temPrizeInfo) + return _pos + + def Clear(self): + self.Prizes = 0 + self.PrizeInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + for i in range(self.Prizes): + length += self.PrizeInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.Prizes) + for i in range(self.Prizes): + data = CommFunc.WriteString(data, self.PrizeInfo[i].GetLength(), self.PrizeInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Prizes:%d, + PrizeInfo:%s + '''\ + %( + self.Prizes, + "..." + ) + return DumpString + + +class tagMCActRechargePrizeInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + PrizeDays = 0 #(BYTE PrizeDays) + PrizeDayInfo = list() #(vector<tagMCActRechargePrizeDay> PrizeDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x27 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PrizeDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PrizeDays): + temPrizeDayInfo = tagMCActRechargePrizeDay() + _pos = temPrizeDayInfo.ReadData(_lpData, _pos) + self.PrizeDayInfo.append(temPrizeDayInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x27 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.IsDayReset = 0 + self.PrizeDays = 0 + self.PrizeDayInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.PrizeDays): + length += self.PrizeDayInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.PrizeDays) + for i in range(self.PrizeDays): + data = CommFunc.WriteString(data, self.PrizeDayInfo[i].GetLength(), self.PrizeDayInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + IsDayReset:%d, + PrizeDays:%d, + PrizeDayInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.IsDayReset, + self.PrizeDays, + "..." + ) + return DumpString + + +m_NAtagMCActRechargePrizeInfo=tagMCActRechargePrizeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargePrizeInfo.Head.Cmd,m_NAtagMCActRechargePrizeInfo.Head.SubCmd))] = m_NAtagMCActRechargePrizeInfo + + +#------------------------------------------------------ +# AA 29 累计充值返利仙玉活动信息 #tagMCActRechargeRebateGoldInfo + +class tagMCActRechargeRebate(Structure): + _pack_ = 1 + _fields_ = [ + ("RMBMin", c_int), # 充值RMB最小值 + ("RMBMax", c_int), # 充值RMB最大值,0代表无上限 + ("RebateRate", 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.RMBMin = 0 + self.RMBMax = 0 + self.RebateRate = 0 + return + + def GetLength(self): + return sizeof(tagMCActRechargeRebate) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 29 累计充值返利仙玉活动信息 //tagMCActRechargeRebateGoldInfo: + RMBMin:%d, + RMBMax:%d, + RebateRate:%d + '''\ + %( + self.RMBMin, + self.RMBMax, + self.RebateRate + ) + return DumpString + + +class tagMCActRechargeRebateDay(Structure): + Rebates = 0 #(BYTE Rebates)// 返利档数 + RebateInfo = list() #(vector<tagMCActRechargeRebate> RebateInfo)// 返利档信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rebates,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Rebates): + temRebateInfo = tagMCActRechargeRebate() + _pos = temRebateInfo.ReadData(_lpData, _pos) + self.RebateInfo.append(temRebateInfo) + return _pos + + def Clear(self): + self.Rebates = 0 + self.RebateInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + for i in range(self.Rebates): + length += self.RebateInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.Rebates) + for i in range(self.Rebates): + data = CommFunc.WriteString(data, self.RebateInfo[i].GetLength(), self.RebateInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rebates:%d, + RebateInfo:%s + '''\ + %( + self.Rebates, + "..." + ) + return DumpString + + +class tagMCActRechargeRebateGoldInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + RebateDays = 0 #(BYTE RebateDays) + RebateDayInfo = list() #(vector<tagMCActRechargeRebateDay> RebateDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x29 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RebateDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RebateDays): + temRebateDayInfo = tagMCActRechargeRebateDay() + _pos = temRebateDayInfo.ReadData(_lpData, _pos) + self.RebateDayInfo.append(temRebateDayInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x29 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.IsDayReset = 0 + self.RebateDays = 0 + self.RebateDayInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.RebateDays): + length += self.RebateDayInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.RebateDays) + for i in range(self.RebateDays): + data = CommFunc.WriteString(data, self.RebateDayInfo[i].GetLength(), self.RebateDayInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + IsDayReset:%d, + RebateDays:%d, + RebateDayInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.IsDayReset, + self.RebateDays, + "..." + ) + return DumpString + + +m_NAtagMCActRechargeRebateGoldInfo=tagMCActRechargeRebateGoldInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargeRebateGoldInfo.Head.Cmd,m_NAtagMCActRechargeRebateGoldInfo.Head.SubCmd))] = m_NAtagMCActRechargeRebateGoldInfo + + +#------------------------------------------------------ +# AA 50 单笔累充活动信息 #tagMCActSingleRechargeInfo + +class tagMCActSingleRechargeAwardItem(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(tagMCActSingleRechargeAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 50 单笔累充活动信息 //tagMCActSingleRechargeInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActSingleRechargeAward(Structure): + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + SingleRechargeValue = 0 #(DWORD SingleRechargeValue)// 单笔所需充值额度 + AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数 + AwardItem = list() #(vector<tagMCActSingleRechargeAwardItem> AwardItem)// 奖励物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SingleRechargeValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItem = tagMCActSingleRechargeAwardItem() + _pos = temAwardItem.ReadData(_lpData, _pos) + self.AwardItem.append(temAwardItem) + return _pos + + def Clear(self): + self.AwardIndex = 0 + self.SingleRechargeValue = 0 + self.AwardItemCount = 0 + self.AwardItem = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 4 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItem[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteDWORD(data, self.SingleRechargeValue) + data = CommFunc.WriteBYTE(data, self.AwardItemCount) + for i in range(self.AwardItemCount): + data = CommFunc.WriteString(data, self.AwardItem[i].GetLength(), self.AwardItem[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + AwardIndex:%d, + SingleRechargeValue:%d, + AwardItemCount:%d, + AwardItem:%s + '''\ + %( + self.AwardIndex, + self.SingleRechargeValue, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCActSingleRechargeInfo(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)// 限制等级 + AwardCount = 0 #(BYTE AwardCount)// 奖励档数 + AwardInfo = list() #(vector<tagMCActSingleRechargeAward> AwardInfo)// 奖励档信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x50 + 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.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + temAwardInfo = tagMCActSingleRechargeAward() + _pos = temAwardInfo.ReadData(_lpData, _pos) + self.AwardInfo.append(temAwardInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x50 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.AwardCount = 0 + self.AwardInfo = 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.AwardCount): + length += self.AwardInfo[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.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteString(data, self.AwardInfo[i].GetLength(), self.AwardInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + AwardCount:%d, + AwardInfo:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCActSingleRechargeInfo=tagMCActSingleRechargeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargeInfo.Head.Cmd,m_NAtagMCActSingleRechargeInfo.Head.SubCmd))] = m_NAtagMCActSingleRechargeInfo + + +#------------------------------------------------------ +# AA 51 单笔累充活动玩家信息 #tagMCActSingleRechargePlayerInfo + +class tagMCActSingleRechargePlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 + ("HightestSingleRecharge", c_int), # 最高单笔充值额度 + ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x51 + 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 = 0x51 + self.ActNum = 0 + self.HightestSingleRecharge = 0 + self.AwardRecord = 0 + return + + def GetLength(self): + return sizeof(tagMCActSingleRechargePlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 51 单笔累充活动玩家信息 //tagMCActSingleRechargePlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + HightestSingleRecharge:%d, + AwardRecord:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.HightestSingleRecharge, + self.AwardRecord + ) + return DumpString + + +m_NAtagMCActSingleRechargePlayerInfo=tagMCActSingleRechargePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Cmd,m_NAtagMCActSingleRechargePlayerInfo.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo + + +#------------------------------------------------------ # AA 1D 累计充值活动信息 #tagMCActTotalRechargeInfo class tagMCTotalRechargeAwardItem(Structure): @@ -24025,6 +26394,7 @@ class tagMCActTotalRechargeInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 @@ -24042,6 +26412,7 @@ 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) @@ -24058,6 +26429,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x1D + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.IsDayReset = 0 @@ -24069,6 +26441,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 1 @@ -24082,6 +26455,7 @@ 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) @@ -24094,6 +26468,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, IsDayReset:%d, @@ -24103,6 +26478,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.IsDayReset, @@ -24687,13 +27063,434 @@ #------------------------------------------------------ +# AA 32 跨服充值排行活动信息 #tagMCCACTGBillboardInfo + +class tagMCCACTGBillboardAwardItem(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(tagMCCACTGBillboardAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 32 跨服充值排行活动信息 //tagMCCACTGBillboardInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCCACTGBillboardDabiao(Structure): + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + NeedRMB = 0 #(DWORD NeedRMB)// 所需充值RMB + AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数 + AwardItemList = list() #(vector<tagMCCACTGBillboardAwardItem> AwardItemList)// 奖励物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedRMB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCCACTGBillboardAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.AwardIndex = 0 + self.NeedRMB = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 4 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteDWORD(data, self.NeedRMB) + 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 = ''' + AwardIndex:%d, + NeedRMB:%d, + AwardItemCount:%d, + AwardItemList:%s + '''\ + %( + self.AwardIndex, + self.NeedRMB, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCCACTGBillboardOrder(Structure): + OrderA = 0 #(BYTE OrderA)// 名次A + OrderB = 0 #(BYTE OrderB)// 至名次B + NeedRMB = 0 #(DWORD NeedRMB)// 所需充值RMB,未达标的该名次空,排名后面的玩家向下顺延 + AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数 + AwardItemList = list() #(vector<tagMCCACTGBillboardAwardItem> AwardItemList)// 奖励物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.OrderA,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderB,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedRMB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCCACTGBillboardAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.OrderA = 0 + self.OrderB = 0 + self.NeedRMB = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + length += 4 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.OrderA) + data = CommFunc.WriteBYTE(data, self.OrderB) + data = CommFunc.WriteDWORD(data, self.NeedRMB) + 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 = ''' + OrderA:%d, + OrderB:%d, + NeedRMB:%d, + AwardItemCount:%d, + AwardItemList:%s + '''\ + %( + self.OrderA, + self.OrderB, + self.NeedRMB, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCCACTGBillboardTempInfo(Structure): + TemplateID = 0 #(BYTE TemplateID)// 活动模板ID + DabiaoAwardCount = 0 #(BYTE DabiaoAwardCount)// 达标奖励档数 + DabiaoAwardInfo = list() #(vector<tagMCCACTGBillboardDabiao> DabiaoAwardInfo)// 达标奖励信息 + OrderAwardCount = 0 #(BYTE OrderAwardCount)// 排行奖励档数 + OrderAwardInfo = list() #(vector<tagMCCACTGBillboardOrder> OrderAwardInfo)// 排行奖励信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.TemplateID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.DabiaoAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DabiaoAwardCount): + temDabiaoAwardInfo = tagMCCACTGBillboardDabiao() + _pos = temDabiaoAwardInfo.ReadData(_lpData, _pos) + self.DabiaoAwardInfo.append(temDabiaoAwardInfo) + self.OrderAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.OrderAwardCount): + temOrderAwardInfo = tagMCCACTGBillboardOrder() + _pos = temOrderAwardInfo.ReadData(_lpData, _pos) + self.OrderAwardInfo.append(temOrderAwardInfo) + return _pos + + def Clear(self): + self.TemplateID = 0 + self.DabiaoAwardCount = 0 + self.DabiaoAwardInfo = list() + self.OrderAwardCount = 0 + self.OrderAwardInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.DabiaoAwardCount): + length += self.DabiaoAwardInfo[i].GetLength() + length += 1 + for i in range(self.OrderAwardCount): + length += self.OrderAwardInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.TemplateID) + data = CommFunc.WriteBYTE(data, self.DabiaoAwardCount) + for i in range(self.DabiaoAwardCount): + data = CommFunc.WriteString(data, self.DabiaoAwardInfo[i].GetLength(), self.DabiaoAwardInfo[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.OrderAwardCount) + for i in range(self.OrderAwardCount): + data = CommFunc.WriteString(data, self.OrderAwardInfo[i].GetLength(), self.OrderAwardInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + TemplateID:%d, + DabiaoAwardCount:%d, + DabiaoAwardInfo:%s, + OrderAwardCount:%d, + OrderAwardInfo:%s + '''\ + %( + self.TemplateID, + self.DabiaoAwardCount, + "...", + self.OrderAwardCount, + "..." + ) + return DumpString + + +class tagMCCACTGBillboardInfo(Structure): + Head = tagHead() + ServerInfoLen = 0 #(BYTE ServerInfoLen) + ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服 + GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + TemplateID = 0 #(BYTE TemplateID)// 当前活动模板ID + TemplateCount = 0 #(BYTE TemplateCount) + TempInfo = list() #(vector<tagMCCACTGBillboardTempInfo> TempInfo)// 模板信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x32 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen) + self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.TemplateID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TemplateCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TemplateCount): + temTempInfo = tagMCCACTGBillboardTempInfo() + _pos = temTempInfo.ReadData(_lpData, _pos) + self.TempInfo.append(temTempInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x32 + self.ServerInfoLen = 0 + self.ServerIDRangeInfo = "" + self.GroupValue1 = 0 + self.StartDate = "" + self.EndtDate = "" + self.TemplateID = 0 + self.TemplateCount = 0 + self.TempInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.ServerIDRangeInfo) + length += 1 + length += 10 + length += 10 + length += 1 + length += 1 + for i in range(self.TemplateCount): + length += self.TempInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ServerInfoLen) + data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo) + data = CommFunc.WriteBYTE(data, self.GroupValue1) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.TemplateID) + data = CommFunc.WriteBYTE(data, self.TemplateCount) + for i in range(self.TemplateCount): + data = CommFunc.WriteString(data, self.TempInfo[i].GetLength(), self.TempInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ServerInfoLen:%d, + ServerIDRangeInfo:%s, + GroupValue1:%d, + StartDate:%s, + EndtDate:%s, + TemplateID:%d, + TemplateCount:%d, + TempInfo:%s + '''\ + %( + self.Head.OutputString(), + self.ServerInfoLen, + self.ServerIDRangeInfo, + self.GroupValue1, + self.StartDate, + self.EndtDate, + self.TemplateID, + self.TemplateCount, + "..." + ) + return DumpString + + +m_NAtagMCCACTGBillboardInfo=tagMCCACTGBillboardInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCACTGBillboardInfo.Head.Cmd,m_NAtagMCCACTGBillboardInfo.Head.SubCmd))] = m_NAtagMCCACTGBillboardInfo + + +#------------------------------------------------------ +# AA 33 跨服充值排行活动玩家信息 #tagMCCACTGBillboardPlayerInfo + +class tagMCCACTGBillboardPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("CTGRMBTotal", c_int), # 活动已累计充值RMB + ("DabiaoAwardRecord", c_int), # 达标奖励记录,与达标奖励索引位或运算判断是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x33 + 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 = 0x33 + self.CTGRMBTotal = 0 + self.DabiaoAwardRecord = 0 + return + + def GetLength(self): + return sizeof(tagMCCACTGBillboardPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 33 跨服充值排行活动玩家信息 //tagMCCACTGBillboardPlayerInfo: + Cmd:%s, + SubCmd:%s, + CTGRMBTotal:%d, + DabiaoAwardRecord:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.CTGRMBTotal, + self.DabiaoAwardRecord + ) + return DumpString + + +m_NAtagMCCACTGBillboardPlayerInfo=tagMCCACTGBillboardPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCACTGBillboardPlayerInfo.Cmd,m_NAtagMCCACTGBillboardPlayerInfo.SubCmd))] = m_NAtagMCCACTGBillboardPlayerInfo + + +#------------------------------------------------------ # AA 09 消费返利活动信息 #tagMCCostRebateInfo class tagMCCostRebateAwardItem(Structure): _pack_ = 1 _fields_ = [ ("ItemID", c_int), - ("ItemCount", c_ushort), + ("ItemCount", c_int), ("IsBind", c_ubyte), ] @@ -24848,6 +27645,7 @@ class tagMCCostRebateInfo(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)//是否每天重置 @@ -24865,6 +27663,7 @@ 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) @@ -24881,6 +27680,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x09 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.IsDayReset = 0 @@ -24892,6 +27692,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 1 @@ -24905,6 +27706,7 @@ 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) @@ -24917,6 +27719,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, IsDayReset:%d, @@ -24926,6 +27729,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.IsDayReset, @@ -24948,6 +27752,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 ("CostGoldTotal", c_int), #本次活动已累计消费仙玉数 ("AwardRecord", c_int), #返利奖励领奖记录,按奖励索引二进制位存储是否已领取 ] @@ -24966,6 +27771,7 @@ def Clear(self): self.Cmd = 0xAA self.SubCmd = 0x10 + self.ActNum = 0 self.CostGoldTotal = 0 self.AwardRecord = 0 return @@ -24980,12 +27786,14 @@ DumpString = '''// AA 10 消费返利玩家活动信息 //tagMCCostRebatePlayerInfo: Cmd:%s, SubCmd:%s, + ActNum:%d, CostGoldTotal:%d, AwardRecord:%d '''\ %( self.Cmd, self.SubCmd, + self.ActNum, self.CostGoldTotal, self.AwardRecord ) @@ -24994,6 +27802,314 @@ m_NAtagMCCostRebatePlayerInfo=tagMCCostRebatePlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostRebatePlayerInfo.Cmd,m_NAtagMCCostRebatePlayerInfo.SubCmd))] = m_NAtagMCCostRebatePlayerInfo + + +#------------------------------------------------------ +# AA 25 每日礼包活动信息 #tagMCDailyGiftbagInfo + +class tagMCDailyGiftbagItem(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(tagMCDailyGiftbagItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 25 每日礼包活动信息 //tagMCDailyGiftbagInfo: + ItemID:%d, + ItemCount:%d + '''\ + %( + self.ItemID, + self.ItemCount + ) + return DumpString + + +class tagMCDailyGiftbag(Structure): + GiftID = 0 #(DWORD GiftID)//礼包ID,0为免费 + OrderInfoLen = 0 #(BYTE OrderInfoLen) + OrderInfo = "" #(String OrderInfo)//商品编号 + BuyCountLimit = 0 #(BYTE BuyCountLimit)//限购数 + RMB = 0 #(DWORD RMB)//所需RMB,元 + GiftItemCount = 0 #(BYTE GiftItemCount)// 礼包物品数 + ItemInfo = list() #(vector<tagMCDailyGiftbagItem> 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.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen) + self.BuyCountLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RMB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.GiftItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GiftItemCount): + temItemInfo = tagMCDailyGiftbagItem() + _pos = temItemInfo.ReadData(_lpData, _pos) + self.ItemInfo.append(temItemInfo) + return _pos + + def Clear(self): + self.GiftID = 0 + self.OrderInfoLen = 0 + self.OrderInfo = "" + self.BuyCountLimit = 0 + self.RMB = 0 + self.GiftItemCount = 0 + self.ItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += len(self.OrderInfo) + length += 1 + 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.OrderInfoLen) + data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo) + data = CommFunc.WriteBYTE(data, self.BuyCountLimit) + data = CommFunc.WriteDWORD(data, self.RMB) + 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, + OrderInfoLen:%d, + OrderInfo:%s, + BuyCountLimit:%d, + RMB:%d, + GiftItemCount:%d, + ItemInfo:%s + '''\ + %( + self.GiftID, + self.OrderInfoLen, + self.OrderInfo, + self.BuyCountLimit, + self.RMB, + self.GiftItemCount, + "..." + ) + return DumpString + + +class tagMCDailyGiftbagInfo(Structure): + Head = tagHead() + LimitLV = 0 #(WORD LimitLV)// 限制等级 + GiftbagCount = 0 #(BYTE GiftbagCount)// 礼包数 + GiftbagInfo = list() #(vector<tagMCDailyGiftbag> GiftbagInfo)// 礼包信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x25 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GiftbagCount): + temGiftbagInfo = tagMCDailyGiftbag() + _pos = temGiftbagInfo.ReadData(_lpData, _pos) + self.GiftbagInfo.append(temGiftbagInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x25 + self.LimitLV = 0 + self.GiftbagCount = 0 + self.GiftbagInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + for i in range(self.GiftbagCount): + length += self.GiftbagInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.GiftbagCount) + for i in range(self.GiftbagCount): + data = CommFunc.WriteString(data, self.GiftbagInfo[i].GetLength(), self.GiftbagInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + LimitLV:%d, + GiftbagCount:%d, + GiftbagInfo:%s + '''\ + %( + self.Head.OutputString(), + self.LimitLV, + self.GiftbagCount, + "..." + ) + return DumpString + + +m_NAtagMCDailyGiftbagInfo=tagMCDailyGiftbagInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyGiftbagInfo.Head.Cmd,m_NAtagMCDailyGiftbagInfo.Head.SubCmd))] = m_NAtagMCDailyGiftbagInfo + + +#------------------------------------------------------ +# AA 26 每日礼包玩家活动信息 #tagMCDailyGiftbagPlayerInfo + +class tagMCDailyGiftbagBuyCount(Structure): + _pack_ = 1 + _fields_ = [ + ("GiftbagID", c_int), #礼包ID + ("BuyCount", 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.GiftbagID = 0 + self.BuyCount = 0 + return + + def GetLength(self): + return sizeof(tagMCDailyGiftbagBuyCount) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 26 每日礼包玩家活动信息 //tagMCDailyGiftbagPlayerInfo: + GiftbagID:%d, + BuyCount:%d + '''\ + %( + self.GiftbagID, + self.BuyCount + ) + return DumpString + + +class tagMCDailyGiftbagPlayerInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + BuyCountList = list() #(vector<tagMCDailyGiftbagBuyCount> BuyCountList)//礼包购买次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x26 + 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): + temBuyCountList = tagMCDailyGiftbagBuyCount() + _pos = temBuyCountList.ReadData(_lpData, _pos) + self.BuyCountList.append(temBuyCountList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x26 + self.Count = 0 + self.BuyCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.BuyCountList[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.BuyCountList[i].GetLength(), self.BuyCountList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + BuyCountList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCDailyGiftbagPlayerInfo=tagMCDailyGiftbagPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyGiftbagPlayerInfo.Head.Cmd,m_NAtagMCDailyGiftbagPlayerInfo.Head.SubCmd))] = m_NAtagMCDailyGiftbagPlayerInfo #------------------------------------------------------ @@ -25046,6 +28162,706 @@ m_NAtagMCDayFreeGoldGiftState=tagMCDayFreeGoldGiftState() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDayFreeGoldGiftState.Cmd,m_NAtagMCDayFreeGoldGiftState.SubCmd))] = m_NAtagMCDayFreeGoldGiftState + + +#------------------------------------------------------ +# AA 42 节日登录奖励活动信息 #tagMCFeastLoginInfo + +class tagMCFeastLoginDayAwardItem(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(tagMCFeastLoginDayAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 42 节日登录奖励活动信息 //tagMCFeastLoginInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCFeastLoginDayAward(Structure): + DayNum = 0 #(BYTE DayNum)//天编号,从1开始,活动第X天只能领对应第X天的奖励 + AwardCount = 0 #(BYTE AwardCount) + AwardItemList = list() #(vector<tagMCFeastLoginDayAwardItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.DayNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + temAwardItemList = tagMCFeastLoginDayAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.DayNum = 0 + self.AwardCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.AwardCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.DayNum) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + DayNum:%d, + AwardCount:%d, + AwardItemList:%s + '''\ + %( + self.DayNum, + self.AwardCount, + "..." + ) + return DumpString + + +class tagMCFeastLoginInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + DayCount = 0 #(BYTE DayCount)// 总共几天 + DayAwardList = list() #(vector<tagMCFeastLoginDayAward> DayAwardList)//登录天奖励列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x42 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DayCount): + temDayAwardList = tagMCFeastLoginDayAward() + _pos = temDayAwardList.ReadData(_lpData, _pos) + self.DayAwardList.append(temDayAwardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x42 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.DayCount = 0 + self.DayAwardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + for i in range(self.DayCount): + length += self.DayAwardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.DayCount) + for i in range(self.DayCount): + data = CommFunc.WriteString(data, self.DayAwardList[i].GetLength(), self.DayAwardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + DayCount:%d, + DayAwardList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.DayCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastLoginInfo=tagMCFeastLoginInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastLoginInfo.Head.Cmd,m_NAtagMCFeastLoginInfo.Head.SubCmd))] = m_NAtagMCFeastLoginInfo + + +#------------------------------------------------------ +# AA 39 节日登录奖励活动玩家信息 #tagMCFeastLoginPlayerInfo + +class tagMCFeastLoginPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("LoginState", c_int), # 是否已登录,按天索引0代表第1天记录当天是否已登录 + ("LoginAward", c_int), # 是否已领取,按天索引0代表第1天记录当天是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x39 + 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 = 0x39 + self.LoginState = 0 + self.LoginAward = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastLoginPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 39 节日登录奖励活动玩家信息 //tagMCFeastLoginPlayerInfo: + Cmd:%s, + SubCmd:%s, + LoginState:%d, + LoginAward:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.LoginState, + self.LoginAward + ) + return DumpString + + +m_NAtagMCFeastLoginPlayerInfo=tagMCFeastLoginPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastLoginPlayerInfo.Cmd,m_NAtagMCFeastLoginPlayerInfo.SubCmd))] = m_NAtagMCFeastLoginPlayerInfo + + +#------------------------------------------------------ +# AA 46 节日游历活动信息 #tagMCFeastTravelInfo + +class tagMCFeastTravelAwardItem(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(tagMCFeastTravelAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 46 节日游历活动信息 //tagMCFeastTravelInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCFeastTravelAward(Structure): + AwardIndex = 0 #(BYTE AwardIndex)//游历奖励索引 + NeedTravelPoint = 0 #(WORD NeedTravelPoint)//单次领奖所需游历值 + AwardCountMax = 0 #(WORD AwardCountMax)//最大可领取次数,0代表不限 + AwardItemCount = 0 #(BYTE AwardItemCount)//奖励物品数 + AwardItemList = list() #(vector<tagMCFeastTravelAwardItem> AwardItemList)//奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedTravelPoint,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardCountMax,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCFeastTravelAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.AwardIndex = 0 + self.NeedTravelPoint = 0 + self.AwardCountMax = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 + length += 2 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteWORD(data, self.NeedTravelPoint) + data = CommFunc.WriteWORD(data, self.AwardCountMax) + 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 = ''' + AwardIndex:%d, + NeedTravelPoint:%d, + AwardCountMax:%d, + AwardItemCount:%d, + AwardItemList:%s + '''\ + %( + self.AwardIndex, + self.NeedTravelPoint, + self.AwardCountMax, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCFeastTravelTask(Structure): + _pack_ = 1 + _fields_ = [ + ("TravelTaskID", c_ubyte), #游历任务ID + ("FinishNeedValue", c_ushort), #单次完成所需进度 + ("FinishTimeMax", c_ushort), #最大可完成次数,0代表不限 + ("AddTravelPoint", 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.TravelTaskID = 0 + self.FinishNeedValue = 0 + self.FinishTimeMax = 0 + self.AddTravelPoint = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastTravelTask) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 46 节日游历活动信息 //tagMCFeastTravelInfo: + TravelTaskID:%d, + FinishNeedValue:%d, + FinishTimeMax:%d, + AddTravelPoint:%d + '''\ + %( + self.TravelTaskID, + self.FinishNeedValue, + self.FinishTimeMax, + self.AddTravelPoint + ) + return DumpString + + +class tagMCFeastTravelInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 + TravelTaskCount = 0 #(BYTE TravelTaskCount)// 游历任务数 + TravelTaskList = list() #(vector<tagMCFeastTravelTask> TravelTaskList)//游历任务信息列表 + TravelAwardCount = 0 #(BYTE TravelAwardCount)// 游历奖励数 + TravelAwardList = list() #(vector<tagMCFeastTravelAward> TravelAwardList)//游历奖励信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x46 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TravelTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TravelTaskCount): + temTravelTaskList = tagMCFeastTravelTask() + _pos = temTravelTaskList.ReadData(_lpData, _pos) + self.TravelTaskList.append(temTravelTaskList) + self.TravelAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TravelAwardCount): + temTravelAwardList = tagMCFeastTravelAward() + _pos = temTravelAwardList.ReadData(_lpData, _pos) + self.TravelAwardList.append(temTravelAwardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x46 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + self.TravelTaskCount = 0 + self.TravelTaskList = list() + self.TravelAwardCount = 0 + self.TravelAwardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.TravelTaskCount): + length += self.TravelTaskList[i].GetLength() + length += 1 + for i in range(self.TravelAwardCount): + length += self.TravelAwardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteBYTE(data, self.TravelTaskCount) + for i in range(self.TravelTaskCount): + data = CommFunc.WriteString(data, self.TravelTaskList[i].GetLength(), self.TravelTaskList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TravelAwardCount) + for i in range(self.TravelAwardCount): + data = CommFunc.WriteString(data, self.TravelAwardList[i].GetLength(), self.TravelAwardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d, + TravelTaskCount:%d, + TravelTaskList:%s, + TravelAwardCount:%d, + TravelAwardList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType, + self.TravelTaskCount, + "...", + self.TravelAwardCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastTravelInfo=tagMCFeastTravelInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastTravelInfo.Head.Cmd,m_NAtagMCFeastTravelInfo.Head.SubCmd))] = m_NAtagMCFeastTravelInfo + + +#------------------------------------------------------ +# AA 47 节日游历活动玩家信息 #tagMCFeastTravelPlayerInfo + +class tagMCFeastTravelPlayerAward(Structure): + _pack_ = 1 + _fields_ = [ + ("AwardIndex", c_ubyte), #游历奖励索引 + ("GetAwardCount", c_ubyte), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 + ] + + 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.AwardIndex = 0 + self.GetAwardCount = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastTravelPlayerAward) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 47 节日游历活动玩家信息 //tagMCFeastTravelPlayerInfo: + AwardIndex:%d, + GetAwardCount:%d + '''\ + %( + self.AwardIndex, + self.GetAwardCount + ) + return DumpString + + +class tagMCFeastTravelPlayerTask(Structure): + _pack_ = 1 + _fields_ = [ + ("TravelTaskID", c_ubyte), #游历任务ID + ("TravelValue", c_int), #当前进度值,一直累加 + ("FinishCount", c_ubyte), #当前已完成次数; 前端计算未完成次数的进度值=max(0, 当前进度值 - (完成次数 * 单次所需进度)) + ] + + 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.TravelTaskID = 0 + self.TravelValue = 0 + self.FinishCount = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastTravelPlayerTask) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 47 节日游历活动玩家信息 //tagMCFeastTravelPlayerInfo: + TravelTaskID:%d, + TravelValue:%d, + FinishCount:%d + '''\ + %( + self.TravelTaskID, + self.TravelValue, + self.FinishCount + ) + return DumpString + + +class tagMCFeastTravelPlayerInfo(Structure): + Head = tagHead() + TravelPoint = 0 #(DWORD TravelPoint)//当前总游历值,一直累加,不会扣的 + TravelPlayerTaskCount = 0 #(BYTE TravelPlayerTaskCount)// 游历任务数,不一定有同步,有同步数据则替换即可 + TravelPlayerTaskList = list() #(vector<tagMCFeastTravelPlayerTask> TravelPlayerTaskList)//游历任务信息列表 + TravelPlayerAwardCount = 0 #(BYTE TravelPlayerAwardCount)// 游历奖励数,不一定有同步,有同步数据则替换即可 + TravelPlayerAwardList = list() #(vector<tagMCFeastTravelPlayerAward> TravelPlayerAwardList)//游历奖励信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x47 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.TravelPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TravelPlayerTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TravelPlayerTaskCount): + temTravelPlayerTaskList = tagMCFeastTravelPlayerTask() + _pos = temTravelPlayerTaskList.ReadData(_lpData, _pos) + self.TravelPlayerTaskList.append(temTravelPlayerTaskList) + self.TravelPlayerAwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TravelPlayerAwardCount): + temTravelPlayerAwardList = tagMCFeastTravelPlayerAward() + _pos = temTravelPlayerAwardList.ReadData(_lpData, _pos) + self.TravelPlayerAwardList.append(temTravelPlayerAwardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x47 + self.TravelPoint = 0 + self.TravelPlayerTaskCount = 0 + self.TravelPlayerTaskList = list() + self.TravelPlayerAwardCount = 0 + self.TravelPlayerAwardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + for i in range(self.TravelPlayerTaskCount): + length += self.TravelPlayerTaskList[i].GetLength() + length += 1 + for i in range(self.TravelPlayerAwardCount): + length += self.TravelPlayerAwardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.TravelPoint) + data = CommFunc.WriteBYTE(data, self.TravelPlayerTaskCount) + for i in range(self.TravelPlayerTaskCount): + data = CommFunc.WriteString(data, self.TravelPlayerTaskList[i].GetLength(), self.TravelPlayerTaskList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TravelPlayerAwardCount) + for i in range(self.TravelPlayerAwardCount): + data = CommFunc.WriteString(data, self.TravelPlayerAwardList[i].GetLength(), self.TravelPlayerAwardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + TravelPoint:%d, + TravelPlayerTaskCount:%d, + TravelPlayerTaskList:%s, + TravelPlayerAwardCount:%d, + TravelPlayerAwardList:%s + '''\ + %( + self.Head.OutputString(), + self.TravelPoint, + self.TravelPlayerTaskCount, + "...", + self.TravelPlayerAwardCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastTravelPlayerInfo=tagMCFeastTravelPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastTravelPlayerInfo.Head.Cmd,m_NAtagMCFeastTravelPlayerInfo.Head.SubCmd))] = m_NAtagMCFeastTravelPlayerInfo #------------------------------------------------------ @@ -25561,6 +29377,421 @@ #------------------------------------------------------ +# AA 43 节日祝福活动信息 #tagMCFeastWishInfo + +class tagMCFeastWishBottleItem(Structure): + _pack_ = 1 + _fields_ = [ + ("RecordIndex", c_ubyte), #物品索引,用于选择及记录是否已选择 + ("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.RecordIndex = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastWishBottleItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 43 节日祝福活动信息 //tagMCFeastWishInfo: + RecordIndex:%d, + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.RecordIndex, + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCFeastWishBottleInfo(Structure): + BottleNum = 0 #(BYTE BottleNum)//瓶子编号 + NeedWishValue = 0 #(WORD NeedWishValue)//单次领奖所需祝福值 + ChooseTimeMax = 0 #(BYTE ChooseTimeMax)//最大可领奖次数 + ChoosePrizeCount = 0 #(BYTE ChoosePrizeCount)//可选择奖励个数 + ChoosePrizeList = list() #(vector<tagMCFeastWishBottleItem> ChoosePrizeList)// 选择奖励物品列表,已选过的无法再选 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.BottleNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedWishValue,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ChooseTimeMax,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ChoosePrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ChoosePrizeCount): + temChoosePrizeList = tagMCFeastWishBottleItem() + _pos = temChoosePrizeList.ReadData(_lpData, _pos) + self.ChoosePrizeList.append(temChoosePrizeList) + return _pos + + def Clear(self): + self.BottleNum = 0 + self.NeedWishValue = 0 + self.ChooseTimeMax = 0 + self.ChoosePrizeCount = 0 + self.ChoosePrizeList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 + length += 1 + length += 1 + for i in range(self.ChoosePrizeCount): + length += self.ChoosePrizeList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.BottleNum) + data = CommFunc.WriteWORD(data, self.NeedWishValue) + data = CommFunc.WriteBYTE(data, self.ChooseTimeMax) + data = CommFunc.WriteBYTE(data, self.ChoosePrizeCount) + for i in range(self.ChoosePrizeCount): + data = CommFunc.WriteString(data, self.ChoosePrizeList[i].GetLength(), self.ChoosePrizeList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + BottleNum:%d, + NeedWishValue:%d, + ChooseTimeMax:%d, + ChoosePrizeCount:%d, + ChoosePrizeList:%s + '''\ + %( + self.BottleNum, + self.NeedWishValue, + self.ChooseTimeMax, + self.ChoosePrizeCount, + "..." + ) + return DumpString + + +class tagMCFeastWishInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 + WishPoolShowCount = 0 #(BYTE WishPoolShowCount)//祝福池展示物品数 + WishPoolShowItemList = list() #(vector<DWORD> WishPoolShowItemList)//祝福池展示物品ID列表 + BottleCount = 0 #(BYTE BottleCount)// 祝福瓶个数 + BottleInfoList = list() #(vector<tagMCFeastWishBottleInfo> BottleInfoList)// 祝福瓶信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x43 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.WishPoolShowCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.WishPoolShowCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.WishPoolShowItemList.append(value) + self.BottleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BottleCount): + temBottleInfoList = tagMCFeastWishBottleInfo() + _pos = temBottleInfoList.ReadData(_lpData, _pos) + self.BottleInfoList.append(temBottleInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x43 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + self.WishPoolShowCount = 0 + self.WishPoolShowItemList = list() + self.BottleCount = 0 + self.BottleInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 4 * self.WishPoolShowCount + length += 1 + for i in range(self.BottleCount): + length += self.BottleInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteBYTE(data, self.WishPoolShowCount) + for i in range(self.WishPoolShowCount): + data = CommFunc.WriteDWORD(data, self.WishPoolShowItemList[i]) + data = CommFunc.WriteBYTE(data, self.BottleCount) + for i in range(self.BottleCount): + data = CommFunc.WriteString(data, self.BottleInfoList[i].GetLength(), self.BottleInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d, + WishPoolShowCount:%d, + WishPoolShowItemList:%s, + BottleCount:%d, + BottleInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType, + self.WishPoolShowCount, + "...", + self.BottleCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastWishInfo=tagMCFeastWishInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishInfo.Head.Cmd,m_NAtagMCFeastWishInfo.Head.SubCmd))] = m_NAtagMCFeastWishInfo + + +#------------------------------------------------------ +# AA 44 节日祝福活动玩家信息 #tagMCFeastWishPlayerInfo + +class tagMCFeastWishPlayerBottle(Structure): + _pack_ = 1 + _fields_ = [ + ("BottleNum", c_ubyte), #瓶子编号 + ("WishValue", c_ushort), #当前可用祝福值 + ("ChooseRecord", 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.BottleNum = 0 + self.WishValue = 0 + self.ChooseRecord = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastWishPlayerBottle) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 44 节日祝福活动玩家信息 //tagMCFeastWishPlayerInfo: + BottleNum:%d, + WishValue:%d, + ChooseRecord:%d + '''\ + %( + self.BottleNum, + self.WishValue, + self.ChooseRecord + ) + return DumpString + + +class tagMCFeastWishPlayerInfo(Structure): + Head = tagHead() + BottleCount = 0 #(BYTE BottleCount)// 祝福瓶个数 + PlayerBottleInfo = list() #(vector<tagMCFeastWishPlayerBottle> PlayerBottleInfo)// 祝福瓶信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x44 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.BottleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BottleCount): + temPlayerBottleInfo = tagMCFeastWishPlayerBottle() + _pos = temPlayerBottleInfo.ReadData(_lpData, _pos) + self.PlayerBottleInfo.append(temPlayerBottleInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x44 + self.BottleCount = 0 + self.PlayerBottleInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.BottleCount): + length += self.PlayerBottleInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.BottleCount) + for i in range(self.BottleCount): + data = CommFunc.WriteString(data, self.PlayerBottleInfo[i].GetLength(), self.PlayerBottleInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + BottleCount:%d, + PlayerBottleInfo:%s + '''\ + %( + self.Head.OutputString(), + self.BottleCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastWishPlayerInfo=tagMCFeastWishPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishPlayerInfo.Head.Cmd,m_NAtagMCFeastWishPlayerInfo.Head.SubCmd))] = m_NAtagMCFeastWishPlayerInfo + + +#------------------------------------------------------ +# AA 45 节日祝福祝福结果 #tagMCFeastWishResult + +class tagMCFeastWishResult(Structure): + Head = tagHead() + AddWishValue = 0 #(WORD AddWishValue)// 本次增加的祝福值 + WishResultLen = 0 #(WORD WishResultLen) + WishResult = "" #(String WishResult)// 获得物品结果[[物品ID,个数,是否绑定], ...] + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x45 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AddWishValue,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.WishResultLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.WishResult,_pos = CommFunc.ReadString(_lpData, _pos,self.WishResultLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x45 + self.AddWishValue = 0 + self.WishResultLen = 0 + self.WishResult = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 2 + length += len(self.WishResult) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.AddWishValue) + data = CommFunc.WriteWORD(data, self.WishResultLen) + data = CommFunc.WriteString(data, self.WishResultLen, self.WishResult) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AddWishValue:%d, + WishResultLen:%d, + WishResult:%s + '''\ + %( + self.Head.OutputString(), + self.AddWishValue, + self.WishResultLen, + self.WishResult + ) + return DumpString + + +m_NAtagMCFeastWishResult=tagMCFeastWishResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWishResult.Head.Cmd,m_NAtagMCFeastWishResult.Head.SubCmd))] = m_NAtagMCFeastWishResult + + +#------------------------------------------------------ # AA 02 首充信息 #tagMCFirstGoldInfo class tagMCFirstGoldInfo(Structure): @@ -25911,6 +30142,7 @@ class tagMCFlashGiftbagInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 @@ -25931,6 +30163,7 @@ 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.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) @@ -25953,6 +30186,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x12 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.AdvanceMinutes = 0 @@ -25967,6 +30201,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 2 @@ -25984,6 +30219,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteWORD(data, self.AdvanceMinutes) @@ -26000,6 +30236,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, AdvanceMinutes:%d, @@ -26012,6 +30249,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.AdvanceMinutes, @@ -26073,6 +30311,7 @@ class tagMCFlashGiftbagPlayerInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 Count = 0 #(BYTE Count) BuyCountList = list() #(vector<tagMCFlashGiftbagBuyCount> BuyCountList)//礼包购买次数信息 data = None @@ -26086,6 +30325,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.Count): temBuyCountList = tagMCFlashGiftbagBuyCount() @@ -26098,6 +30338,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x13 + self.ActNum = 0 self.Count = 0 self.BuyCountList = list() return @@ -26105,6 +30346,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 1 for i in range(self.Count): length += self.BuyCountList[i].GetLength() @@ -26114,6 +30356,7 @@ 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.Count) for i in range(self.Count): data = CommFunc.WriteString(data, self.BuyCountList[i].GetLength(), self.BuyCountList[i].GetBuffer()) @@ -26122,11 +30365,13 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, Count:%d, BuyCountList:%s '''\ %( self.Head.OutputString(), + self.ActNum, self.Count, "..." ) @@ -26181,6 +30426,7 @@ class tagMCFlashSaleAppointmentInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 IsAll = 0 #(BYTE IsAll)// 是否全部 GoodsCount = 0 #(WORD GoodsCount)// 商品数 GoodsList = list() #(vector<tagMCFlashSaleAppointmentState> GoodsList)// 预约的商品 @@ -26195,6 +30441,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.GoodsCount,_pos = CommFunc.ReadWORD(_lpData, _pos) for i in range(self.GoodsCount): @@ -26208,6 +30455,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x18 + self.ActNum = 0 self.IsAll = 0 self.GoodsCount = 0 self.GoodsList = list() @@ -26216,6 +30464,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 1 length += 2 for i in range(self.GoodsCount): @@ -26226,6 +30475,7 @@ 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.IsAll) data = CommFunc.WriteWORD(data, self.GoodsCount) for i in range(self.GoodsCount): @@ -26235,12 +30485,14 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, IsAll:%d, GoodsCount:%d, GoodsList:%s '''\ %( self.Head.OutputString(), + self.ActNum, self.IsAll, self.GoodsCount, "..." @@ -26433,6 +30685,7 @@ class tagMCFlashSaleInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 @@ -26453,6 +30706,7 @@ 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.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) @@ -26475,6 +30729,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x17 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.AdvanceMinutes = 0 @@ -26489,6 +30744,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 2 @@ -26506,6 +30762,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteWORD(data, self.AdvanceMinutes) @@ -26522,6 +30779,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, AdvanceMinutes:%d, @@ -26534,6 +30792,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.AdvanceMinutes, @@ -26941,6 +31200,218 @@ #------------------------------------------------------ +# AA 04 创角在线充值特惠信息 #tagMCOnlineRechargeTH + +class tagMCOnlineRechargeTH(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("AwardState", c_ubyte), #是否已领取奖励 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x04 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x04 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCOnlineRechargeTH) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 04 创角在线充值特惠信息 //tagMCOnlineRechargeTH: + Cmd:%s, + SubCmd:%s, + AwardState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.AwardState + ) + return DumpString + + +m_NAtagMCOnlineRechargeTH=tagMCOnlineRechargeTH() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCOnlineRechargeTH.Cmd,m_NAtagMCOnlineRechargeTH.SubCmd))] = m_NAtagMCOnlineRechargeTH + + +#------------------------------------------------------ +# AA 28 充值返利玩家活动信息 #tagMCRechargePrizePlayerInfo + +class tagMCRechargePrizeInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("CTGID", c_ushort), # 对应充值表充值ID + ("PrizeCount", 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.CTGID = 0 + self.PrizeCount = 0 + return + + def GetLength(self): + return sizeof(tagMCRechargePrizeInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 28 充值返利玩家活动信息 //tagMCRechargePrizePlayerInfo: + CTGID:%d, + PrizeCount:%d + '''\ + %( + self.CTGID, + self.PrizeCount + ) + return DumpString + + +class tagMCRechargePrizePlayerInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + PlayerInfoList = list() #(vector<tagMCRechargePrizeInfo> PlayerInfoList)//玩家返利信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x28 + 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): + temPlayerInfoList = tagMCRechargePrizeInfo() + _pos = temPlayerInfoList.ReadData(_lpData, _pos) + self.PlayerInfoList.append(temPlayerInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x28 + self.Count = 0 + self.PlayerInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.PlayerInfoList[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.PlayerInfoList[i].GetLength(), self.PlayerInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + PlayerInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCRechargePrizePlayerInfo=tagMCRechargePrizePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargePrizePlayerInfo.Head.Cmd,m_NAtagMCRechargePrizePlayerInfo.Head.SubCmd))] = m_NAtagMCRechargePrizePlayerInfo + + +#------------------------------------------------------ +# AA 30 累计充值返利仙玉玩家活动信息 #tagMCRechargeRebateGoldPlayerInfo + +class tagMCRechargeRebateGoldPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("RechargeRMBTotal", c_int), # 活动已累计充值RMB + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + 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 = 0xAA + self.SubCmd = 0x30 + self.RechargeRMBTotal = 0 + return + + def GetLength(self): + return sizeof(tagMCRechargeRebateGoldPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 30 累计充值返利仙玉玩家活动信息 //tagMCRechargeRebateGoldPlayerInfo: + Cmd:%s, + SubCmd:%s, + RechargeRMBTotal:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.RechargeRMBTotal + ) + return DumpString + + +m_NAtagMCRechargeRebateGoldPlayerInfo=tagMCRechargeRebateGoldPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRebateGoldPlayerInfo.Cmd,m_NAtagMCRechargeRebateGoldPlayerInfo.SubCmd))] = m_NAtagMCRechargeRebateGoldPlayerInfo + + +#------------------------------------------------------ # AA 11 限时特惠活动信息 #tagMCSpringSaleInfo class tagMCSpringSaleItem(Structure): @@ -27172,6 +31643,7 @@ class tagMCSpringSaleInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 @@ -27192,6 +31664,7 @@ 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.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) @@ -27214,6 +31687,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x11 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.AdvanceMinutes = 0 @@ -27228,6 +31702,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 2 @@ -27245,6 +31720,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteWORD(data, self.AdvanceMinutes) @@ -27261,6 +31737,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, AdvanceMinutes:%d, @@ -27273,6 +31750,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.AdvanceMinutes, @@ -27406,6 +31884,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 ("GoldTotal", c_int), #本次活动已累计充值仙玉数 ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取 ] @@ -27424,6 +31903,7 @@ def Clear(self): self.Cmd = 0xAA self.SubCmd = 0x1C + self.ActNum = 0 self.GoldTotal = 0 self.AwardRecord = 0 return @@ -27438,12 +31918,14 @@ DumpString = '''// AA 1C 累计充值玩家活动信息 //tagMCTotalRechargePlayerInfo: Cmd:%s, SubCmd:%s, + ActNum:%d, GoldTotal:%d, AwardRecord:%d '''\ %( self.Cmd, self.SubCmd, + self.ActNum, self.GoldTotal, self.AwardRecord ) @@ -29674,6 +34156,118 @@ m_NAtagMCClothesCoatSkinState=tagMCClothesCoatSkinState() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCClothesCoatSkinState.Head.Cmd,m_NAtagMCClothesCoatSkinState.Head.SubCmd))] = m_NAtagMCClothesCoatSkinState + + +#------------------------------------------------------ +# B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList + +class tagMCFuncSysPrivilegeInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("FuncSysID", c_ubyte), # 功能系统ID + ("ActivateTime", c_int), # 激活时间戳 + ("AwardState", 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.FuncSysID = 0 + self.ActivateTime = 0 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCFuncSysPrivilegeInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 11 功能系统特权信息 //tagMCFuncSysPrivilegeInfoList: + FuncSysID:%d, + ActivateTime:%d, + AwardState:%d + '''\ + %( + self.FuncSysID, + self.ActivateTime, + self.AwardState + ) + return DumpString + + +class tagMCFuncSysPrivilegeInfoList(Structure): + Head = tagHead() + PrivilegeCount = 0 #(BYTE PrivilegeCount)// 特权个数 + PrivilegeInfoList = list() #(vector<tagMCFuncSysPrivilegeInfo> PrivilegeInfoList)// 特权信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x11 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PrivilegeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PrivilegeCount): + temPrivilegeInfoList = tagMCFuncSysPrivilegeInfo() + _pos = temPrivilegeInfoList.ReadData(_lpData, _pos) + self.PrivilegeInfoList.append(temPrivilegeInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x11 + self.PrivilegeCount = 0 + self.PrivilegeInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.PrivilegeCount): + length += self.PrivilegeInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.PrivilegeCount) + for i in range(self.PrivilegeCount): + data = CommFunc.WriteString(data, self.PrivilegeInfoList[i].GetLength(), self.PrivilegeInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PrivilegeCount:%d, + PrivilegeInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.PrivilegeCount, + "..." + ) + return DumpString + + +m_NAtagMCFuncSysPrivilegeInfoList=tagMCFuncSysPrivilegeInfoList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFuncSysPrivilegeInfoList.Head.Cmd,m_NAtagMCFuncSysPrivilegeInfoList.Head.SubCmd))] = m_NAtagMCFuncSysPrivilegeInfoList #------------------------------------------------------ @@ -32772,6 +37366,7 @@ ("ObjID", c_int), ("AttackType", c_ubyte), #爆击, miss ("HurtHP", c_int), + ("HurtHPEx", c_int), ("CurHP", c_int), ("CurHPEx", c_int), ] @@ -32790,6 +37385,7 @@ self.ObjID = 0 self.AttackType = 0 self.HurtHP = 0 + self.HurtHPEx = 0 self.CurHP = 0 self.CurHPEx = 0 return @@ -32806,6 +37402,7 @@ ObjID:%d, AttackType:%d, HurtHP:%d, + HurtHPEx:%d, CurHP:%d, CurHPEx:%d '''\ @@ -32814,6 +37411,7 @@ self.ObjID, self.AttackType, self.HurtHP, + self.HurtHPEx, self.CurHP, self.CurHPEx ) -- Gitblit v1.8.0