From 42f1ae76751b709e75d90d87959829c6c59de3a3 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期日, 09 十月 2022 18:50:26 +0800 Subject: [PATCH] 9455 【越南】【后端】通天令(主干 冲突) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 5668 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 5,588 insertions(+), 80 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index 4eea8de..0eb8646 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -561,33 +561,41 @@ #A0 04 同步客户端时间 #tagServerDateTime class tagServerDateTime(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("Year", c_ushort), - ("Month", c_ubyte), - ("Day", c_ubyte), - ("Hour", c_ubyte), - ("Minute", c_ubyte), - ("Second", c_ubyte), - ("MicSecond", c_int), - ] + Head = tagHead() + Year = 0 #(WORD Year) + Month = 0 #(BYTE Month) + Day = 0 #(BYTE Day) + Hour = 0 #(BYTE Hour) + Minute = 0 #(BYTE Minute) + Second = 0 #(BYTE Second) + MicSecond = 0 #(DWORD MicSecond) + CrossServerTime = "" #(char CrossServerTime[19]) + data = None def __init__(self): self.Clear() - self.Cmd = 0xA0 - self.SubCmd = 0x04 + self.Head.Cmd = 0xA0 + self.Head.SubCmd = 0x04 return - def ReadData(self, stringData, _pos=0, _len=0): + def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() + _pos = self.Head.ReadData(_lpData, _pos) + self.Year,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Month,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Day,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Hour,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Minute,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Second,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MicSecond,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CrossServerTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + return _pos def Clear(self): - self.Cmd = 0xA0 - self.SubCmd = 0x04 + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA0 + self.Head.SubCmd = 0x04 self.Year = 0 self.Month = 0 self.Day = 0 @@ -595,42 +603,64 @@ self.Minute = 0 self.Second = 0 self.MicSecond = 0 + self.CrossServerTime = "" return def GetLength(self): - return sizeof(tagServerDateTime) + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + length += 1 + length += 1 + length += 1 + length += 1 + length += 4 + length += 19 + + return length def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.Year) + data = CommFunc.WriteBYTE(data, self.Month) + data = CommFunc.WriteBYTE(data, self.Day) + data = CommFunc.WriteBYTE(data, self.Hour) + data = CommFunc.WriteBYTE(data, self.Minute) + data = CommFunc.WriteBYTE(data, self.Second) + data = CommFunc.WriteDWORD(data, self.MicSecond) + data = CommFunc.WriteString(data, 19, self.CrossServerTime) + return data def OutputString(self): - DumpString = '''//A0 04 同步客户端时间 //tagServerDateTime: - Cmd:%s, - SubCmd:%s, + DumpString = ''' + Head:%s, Year:%d, Month:%d, Day:%d, Hour:%d, Minute:%d, Second:%d, - MicSecond:%d + MicSecond:%d, + CrossServerTime:%s '''\ %( - self.Cmd, - self.SubCmd, + self.Head.OutputString(), self.Year, self.Month, self.Day, self.Hour, self.Minute, self.Second, - self.MicSecond + self.MicSecond, + self.CrossServerTime ) return DumpString m_NAtagServerDateTime=tagServerDateTime() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagServerDateTime.Cmd,m_NAtagServerDateTime.SubCmd))] = m_NAtagServerDateTime +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagServerDateTime.Head.Cmd,m_NAtagServerDateTime.Head.SubCmd))] = m_NAtagServerDateTime #------------------------------------------------------ @@ -1272,7 +1302,8 @@ # A4 05 家族红包抢的信息 #tagGCFamilyRedPacketGrabInfo class tagFGrabRedPacketInfo(Structure): - Name = "" #(char Name[33])//名字 + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)//名字 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 MoneyNum = 0 #(DWORD MoneyNum)//金钱数量 data = None @@ -1283,12 +1314,14 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.MoneyNum,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): + self.NameLen = 0 self.Name = "" self.PlayeJob = 0 self.MoneyNum = 0 @@ -1296,7 +1329,8 @@ def GetLength(self): length = 0 - length += 33 + length += 1 + length += len(self.Name) length += 1 length += 4 @@ -1304,18 +1338,21 @@ def GetBuffer(self): data = '' - data = CommFunc.WriteString(data, 33, self.Name) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteDWORD(data, self.MoneyNum) return data def OutputString(self): DumpString = ''' + NameLen:%d, Name:%s, PlayeJob:%d, MoneyNum:%d '''\ %( + self.NameLen, self.Name, self.PlayeJob, self.MoneyNum @@ -1402,7 +1439,8 @@ class tagFRedPacketInfo(Structure): RedPacketID = 0 #(DWORD RedPacketID)//红包唯一ID PlayerID = 0 #(DWORD PlayerID)//玩家ID - Name = "" #(char Name[33])//玩家名字 + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)//玩家名字 Time = 0 #(DWORD Time)//时间 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 MoneyType = 0 #(BYTE MoneyType)//金钱类型 @@ -1410,7 +1448,9 @@ GetWay = 0 #(BYTE GetWay)//获得途径 PacketCnt = 0 #(BYTE PacketCnt)//可抢个数 State = 0 #(BYTE State)//0未发,1未领取,2已领取,3全部领完 - Wish = "" #(char Wish[33])//祝福语 + WishLen = 0 #(BYTE WishLen) + Wish = "" #(String Wish)//祝福语 + IsAnonymous = 0 #(BYTE IsAnonymous)//是否匿名 data = None def __init__(self): @@ -1421,7 +1461,8 @@ self.Clear() self.RedPacketID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) @@ -1429,12 +1470,15 @@ self.GetWay,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.PacketCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Wish,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.WishLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Wish,_pos = CommFunc.ReadString(_lpData, _pos,self.WishLen) + self.IsAnonymous,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): self.RedPacketID = 0 self.PlayerID = 0 + self.NameLen = 0 self.Name = "" self.Time = 0 self.PlayeJob = 0 @@ -1443,14 +1487,17 @@ self.GetWay = 0 self.PacketCnt = 0 self.State = 0 + self.WishLen = 0 self.Wish = "" + self.IsAnonymous = 0 return def GetLength(self): length = 0 length += 4 length += 4 - length += 33 + length += 1 + length += len(self.Name) length += 4 length += 1 length += 1 @@ -1458,7 +1505,9 @@ length += 1 length += 1 length += 1 - length += 33 + length += 1 + length += len(self.Wish) + length += 1 return length @@ -1466,7 +1515,8 @@ data = '' data = CommFunc.WriteDWORD(data, self.RedPacketID) data = CommFunc.WriteDWORD(data, self.PlayerID) - data = CommFunc.WriteString(data, 33, self.Name) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) data = CommFunc.WriteDWORD(data, self.Time) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteBYTE(data, self.MoneyType) @@ -1474,13 +1524,16 @@ data = CommFunc.WriteBYTE(data, self.GetWay) data = CommFunc.WriteBYTE(data, self.PacketCnt) data = CommFunc.WriteBYTE(data, self.State) - data = CommFunc.WriteString(data, 33, self.Wish) + data = CommFunc.WriteBYTE(data, self.WishLen) + data = CommFunc.WriteString(data, self.WishLen, self.Wish) + data = CommFunc.WriteBYTE(data, self.IsAnonymous) return data def OutputString(self): DumpString = ''' RedPacketID:%d, PlayerID:%d, + NameLen:%d, Name:%s, Time:%d, PlayeJob:%d, @@ -1489,11 +1542,14 @@ GetWay:%d, PacketCnt:%d, State:%d, - Wish:%s + WishLen:%d, + Wish:%s, + IsAnonymous:%d '''\ %( self.RedPacketID, self.PlayerID, + self.NameLen, self.Name, self.Time, self.PlayeJob, @@ -1502,7 +1558,9 @@ self.GetWay, self.PacketCnt, self.State, - self.Wish + self.WishLen, + self.Wish, + self.IsAnonymous ) return DumpString @@ -2340,6 +2398,112 @@ #------------------------------------------------------ +# A9 26 竞技场对战玩家最新信息 #tagGCArenaBattlePlayerInfo + +class tagGCArenaBattlePlayerInfo(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)//目标玩家ID + PlayerName = "" #(char PlayerName[33]) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV)//等级 + RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界 + FightPower = 0 #(DWORD FightPower)//战力求余亿部分,机器人读等级表取等级对应战力 + FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分,机器人读等级表取等级对应战力 + Score = 0 #(DWORD Score)//积分 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x26 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.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.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x26 + self.PlayerID = 0 + self.PlayerName = "" + self.Job = 0 + self.LV = 0 + self.RealmLV = 0 + self.FightPower = 0 + self.FightPowerEx = 0 + self.Score = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 33 + length += 1 + length += 2 + length += 2 + length += 4 + length += 4 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + 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.FightPowerEx) + data = CommFunc.WriteDWORD(data, self.Score) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + PlayerName:%s, + Job:%d, + LV:%d, + RealmLV:%d, + FightPower:%d, + FightPowerEx:%d, + Score:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.PlayerName, + self.Job, + self.LV, + self.RealmLV, + self.FightPower, + self.FightPowerEx, + self.Score + ) + return DumpString + + +m_NAtagGCArenaBattlePlayerInfo=tagGCArenaBattlePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaBattlePlayerInfo.Head.Cmd,m_NAtagGCArenaBattlePlayerInfo.Head.SubCmd))] = m_NAtagGCArenaBattlePlayerInfo + + +#------------------------------------------------------ # A9 23 竞技场对战记录列表 #tagGCArenaBattleRecordList class tagGCArenaBattleRecord(Structure): @@ -2348,7 +2512,9 @@ Job = 0 #(BYTE Job) LV = 0 #(WORD LV)//等级 RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界 - FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力 + FightPower = 0 #(DWORD FightPower)//战力求余亿部分,机器人读等级表取等级对应战力 + FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分,机器人读等级表取等级对应战力 + Score = 0 #(DWORD Score)//积分 AddScoreLen = 0 #(BYTE AddScoreLen) AddScore = "" #(String AddScore)//本次对战增加的积分,有正负 IsWin = 0 #(BYTE IsWin)//是否获胜 @@ -2367,6 +2533,8 @@ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Score,_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) @@ -2380,6 +2548,8 @@ self.LV = 0 self.RealmLV = 0 self.FightPower = 0 + self.FightPowerEx = 0 + self.Score = 0 self.AddScoreLen = 0 self.AddScore = "" self.IsWin = 0 @@ -2393,6 +2563,8 @@ length += 1 length += 2 length += 2 + length += 4 + length += 4 length += 4 length += 1 length += len(self.AddScore) @@ -2409,6 +2581,8 @@ data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteDWORD(data, self.FightPowerEx) + data = CommFunc.WriteDWORD(data, self.Score) data = CommFunc.WriteBYTE(data, self.AddScoreLen) data = CommFunc.WriteString(data, self.AddScoreLen, self.AddScore) data = CommFunc.WriteBYTE(data, self.IsWin) @@ -2423,6 +2597,8 @@ LV:%d, RealmLV:%d, FightPower:%d, + FightPowerEx:%d, + Score:%d, AddScoreLen:%d, AddScore:%s, IsWin:%d, @@ -2435,6 +2611,8 @@ self.LV, self.RealmLV, self.FightPower, + self.FightPowerEx, + self.Score, self.AddScoreLen, self.AddScore, self.IsWin, @@ -2518,7 +2696,8 @@ Job = 0 #(BYTE Job) LV = 0 #(WORD LV)//等级 RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界 - FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力 + FightPower = 0 #(DWORD FightPower)//战力求余亿部分,机器人读等级表取等级对应战力 + FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分,机器人读等级表取等级对应战力 Score = 0 #(DWORD Score)//积分 data = None @@ -2534,6 +2713,7 @@ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos @@ -2544,6 +2724,7 @@ self.LV = 0 self.RealmLV = 0 self.FightPower = 0 + self.FightPowerEx = 0 self.Score = 0 return @@ -2554,6 +2735,7 @@ length += 1 length += 2 length += 2 + length += 4 length += 4 length += 4 @@ -2567,6 +2749,7 @@ data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteDWORD(data, self.FightPowerEx) data = CommFunc.WriteDWORD(data, self.Score) return data @@ -2578,6 +2761,7 @@ LV:%d, RealmLV:%d, FightPower:%d, + FightPowerEx:%d, Score:%d '''\ %( @@ -2587,6 +2771,7 @@ self.LV, self.RealmLV, self.FightPower, + self.FightPowerEx, self.Score ) return DumpString @@ -7121,6 +7306,994 @@ #------------------------------------------------------ +# B3 24 喜糖列表 #tagGCCandyList + +class tagGCCandyInfo(Structure): + PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方 + NameALen = 0 #(BYTE NameALen) + PlayerNameA = "" #(String PlayerNameA) + PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方 + NameBLen = 0 #(BYTE NameBLen) + PlayerNameB = "" #(String PlayerNameB) + BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID + MarryTime = 0 #(DWORD MarryTime)// 成亲时间戳,秒 + EndTime = 0 #(DWORD EndTime)// 结束时间戳,秒 + Prosperity = 0 #(DWORD Prosperity)// 当前繁荣度 + FireworksTotalBuyCount = 0 #(BYTE FireworksTotalBuyCount)// 烟花总已购买次数 + FireworksPlayerBuyCount = 0 #(BYTE FireworksPlayerBuyCount)// 烟花玩家已购买次数 + PlayerFreeEatCandyCount = 0 #(BYTE PlayerFreeEatCandyCount)// 玩家已免费吃该喜糖总次数,包含免费次数、烟花赠送次数 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen) + self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen) + self.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.EndTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Prosperity,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FireworksTotalBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FireworksPlayerBuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerFreeEatCandyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerIDA = 0 + self.NameALen = 0 + self.PlayerNameA = "" + self.PlayerIDB = 0 + self.NameBLen = 0 + self.PlayerNameB = "" + self.BridePriceID = 0 + self.MarryTime = 0 + self.EndTime = 0 + self.Prosperity = 0 + self.FireworksTotalBuyCount = 0 + self.FireworksPlayerBuyCount = 0 + self.PlayerFreeEatCandyCount = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += len(self.PlayerNameA) + length += 4 + length += 1 + length += len(self.PlayerNameB) + length += 1 + length += 4 + length += 4 + length += 4 + length += 1 + length += 1 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.PlayerIDA) + data = CommFunc.WriteBYTE(data, self.NameALen) + data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA) + data = CommFunc.WriteDWORD(data, self.PlayerIDB) + data = CommFunc.WriteBYTE(data, self.NameBLen) + data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB) + data = CommFunc.WriteBYTE(data, self.BridePriceID) + data = CommFunc.WriteDWORD(data, self.MarryTime) + data = CommFunc.WriteDWORD(data, self.EndTime) + data = CommFunc.WriteDWORD(data, self.Prosperity) + data = CommFunc.WriteBYTE(data, self.FireworksTotalBuyCount) + data = CommFunc.WriteBYTE(data, self.FireworksPlayerBuyCount) + data = CommFunc.WriteBYTE(data, self.PlayerFreeEatCandyCount) + return data + + def OutputString(self): + DumpString = ''' + PlayerIDA:%d, + NameALen:%d, + PlayerNameA:%s, + PlayerIDB:%d, + NameBLen:%d, + PlayerNameB:%s, + BridePriceID:%d, + MarryTime:%d, + EndTime:%d, + Prosperity:%d, + FireworksTotalBuyCount:%d, + FireworksPlayerBuyCount:%d, + PlayerFreeEatCandyCount:%d + '''\ + %( + self.PlayerIDA, + self.NameALen, + self.PlayerNameA, + self.PlayerIDB, + self.NameBLen, + self.PlayerNameB, + self.BridePriceID, + self.MarryTime, + self.EndTime, + self.Prosperity, + self.FireworksTotalBuyCount, + self.FireworksPlayerBuyCount, + self.PlayerFreeEatCandyCount + ) + return DumpString + + +class tagGCCandyList(Structure): + Head = tagHead() + CandyCount = 0 #(WORD CandyCount) + CandyInfoList = list() #(vector<tagGCCandyInfo> CandyInfoList)// 可吃喜糖列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x24 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.CandyCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.CandyCount): + temCandyInfoList = tagGCCandyInfo() + _pos = temCandyInfoList.ReadData(_lpData, _pos) + self.CandyInfoList.append(temCandyInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x24 + self.CandyCount = 0 + self.CandyInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.CandyCount): + length += self.CandyInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.CandyCount) + for i in range(self.CandyCount): + data = CommFunc.WriteString(data, self.CandyInfoList[i].GetLength(), self.CandyInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + CandyCount:%d, + CandyInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.CandyCount, + "..." + ) + return DumpString + + +m_NAtagGCCandyList=tagGCCandyList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCandyList.Head.Cmd,m_NAtagGCCandyList.Head.SubCmd))] = m_NAtagGCCandyList + + +#------------------------------------------------------ +# B3 19 魅力贡献榜 #tagGCCharmOfferBillboardDataList + +class tagGCCharmOfferBillboardData(Structure): + OrderIndex = 0 #(DWORD OrderIndex)//名次索引,0代表第一名 + PlayerID = 0 #(DWORD PlayerID)// 玩家ID - 贡献者 + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + CharmValue = 0 #(DWORD CharmValue)//贡献魅力值 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.OrderIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.CharmValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.OrderIndex = 0 + self.PlayerID = 0 + self.NameLen = 0 + self.PlayerName = "" + self.CharmValue = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 1 + length += len(self.PlayerName) + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.OrderIndex) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteDWORD(data, self.CharmValue) + return data + + def OutputString(self): + DumpString = ''' + OrderIndex:%d, + PlayerID:%d, + NameLen:%d, + PlayerName:%s, + CharmValue:%d + '''\ + %( + self.OrderIndex, + self.PlayerID, + self.NameLen, + self.PlayerName, + self.CharmValue + ) + return DumpString + + +class tagGCCharmOfferBillboardDataList(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)// 魅力玩家ID + QueryType = 0 #(BYTE QueryType)// 查看类型: 1-总榜,2-周榜,3-日榜 + DataCount = 0 #(BYTE DataCount) + OfferBillboardDataList = list() #(vector<tagGCCharmOfferBillboardData> OfferBillboardDataList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x19 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.QueryType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.DataCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DataCount): + temOfferBillboardDataList = tagGCCharmOfferBillboardData() + _pos = temOfferBillboardDataList.ReadData(_lpData, _pos) + self.OfferBillboardDataList.append(temOfferBillboardDataList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x19 + self.PlayerID = 0 + self.QueryType = 0 + self.DataCount = 0 + self.OfferBillboardDataList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += 1 + for i in range(self.DataCount): + length += self.OfferBillboardDataList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.QueryType) + data = CommFunc.WriteBYTE(data, self.DataCount) + for i in range(self.DataCount): + data = CommFunc.WriteString(data, self.OfferBillboardDataList[i].GetLength(), self.OfferBillboardDataList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + QueryType:%d, + DataCount:%d, + OfferBillboardDataList:%s + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.QueryType, + self.DataCount, + "..." + ) + return DumpString + + +m_NAtagGCCharmOfferBillboardDataList=tagGCCharmOfferBillboardDataList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCharmOfferBillboardDataList.Head.Cmd,m_NAtagGCCharmOfferBillboardDataList.Head.SubCmd))] = m_NAtagGCCharmOfferBillboardDataList + + +#------------------------------------------------------ +# B3 26 伴侣信息 #tagGCCoupleInfo + +class tagGCCoupleInfo(Structure): + Head = tagHead() + CoupleID = 0 #(DWORD CoupleID)// 伴侣玩家ID,一定是好友,社交信息从好友系统中获取 + NameLen = 0 #(BYTE NameLen) + CoupleName = "" #(String CoupleName) + NewMarryTime = 0 #(DWORD NewMarryTime)// 新婚时间戳, 秒,计算结婚天数按该时间计算 + MarryTime = 0 #(DWORD MarryTime)// 最近一次提亲成功时间戳, 秒,计算可离婚时间按该时间计算 + BridePriceState = 0 #(DWORD BridePriceState)// 聘礼状态,按位存储已购买次数,如205代表ID1买了5次,ID2买了0次,ID3买了2次,最高9次 + BreakRequestID = 0 #(DWORD BreakRequestID)// 当前请求中的和离时间戳 - 请求方ID,0代表没人发起请求 + BreakRequestTime = 0 #(DWORD BreakRequestTime)// 当前请求中的和离时间戳, 秒,用于计算和离回应有效期 + PlayerBreakRequestTime = 0 #(DWORD PlayerBreakRequestTime)// 玩家最近一次和离请求时间戳, 秒,用于计算自身的请求和离CD + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x26 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.CoupleID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CoupleName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.NewMarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MarryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BridePriceState,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BreakRequestID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BreakRequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerBreakRequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x26 + self.CoupleID = 0 + self.NameLen = 0 + self.CoupleName = "" + self.NewMarryTime = 0 + self.MarryTime = 0 + self.BridePriceState = 0 + self.BreakRequestID = 0 + self.BreakRequestTime = 0 + self.PlayerBreakRequestTime = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.CoupleName) + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.CoupleID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.CoupleName) + data = CommFunc.WriteDWORD(data, self.NewMarryTime) + data = CommFunc.WriteDWORD(data, self.MarryTime) + data = CommFunc.WriteDWORD(data, self.BridePriceState) + data = CommFunc.WriteDWORD(data, self.BreakRequestID) + data = CommFunc.WriteDWORD(data, self.BreakRequestTime) + data = CommFunc.WriteDWORD(data, self.PlayerBreakRequestTime) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + CoupleID:%d, + NameLen:%d, + CoupleName:%s, + NewMarryTime:%d, + MarryTime:%d, + BridePriceState:%d, + BreakRequestID:%d, + BreakRequestTime:%d, + PlayerBreakRequestTime:%d + '''\ + %( + self.Head.OutputString(), + self.CoupleID, + self.NameLen, + self.CoupleName, + self.NewMarryTime, + self.MarryTime, + self.BridePriceState, + self.BreakRequestID, + self.BreakRequestTime, + self.PlayerBreakRequestTime + ) + return DumpString + + +m_NAtagGCCoupleInfo=tagGCCoupleInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCoupleInfo.Head.Cmd,m_NAtagGCCoupleInfo.Head.SubCmd))] = m_NAtagGCCoupleInfo + + +#------------------------------------------------------ +# B3 22 收到提亲信息 #tagGCMarryReqInfo + +class tagGCMarryReqInfo(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)// 同一个玩家ID多次提亲时可能同步多次,前端覆盖数据即可 + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + BridePriceID = 0 #(BYTE BridePriceID)// 聘礼ID + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x22 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.BridePriceID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x22 + self.PlayerID = 0 + self.NameLen = 0 + self.PlayerName = "" + self.BridePriceID = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.PlayerName) + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteBYTE(data, self.BridePriceID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + NameLen:%d, + PlayerName:%s, + BridePriceID:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.NameLen, + self.PlayerName, + self.BridePriceID + ) + return DumpString + + +m_NAtagGCMarryReqInfo=tagGCMarryReqInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqInfo.Head.Cmd,m_NAtagGCMarryReqInfo.Head.SubCmd))] = m_NAtagGCMarryReqInfo + + +#------------------------------------------------------ +# B3 21 提亲发送成功 #tagGCMarryReqOK + +class tagGCMarryReqOK(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x21 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB3 + self.SubCmd = 0x21 + return + + def GetLength(self): + return sizeof(tagGCMarryReqOK) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 21 提亲发送成功 //tagGCMarryReqOK: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagGCMarryReqOK=tagGCMarryReqOK() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryReqOK.Cmd,m_NAtagGCMarryReqOK.SubCmd))] = m_NAtagGCMarryReqOK + + +#------------------------------------------------------ +# B3 23 提亲回应结果 #tagGCMarryResponseRet + +class tagGCMarryResponseRet(Structure): + Head = tagHead() + PlayerIDA = 0 #(DWORD PlayerIDA)// 玩家ID - 请求方 + NameALen = 0 #(BYTE NameALen) + PlayerNameA = "" #(String PlayerNameA) + PlayerIDB = 0 #(DWORD PlayerIDB)// 玩家ID - 接受方 + NameBLen = 0 #(BYTE NameBLen) + PlayerNameB = "" #(String PlayerNameB) + IsOK = 0 #(BYTE IsOK)// 是否同意,0-否,1-是; 如果同意则双方都会收到该包,根据玩家ID判断自己是请求或接受方,显示不同的同意结果界面;不同意只有请求方会收到 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerIDA,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameALen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameA,_pos = CommFunc.ReadString(_lpData, _pos,self.NameALen) + self.PlayerIDB,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameBLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerNameB,_pos = CommFunc.ReadString(_lpData, _pos,self.NameBLen) + self.IsOK,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x23 + self.PlayerIDA = 0 + self.NameALen = 0 + self.PlayerNameA = "" + self.PlayerIDB = 0 + self.NameBLen = 0 + self.PlayerNameB = "" + self.IsOK = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += len(self.PlayerNameA) + length += 4 + length += 1 + length += len(self.PlayerNameB) + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerIDA) + data = CommFunc.WriteBYTE(data, self.NameALen) + data = CommFunc.WriteString(data, self.NameALen, self.PlayerNameA) + data = CommFunc.WriteDWORD(data, self.PlayerIDB) + data = CommFunc.WriteBYTE(data, self.NameBLen) + data = CommFunc.WriteString(data, self.NameBLen, self.PlayerNameB) + data = CommFunc.WriteBYTE(data, self.IsOK) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerIDA:%d, + NameALen:%d, + PlayerNameA:%s, + PlayerIDB:%d, + NameBLen:%d, + PlayerNameB:%s, + IsOK:%d + '''\ + %( + self.Head.OutputString(), + self.PlayerIDA, + self.NameALen, + self.PlayerNameA, + self.PlayerIDB, + self.NameBLen, + self.PlayerNameB, + self.IsOK + ) + return DumpString + + +m_NAtagGCMarryResponseRet=tagGCMarryResponseRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMarryResponseRet.Head.Cmd,m_NAtagGCMarryResponseRet.Head.SubCmd))] = m_NAtagGCMarryResponseRet + + +#------------------------------------------------------ +# B3 25 玩家魅力值信息 #tagGCPlayerCharmValueInfo + +class tagGCPlayerCharmValueInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("CharmValueTotal", c_int), #当前魅力值 - 总 + ("CharmValueWeek", c_int), #当前魅力值 - 周 + ("CharmValueDay", c_int), #当前魅力值 - 日 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x25 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB3 + self.SubCmd = 0x25 + self.CharmValueTotal = 0 + self.CharmValueWeek = 0 + self.CharmValueDay = 0 + return + + def GetLength(self): + return sizeof(tagGCPlayerCharmValueInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 25 玩家魅力值信息 //tagGCPlayerCharmValueInfo: + Cmd:%s, + SubCmd:%s, + CharmValueTotal:%d, + CharmValueWeek:%d, + CharmValueDay:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.CharmValueTotal, + self.CharmValueWeek, + self.CharmValueDay + ) + return DumpString + + +m_NAtagGCPlayerCharmValueInfo=tagGCPlayerCharmValueInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerCharmValueInfo.Cmd,m_NAtagGCPlayerCharmValueInfo.SubCmd))] = m_NAtagGCPlayerCharmValueInfo + + +#------------------------------------------------------ +# B3 20 送礼物成功通知 #tagGCSendGiftsOKList + +class tagGCSendGiftsOK(Structure): + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)// 赠送方玩家名 + PlayerID = 0 #(DWORD PlayerID)// 赠送方玩家ID + GiftNum = 0 #(WORD GiftNum)// 赠送礼物编号 + GiftCount = 0 #(DWORD GiftCount)// 赠送礼物数量 + SendTime = 0 #(DWORD SendTime)// 赠送时间戳 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.GiftNum,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.GiftCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SendTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.NameLen = 0 + self.Name = "" + self.PlayerID = 0 + self.GiftNum = 0 + self.GiftCount = 0 + self.SendTime = 0 + return + + def GetLength(self): + length = 0 + length += 1 + length += len(self.Name) + length += 4 + length += 2 + length += 4 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteWORD(data, self.GiftNum) + data = CommFunc.WriteDWORD(data, self.GiftCount) + data = CommFunc.WriteDWORD(data, self.SendTime) + return data + + def OutputString(self): + DumpString = ''' + NameLen:%d, + Name:%s, + PlayerID:%d, + GiftNum:%d, + GiftCount:%d, + SendTime:%d + '''\ + %( + self.NameLen, + self.Name, + self.PlayerID, + self.GiftNum, + self.GiftCount, + self.SendTime + ) + return DumpString + + +class tagGCSendGiftsOKList(Structure): + Head = tagHead() + Count = 0 #(WORD Count) + SendGiftsOKList = list() #(vector<tagGCSendGiftsOK> SendGiftsOKList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temSendGiftsOKList = tagGCSendGiftsOK() + _pos = temSendGiftsOKList.ReadData(_lpData, _pos) + self.SendGiftsOKList.append(temSendGiftsOKList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x20 + self.Count = 0 + self.SendGiftsOKList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.Count): + length += self.SendGiftsOKList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.SendGiftsOKList[i].GetLength(), self.SendGiftsOKList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + SendGiftsOKList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCSendGiftsOKList=tagGCSendGiftsOKList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSendGiftsOKList.Head.Cmd,m_NAtagGCSendGiftsOKList.Head.SubCmd))] = m_NAtagGCSendGiftsOKList + + +#------------------------------------------------------ +# B3 14 社交人群伴侣信息 #tagGCSocialCouples + +class tagGCSocialCouple(Structure): + _pack_ = 1 + _fields_ = [ + ("PlayerID", c_int), + ("CoupleID", c_int), #伴侣ID + ] + + 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.PlayerID = 0 + self.CoupleID = 0 + return + + def GetLength(self): + return sizeof(tagGCSocialCouple) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 14 社交人群伴侣信息 //tagGCSocialCouples: + PlayerID:%d, + CoupleID:%d + '''\ + %( + self.PlayerID, + self.CoupleID + ) + return DumpString + + +class tagGCSocialCouples(Structure): + Head = tagHead() + Count = 0 #(WORD Count) + Player = list() #(vector<tagGCSocialCouple> Player)//size = Count + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x14 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temPlayer = tagGCSocialCouple() + _pos = temPlayer.ReadData(_lpData, _pos) + self.Player.append(temPlayer) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB3 + self.Head.SubCmd = 0x14 + self.Count = 0 + self.Player = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.Count): + length += self.Player[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.Player[i].GetLength(), self.Player[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + Player:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCSocialCouples=tagGCSocialCouples() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCSocialCouples.Head.Cmd,m_NAtagGCSocialCouples.Head.SubCmd))] = m_NAtagGCSocialCouples + + +#------------------------------------------------------ #B3 01 添加社交对象 #tagGCAddSocialPlayer class tagGCAddSocialPlayer(Structure): @@ -7491,7 +8664,7 @@ _pack_ = 1 _fields_ = [ ("PlayerID", c_int), - ("SortValue", c_int), + ("SortValue", c_int), # 亲密组时为亲密度 ] def __init__(self): @@ -7528,7 +8701,7 @@ class tagGCGroupPlayers(Structure): Head = tagHead() - GroupType = 0 #(BYTE GroupType)// 分组 1 最近联系人 2 好友 3 仇人 4 黑名单 + GroupType = 0 #(BYTE GroupType)// 分组 1 最近联系人 2 好友 3 仇人 4 黑名单 5亲密组 Count = 0 #(WORD Count) Players = list() #(vector<tagGCGroupPlayer> Players)//size = Count data = None @@ -11115,6 +12288,1206 @@ #------------------------------------------------------ +# C0 23 跨服排位竞猜个人信息 #tagGCChampionshipGuessPriInfo + +class tagGCChampionshipGuessPlayerPri(Structure): + _pack_ = 1 + _fields_ = [ + ("PlayerID", c_int), # 目标玩家ID + ("MoneyTotal", c_int), # 已投注该玩家货币总数 + ("GuessRank", c_ubyte), # 竞猜名次,没有名次的竞猜默认0;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.PlayerID = 0 + self.MoneyTotal = 0 + self.GuessRank = 0 + return + + def GetLength(self): + return sizeof(tagGCChampionshipGuessPlayerPri) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 23 跨服排位竞猜个人信息 //tagGCChampionshipGuessPriInfo: + PlayerID:%d, + MoneyTotal:%d, + GuessRank:%d + '''\ + %( + self.PlayerID, + self.MoneyTotal, + self.GuessRank + ) + return DumpString + + +class tagGCChampionshipGuessPriList(Structure): + GuessType = 0 #(BYTE GuessType)//竞猜类型 8-8强;4-4强排位 + PlayerCount = 0 #(BYTE PlayerCount) + GuessPlayerList = list() #(vector<tagGCChampionshipGuessPlayerPri> GuessPlayerList)// 被竞猜玩家列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.GuessType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PlayerCount): + temGuessPlayerList = tagGCChampionshipGuessPlayerPri() + _pos = temGuessPlayerList.ReadData(_lpData, _pos) + self.GuessPlayerList.append(temGuessPlayerList) + return _pos + + def Clear(self): + self.GuessType = 0 + self.PlayerCount = 0 + self.GuessPlayerList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.PlayerCount): + length += self.GuessPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.GuessType) + data = CommFunc.WriteBYTE(data, self.PlayerCount) + for i in range(self.PlayerCount): + data = CommFunc.WriteString(data, self.GuessPlayerList[i].GetLength(), self.GuessPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + GuessType:%d, + PlayerCount:%d, + GuessPlayerList:%s + '''\ + %( + self.GuessType, + self.PlayerCount, + "..." + ) + return DumpString + + +class tagGCChampionshipGuessPriInfo(Structure): + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 排位数据分区ID + Count = 0 #(BYTE Count) + GuessList = list() #(vector<tagGCChampionshipGuessPriList> GuessList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temGuessList = tagGCChampionshipGuessPriList() + _pos = temGuessList.ReadData(_lpData, _pos) + self.GuessList.append(temGuessList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x23 + self.ZoneID = 0 + self.Count = 0 + self.GuessList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.Count): + length += self.GuessList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.GuessList[i].GetLength(), self.GuessList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZoneID:%d, + Count:%d, + GuessList:%s + '''\ + %( + self.Head.OutputString(), + self.ZoneID, + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCChampionshipGuessPriInfo=tagGCChampionshipGuessPriInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChampionshipGuessPriInfo.Head.Cmd,m_NAtagGCChampionshipGuessPriInfo.Head.SubCmd))] = m_NAtagGCChampionshipGuessPriInfo + + +#------------------------------------------------------ +# C0 22 跨服排位竞猜公共信息 #tagGCChampionshipGuessPubInfo + +class tagGCChampionshipGuessPlayerPub(Structure): + _pack_ = 1 + _fields_ = [ + ("PlayerID", c_int), # 目标玩家ID + ("SupportCount", 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.PlayerID = 0 + self.SupportCount = 0 + return + + def GetLength(self): + return sizeof(tagGCChampionshipGuessPlayerPub) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 22 跨服排位竞猜公共信息 //tagGCChampionshipGuessPubInfo: + PlayerID:%d, + SupportCount:%d + '''\ + %( + self.PlayerID, + self.SupportCount + ) + return DumpString + + +class tagGCChampionshipGuessPubList(Structure): + GuessType = 0 #(BYTE GuessType)//竞猜类型 8-8强;4-4强排位 + PlayerCount = 0 #(BYTE PlayerCount) + GuessPlayerList = list() #(vector<tagGCChampionshipGuessPlayerPub> GuessPlayerList)// 被竞猜玩家列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.GuessType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PlayerCount): + temGuessPlayerList = tagGCChampionshipGuessPlayerPub() + _pos = temGuessPlayerList.ReadData(_lpData, _pos) + self.GuessPlayerList.append(temGuessPlayerList) + return _pos + + def Clear(self): + self.GuessType = 0 + self.PlayerCount = 0 + self.GuessPlayerList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + for i in range(self.PlayerCount): + length += self.GuessPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.GuessType) + data = CommFunc.WriteBYTE(data, self.PlayerCount) + for i in range(self.PlayerCount): + data = CommFunc.WriteString(data, self.GuessPlayerList[i].GetLength(), self.GuessPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + GuessType:%d, + PlayerCount:%d, + GuessPlayerList:%s + '''\ + %( + self.GuessType, + self.PlayerCount, + "..." + ) + return DumpString + + +class tagGCChampionshipGuessPubInfo(Structure): + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 排位数据分区ID + Count = 0 #(BYTE Count) + GuessList = list() #(vector<tagGCChampionshipGuessPubList> GuessList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x22 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temGuessList = tagGCChampionshipGuessPubList() + _pos = temGuessList.ReadData(_lpData, _pos) + self.GuessList.append(temGuessList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x22 + self.ZoneID = 0 + self.Count = 0 + self.GuessList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.Count): + length += self.GuessList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.GuessList[i].GetLength(), self.GuessList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZoneID:%d, + Count:%d, + GuessList:%s + '''\ + %( + self.Head.OutputString(), + self.ZoneID, + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCChampionshipGuessPubInfo=tagGCChampionshipGuessPubInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChampionshipGuessPubInfo.Head.Cmd,m_NAtagGCChampionshipGuessPubInfo.Head.SubCmd))] = m_NAtagGCChampionshipGuessPubInfo + + +#------------------------------------------------------ +# C0 19 跨服排位仙官申请回应结果 #tagGCChampionshipOfficialApplyReplyRet + +class tagGCChampionshipOfficialApplyReplyRet(Structure): + Head = tagHead() + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName)// 界主玩家名 + MainOfficialID = 0 #(WORD MainOfficialID)//界主官职ID + OfficialID = 0 #(WORD OfficialID)//申请官职ID + IsOK = 0 #(BYTE IsOK)//是否同意;1-是;0-否 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x19 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.MainOfficialID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.OfficialID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsOK,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x19 + self.NameLen = 0 + self.PlayerName = "" + self.MainOfficialID = 0 + self.OfficialID = 0 + self.IsOK = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.PlayerName) + length += 2 + length += 2 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteWORD(data, self.MainOfficialID) + data = CommFunc.WriteWORD(data, self.OfficialID) + data = CommFunc.WriteBYTE(data, self.IsOK) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + NameLen:%d, + PlayerName:%s, + MainOfficialID:%d, + OfficialID:%d, + IsOK:%d + '''\ + %( + self.Head.OutputString(), + self.NameLen, + self.PlayerName, + self.MainOfficialID, + self.OfficialID, + self.IsOK + ) + return DumpString + + +m_NAtagGCChampionshipOfficialApplyReplyRet=tagGCChampionshipOfficialApplyReplyRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChampionshipOfficialApplyReplyRet.Head.Cmd,m_NAtagGCChampionshipOfficialApplyReplyRet.Head.SubCmd))] = m_NAtagGCChampionshipOfficialApplyReplyRet + + +#------------------------------------------------------ +# C0 21 跨服排位仙官挑战记录 #tagGCChampionshipOfficialChallengeRecordInfo + +class tagGCChampionshipOfficialChallengeRecord(Structure): + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + ChallengeTime = 0 #(DWORD ChallengeTime)//挑战时间戳 + Ret = 0 #(BYTE Ret)//挑战结果;0-失败;1-获胜; + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.ChallengeTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Ret,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.NameLen = 0 + self.PlayerName = "" + self.ChallengeTime = 0 + self.Ret = 0 + return + + def GetLength(self): + length = 0 + length += 1 + length += len(self.PlayerName) + length += 4 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteDWORD(data, self.ChallengeTime) + data = CommFunc.WriteBYTE(data, self.Ret) + return data + + def OutputString(self): + DumpString = ''' + NameLen:%d, + PlayerName:%s, + ChallengeTime:%d, + Ret:%d + '''\ + %( + self.NameLen, + self.PlayerName, + self.ChallengeTime, + self.Ret + ) + return DumpString + + +class tagGCChampionshipOfficialChallengeRecordInfo(Structure): + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 分区ID + MainOfficialID = 0 #(WORD MainOfficialID)// 界主官职ID + OfficialID = 0 #(WORD OfficialID)// 记录的官职ID + RecordCount = 0 #(BYTE RecordCount)// 挑战记录数 + RecordList = list() #(vector<tagGCChampionshipOfficialChallengeRecord> RecordList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x21 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MainOfficialID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.OfficialID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + temRecordList = tagGCChampionshipOfficialChallengeRecord() + _pos = temRecordList.ReadData(_lpData, _pos) + self.RecordList.append(temRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x21 + self.ZoneID = 0 + self.MainOfficialID = 0 + self.OfficialID = 0 + self.RecordCount = 0 + self.RecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 2 + length += 2 + length += 1 + for i in range(self.RecordCount): + length += self.RecordList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteWORD(data, self.MainOfficialID) + data = CommFunc.WriteWORD(data, self.OfficialID) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZoneID:%d, + MainOfficialID:%d, + OfficialID:%d, + RecordCount:%d, + RecordList:%s + '''\ + %( + self.Head.OutputString(), + self.ZoneID, + self.MainOfficialID, + self.OfficialID, + self.RecordCount, + "..." + ) + return DumpString + + +m_NAtagGCChampionshipOfficialChallengeRecordInfo=tagGCChampionshipOfficialChallengeRecordInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChampionshipOfficialChallengeRecordInfo.Head.Cmd,m_NAtagGCChampionshipOfficialChallengeRecordInfo.Head.SubCmd))] = m_NAtagGCChampionshipOfficialChallengeRecordInfo + + +#------------------------------------------------------ +# C0 20 跨服排位仙官挑战结果 #tagGCChampionshipOfficialChallengeRet + +class tagGCChampionshipOfficialChallengeRet(Structure): + Head = tagHead() + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName)// 原仙官玩家名,可能为空,代表本来无玩家 + MainOfficialID = 0 #(WORD MainOfficialID)//界主官职ID + OfficialID = 0 #(WORD OfficialID)//挑战的官职ID + Ret = 0 #(BYTE Ret)//挑战结果;0-失败;1-获胜;2-目标仙官玩家ID已变更,可刷新后重试 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.MainOfficialID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.OfficialID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Ret,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x20 + self.NameLen = 0 + self.PlayerName = "" + self.MainOfficialID = 0 + self.OfficialID = 0 + self.Ret = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.PlayerName) + length += 2 + length += 2 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteWORD(data, self.MainOfficialID) + data = CommFunc.WriteWORD(data, self.OfficialID) + data = CommFunc.WriteBYTE(data, self.Ret) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + NameLen:%d, + PlayerName:%s, + MainOfficialID:%d, + OfficialID:%d, + Ret:%d + '''\ + %( + self.Head.OutputString(), + self.NameLen, + self.PlayerName, + self.MainOfficialID, + self.OfficialID, + self.Ret + ) + return DumpString + + +m_NAtagGCChampionshipOfficialChallengeRet=tagGCChampionshipOfficialChallengeRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChampionshipOfficialChallengeRet.Head.Cmd,m_NAtagGCChampionshipOfficialChallengeRet.Head.SubCmd))] = m_NAtagGCChampionshipOfficialChallengeRet + + +#------------------------------------------------------ +# C0 18 跨服排位官职信息 #tagGCChampionshipOfficialInfo + +class tagGCChampionshipOfficialPlayer(Structure): + PlayerID = 0 #(DWORD PlayerID)// 玩家ID + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV) + FightPower = 0 #(DWORD FightPower)// 战力求余亿部分 + FightPowerEx = 0 #(DWORD FightPowerEx)// 战力整除亿部分 + RealmLV = 0 #(WORD RealmLV) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerID = 0 + self.NameLen = 0 + self.PlayerName = "" + self.Job = 0 + self.LV = 0 + self.FightPower = 0 + self.FightPowerEx = 0 + self.RealmLV = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += len(self.PlayerName) + length += 1 + length += 2 + length += 4 + length += 4 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteDWORD(data, self.FightPowerEx) + data = CommFunc.WriteWORD(data, self.RealmLV) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + NameLen:%d, + PlayerName:%s, + Job:%d, + LV:%d, + FightPower:%d, + FightPowerEx:%d, + RealmLV:%d + '''\ + %( + self.PlayerID, + self.NameLen, + self.PlayerName, + self.Job, + self.LV, + self.FightPower, + self.FightPowerEx, + self.RealmLV + ) + return DumpString + + +class tagGCChampionshipOfficial(Structure): + OfficialID = 0 #(DWORD OfficialID)// 官职ID + LastDismissJuniorTime = 0 #(DWORD LastDismissJuniorTime)// 上次辞退下级仙官时间戳,跨服时间,如果自己是本界主时,用于计算辞退CD + WorshipCount = 0 #(DWORD WorshipCount)// 被膜拜次数 + WorshipDouble = 0 #(BYTE WorshipDouble)// 今日是否双倍膜拜,仅在规定时间点内有用 + OfficialPlayer=tagGCChampionshipOfficialPlayer() #(tagGCChampionshipOfficialPlayer OfficialPlayer)// 任职玩家信息,可能没有 + ApplyPlayerCount = 0 #(BYTE ApplyPlayerCount)// 申请该仙官玩家数 + ApplyPlayerList = list() #(vector<tagGCChampionshipOfficialPlayer> ApplyPlayerList)// 申请该仙官玩家列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.OfficialID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.LastDismissJuniorTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.WorshipCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.WorshipDouble,_pos = CommFunc.ReadBYTE(_lpData, _pos) + _pos = self.OfficialPlayer.ReadData(_lpData,_pos) + self.ApplyPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ApplyPlayerCount): + temApplyPlayerList = tagGCChampionshipOfficialPlayer() + _pos = temApplyPlayerList.ReadData(_lpData, _pos) + self.ApplyPlayerList.append(temApplyPlayerList) + return _pos + + def Clear(self): + self.OfficialID = 0 + self.LastDismissJuniorTime = 0 + self.WorshipCount = 0 + self.WorshipDouble = 0 + self.OfficialPlayer=tagGCChampionshipOfficialPlayer() + self.OfficialPlayer.Clear() + self.ApplyPlayerCount = 0 + self.ApplyPlayerList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 4 + length += 1 + length += self.OfficialPlayer.GetLength() + length += 1 + for i in range(self.ApplyPlayerCount): + length += self.ApplyPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.OfficialID) + data = CommFunc.WriteDWORD(data, self.LastDismissJuniorTime) + data = CommFunc.WriteDWORD(data, self.WorshipCount) + data = CommFunc.WriteBYTE(data, self.WorshipDouble) + data = CommFunc.WriteString(data,self.OfficialPlayer.GetLength(),self.OfficialPlayer.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ApplyPlayerCount) + for i in range(self.ApplyPlayerCount): + data = CommFunc.WriteString(data, self.ApplyPlayerList[i].GetLength(), self.ApplyPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + OfficialID:%d, + LastDismissJuniorTime:%d, + WorshipCount:%d, + WorshipDouble:%d, + OfficialPlayer:%s, + ApplyPlayerCount:%d, + ApplyPlayerList:%s + '''\ + %( + self.OfficialID, + self.LastDismissJuniorTime, + self.WorshipCount, + self.WorshipDouble, + self.OfficialPlayer.OutputString(), + self.ApplyPlayerCount, + "..." + ) + return DumpString + + +class tagGCChampionshipOfficialInfo(Structure): + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 官职数据分区ID + OfficialCount = 0 #(BYTE OfficialCount)// 官职数,包含界主及所有仙官 + OfficialList = list() #(vector<tagGCChampionshipOfficial> OfficialList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x18 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OfficialCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.OfficialCount): + temOfficialList = tagGCChampionshipOfficial() + _pos = temOfficialList.ReadData(_lpData, _pos) + self.OfficialList.append(temOfficialList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x18 + self.ZoneID = 0 + self.OfficialCount = 0 + self.OfficialList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.OfficialCount): + length += self.OfficialList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteBYTE(data, self.OfficialCount) + for i in range(self.OfficialCount): + data = CommFunc.WriteString(data, self.OfficialList[i].GetLength(), self.OfficialList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZoneID:%d, + OfficialCount:%d, + OfficialList:%s + '''\ + %( + self.Head.OutputString(), + self.ZoneID, + self.OfficialCount, + "..." + ) + return DumpString + + +m_NAtagGCChampionshipOfficialInfo=tagGCChampionshipOfficialInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCChampionshipOfficialInfo.Head.Cmd,m_NAtagGCChampionshipOfficialInfo.Head.SubCmd))] = m_NAtagGCChampionshipOfficialInfo + + +#------------------------------------------------------ +# C0 09 跨服战场玩家购买战场信息 #tagGCCrossBattlefieldBuyInfo + +class tagGCCrossBattlefieldPlayer(Structure): + PlayerID = 0 #(DWORD PlayerID) + PlayerName = "" #(char PlayerName[33]) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV)//等级 + RealmLV = 0 #(WORD RealmLV)//境界 + FightPower = 0 #(DWORD FightPower)//战力求余亿部分 + FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分 + 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.FightPowerEx,_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.FightPowerEx = 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.FightPowerEx) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + PlayerName:%s, + Job:%d, + LV:%d, + RealmLV:%d, + FightPower:%d, + FightPowerEx:%d + '''\ + %( + self.PlayerID, + self.PlayerName, + self.Job, + self.LV, + self.RealmLV, + self.FightPower, + self.FightPowerEx + ) + return DumpString + + +class tagGCCrossBattlefieldBuyPlayer(Structure): + BuyPlayerID = 0 #(DWORD BuyPlayerID)//购买的玩家ID,即召集人 + Faction = 0 #(BYTE Faction)//阵营 1-红;2-蓝 + ServerOnly = 0 #(BYTE ServerOnly)//是否仅本服玩家可加入,0-否,1-是 + FactionPlayerCount = 0 #(BYTE FactionPlayerCount) + FactionPlayerList = list() #(vector<tagGCCrossBattlefieldPlayer> FactionPlayerList)//阵营所有玩家列表,包含召集人 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.BuyPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ServerOnly,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FactionPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.FactionPlayerCount): + temFactionPlayerList = tagGCCrossBattlefieldPlayer() + _pos = temFactionPlayerList.ReadData(_lpData, _pos) + self.FactionPlayerList.append(temFactionPlayerList) + return _pos + + def Clear(self): + self.BuyPlayerID = 0 + self.Faction = 0 + self.ServerOnly = 0 + self.FactionPlayerCount = 0 + self.FactionPlayerList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 1 + length += 1 + for i in range(self.FactionPlayerCount): + length += self.FactionPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.BuyPlayerID) + data = CommFunc.WriteBYTE(data, self.Faction) + data = CommFunc.WriteBYTE(data, self.ServerOnly) + data = CommFunc.WriteBYTE(data, self.FactionPlayerCount) + for i in range(self.FactionPlayerCount): + data = CommFunc.WriteString(data, self.FactionPlayerList[i].GetLength(), self.FactionPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + BuyPlayerID:%d, + Faction:%d, + ServerOnly:%d, + FactionPlayerCount:%d, + FactionPlayerList:%s + '''\ + %( + self.BuyPlayerID, + self.Faction, + self.ServerOnly, + self.FactionPlayerCount, + "..." + ) + return DumpString + + +class tagGCCrossBattlefieldBuyHM(Structure): + Hour = 0 #(BYTE Hour)//战场开启时 + Minute = 0 #(BYTE Minute)//战场开启分 + BuyPlayerCount = 0 #(BYTE BuyPlayerCount) + BuyPlayerList = list() #(vector<tagGCCrossBattlefieldBuyPlayer> BuyPlayerList)//购买本场次的玩家信息列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Hour,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Minute,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.BuyPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BuyPlayerCount): + temBuyPlayerList = tagGCCrossBattlefieldBuyPlayer() + _pos = temBuyPlayerList.ReadData(_lpData, _pos) + self.BuyPlayerList.append(temBuyPlayerList) + return _pos + + def Clear(self): + self.Hour = 0 + self.Minute = 0 + self.BuyPlayerCount = 0 + self.BuyPlayerList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 1 + length += 1 + for i in range(self.BuyPlayerCount): + length += self.BuyPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.Hour) + data = CommFunc.WriteBYTE(data, self.Minute) + data = CommFunc.WriteBYTE(data, self.BuyPlayerCount) + for i in range(self.BuyPlayerCount): + data = CommFunc.WriteString(data, self.BuyPlayerList[i].GetLength(), self.BuyPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Hour:%d, + Minute:%d, + BuyPlayerCount:%d, + BuyPlayerList:%s + '''\ + %( + self.Hour, + self.Minute, + self.BuyPlayerCount, + "..." + ) + return DumpString + + +class tagGCCrossBattlefieldBuyInfo(Structure): + Head = tagHead() + HMCount = 0 #(BYTE HMCount)// 为0时清空重置,其他为增量更新 + HMBuyList = list() #(vector<tagGCCrossBattlefieldBuyHM> HMBuyList)//购买场次列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x09 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.HMCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.HMCount): + temHMBuyList = tagGCCrossBattlefieldBuyHM() + _pos = temHMBuyList.ReadData(_lpData, _pos) + self.HMBuyList.append(temHMBuyList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x09 + self.HMCount = 0 + self.HMBuyList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.HMCount): + length += self.HMBuyList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.HMCount) + for i in range(self.HMCount): + data = CommFunc.WriteString(data, self.HMBuyList[i].GetLength(), self.HMBuyList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + HMCount:%d, + HMBuyList:%s + '''\ + %( + self.Head.OutputString(), + self.HMCount, + "..." + ) + return DumpString + + +m_NAtagGCCrossBattlefieldBuyInfo=tagGCCrossBattlefieldBuyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossBattlefieldBuyInfo.Head.Cmd,m_NAtagGCCrossBattlefieldBuyInfo.Head.SubCmd))] = m_NAtagGCCrossBattlefieldBuyInfo + + +#------------------------------------------------------ # C0 07 跨服排行榜信息 #tagGCCrossBillboardInfo class tagGCCrossBillboardData(Structure): @@ -11296,6 +13669,429 @@ m_NAtagGCCrossBillboardInfo=tagGCCrossBillboardInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossBillboardInfo.Head.Cmd,m_NAtagGCCrossBillboardInfo.Head.SubCmd))] = m_NAtagGCCrossBillboardInfo + + +#------------------------------------------------------ +# C0 16 跨服排位战斗结果 #tagGCCrossChampionshipPKOver + +class tagGCCrossChampionshipPKOver(Structure): + Head = tagHead() + GroupMark = 0 #(DWORD GroupMark)// 分组标识:64、32、16、8 - 64、32、16、8强赛;4 - 半决赛; 2 - 决赛 + TimeStr = "" #(char TimeStr[19])// 结算时间,格式 yyyy-MM-dd HH:mm:ss + OverType = 0 #(BYTE OverType)// 0-正常,1-有人离线 + WinnerID = 0 #(DWORD WinnerID)// 胜方ID + LoserID = 0 #(DWORD LoserID)// 败方ID + RoundCount = 0 #(BYTE RoundCount)// PK回合数 + RoundWinnerID = list() #(vector<DWORD> RoundWinnerID)// 回合获胜ID列表 + TagNameLen = 0 #(BYTE TagNameLen) + TagName = "" #(String TagName) + Rank = 0 #(BYTE Rank)// 最终名次,决赛才有 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x16 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GroupMark,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TimeStr,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.OverType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.WinnerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.LoserID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RoundCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RoundCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.RoundWinnerID.append(value) + self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TagName,_pos = CommFunc.ReadString(_lpData, _pos,self.TagNameLen) + self.Rank,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x16 + self.GroupMark = 0 + self.TimeStr = "" + self.OverType = 0 + self.WinnerID = 0 + self.LoserID = 0 + self.RoundCount = 0 + self.RoundWinnerID = list() + self.TagNameLen = 0 + self.TagName = "" + self.Rank = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 19 + length += 1 + length += 4 + length += 4 + length += 1 + length += 4 * self.RoundCount + length += 1 + length += len(self.TagName) + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.GroupMark) + data = CommFunc.WriteString(data, 19, self.TimeStr) + data = CommFunc.WriteBYTE(data, self.OverType) + data = CommFunc.WriteDWORD(data, self.WinnerID) + data = CommFunc.WriteDWORD(data, self.LoserID) + data = CommFunc.WriteBYTE(data, self.RoundCount) + for i in range(self.RoundCount): + data = CommFunc.WriteDWORD(data, self.RoundWinnerID[i]) + data = CommFunc.WriteBYTE(data, self.TagNameLen) + data = CommFunc.WriteString(data, self.TagNameLen, self.TagName) + data = CommFunc.WriteBYTE(data, self.Rank) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GroupMark:%d, + TimeStr:%s, + OverType:%d, + WinnerID:%d, + LoserID:%d, + RoundCount:%d, + RoundWinnerID:%s, + TagNameLen:%d, + TagName:%s, + Rank:%d + '''\ + %( + self.Head.OutputString(), + self.GroupMark, + self.TimeStr, + self.OverType, + self.WinnerID, + self.LoserID, + self.RoundCount, + "...", + self.TagNameLen, + self.TagName, + self.Rank + ) + return DumpString + + +m_NAtagGCCrossChampionshipPKOver=tagGCCrossChampionshipPKOver() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossChampionshipPKOver.Head.Cmd,m_NAtagGCCrossChampionshipPKOver.Head.SubCmd))] = m_NAtagGCCrossChampionshipPKOver + + +#------------------------------------------------------ +# C0 15 跨服排位分区分组信息 #tagGCCrossChampionshipPKZoneGroupInfo + +class tagGCCrossChampionshipPKBattle(Structure): + _pack_ = 1 + _fields_ = [ + ("BattleNum", c_ubyte), # 对战组编号 1~n + ("WinPlayerID", c_int), # 获胜玩家ID + ("PlayerIDA", c_int), # 玩家IDA + ("PlayerIDB", c_int), # 玩家IDB + ] + + 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.BattleNum = 0 + self.WinPlayerID = 0 + self.PlayerIDA = 0 + self.PlayerIDB = 0 + return + + def GetLength(self): + return sizeof(tagGCCrossChampionshipPKBattle) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 15 跨服排位分区分组信息 //tagGCCrossChampionshipPKZoneGroupInfo: + BattleNum:%d, + WinPlayerID:%d, + PlayerIDA:%d, + PlayerIDB:%d + '''\ + %( + self.BattleNum, + self.WinPlayerID, + self.PlayerIDA, + self.PlayerIDB + ) + return DumpString + + +class tagGCCrossChampionshipPKGroup(Structure): + GroupMark = 0 #(DWORD GroupMark)// 战斗分区mark, 如 64、32、16、8、4-半决赛、2-决赛; + BattleCount = 0 #(BYTE BattleCount)// 对战组数 + BattleList = list() #(vector<tagGCCrossChampionshipPKBattle> BattleList)// 对战组列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.GroupMark,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BattleCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BattleCount): + temBattleList = tagGCCrossChampionshipPKBattle() + _pos = temBattleList.ReadData(_lpData, _pos) + self.BattleList.append(temBattleList) + return _pos + + def Clear(self): + self.GroupMark = 0 + self.BattleCount = 0 + self.BattleList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.BattleCount): + length += self.BattleList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.GroupMark) + data = CommFunc.WriteBYTE(data, self.BattleCount) + for i in range(self.BattleCount): + data = CommFunc.WriteString(data, self.BattleList[i].GetLength(), self.BattleList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + GroupMark:%d, + BattleCount:%d, + BattleList:%s + '''\ + %( + self.GroupMark, + self.BattleCount, + "..." + ) + return DumpString + + +class tagGCCrossChampionshipPKPlayer(Structure): + PlayerID = 0 #(DWORD PlayerID)// 玩家ID + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + Job = 0 #(BYTE Job) + LV = 0 #(WORD LV) + FightPower = 0 #(DWORD FightPower)// 战力求余亿部分 + FightPowerEx = 0 #(DWORD FightPowerEx)// 战力整除亿部分 + RealmLV = 0 #(WORD RealmLV) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.PlayerID = 0 + self.NameLen = 0 + self.PlayerName = "" + self.Job = 0 + self.LV = 0 + self.FightPower = 0 + self.FightPowerEx = 0 + self.RealmLV = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += len(self.PlayerName) + length += 1 + length += 2 + length += 4 + length += 4 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteDWORD(data, self.FightPower) + data = CommFunc.WriteDWORD(data, self.FightPowerEx) + data = CommFunc.WriteWORD(data, self.RealmLV) + return data + + def OutputString(self): + DumpString = ''' + PlayerID:%d, + NameLen:%d, + PlayerName:%s, + Job:%d, + LV:%d, + FightPower:%d, + FightPowerEx:%d, + RealmLV:%d + '''\ + %( + self.PlayerID, + self.NameLen, + self.PlayerName, + self.Job, + self.LV, + self.FightPower, + self.FightPowerEx, + self.RealmLV + ) + return DumpString + + +class tagGCCrossChampionshipPKZoneGroupInfo(Structure): + Head = tagHead() + ActID = 0 #(DWORD ActID)// 活动ID,活动ID不同则可重置前端排位赛相关缓存数据 + StateError = 0 #(BYTE StateError)// 本次活动是否已经出现流程状态异常;如服务器异常或维护服务器导致跳过步骤,则会废弃该次比赛,直到下次新活动; + ZoneID = 0 #(BYTE ZoneID)// 排位分区ID + PlayerCount = 0 #(BYTE PlayerCount)// 参赛玩家数 + PlayerList = list() #(vector<tagGCCrossChampionshipPKPlayer> PlayerList) + GroupCount = 0 #(WORD GroupCount) + GroupList = list() #(vector<tagGCCrossChampionshipPKGroup> GroupList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x15 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.StateError,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PlayerCount): + temPlayerList = tagGCCrossChampionshipPKPlayer() + _pos = temPlayerList.ReadData(_lpData, _pos) + self.PlayerList.append(temPlayerList) + self.GroupCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.GroupCount): + temGroupList = tagGCCrossChampionshipPKGroup() + _pos = temGroupList.ReadData(_lpData, _pos) + self.GroupList.append(temGroupList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x15 + self.ActID = 0 + self.StateError = 0 + self.ZoneID = 0 + self.PlayerCount = 0 + self.PlayerList = list() + self.GroupCount = 0 + self.GroupList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += 1 + length += 1 + for i in range(self.PlayerCount): + length += self.PlayerList[i].GetLength() + length += 2 + 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.WriteDWORD(data, self.ActID) + data = CommFunc.WriteBYTE(data, self.StateError) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteBYTE(data, self.PlayerCount) + for i in range(self.PlayerCount): + data = CommFunc.WriteString(data, self.PlayerList[i].GetLength(), self.PlayerList[i].GetBuffer()) + data = CommFunc.WriteWORD(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, + ActID:%d, + StateError:%d, + ZoneID:%d, + PlayerCount:%d, + PlayerList:%s, + GroupCount:%d, + GroupList:%s + '''\ + %( + self.Head.OutputString(), + self.ActID, + self.StateError, + self.ZoneID, + self.PlayerCount, + "...", + self.GroupCount, + "..." + ) + return DumpString + + +m_NAtagGCCrossChampionshipPKZoneGroupInfo=tagGCCrossChampionshipPKZoneGroupInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossChampionshipPKZoneGroupInfo.Head.Cmd,m_NAtagGCCrossChampionshipPKZoneGroupInfo.Head.SubCmd))] = m_NAtagGCCrossChampionshipPKZoneGroupInfo #------------------------------------------------------ @@ -12123,6 +14919,501 @@ m_NAtagGCCrossRealmPKStartMatch=tagGCCrossRealmPKStartMatch() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKStartMatch.Cmd,m_NAtagGCCrossRealmPKStartMatch.SubCmd))] = m_NAtagGCCrossRealmPKStartMatch + + +#------------------------------------------------------ +# C0 14 幸运云购开奖记录 #tagGCLuckyCloudBuyLotteryRecInfo + +class tagGCLuckyCloudBuyLotteryRec(Structure): + SuperItemID = 0 #(DWORD SuperItemID)// 大奖物品ID + SuperItemCount = 0 #(BYTE SuperItemCount)// 大奖物品个数 + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName)// 中奖玩家名 + LotteryNum = 0 #(WORD LotteryNum)// 开奖号码 + LotteryTime = 0 #(DWORD LotteryTime)// 开奖时间戳,秒 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.SuperItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.LotteryNum,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LotteryTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.SuperItemID = 0 + self.SuperItemCount = 0 + self.NameLen = 0 + self.PlayerName = "" + self.LotteryNum = 0 + self.LotteryTime = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 1 + length += len(self.PlayerName) + length += 2 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.SuperItemID) + data = CommFunc.WriteBYTE(data, self.SuperItemCount) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteWORD(data, self.LotteryNum) + data = CommFunc.WriteDWORD(data, self.LotteryTime) + return data + + def OutputString(self): + DumpString = ''' + SuperItemID:%d, + SuperItemCount:%d, + NameLen:%d, + PlayerName:%s, + LotteryNum:%d, + LotteryTime:%d + '''\ + %( + self.SuperItemID, + self.SuperItemCount, + self.NameLen, + self.PlayerName, + self.LotteryNum, + self.LotteryTime + ) + return DumpString + + +class tagGCLuckyCloudBuyLotteryRecInfo(Structure): + Head = tagHead() + ZoneCount = 0 #(BYTE ZoneCount)// 分区数 + ZoneIDList = list() #(vector<BYTE> ZoneIDList)// 所有分区ID列表 + ZoneID = 0 #(BYTE ZoneID)// 返回记录分区ID + Count = 0 #(WORD Count) + LotteryRecList = list() #(vector<tagGCLuckyCloudBuyLotteryRec> LotteryRecList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x14 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ZoneCount): + value,_pos=CommFunc.ReadBYTE(_lpData,_pos) + self.ZoneIDList.append(value) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temLotteryRecList = tagGCLuckyCloudBuyLotteryRec() + _pos = temLotteryRecList.ReadData(_lpData, _pos) + self.LotteryRecList.append(temLotteryRecList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x14 + self.ZoneCount = 0 + self.ZoneIDList = list() + self.ZoneID = 0 + self.Count = 0 + self.LotteryRecList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 * self.ZoneCount + length += 1 + length += 2 + for i in range(self.Count): + length += self.LotteryRecList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneCount) + for i in range(self.ZoneCount): + data = CommFunc.WriteBYTE(data, self.ZoneIDList[i]) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.LotteryRecList[i].GetLength(), self.LotteryRecList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZoneCount:%d, + ZoneIDList:%s, + ZoneID:%d, + Count:%d, + LotteryRecList:%s + '''\ + %( + self.Head.OutputString(), + self.ZoneCount, + "...", + self.ZoneID, + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCLuckyCloudBuyLotteryRecInfo=tagGCLuckyCloudBuyLotteryRecInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyLotteryRecInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyLotteryRecInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyLotteryRecInfo + + +#------------------------------------------------------ +# C0 13 幸运云购购买号码记录 #tagGCLuckyCloudBuyNumRecInfo + +class tagGCLuckyCloudBuyNumRec(Structure): + NameLen = 0 #(BYTE NameLen) + PlayerName = "" #(String PlayerName) + BuyNum = 0 #(WORD BuyNum) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.BuyNum,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.NameLen = 0 + self.PlayerName = "" + self.BuyNum = 0 + return + + def GetLength(self): + length = 0 + length += 1 + length += len(self.PlayerName) + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.PlayerName) + data = CommFunc.WriteWORD(data, self.BuyNum) + return data + + def OutputString(self): + DumpString = ''' + NameLen:%d, + PlayerName:%s, + BuyNum:%d + '''\ + %( + self.NameLen, + self.PlayerName, + self.BuyNum + ) + return DumpString + + +class tagGCLuckyCloudBuyNumRecInfo(Structure): + Head = tagHead() + RemainCount = 0 #(WORD RemainCount)// 开奖剩余份数 + Count = 0 #(WORD Count) + BuyNumRecList = list() #(vector<tagGCLuckyCloudBuyNumRec> BuyNumRecList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x13 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RemainCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temBuyNumRecList = tagGCLuckyCloudBuyNumRec() + _pos = temBuyNumRecList.ReadData(_lpData, _pos) + self.BuyNumRecList.append(temBuyNumRecList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x13 + self.RemainCount = 0 + self.Count = 0 + self.BuyNumRecList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 2 + for i in range(self.Count): + length += self.BuyNumRecList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.RemainCount) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.BuyNumRecList[i].GetLength(), self.BuyNumRecList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RemainCount:%d, + Count:%d, + BuyNumRecList:%s + '''\ + %( + self.Head.OutputString(), + self.RemainCount, + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCLuckyCloudBuyNumRecInfo=tagGCLuckyCloudBuyNumRecInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyNumRecInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyNumRecInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyNumRecInfo + + +#------------------------------------------------------ +# C0 12 幸运云购轮次信息 #tagGCLuckyCloudBuyRoundInfo + +class tagGCLuckyCloudBuyRoundItem(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(tagGCLuckyCloudBuyRoundItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C0 12 幸运云购轮次信息 //tagGCLuckyCloudBuyRoundInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagGCLuckyCloudBuyRoundInfo(Structure): + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 所属分区ID + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + RoundID = 0 #(DWORD RoundID)// 轮次唯一ID标识,当收到的轮次ID变更时,前端需清空购买号码记录缓存 + RoundNum = 0 #(BYTE RoundNum)// 今日第几轮 + SuperItemID = 0 #(DWORD SuperItemID)// 大奖物品ID + SuperItemCount = 0 #(BYTE SuperItemCount)// 大奖物品个数 + SuperItemMoneyType = 0 #(BYTE SuperItemMoneyType)// 大奖价值货币类型 + SuperItemMoneyValue = 0 #(DWORD SuperItemMoneyValue)// 大奖价值 + LVLimit = 0 #(WORD LVLimit)//开启等级 + BaseItemCount = 0 #(BYTE BaseItemCount)// 每次购买固定奖励物品数 + BaseItemList = list() #(vector<tagGCLuckyCloudBuyRoundItem> BaseItemList)// 每次购买固定奖励物品信息 + RandItemCount = 0 #(BYTE RandItemCount)// 每次购买随机奖励物品数 + RandItemList = list() #(vector<tagGCLuckyCloudBuyRoundItem> RandItemList)// 每次购买随机奖励物品信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x12 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.RoundID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SuperItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SuperItemMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SuperItemMoneyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.LVLimit,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BaseItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BaseItemCount): + temBaseItemList = tagGCLuckyCloudBuyRoundItem() + _pos = temBaseItemList.ReadData(_lpData, _pos) + self.BaseItemList.append(temBaseItemList) + self.RandItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RandItemCount): + temRandItemList = tagGCLuckyCloudBuyRoundItem() + _pos = temRandItemList.ReadData(_lpData, _pos) + self.RandItemList.append(temRandItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x12 + self.ZoneID = 0 + self.StartDate = "" + self.EndtDate = "" + self.RoundID = 0 + self.RoundNum = 0 + self.SuperItemID = 0 + self.SuperItemCount = 0 + self.SuperItemMoneyType = 0 + self.SuperItemMoneyValue = 0 + self.LVLimit = 0 + self.BaseItemCount = 0 + self.BaseItemList = list() + self.RandItemCount = 0 + self.RandItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 4 + length += 1 + length += 4 + length += 1 + length += 1 + length += 4 + length += 2 + length += 1 + for i in range(self.BaseItemCount): + length += self.BaseItemList[i].GetLength() + length += 1 + for i in range(self.RandItemCount): + length += self.RandItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteDWORD(data, self.RoundID) + data = CommFunc.WriteBYTE(data, self.RoundNum) + data = CommFunc.WriteDWORD(data, self.SuperItemID) + data = CommFunc.WriteBYTE(data, self.SuperItemCount) + data = CommFunc.WriteBYTE(data, self.SuperItemMoneyType) + data = CommFunc.WriteDWORD(data, self.SuperItemMoneyValue) + data = CommFunc.WriteWORD(data, self.LVLimit) + data = CommFunc.WriteBYTE(data, self.BaseItemCount) + for i in range(self.BaseItemCount): + data = CommFunc.WriteString(data, self.BaseItemList[i].GetLength(), self.BaseItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RandItemCount) + for i in range(self.RandItemCount): + data = CommFunc.WriteString(data, self.RandItemList[i].GetLength(), self.RandItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZoneID:%d, + StartDate:%s, + EndtDate:%s, + RoundID:%d, + RoundNum:%d, + SuperItemID:%d, + SuperItemCount:%d, + SuperItemMoneyType:%d, + SuperItemMoneyValue:%d, + LVLimit:%d, + BaseItemCount:%d, + BaseItemList:%s, + RandItemCount:%d, + RandItemList:%s + '''\ + %( + self.Head.OutputString(), + self.ZoneID, + self.StartDate, + self.EndtDate, + self.RoundID, + self.RoundNum, + self.SuperItemID, + self.SuperItemCount, + self.SuperItemMoneyType, + self.SuperItemMoneyValue, + self.LVLimit, + self.BaseItemCount, + "...", + self.RandItemCount, + "..." + ) + return DumpString + + +m_NAtagGCLuckyCloudBuyRoundInfo=tagGCLuckyCloudBuyRoundInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCLuckyCloudBuyRoundInfo.Head.Cmd,m_NAtagGCLuckyCloudBuyRoundInfo.Head.SubCmd))] = m_NAtagGCLuckyCloudBuyRoundInfo #------------------------------------------------------ @@ -15399,6 +18690,87 @@ #------------------------------------------------------ +# A3 C4 装备神装拆解结果 #tagMCEquipDecomposeRet + +class tagMCEquipDecomposeRet(Structure): + Head = tagHead() + DecomposeEquipIDCount = 0 #(BYTE DecomposeEquipIDCount)// 已分解的装备个数 + DecomposeEquipIDList = list() #(vector<DWORD> DecomposeEquipIDList)// 已分解的神装装备ID列表 + GetItemLen = 0 #(WORD GetItemLen) + GetItemData = "" #(String GetItemData)// 获得物品信息 [[itemID,itemCount,isBind], [或itemID,itemCount,isBind,isAppoint], {或物品信息字典}, ...] + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC4 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.DecomposeEquipIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DecomposeEquipIDCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.DecomposeEquipIDList.append(value) + self.GetItemLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.GetItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.GetItemLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC4 + self.DecomposeEquipIDCount = 0 + self.DecomposeEquipIDList = list() + self.GetItemLen = 0 + self.GetItemData = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.DecomposeEquipIDCount + length += 2 + length += len(self.GetItemData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.DecomposeEquipIDCount) + for i in range(self.DecomposeEquipIDCount): + data = CommFunc.WriteDWORD(data, self.DecomposeEquipIDList[i]) + data = CommFunc.WriteWORD(data, self.GetItemLen) + data = CommFunc.WriteString(data, self.GetItemLen, self.GetItemData) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + DecomposeEquipIDCount:%d, + DecomposeEquipIDList:%s, + GetItemLen:%d, + GetItemData:%s + '''\ + %( + self.Head.OutputString(), + self.DecomposeEquipIDCount, + "...", + self.GetItemLen, + self.GetItemData + ) + return DumpString + + +m_NAtagMCEquipDecomposeRet=tagMCEquipDecomposeRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipDecomposeRet.Head.Cmd,m_NAtagMCEquipDecomposeRet.Head.SubCmd))] = m_NAtagMCEquipDecomposeRet + + +#------------------------------------------------------ # A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo class tagMCEquipPartStar(Structure): @@ -16106,6 +19478,62 @@ m_NAtagMCFamilyActivityInfo=tagMCFamilyActivityInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyActivityInfo.Head.Cmd,m_NAtagMCFamilyActivityInfo.Head.SubCmd))] = m_NAtagMCFamilyActivityInfo + + +#------------------------------------------------------ +# A3 54 法器信息 #tagMCFaQiInfo + +class tagMCFaQiInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("LV", c_ubyte), #等阶 + ("EatItemCount", c_int), #当前阶已吃丹个数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0x54 + 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 = 0x54 + self.LV = 0 + self.EatItemCount = 0 + return + + def GetLength(self): + return sizeof(tagMCFaQiInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 54 法器信息 //tagMCFaQiInfo: + Cmd:%s, + SubCmd:%s, + LV:%d, + EatItemCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.LV, + self.EatItemCount + ) + return DumpString + + +m_NAtagMCFaQiInfo=tagMCFaQiInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFaQiInfo.Cmd,m_NAtagMCFaQiInfo.SubCmd))] = m_NAtagMCFaQiInfo #------------------------------------------------------ @@ -17247,6 +20675,62 @@ m_NAtagMCInvestInfo=tagMCInvestInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCInvestInfo.Head.Cmd,m_NAtagMCInvestInfo.Head.SubCmd))] = m_NAtagMCInvestInfo + + +#------------------------------------------------------ +# A3 55 炼体信息 #tagMCLianTiInfo + +class tagMCLianTiInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("LianTiLV", c_ubyte), #炼体等级 + ("EatItemCount", c_int), #当前等级已吃丹个数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0x55 + 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 = 0x55 + self.LianTiLV = 0 + self.EatItemCount = 0 + return + + def GetLength(self): + return sizeof(tagMCLianTiInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 55 炼体信息 //tagMCLianTiInfo: + Cmd:%s, + SubCmd:%s, + LianTiLV:%d, + EatItemCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.LianTiLV, + self.EatItemCount + ) + return DumpString + + +m_NAtagMCLianTiInfo=tagMCLianTiInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLianTiInfo.Cmd,m_NAtagMCLianTiInfo.SubCmd))] = m_NAtagMCLianTiInfo #------------------------------------------------------ @@ -19992,22 +23476,183 @@ #------------------------------------------------------ -#A3 01 坐骑培养信息 #tagTrainHorseData +# A3 56 通天令信息 #tagMCTongTianLingInfo -class tagTrainHorseData(Structure): +class tagMCTongTianLingInfo(Structure): + Head = tagHead() + TTLBuyState = 0 #(BYTE TTLBuyState)//通天令是否已购买 + TTLLV = 0 #(BYTE TTLLV)//通天令等级,从0开始 + CurPoint = 0 #(DWORD CurPoint)//通天令当前等级经验积分点 + AwardStateCount = 0 #(BYTE AwardStateCount)//等级领奖记录值数,每个值存31个记录 0-30, 31-61, ... + CommAwardStateList = list() #(vector<DWORD> CommAwardStateList)//常规奖励领奖记录,按等级二进制位存储是否领奖 + XianAwardStateList = list() #(vector<DWORD> XianAwardStateList)//仙品奖励领奖记录,按等级二进制位存储是否领奖 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x56 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.TTLBuyState,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TTLLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CurPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardStateCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardStateCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.CommAwardStateList.append(value) + for i in range(self.AwardStateCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.XianAwardStateList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x56 + self.TTLBuyState = 0 + self.TTLLV = 0 + self.CurPoint = 0 + self.AwardStateCount = 0 + self.CommAwardStateList = list() + self.XianAwardStateList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 + length += 1 + length += 4 * self.AwardStateCount + length += 4 * self.AwardStateCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TTLBuyState) + data = CommFunc.WriteBYTE(data, self.TTLLV) + data = CommFunc.WriteDWORD(data, self.CurPoint) + data = CommFunc.WriteBYTE(data, self.AwardStateCount) + for i in range(self.AwardStateCount): + data = CommFunc.WriteDWORD(data, self.CommAwardStateList[i]) + for i in range(self.AwardStateCount): + data = CommFunc.WriteDWORD(data, self.XianAwardStateList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + TTLBuyState:%d, + TTLLV:%d, + CurPoint:%d, + AwardStateCount:%d, + CommAwardStateList:%s, + XianAwardStateList:%s + '''\ + %( + self.Head.OutputString(), + self.TTLBuyState, + self.TTLLV, + self.CurPoint, + self.AwardStateCount, + "...", + "..." + ) + return DumpString + + +m_NAtagMCTongTianLingInfo=tagMCTongTianLingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTongTianLingInfo.Head.Cmd,m_NAtagMCTongTianLingInfo.Head.SubCmd))] = m_NAtagMCTongTianLingInfo + + +#------------------------------------------------------ +# A3 58 通天令任务奖励信息 #tagMCTongTianLingTaskAwardInfo + +class tagMCTongTianLingTaskAwardInfo(Structure): + Head = tagHead() + AwardStateCount = 0 #(BYTE AwardStateCount) + TaskAwardStateList = list() #(vector<DWORD> TaskAwardStateList)//任务领奖记录值个数,按任务ID二进制位存储是否已领取,每个值存31个记录 0-30, 31-61, ... + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x58 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AwardStateCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardStateCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TaskAwardStateList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x58 + self.AwardStateCount = 0 + self.TaskAwardStateList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.AwardStateCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AwardStateCount) + for i in range(self.AwardStateCount): + data = CommFunc.WriteDWORD(data, self.TaskAwardStateList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AwardStateCount:%d, + TaskAwardStateList:%s + '''\ + %( + self.Head.OutputString(), + self.AwardStateCount, + "..." + ) + return DumpString + + +m_NAtagMCTongTianLingTaskAwardInfo=tagMCTongTianLingTaskAwardInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTongTianLingTaskAwardInfo.Head.Cmd,m_NAtagMCTongTianLingTaskAwardInfo.Head.SubCmd))] = m_NAtagMCTongTianLingTaskAwardInfo + + +#------------------------------------------------------ +# A3 57 通天令任务进度信息 #tagMCTongTianLingTaskValueInfo + +class tagMCTongTianLingTaskValue(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("LV", c_ubyte), #等阶 - ("EatItemCount", c_int), #当前阶已吃丹个数 - ("SkinPlusState", c_int), #幻化激活状态,按位存储是否激活,幻化编号ID对应位 + ("TaskType", c_ubyte), #成就类型 + ("IsDaily", c_ubyte), #是否每日任务 + ("TaskValue", c_int), #当前完成进度值 ] def __init__(self): self.Clear() - self.Cmd = 0xA3 - self.SubCmd = 0x01 return def ReadData(self, stringData, _pos=0, _len=0): @@ -20016,39 +23661,193 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xA3 - self.SubCmd = 0x01 - self.LV = 0 - self.EatItemCount = 0 - self.SkinPlusState = 0 + self.TaskType = 0 + self.IsDaily = 0 + self.TaskValue = 0 return def GetLength(self): - return sizeof(tagTrainHorseData) + return sizeof(tagMCTongTianLingTaskValue) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''//A3 01 坐骑培养信息 //tagTrainHorseData: - Cmd:%s, - SubCmd:%s, - LV:%d, - EatItemCount:%d, - SkinPlusState:%d + DumpString = '''// A3 57 通天令任务进度信息 //tagMCTongTianLingTaskValueInfo: + TaskType:%d, + IsDaily:%d, + TaskValue:%d '''\ %( - self.Cmd, - self.SubCmd, + self.TaskType, + self.IsDaily, + self.TaskValue + ) + return DumpString + + +class tagMCTongTianLingTaskValueInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count)//信息个数 + TaskValueList = list() #(vector<tagMCTongTianLingTaskValue> TaskValueList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x57 + 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): + temTaskValueList = tagMCTongTianLingTaskValue() + _pos = temTaskValueList.ReadData(_lpData, _pos) + self.TaskValueList.append(temTaskValueList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x57 + self.Count = 0 + self.TaskValueList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.TaskValueList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.TaskValueList[i].GetLength(), self.TaskValueList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + TaskValueList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCTongTianLingTaskValueInfo=tagMCTongTianLingTaskValueInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTongTianLingTaskValueInfo.Head.Cmd,m_NAtagMCTongTianLingTaskValueInfo.Head.SubCmd))] = m_NAtagMCTongTianLingTaskValueInfo + + +#------------------------------------------------------ +#A3 01 坐骑培养信息 #tagTrainHorseData + +class tagTrainHorseData(Structure): + Head = tagHead() + LV = 0 #(BYTE LV)//等阶 + EatItemCount = 0 #(DWORD EatItemCount)//当前阶已吃丹个数 + SkinPlusState = 0 #(DWORD SkinPlusState)//幻化激活状态,按位存储是否激活,幻化编号ID对应位 + TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 + TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 + TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x01 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.LV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.EatItemCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SkinPlusState,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TrainTypes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainLVList.append(value) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainItemCountList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x01 + self.LV = 0 + self.EatItemCount = 0 + self.SkinPlusState = 0 + self.TrainTypes = 0 + self.TrainLVList = list() + self.TrainItemCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 + length += 4 + length += 1 + length += 4 * self.TrainTypes + length += 4 * self.TrainTypes + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.LV) + data = CommFunc.WriteDWORD(data, self.EatItemCount) + data = CommFunc.WriteDWORD(data, self.SkinPlusState) + data = CommFunc.WriteBYTE(data, self.TrainTypes) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + LV:%d, + EatItemCount:%d, + SkinPlusState:%d, + TrainTypes:%d, + TrainLVList:%s, + TrainItemCountList:%s + '''\ + %( + self.Head.OutputString(), self.LV, self.EatItemCount, - self.SkinPlusState + self.SkinPlusState, + self.TrainTypes, + "...", + "..." ) return DumpString m_NAtagTrainHorseData=tagTrainHorseData() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagTrainHorseData.Cmd,m_NAtagTrainHorseData.SubCmd))] = m_NAtagTrainHorseData +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagTrainHorseData.Head.Cmd,m_NAtagTrainHorseData.Head.SubCmd))] = m_NAtagTrainHorseData #------------------------------------------------------ @@ -20843,6 +24642,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("HasSendGold", c_int), # 已用额度 + ("ServerGrabCnt", c_int), # 全服红包已抢次数 ] def __init__(self): @@ -20860,6 +24660,7 @@ self.Cmd = 0xA5 self.SubCmd = 0x05 self.HasSendGold = 0 + self.ServerGrabCnt = 0 return def GetLength(self): @@ -20872,12 +24673,14 @@ DumpString = '''// A5 05 通知家族钻石红包已用额度 //tagMCFamilyRedPacketGoldLimit: Cmd:%s, SubCmd:%s, - HasSendGold:%d + HasSendGold:%d, + ServerGrabCnt:%d '''\ %( self.Cmd, self.SubCmd, - self.HasSendGold + self.HasSendGold, + self.ServerGrabCnt ) return DumpString @@ -23635,6 +27438,90 @@ #------------------------------------------------------ +# A8 18 灵器培养信息 #tagMCLingQiTrainInfo + +class tagMCLingQiTrainInfo(Structure): + Head = tagHead() + EquipPlace = 0 #(BYTE EquipPlace)//灵器装备位 + TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 + TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 + TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x18 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.EquipPlace,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TrainTypes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainLVList.append(value) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainItemCountList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x18 + self.EquipPlace = 0 + self.TrainTypes = 0 + self.TrainLVList = list() + self.TrainItemCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.TrainTypes + length += 4 * self.TrainTypes + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.EquipPlace) + data = CommFunc.WriteBYTE(data, self.TrainTypes) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + EquipPlace:%d, + TrainTypes:%d, + TrainLVList:%s, + TrainItemCountList:%s + '''\ + %( + self.Head.OutputString(), + self.EquipPlace, + self.TrainTypes, + "...", + "..." + ) + return DumpString + + +m_NAtagMCLingQiTrainInfo=tagMCLingQiTrainInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLingQiTrainInfo.Head.Cmd,m_NAtagMCLingQiTrainInfo.Head.SubCmd))] = m_NAtagMCLingQiTrainInfo + + +#------------------------------------------------------ # A8 14 合成结果通知 #tagMCMakeItemAnswer class tagMCMakeItemAnswer(Structure): @@ -24059,6 +27946,83 @@ m_NAtagMCNotifyUseItemGetItem=tagMCNotifyUseItemGetItem() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNotifyUseItemGetItem.Head.Cmd,m_NAtagMCNotifyUseItemGetItem.Head.SubCmd))] = m_NAtagMCNotifyUseItemGetItem + + +#------------------------------------------------------ +# A8 17 宠物培养信息 #tagMCPetTrainInfo + +class tagMCPetTrainInfo(Structure): + Head = tagHead() + TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 + TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 + TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x17 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.TrainTypes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainLVList.append(value) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainItemCountList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x17 + self.TrainTypes = 0 + self.TrainLVList = list() + self.TrainItemCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.TrainTypes + length += 4 * self.TrainTypes + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TrainTypes) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + TrainTypes:%d, + TrainLVList:%s, + TrainItemCountList:%s + '''\ + %( + self.Head.OutputString(), + self.TrainTypes, + "...", + "..." + ) + return DumpString + + +m_NAtagMCPetTrainInfo=tagMCPetTrainInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPetTrainInfo.Head.Cmd,m_NAtagMCPetTrainInfo.Head.SubCmd))] = m_NAtagMCPetTrainInfo #------------------------------------------------------ @@ -24606,6 +28570,285 @@ #------------------------------------------------------ +# AA 55 垃圾收集活动信息 #tagMCActGarbageSortingInfo + +class tagMCActGarbageSortingInfo(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)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x55 + 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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x55 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + + 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.ResetType) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType + ) + return DumpString + + +m_NAtagMCActGarbageSortingInfo=tagMCActGarbageSortingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageSortingInfo.Head.Cmd,m_NAtagMCActGarbageSortingInfo.Head.SubCmd))] = m_NAtagMCActGarbageSortingInfo + + +#------------------------------------------------------ +# AA 57 垃圾收集活动分类结果 #tagMCActGarbageSortingResult + +class tagMCActGarbageSortingResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 + ("GarbageSortingType", c_ubyte), #垃圾分类类型 + ("IsRight", c_ubyte), #是否正确 + ("AddEnvValue", c_int), #增加环保值 + ("HisEnvValueTotal", c_int), # 当前活动累计获得环保值 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x57 + 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 = 0x57 + self.ActNum = 0 + self.GarbageSortingType = 0 + self.IsRight = 0 + self.AddEnvValue = 0 + self.HisEnvValueTotal = 0 + return + + def GetLength(self): + return sizeof(tagMCActGarbageSortingResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 57 垃圾收集活动分类结果 //tagMCActGarbageSortingResult: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + GarbageSortingType:%d, + IsRight:%d, + AddEnvValue:%d, + HisEnvValueTotal:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.GarbageSortingType, + self.IsRight, + self.AddEnvValue, + self.HisEnvValueTotal + ) + return DumpString + + +m_NAtagMCActGarbageSortingResult=tagMCActGarbageSortingResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageSortingResult.Cmd,m_NAtagMCActGarbageSortingResult.SubCmd))] = m_NAtagMCActGarbageSortingResult + + +#------------------------------------------------------ +# AA 56 垃圾收集活动任务进度信息 #tagMCActGarbageTaskInfo + +class tagMCActGarbageTask(Structure): + _pack_ = 1 + _fields_ = [ + ("GarbageTaskID", c_ubyte), #垃圾任务ID + ("GarbageTaskValue", c_int), #当前进度值,一直累加 + ("GarbageTaskFinishCount", c_int), #当前已完成次数; 前端计算未完成次数的进度值=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.GarbageTaskID = 0 + self.GarbageTaskValue = 0 + self.GarbageTaskFinishCount = 0 + return + + def GetLength(self): + return sizeof(tagMCActGarbageTask) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 56 垃圾收集活动任务进度信息 //tagMCActGarbageTaskInfo: + GarbageTaskID:%d, + GarbageTaskValue:%d, + GarbageTaskFinishCount:%d + '''\ + %( + self.GarbageTaskID, + self.GarbageTaskValue, + self.GarbageTaskFinishCount + ) + return DumpString + + +class tagMCActGarbageTaskInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + HisEnvValueTotal = 0 #(DWORD HisEnvValueTotal)// 当前活动累计获得环保值 + GarbageTaskCount = 0 #(BYTE GarbageTaskCount)//任务数 + GarbageTaskList = list() #(vector<tagMCActGarbageTask> GarbageTaskList)//任务信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x56 + 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.HisEnvValueTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.GarbageTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GarbageTaskCount): + temGarbageTaskList = tagMCActGarbageTask() + _pos = temGarbageTaskList.ReadData(_lpData, _pos) + self.GarbageTaskList.append(temGarbageTaskList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x56 + self.ActNum = 0 + self.HisEnvValueTotal = 0 + self.GarbageTaskCount = 0 + self.GarbageTaskList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 + length += 1 + for i in range(self.GarbageTaskCount): + length += self.GarbageTaskList[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.WriteDWORD(data, self.HisEnvValueTotal) + data = CommFunc.WriteBYTE(data, self.GarbageTaskCount) + for i in range(self.GarbageTaskCount): + data = CommFunc.WriteString(data, self.GarbageTaskList[i].GetLength(), self.GarbageTaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + HisEnvValueTotal:%d, + GarbageTaskCount:%d, + GarbageTaskList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.HisEnvValueTotal, + self.GarbageTaskCount, + "..." + ) + return DumpString + + +m_NAtagMCActGarbageTaskInfo=tagMCActGarbageTaskInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageTaskInfo.Head.Cmd,m_NAtagMCActGarbageTaskInfo.Head.SubCmd))] = m_NAtagMCActGarbageTaskInfo + + +#------------------------------------------------------ # AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo class tagMCActGrowupBuyCTGItem(Structure): @@ -24850,6 +29093,148 @@ m_NAtagMCActGrowupBuyInfo=tagMCActGrowupBuyInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGrowupBuyInfo.Head.Cmd,m_NAtagMCActGrowupBuyInfo.Head.SubCmd))] = m_NAtagMCActGrowupBuyInfo + + +#------------------------------------------------------ +# AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo + +class tagMCActHorsePetFeastTime(Structure): + StartTime = "" #(char StartTime[5])// 开始时间 H:M + EndtTime = "" #(char EndtTime[5])// 结束时间 H:M + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + return _pos + + def Clear(self): + self.StartTime = "" + self.EndtTime = "" + return + + def GetLength(self): + length = 0 + length += 5 + length += 5 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 5, self.StartTime) + data = CommFunc.WriteString(data, 5, self.EndtTime) + return data + + def OutputString(self): + DumpString = ''' + StartTime:%s, + EndtTime:%s + '''\ + %( + self.StartTime, + self.EndtTime + ) + return DumpString + + +class tagMCActHorsePetFeastInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + TimeCount = 0 #(BYTE TimeCount) + ActTimeList = list() #(vector<tagMCActHorsePetFeastTime> ActTimeList)// 活动时间 H:M 列表 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x54 + 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.TimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TimeCount): + temActTimeList = tagMCActHorsePetFeastTime() + _pos = temActTimeList.ReadData(_lpData, _pos) + self.ActTimeList.append(temActTimeList) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x54 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.TimeCount = 0 + self.ActTimeList = list() + self.LimitLV = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + for i in range(self.TimeCount): + length += self.ActTimeList[i].GetLength() + length += 2 + + 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.TimeCount) + for i in range(self.TimeCount): + data = CommFunc.WriteString(data, self.ActTimeList[i].GetLength(), self.ActTimeList[i].GetBuffer()) + data = CommFunc.WriteWORD(data, self.LimitLV) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + TimeCount:%d, + ActTimeList:%s, + LimitLV:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.TimeCount, + "...", + self.LimitLV + ) + return DumpString + + +m_NAtagMCActHorsePetFeastInfo=tagMCActHorsePetFeastInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetFeastInfo.Head.Cmd,m_NAtagMCActHorsePetFeastInfo.Head.SubCmd))] = m_NAtagMCActHorsePetFeastInfo #------------------------------------------------------ @@ -26073,11 +30458,12 @@ class tagMCActSingleRechargeInfo(Structure): Head = tagHead() - ActNum = 0 #(BYTE ActNum)//活动编号 + ActNum = 0 #(BYTE ActNum)// 活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d - IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 LimitLV = 0 #(WORD LimitLV)// 限制等级 + AwardRuleType = 0 #(BYTE AwardRuleType)// 领奖规则类型 0-向下兼容;1-匹配最高档;2-精确匹配对应档次 AwardCount = 0 #(BYTE AwardCount)// 奖励档数 AwardInfo = list() #(vector<tagMCActSingleRechargeAward> AwardInfo)// 奖励档信息 data = None @@ -26096,6 +30482,7 @@ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardRuleType,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.AwardCount): temAwardInfo = tagMCActSingleRechargeAward() @@ -26113,6 +30500,7 @@ self.EndtDate = "" self.IsDayReset = 0 self.LimitLV = 0 + self.AwardRuleType = 0 self.AwardCount = 0 self.AwardInfo = list() return @@ -26125,6 +30513,7 @@ length += 10 length += 1 length += 2 + length += 1 length += 1 for i in range(self.AwardCount): length += self.AwardInfo[i].GetLength() @@ -26139,6 +30528,7 @@ data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteBYTE(data, self.IsDayReset) data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.AwardRuleType) data = CommFunc.WriteBYTE(data, self.AwardCount) for i in range(self.AwardCount): data = CommFunc.WriteString(data, self.AwardInfo[i].GetLength(), self.AwardInfo[i].GetBuffer()) @@ -26152,6 +30542,7 @@ EndtDate:%s, IsDayReset:%d, LimitLV:%d, + AwardRuleType:%d, AwardCount:%d, AwardInfo:%s '''\ @@ -26162,6 +30553,7 @@ self.EndtDate, self.IsDayReset, self.LimitLV, + self.AwardRuleType, self.AwardCount, "..." ) @@ -26181,7 +30573,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 - ("HightestSingleRecharge", c_int), # 最高单笔充值额度 + ("CanAwardValue", c_int), #可否领奖记录,按奖励索引二进制位存储是否可领取 ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取 ] @@ -26200,7 +30592,7 @@ self.Cmd = 0xAA self.SubCmd = 0x51 self.ActNum = 0 - self.HightestSingleRecharge = 0 + self.CanAwardValue = 0 self.AwardRecord = 0 return @@ -26215,14 +30607,14 @@ Cmd:%s, SubCmd:%s, ActNum:%d, - HightestSingleRecharge:%d, + CanAwardValue:%d, AwardRecord:%d '''\ %( self.Cmd, self.SubCmd, self.ActNum, - self.HightestSingleRecharge, + self.CanAwardValue, self.AwardRecord ) return DumpString @@ -26491,6 +30883,322 @@ m_NAtagMCActTotalRechargeInfo=tagMCActTotalRechargeInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTotalRechargeInfo.Head.Cmd,m_NAtagMCActTotalRechargeInfo.Head.SubCmd))] = m_NAtagMCActTotalRechargeInfo + + +#------------------------------------------------------ +# AA 52 转盘活动信息 #tagMCActTurntableInfo + +class tagMCActTurntableItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemNum", c_ubyte), #物品编号 1~n;注意转盘已确定物品编号 与 极品终极物品待选择库编号可能相同,但并不代表同一物品 + ("ItemLibType", c_ubyte), #物品库类型;1-常规,2-极品,3-终极 + ("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.ItemNum = 0 + self.ItemLibType = 0 + self.ItemID = 0 + self.ItemCount = 0 + return + + def GetLength(self): + return sizeof(tagMCActTurntableItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 52 转盘活动信息 //tagMCActTurntableInfo: + ItemNum:%d, + ItemLibType:%d, + ItemID:%d, + ItemCount:%d + '''\ + %( + self.ItemNum, + self.ItemLibType, + self.ItemID, + self.ItemCount + ) + return DumpString + + +class tagMCActTurntableInfo(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)// 限制等级 + CTGPrizeCount = 0 #(BYTE CTGPrizeCount) + CTGPrizeList = list() #(vector<DWORD> CTGPrizeList)// 累计充值额度奖励次数列表 [奖励第1次所需累计充值额度, 第2次, ...] + UseMoneyType = 0 #(BYTE UseMoneyType)// 累计消费货币类型 + UseMoneyPrizeCount = 0 #(BYTE UseMoneyPrizeCount) + UseMoneyPrizeList = list() #(vector<DWORD> UseMoneyPrizeList)// 累计消费货币奖励次数列表 [奖励第1次所需累计消费货币, 第2次, ...] + TurnItemCount = 0 #(BYTE TurnItemCount) + TurnItemList = list() #(vector<tagMCActTurntableItem> TurnItemList)// 转盘已确定的物品列表,包含常规物品+极品物品+终极物品,活动开始时,后端直接随机生成常规物品,已确定的物品不包含极品、终极物品时需要先选择才能使用转盘; + GoodItemCount = 0 #(BYTE GoodItemCount) + GoodItemList = list() #(vector<tagMCActTurntableItem> GoodItemList)// 极品物品待选择库,由玩家从库中选择放入转盘的物品;注意此库中的物品编号仅表示在该库中的编号,可能与转盘已确定的物品编号重复,但并不代表同一物品; + GoodItemCanChooseCount = 0 #(BYTE GoodItemCanChooseCount)// 极品物品可选择个数 + SuperItemCount = 0 #(BYTE SuperItemCount) + SuperItemList = list() #(vector<tagMCActTurntableItem> SuperItemList)// 终极物品待选择库,由玩家从库中选择放入转盘的物品;注意此库中的物品编号仅表示在该库中的编号,可能与转盘已确定的物品编号重复,但并不代表同一物品; + SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 终极物品可选择个数 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x52 + 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.CTGPrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CTGPrizeCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.CTGPrizeList.append(value) + self.UseMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.UseMoneyPrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.UseMoneyPrizeCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.UseMoneyPrizeList.append(value) + self.TurnItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TurnItemCount): + temTurnItemList = tagMCActTurntableItem() + _pos = temTurnItemList.ReadData(_lpData, _pos) + self.TurnItemList.append(temTurnItemList) + self.GoodItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GoodItemCount): + temGoodItemList = tagMCActTurntableItem() + _pos = temGoodItemList.ReadData(_lpData, _pos) + self.GoodItemList.append(temGoodItemList) + self.GoodItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SuperItemCount): + temSuperItemList = tagMCActTurntableItem() + _pos = temSuperItemList.ReadData(_lpData, _pos) + self.SuperItemList.append(temSuperItemList) + self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x52 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.CTGPrizeCount = 0 + self.CTGPrizeList = list() + self.UseMoneyType = 0 + self.UseMoneyPrizeCount = 0 + self.UseMoneyPrizeList = list() + self.TurnItemCount = 0 + self.TurnItemList = list() + self.GoodItemCount = 0 + self.GoodItemList = list() + self.GoodItemCanChooseCount = 0 + self.SuperItemCount = 0 + self.SuperItemList = list() + self.SuperItemCanChooseCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 2 + length += 1 + length += 4 * self.CTGPrizeCount + length += 1 + length += 1 + length += 4 * self.UseMoneyPrizeCount + length += 1 + for i in range(self.TurnItemCount): + length += self.TurnItemList[i].GetLength() + length += 1 + for i in range(self.GoodItemCount): + length += self.GoodItemList[i].GetLength() + length += 1 + length += 1 + for i in range(self.SuperItemCount): + length += self.SuperItemList[i].GetLength() + length += 1 + + 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.CTGPrizeCount) + for i in range(self.CTGPrizeCount): + data = CommFunc.WriteDWORD(data, self.CTGPrizeList[i]) + data = CommFunc.WriteBYTE(data, self.UseMoneyType) + data = CommFunc.WriteBYTE(data, self.UseMoneyPrizeCount) + for i in range(self.UseMoneyPrizeCount): + data = CommFunc.WriteDWORD(data, self.UseMoneyPrizeList[i]) + data = CommFunc.WriteBYTE(data, self.TurnItemCount) + for i in range(self.TurnItemCount): + data = CommFunc.WriteString(data, self.TurnItemList[i].GetLength(), self.TurnItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.GoodItemCount) + for i in range(self.GoodItemCount): + data = CommFunc.WriteString(data, self.GoodItemList[i].GetLength(), self.GoodItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.GoodItemCanChooseCount) + data = CommFunc.WriteBYTE(data, self.SuperItemCount) + for i in range(self.SuperItemCount): + data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + CTGPrizeCount:%d, + CTGPrizeList:%s, + UseMoneyType:%d, + UseMoneyPrizeCount:%d, + UseMoneyPrizeList:%s, + TurnItemCount:%d, + TurnItemList:%s, + GoodItemCount:%d, + GoodItemList:%s, + GoodItemCanChooseCount:%d, + SuperItemCount:%d, + SuperItemList:%s, + SuperItemCanChooseCount:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.CTGPrizeCount, + "...", + self.UseMoneyType, + self.UseMoneyPrizeCount, + "...", + self.TurnItemCount, + "...", + self.GoodItemCount, + "...", + self.GoodItemCanChooseCount, + self.SuperItemCount, + "...", + self.SuperItemCanChooseCount + ) + return DumpString + + +m_NAtagMCActTurntableInfo=tagMCActTurntableInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTurntableInfo.Head.Cmd,m_NAtagMCActTurntableInfo.Head.SubCmd))] = m_NAtagMCActTurntableInfo + + +#------------------------------------------------------ +# AA 53 转盘活动玩家信息 #tagMCActTurntablePlayerInfo + +class tagMCActTurntablePlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 + ("CanUseCount", c_ubyte), #可转盘次数 + ("CTGTotal", c_int), #累计充值额度 + ("UseMoneyTotal", c_int), #累计消费货币额度 + ("TurnItemState", c_int), #转盘物品已抽中记录,按转盘物品编号二进制位代表是否已抽中 + ("GetItemNum", c_ubyte), #本次抽中的物品编号,非转盘结果时为0,大于0时为通知本次转到的物品编号 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x53 + 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 = 0x53 + self.ActNum = 0 + self.CanUseCount = 0 + self.CTGTotal = 0 + self.UseMoneyTotal = 0 + self.TurnItemState = 0 + self.GetItemNum = 0 + return + + def GetLength(self): + return sizeof(tagMCActTurntablePlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 53 转盘活动玩家信息 //tagMCActTurntablePlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + CanUseCount:%d, + CTGTotal:%d, + UseMoneyTotal:%d, + TurnItemState:%d, + GetItemNum:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.CanUseCount, + self.CTGTotal, + self.UseMoneyTotal, + self.TurnItemState, + self.GetItemNum + ) + return DumpString + + +m_NAtagMCActTurntablePlayerInfo=tagMCActTurntablePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTurntablePlayerInfo.Cmd,m_NAtagMCActTurntablePlayerInfo.SubCmd))] = m_NAtagMCActTurntablePlayerInfo #------------------------------------------------------ @@ -26938,6 +31646,288 @@ m_NAtagMCActWishingWellPlayerInfo=tagMCActWishingWellPlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingWellPlayerInfo.Head.Cmd,m_NAtagMCActWishingWellPlayerInfo.Head.SubCmd))] = m_NAtagMCActWishingWellPlayerInfo + + +#------------------------------------------------------ +# AA 59 仙匣秘境抽奖结果 #tagMCActXianXiaMJAwardItemResult + +class tagMCActXianXiaMJAwardItemResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库 + ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同 + ("ItemCount", c_ushort), + ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中; + ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x59 + 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 = 0x59 + self.ActNum = 0 + self.ItemLibType = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.PosNum = 0 + self.TotalTimesNow = 0 + return + + def GetLength(self): + return sizeof(tagMCActXianXiaMJAwardItemResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 59 仙匣秘境抽奖结果 //tagMCActXianXiaMJAwardItemResult: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + ItemLibType:%d, + ItemID:%d, + ItemCount:%d, + PosNum:%d, + TotalTimesNow:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.ItemLibType, + self.ItemID, + self.ItemCount, + self.PosNum, + self.TotalTimesNow + ) + return DumpString + + +m_NAtagMCActXianXiaMJAwardItemResult=tagMCActXianXiaMJAwardItemResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJAwardItemResult.Cmd,m_NAtagMCActXianXiaMJAwardItemResult.SubCmd))] = m_NAtagMCActXianXiaMJAwardItemResult + + +#------------------------------------------------------ +# AA 58 仙匣秘境活动信息 #tagMCActXianXiaMJInfo + +class tagMCActXianXiaMJAwardItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库 + ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同 + ("ItemCount", c_ushort), + ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中; + ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0 + ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限 + ("LayerLimit", c_ubyte), #大于等于X层后可产出,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.ItemLibType = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.PosNum = 0 + self.TotalTimesNow = 0 + self.TotalTimesMax = 0 + self.LayerLimit = 0 + return + + def GetLength(self): + return sizeof(tagMCActXianXiaMJAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 58 仙匣秘境活动信息 //tagMCActXianXiaMJInfo: + ItemLibType:%d, + ItemID:%d, + ItemCount:%d, + PosNum:%d, + TotalTimesNow:%d, + TotalTimesMax:%d, + LayerLimit:%d + '''\ + %( + self.ItemLibType, + self.ItemID, + self.ItemCount, + self.PosNum, + self.TotalTimesNow, + self.TotalTimesMax, + self.LayerLimit + ) + return DumpString + + +class tagMCActXianXiaMJInfo(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)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 + MoneyType = 0 #(BYTE MoneyType)//消耗货币类型 + MoneyValue = 0 #(WORD MoneyValue)//消耗货币值 + LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层 + AwardItemCount = 0 #(BYTE AwardItemCount) + AwardItemList = list() #(vector<tagMCActXianXiaMJAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品 + SuperItemCount = 0 #(BYTE SuperItemCount) + SuperItemList = list() #(vector<tagMCActXianXiaMJAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品; + SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x58 + 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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCActXianXiaMJAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SuperItemCount): + temSuperItemList = tagMCActXianXiaMJAwardItem() + _pos = temSuperItemList.ReadData(_lpData, _pos) + self.SuperItemList.append(temSuperItemList) + self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x58 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + self.MoneyType = 0 + self.MoneyValue = 0 + self.LayerNum = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + self.SuperItemCount = 0 + self.SuperItemList = list() + self.SuperItemCanChooseCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 2 + length += 1 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + length += 1 + for i in range(self.SuperItemCount): + length += self.SuperItemList[i].GetLength() + length += 1 + + 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.ResetType) + data = CommFunc.WriteBYTE(data, self.MoneyType) + data = CommFunc.WriteWORD(data, self.MoneyValue) + data = CommFunc.WriteBYTE(data, self.LayerNum) + data = CommFunc.WriteBYTE(data, self.AwardItemCount) + for i in range(self.AwardItemCount): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.SuperItemCount) + for i in range(self.SuperItemCount): + data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d, + MoneyType:%d, + MoneyValue:%d, + LayerNum:%d, + AwardItemCount:%d, + AwardItemList:%s, + SuperItemCount:%d, + SuperItemList:%s, + SuperItemCanChooseCount:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType, + self.MoneyType, + self.MoneyValue, + self.LayerNum, + self.AwardItemCount, + "...", + self.SuperItemCount, + "...", + self.SuperItemCanChooseCount + ) + return DumpString + + +m_NAtagMCActXianXiaMJInfo=tagMCActXianXiaMJInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJInfo.Head.Cmd,m_NAtagMCActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJInfo #------------------------------------------------------ @@ -31200,6 +36190,58 @@ #------------------------------------------------------ +# 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): @@ -34107,6 +39149,118 @@ #------------------------------------------------------ +# 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 + + +#------------------------------------------------------ # B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove class tagMCNotifyPlayerMove(Structure): @@ -34164,6 +39318,80 @@ m_NAtagMCNotifyPlayerMove=tagMCNotifyPlayerMove() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNotifyPlayerMove.Cmd,m_NAtagMCNotifyPlayerMove.SubCmd))] = m_NAtagMCNotifyPlayerMove + + +#------------------------------------------------------ +# B1 13 在线奖励信息新 #tagMCOnlinePrizeNew + +class tagMCOnlinePrizeNew(Structure): + Head = tagHead() + OnlineTime = 0 #(DWORD OnlineTime)//在线时间毫秒 + Len = 0 #(BYTE Len) + PrizeInfo = list() #(vector<DWORD> PrizeInfo)//领奖记录 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x13 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.OnlineTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Len,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Len): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.PrizeInfo.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x13 + self.OnlineTime = 0 + self.Len = 0 + self.PrizeInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += 4 * self.Len + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.OnlineTime) + data = CommFunc.WriteBYTE(data, self.Len) + for i in range(self.Len): + data = CommFunc.WriteDWORD(data, self.PrizeInfo[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + OnlineTime:%d, + Len:%d, + PrizeInfo:%s + '''\ + %( + self.Head.OutputString(), + self.OnlineTime, + self.Len, + "..." + ) + return DumpString + + +m_NAtagMCOnlinePrizeNew=tagMCOnlinePrizeNew() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCOnlinePrizeNew.Head.Cmd,m_NAtagMCOnlinePrizeNew.Head.SubCmd))] = m_NAtagMCOnlinePrizeNew #------------------------------------------------------ @@ -36061,6 +41289,114 @@ #------------------------------------------------------ +# B3 27 情戒信息 #tagMCLoveRingInfo + +class tagMCLoveRingInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ClassLV", c_ubyte), # 阶 + ("StarLV", c_ubyte), # 星 + ("EatCount", c_int), # 本星已淬炼道具数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x27 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB3 + self.SubCmd = 0x27 + self.ClassLV = 0 + self.StarLV = 0 + self.EatCount = 0 + return + + def GetLength(self): + return sizeof(tagMCLoveRingInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 27 情戒信息 //tagMCLoveRingInfo: + Cmd:%s, + SubCmd:%s, + ClassLV:%d, + StarLV:%d, + EatCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ClassLV, + self.StarLV, + self.EatCount + ) + return DumpString + + +m_NAtagMCLoveRingInfo=tagMCLoveRingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingInfo.Cmd,m_NAtagMCLoveRingInfo.SubCmd))] = m_NAtagMCLoveRingInfo + + +#------------------------------------------------------ +# B3 29 情戒解锁成功 #tagMCLoveRingUnlockOK + +class tagMCLoveRingUnlockOK(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x29 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB3 + self.SubCmd = 0x29 + return + + def GetLength(self): + return sizeof(tagMCLoveRingUnlockOK) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 29 情戒解锁成功 //tagMCLoveRingUnlockOK: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagMCLoveRingUnlockOK=tagMCLoveRingUnlockOK() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLoveRingUnlockOK.Cmd,m_NAtagMCLoveRingUnlockOK.SubCmd))] = m_NAtagMCLoveRingUnlockOK + + +#------------------------------------------------------ # B4 11 新增恶意攻击玩家 #tagMCAddMaliciousAtkPlayer class tagMCAddMaliciousAtkPlayer(Structure): @@ -37591,6 +42927,126 @@ #------------------------------------------------------ +# C1 09 跨服排位玩家信息 #tagMCChampionshipPlayerInfo + +class tagMCChampionshipPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("WorshipCount", c_ubyte), # 今日已膜拜次数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC1 + self.SubCmd = 0x09 + 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 = 0xC1 + self.SubCmd = 0x09 + self.WorshipCount = 0 + return + + def GetLength(self): + return sizeof(tagMCChampionshipPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C1 09 跨服排位玩家信息 //tagMCChampionshipPlayerInfo: + Cmd:%s, + SubCmd:%s, + WorshipCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.WorshipCount + ) + return DumpString + + +m_NAtagMCChampionshipPlayerInfo=tagMCChampionshipPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChampionshipPlayerInfo.Cmd,m_NAtagMCChampionshipPlayerInfo.SubCmd))] = m_NAtagMCChampionshipPlayerInfo + + +#------------------------------------------------------ +# C1 07 跨服战场玩家信息 #tagMCCrossBattlefieldPlayerInfo + +class tagMCCrossBattlefieldPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BuyOpenCountToday", c_ubyte), # 今日已购买开启战场次数 + ("HighScoreToday", c_int), # 今日最高积分 + ("EnterCountWeek", c_int), # 本周总参与次数 + ("BuyOpenCountWeek", c_int), # 本周总购买召集次数 + ("HighScoreTotalWeek", c_int), # 本周每日最高分累加总分 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC1 + self.SubCmd = 0x07 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xC1 + self.SubCmd = 0x07 + self.BuyOpenCountToday = 0 + self.HighScoreToday = 0 + self.EnterCountWeek = 0 + self.BuyOpenCountWeek = 0 + self.HighScoreTotalWeek = 0 + return + + def GetLength(self): + return sizeof(tagMCCrossBattlefieldPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C1 07 跨服战场玩家信息 //tagMCCrossBattlefieldPlayerInfo: + Cmd:%s, + SubCmd:%s, + BuyOpenCountToday:%d, + HighScoreToday:%d, + EnterCountWeek:%d, + BuyOpenCountWeek:%d, + HighScoreTotalWeek:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BuyOpenCountToday, + self.HighScoreToday, + self.EnterCountWeek, + self.BuyOpenCountWeek, + self.HighScoreTotalWeek + ) + return DumpString + + +m_NAtagMCCrossBattlefieldPlayerInfo=tagMCCrossBattlefieldPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossBattlefieldPlayerInfo.Cmd,m_NAtagMCCrossBattlefieldPlayerInfo.SubCmd))] = m_NAtagMCCrossBattlefieldPlayerInfo + + +#------------------------------------------------------ # C1 02 跨服PK玩家奖励记录 #tagMCCrossRealmPKAwardState class tagMCCrossRealmPKAwardState(Structure): @@ -37907,6 +43363,58 @@ #------------------------------------------------------ +# C1 08 幸运云购玩家信息 #tagMCLuckyCloudBuyPlayerInfo + +class tagMCLuckyCloudBuyPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BuyCount", c_ushort), # 本轮已购买份数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC1 + self.SubCmd = 0x08 + 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 = 0xC1 + self.SubCmd = 0x08 + self.BuyCount = 0 + return + + def GetLength(self): + return sizeof(tagMCLuckyCloudBuyPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C1 08 幸运云购玩家信息 //tagMCLuckyCloudBuyPlayerInfo: + Cmd:%s, + SubCmd:%s, + BuyCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BuyCount + ) + return DumpString + + +m_NAtagMCLuckyCloudBuyPlayerInfo=tagMCLuckyCloudBuyPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLuckyCloudBuyPlayerInfo.Cmd,m_NAtagMCLuckyCloudBuyPlayerInfo.SubCmd))] = m_NAtagMCLuckyCloudBuyPlayerInfo + + +#------------------------------------------------------ # C1 04 准备进入跨服服务器 #tagMCPrepareEnterCrossServer class tagMCPrepareEnterCrossServer(Structure): -- Gitblit v1.8.0