From d0d6f28bee730ee64bf46adffa4f768d6af6ac0c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 19 九月 2024 10:56:34 +0800 Subject: [PATCH] 10267 【越南】【英文】【砍树】仙官新增膜拜 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 3075 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 3,001 insertions(+), 74 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index 0aceafa..6ab5fbb 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -1180,6 +1180,7 @@ Job = 0 #(BYTE Job)// 玩家职业 RealmLV = 0 #(WORD RealmLV)// 玩家境界等级 Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 data = None def __init__(self): @@ -1198,6 +1199,7 @@ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -1212,6 +1214,7 @@ self.Job = 0 self.RealmLV = 0 self.Face = 0 + self.FacePic = 0 return def GetLength(self): @@ -1223,6 +1226,7 @@ length += 2 length += 1 length += 2 + length += 4 length += 4 return length @@ -1237,6 +1241,7 @@ data = CommFunc.WriteBYTE(data, self.Job) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) return data def OutputString(self): @@ -1248,7 +1253,8 @@ LV:%d, Job:%d, RealmLV:%d, - Face:%d + Face:%d, + FacePic:%d '''\ %( self.Head.OutputString(), @@ -1258,7 +1264,8 @@ self.LV, self.Job, self.RealmLV, - self.Face + self.Face, + self.FacePic ) return DumpString @@ -2416,6 +2423,7 @@ WarRank = 0 #(BYTE WarRank)//联赛排名 TotalFightPower = 0 #(DWORD TotalFightPower)//总战力,不足1个亿的部分 TotalFightPowerEx = 0 #(DWORD TotalFightPowerEx)//总战力点,1点=1亿 + EmblemID = 0 #(BYTE EmblemID)//徽章ID data = None def __init__(self): @@ -2438,6 +2446,7 @@ self.WarRank,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.TotalFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.TotalFightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.EmblemID,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): @@ -2455,6 +2464,7 @@ self.WarRank = 0 self.TotalFightPower = 0 self.TotalFightPowerEx = 0 + self.EmblemID = 0 return def GetLength(self): @@ -2473,6 +2483,7 @@ length += 1 length += 4 length += 4 + length += 1 return length @@ -2492,6 +2503,7 @@ data = CommFunc.WriteBYTE(data, self.WarRank) data = CommFunc.WriteDWORD(data, self.TotalFightPower) data = CommFunc.WriteDWORD(data, self.TotalFightPowerEx) + data = CommFunc.WriteBYTE(data, self.EmblemID) return data def OutputString(self): @@ -2509,7 +2521,8 @@ JoinAccept:%d, WarRank:%d, TotalFightPower:%d, - TotalFightPowerEx:%d + TotalFightPowerEx:%d, + EmblemID:%d '''\ %( self.FamilyIndex, @@ -2525,7 +2538,8 @@ self.JoinAccept, self.WarRank, self.TotalFightPower, - self.TotalFightPowerEx + self.TotalFightPowerEx, + self.EmblemID ) return DumpString @@ -5269,6 +5283,7 @@ Job = 0 #(BYTE Job) RealmLV = 0 #(WORD RealmLV)//境界 Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 data = None def __init__(self): @@ -5283,6 +5298,7 @@ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -5292,6 +5308,7 @@ self.Job = 0 self.RealmLV = 0 self.Face = 0 + self.FacePic = 0 return def GetLength(self): @@ -5301,6 +5318,7 @@ length += 4 length += 1 length += 2 + length += 4 length += 4 return length @@ -5313,6 +5331,7 @@ data = CommFunc.WriteBYTE(data, self.Job) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) return data def OutputString(self): @@ -5322,7 +5341,8 @@ LV:%d, Job:%d, RealmLV:%d, - Face:%d + Face:%d, + FacePic:%d '''\ %( self.ID, @@ -5330,7 +5350,8 @@ self.LV, self.Job, self.RealmLV, - self.Face + self.Face, + self.FacePic ) return DumpString @@ -5411,6 +5432,7 @@ LV = 0 #(WORD LV)//等级 RealmLV = 0 #(WORD RealmLV)//境界 Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 data = None def __init__(self): @@ -5425,6 +5447,7 @@ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -5434,6 +5457,7 @@ self.LV = 0 self.RealmLV = 0 self.Face = 0 + self.FacePic = 0 return def GetLength(self): @@ -5443,6 +5467,7 @@ length += 1 length += 2 length += 2 + length += 4 length += 4 return length @@ -5455,6 +5480,7 @@ data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) return data def OutputString(self): @@ -5464,7 +5490,8 @@ Job:%d, LV:%d, RealmLV:%d, - Face:%d + Face:%d, + FacePic:%d '''\ %( self.PlayerID, @@ -5472,7 +5499,8 @@ self.Job, self.LV, self.RealmLV, - self.Face + self.Face, + self.FacePic ) return DumpString @@ -5775,6 +5803,356 @@ m_NAtagUpdatePlayerNameResult=tagUpdatePlayerNameResult() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagUpdatePlayerNameResult.Cmd,m_NAtagUpdatePlayerNameResult.SubCmd))] = m_NAtagUpdatePlayerNameResult + + +#------------------------------------------------------ +# A9 27 仙宫新晋玩家信息 #tagGCXiangongNewPlayerInfo + +class tagGCXiangongNewPlayer(Structure): + AddTime = 0 #(DWORD AddTime)// 新晋时间戳 + ServerID = 0 #(DWORD ServerID) + PlayerID = 0 #(DWORD PlayerID) + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)// 玩家名,size = NameLen + LV = 0 #(WORD LV)// 玩家等级 + Job = 0 #(BYTE Job)// 玩家职业 + RealmLV = 0 #(WORD RealmLV)// 玩家境界 + EquipShowSwitch = 0 #(DWORD EquipShowSwitch) + EquipShowIDCount = 0 #(BYTE EquipShowIDCount) + EquipShowID = list() #(vector<DWORD> EquipShowID) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AddTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.EquipShowSwitch,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.EquipShowIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.EquipShowIDCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.EquipShowID.append(value) + return _pos + + def Clear(self): + self.AddTime = 0 + self.ServerID = 0 + self.PlayerID = 0 + self.NameLen = 0 + self.Name = "" + self.LV = 0 + self.Job = 0 + self.RealmLV = 0 + self.EquipShowSwitch = 0 + self.EquipShowIDCount = 0 + self.EquipShowID = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 4 + length += 1 + length += len(self.Name) + length += 2 + length += 1 + length += 2 + length += 4 + length += 1 + length += 4 * self.EquipShowIDCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.AddTime) + data = CommFunc.WriteDWORD(data, self.ServerID) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.RealmLV) + data = CommFunc.WriteDWORD(data, self.EquipShowSwitch) + data = CommFunc.WriteBYTE(data, self.EquipShowIDCount) + for i in range(self.EquipShowIDCount): + data = CommFunc.WriteDWORD(data, self.EquipShowID[i]) + return data + + def OutputString(self): + DumpString = ''' + AddTime:%d, + ServerID:%d, + PlayerID:%d, + NameLen:%d, + Name:%s, + LV:%d, + Job:%d, + RealmLV:%d, + EquipShowSwitch:%d, + EquipShowIDCount:%d, + EquipShowID:%s + '''\ + %( + self.AddTime, + self.ServerID, + self.PlayerID, + self.NameLen, + self.Name, + self.LV, + self.Job, + self.RealmLV, + self.EquipShowSwitch, + self.EquipShowIDCount, + "..." + ) + return DumpString + + +class tagGCXiangongNewPlayerInfo(Structure): + Head = tagHead() + XiangongID = 0 #(WORD XiangongID)// 仙宫ID + NewPlayerCount = 0 #(BYTE NewPlayerCount) + NewPlayerList = list() #(vector<tagGCXiangongNewPlayer> NewPlayerList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x27 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.XiangongID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.NewPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.NewPlayerCount): + temNewPlayerList = tagGCXiangongNewPlayer() + _pos = temNewPlayerList.ReadData(_lpData, _pos) + self.NewPlayerList.append(temNewPlayerList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x27 + self.XiangongID = 0 + self.NewPlayerCount = 0 + self.NewPlayerList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + for i in range(self.NewPlayerCount): + length += self.NewPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.XiangongID) + data = CommFunc.WriteBYTE(data, self.NewPlayerCount) + for i in range(self.NewPlayerCount): + data = CommFunc.WriteString(data, self.NewPlayerList[i].GetLength(), self.NewPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + XiangongID:%d, + NewPlayerCount:%d, + NewPlayerList:%s + '''\ + %( + self.Head.OutputString(), + self.XiangongID, + self.NewPlayerCount, + "..." + ) + return DumpString + + +m_NAtagGCXiangongNewPlayerInfo=tagGCXiangongNewPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXiangongNewPlayerInfo.Head.Cmd,m_NAtagGCXiangongNewPlayerInfo.Head.SubCmd))] = m_NAtagGCXiangongNewPlayerInfo + + +#------------------------------------------------------ +# A9 28 仙宫仙名录玩家信息 #tagGCXiangongRecPlayerInfo + +class tagGCXiangongRecPlayer(Structure): + AddTime = 0 #(DWORD AddTime)// 新晋时间戳 + ServerID = 0 #(DWORD ServerID) + PlayerID = 0 #(DWORD PlayerID) + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)// 玩家名,size = NameLen + LV = 0 #(WORD LV)// 玩家等级 + Job = 0 #(BYTE Job)// 玩家职业 + RealmLV = 0 #(WORD RealmLV)// 玩家境界 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AddTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.AddTime = 0 + self.ServerID = 0 + self.PlayerID = 0 + self.NameLen = 0 + self.Name = "" + self.LV = 0 + self.Job = 0 + self.RealmLV = 0 + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 4 + length += 1 + length += len(self.Name) + length += 2 + length += 1 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.AddTime) + data = CommFunc.WriteDWORD(data, self.ServerID) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.RealmLV) + return data + + def OutputString(self): + DumpString = ''' + AddTime:%d, + ServerID:%d, + PlayerID:%d, + NameLen:%d, + Name:%s, + LV:%d, + Job:%d, + RealmLV:%d + '''\ + %( + self.AddTime, + self.ServerID, + self.PlayerID, + self.NameLen, + self.Name, + self.LV, + self.Job, + self.RealmLV + ) + return DumpString + + +class tagGCXiangongRecPlayerInfo(Structure): + Head = tagHead() + XiangongID = 0 #(WORD XiangongID)// 仙宫ID + RecPlayerCount = 0 #(BYTE RecPlayerCount) + RecPlayerList = list() #(vector<tagGCXiangongRecPlayer> RecPlayerList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x28 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.XiangongID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RecPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecPlayerCount): + temRecPlayerList = tagGCXiangongRecPlayer() + _pos = temRecPlayerList.ReadData(_lpData, _pos) + self.RecPlayerList.append(temRecPlayerList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x28 + self.XiangongID = 0 + self.RecPlayerCount = 0 + self.RecPlayerList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + for i in range(self.RecPlayerCount): + length += self.RecPlayerList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.XiangongID) + data = CommFunc.WriteBYTE(data, self.RecPlayerCount) + for i in range(self.RecPlayerCount): + data = CommFunc.WriteString(data, self.RecPlayerList[i].GetLength(), self.RecPlayerList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + XiangongID:%d, + RecPlayerCount:%d, + RecPlayerList:%s + '''\ + %( + self.Head.OutputString(), + self.XiangongID, + self.RecPlayerCount, + "..." + ) + return DumpString + + +m_NAtagGCXiangongRecPlayerInfo=tagGCXiangongRecPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXiangongRecPlayerInfo.Head.Cmd,m_NAtagGCXiangongRecPlayerInfo.Head.SubCmd))] = m_NAtagGCXiangongRecPlayerInfo #------------------------------------------------------ @@ -8957,6 +9335,7 @@ LV = 0 #(WORD LV) RealmLV = 0 #(WORD RealmLV)//境界等级 Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 data = None def __init__(self): @@ -8973,6 +9352,7 @@ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -8985,6 +9365,7 @@ self.LV = 0 self.RealmLV = 0 self.Face = 0 + self.FacePic = 0 return def GetLength(self): @@ -8994,6 +9375,7 @@ length += 33 length += 2 length += 2 + length += 4 length += 4 return length @@ -9006,6 +9388,7 @@ data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) return data def OutputString(self): @@ -9015,7 +9398,8 @@ Name:%s, LV:%d, RealmLV:%d, - Face:%d + Face:%d, + FacePic:%d '''\ %( self.Head.OutputString(), @@ -9023,7 +9407,8 @@ self.Name, self.LV, self.RealmLV, - self.Face + self.Face, + self.FacePic ) return DumpString @@ -9771,6 +10156,66 @@ #------------------------------------------------------ +# B3 15 相关玩家在线状态变更同步 #tagGCRelatedPlayerOnlineState + +class tagGCRelatedPlayerOnlineState(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("PlayerID", c_int), # 相关玩家ID + ("OfflineValue", c_int), # 离线值:0-在线;1-离线;>1-上次离线时间戳,可用于计算离线多久了;当取不到玩家信息时用1代表已离线; + ("IsCross", c_ubyte), # 是否跨服同步的,如果是跨服则离线时间计算时要取跨服服务器时间 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB3 + self.SubCmd = 0x15 + 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 = 0x15 + self.PlayerID = 0 + self.OfflineValue = 0 + self.IsCross = 0 + return + + def GetLength(self): + return sizeof(tagGCRelatedPlayerOnlineState) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B3 15 相关玩家在线状态变更同步 //tagGCRelatedPlayerOnlineState: + Cmd:%s, + SubCmd:%s, + PlayerID:%d, + OfflineValue:%d, + IsCross:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.PlayerID, + self.OfflineValue, + self.IsCross + ) + return DumpString + + +m_NAtagGCRelatedPlayerOnlineState=tagGCRelatedPlayerOnlineState() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRelatedPlayerOnlineState.Cmd,m_NAtagGCRelatedPlayerOnlineState.SubCmd))] = m_NAtagGCRelatedPlayerOnlineState + + +#------------------------------------------------------ # B3 20 送礼物成功通知 #tagGCSendGiftsOKList class tagGCSendGiftsOK(Structure): @@ -10094,6 +10539,7 @@ IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍 ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 data = None def __init__(self): @@ -10114,6 +10560,7 @@ self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -10130,6 +10577,7 @@ self.IsInTeam = 0 self.ServerGroupID = 0 self.Face = 0 + self.FacePic = 0 return def GetLength(self): @@ -10142,6 +10590,7 @@ length += 2 length += 1 length += 1 + length += 4 length += 4 length += 4 @@ -10159,6 +10608,7 @@ data = CommFunc.WriteBYTE(data, self.IsInTeam) data = CommFunc.WriteDWORD(data, self.ServerGroupID) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) return data def OutputString(self): @@ -10172,7 +10622,8 @@ OnlineType:%d, IsInTeam:%d, ServerGroupID:%d, - Face:%d + Face:%d, + FacePic:%d '''\ %( self.Head.OutputString(), @@ -10184,7 +10635,8 @@ self.OnlineType, self.IsInTeam, self.ServerGroupID, - self.Face + self.Face, + self.FacePic ) return DumpString @@ -10260,6 +10712,7 @@ RealmLV = 0 #(WORD RealmLV)//境界 OnlineType = 0 #(BYTE OnlineType)//0不在线 1在线 2脱机在线 Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 data = None def __init__(self): @@ -10275,6 +10728,7 @@ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -10285,6 +10739,7 @@ self.RealmLV = 0 self.OnlineType = 0 self.Face = 0 + self.FacePic = 0 return def GetLength(self): @@ -10295,6 +10750,7 @@ length += 2 length += 2 length += 1 + length += 4 length += 4 return length @@ -10308,6 +10764,7 @@ data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteBYTE(data, self.OnlineType) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) return data def OutputString(self): @@ -10318,7 +10775,8 @@ LV:%d, RealmLV:%d, OnlineType:%d, - Face:%d + Face:%d, + FacePic:%d '''\ %( self.PlayerID, @@ -10327,7 +10785,8 @@ self.LV, self.RealmLV, self.OnlineType, - self.Face + self.Face, + self.FacePic ) return DumpString @@ -13190,6 +13649,7 @@ RealmLV = 0 #(WORD RealmLV)// 玩家境界 FightPower = 0 #(DWORD FightPower)// 战力,求余亿 FightPowerEx = 0 #(DWORD FightPowerEx)// 战力,整除亿 + OfflineValue = 0 #(DWORD OfflineValue)// 离线值:0-在线;1-离线;>1-上次离线时间戳,可用于计算离线多久了;当取不到玩家信息时用1代表已离线; Value1 = 0 #(DWORD Value1)//值1 Value2 = 0 #(DWORD Value2)//值2 data = None @@ -13209,6 +13669,7 @@ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.OfflineValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Value1,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Value2,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos @@ -13223,6 +13684,7 @@ self.RealmLV = 0 self.FightPower = 0 self.FightPowerEx = 0 + self.OfflineValue = 0 self.Value1 = 0 self.Value2 = 0 return @@ -13236,6 +13698,7 @@ length += 2 length += 1 length += 2 + length += 4 length += 4 length += 4 length += 4 @@ -13254,6 +13717,7 @@ data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteDWORD(data, self.FightPower) data = CommFunc.WriteDWORD(data, self.FightPowerEx) + data = CommFunc.WriteDWORD(data, self.OfflineValue) data = CommFunc.WriteDWORD(data, self.Value1) data = CommFunc.WriteDWORD(data, self.Value2) return data @@ -13269,6 +13733,7 @@ RealmLV:%d, FightPower:%d, FightPowerEx:%d, + OfflineValue:%d, Value1:%d, Value2:%d '''\ @@ -13282,6 +13747,7 @@ self.RealmLV, self.FightPower, self.FightPowerEx, + self.OfflineValue, self.Value1, self.Value2 ) @@ -18686,6 +19152,7 @@ ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性 HPEx = 0 #(DWORD HPEx)//当前血量 超过E的记录 Face = 0 #(DWORD Face)//基本脸型 + FacePic = 0 #(DWORD FacePic)//头像框 RoleType = 0 #(DWORD RoleType)//角色类型(各项目可自定义含义,如种族,与职业区分) data = None @@ -18794,6 +19261,7 @@ self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.HPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.RoleType,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos @@ -18898,6 +19366,7 @@ self.ExAttr20 = 0 self.HPEx = 0 self.Face = 0 + self.FacePic = 0 self.RoleType = 0 return @@ -18991,6 +19460,7 @@ length += 4 length += 4 length += 15 + length += 4 length += 4 length += 4 length += 4 @@ -19103,6 +19573,7 @@ data = CommFunc.WriteDWORD(data, self.ExAttr20) data = CommFunc.WriteDWORD(data, self.HPEx) data = CommFunc.WriteDWORD(data, self.Face) + data = CommFunc.WriteDWORD(data, self.FacePic) data = CommFunc.WriteDWORD(data, self.RoleType) return data @@ -19205,6 +19676,7 @@ ExAttr20:%d, HPEx:%d, Face:%d, + FacePic:%d, RoleType:%d '''\ %( @@ -19305,6 +19777,7 @@ self.ExAttr20, self.HPEx, self.Face, + self.FacePic, self.RoleType ) return DumpString @@ -30163,18 +30636,17 @@ #------------------------------------------------------ # A7 17 聊天气泡框状态 #tagMCChatBubbleBoxState -class tagMCChatBubbleBoxState(Structure): +class tagMCChatBubbleBox(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("BoxState", c_int), # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加 + ("BoxID", c_ubyte), #气泡ID + ("State", c_ubyte), #是否已激活 + ("EndTime", c_int), #到期时间戳,0为永久 + ("Star", c_ubyte), #星级 ] def __init__(self): self.Clear() - self.Cmd = 0xA7 - self.SubCmd = 0x17 return def ReadData(self, stringData, _pos=0, _len=0): @@ -30183,33 +30655,98 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xA7 - self.SubCmd = 0x17 - self.BoxState = 0 + self.BoxID = 0 + self.State = 0 + self.EndTime = 0 + self.Star = 0 return def GetLength(self): - return sizeof(tagMCChatBubbleBoxState) + return sizeof(tagMCChatBubbleBox) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState: - Cmd:%s, - SubCmd:%s, - BoxState:%d + BoxID:%d, + State:%d, + EndTime:%d, + Star:%d '''\ %( - self.Cmd, - self.SubCmd, - self.BoxState + self.BoxID, + self.State, + self.EndTime, + self.Star + ) + return DumpString + + +class tagMCChatBubbleBoxState(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + BoxList = list() #(vector<tagMCChatBubbleBox> BoxList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA7 + self.Head.SubCmd = 0x17 + 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): + temBoxList = tagMCChatBubbleBox() + _pos = temBoxList.ReadData(_lpData, _pos) + self.BoxList.append(temBoxList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA7 + self.Head.SubCmd = 0x17 + self.Count = 0 + self.BoxList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.BoxList[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.BoxList[i].GetLength(), self.BoxList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + BoxList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." ) return DumpString m_NAtagMCChatBubbleBoxState=tagMCChatBubbleBoxState() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Cmd,m_NAtagMCChatBubbleBoxState.SubCmd))] = m_NAtagMCChatBubbleBoxState +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Head.Cmd,m_NAtagMCChatBubbleBoxState.Head.SubCmd))] = m_NAtagMCChatBubbleBoxState #------------------------------------------------------ @@ -30508,6 +31045,118 @@ m_NAtagMCDynamicBarrierState=tagMCDynamicBarrierState() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDynamicBarrierState.Head.Cmd,m_NAtagMCDynamicBarrierState.Head.SubCmd))] = m_NAtagMCDynamicBarrierState + + +#------------------------------------------------------ +# A7 21 表情包信息 #tagMCEmojiPackInfo + +class tagMCEmojiPack(Structure): + _pack_ = 1 + _fields_ = [ + ("PackID", c_ubyte), #表情包ID + ("State", c_ubyte), #是否已激活 + ("EndTime", c_int), #到期时间戳,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.PackID = 0 + self.State = 0 + self.EndTime = 0 + return + + def GetLength(self): + return sizeof(tagMCEmojiPack) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A7 21 表情包信息 //tagMCEmojiPackInfo: + PackID:%d, + State:%d, + EndTime:%d + '''\ + %( + self.PackID, + self.State, + self.EndTime + ) + return DumpString + + +class tagMCEmojiPackInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + EmojiPackList = list() #(vector<tagMCEmojiPack> EmojiPackList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA7 + self.Head.SubCmd = 0x21 + 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): + temEmojiPackList = tagMCEmojiPack() + _pos = temEmojiPackList.ReadData(_lpData, _pos) + self.EmojiPackList.append(temEmojiPackList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA7 + self.Head.SubCmd = 0x21 + self.Count = 0 + self.EmojiPackList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.EmojiPackList[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.EmojiPackList[i].GetLength(), self.EmojiPackList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + EmojiPackList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCEmojiPackInfo=tagMCEmojiPackInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEmojiPackInfo.Head.Cmd,m_NAtagMCEmojiPackInfo.Head.SubCmd))] = m_NAtagMCEmojiPackInfo #------------------------------------------------------ @@ -33054,12 +33703,72 @@ return DumpString +class tagMCActBossTrialAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActBossTrialItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedScore = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedScore:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + class tagMCActBossTrialBillard(Structure): Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 Count = 0 #(BYTE Count)// 奖励物品数 AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表,当仙盟榜时,如果有该奖励则代表盟主奖励,否则默认均为成员奖励 MemCount = 0 #(BYTE MemCount)// 成员奖励物品数 MemAwardItemList = list() #(vector<tagMCActBossTrialItem> MemAwardItemList)// 成员奖励物品列表,仅仙盟榜时有效 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCActBossTrialAwardEx> AwardItemExList)// 额外奖励列表 data = None def __init__(self): @@ -33079,6 +33788,12 @@ temMemAwardItemList = tagMCActBossTrialItem() _pos = temMemAwardItemList.ReadData(_lpData, _pos) self.MemAwardItemList.append(temMemAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCActBossTrialAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) return _pos def Clear(self): @@ -33087,6 +33802,9 @@ self.AwardItemList = list() self.MemCount = 0 self.MemAwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() return def GetLength(self): @@ -33098,6 +33816,10 @@ length += 1 for i in range(self.MemCount): length += self.MemAwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() return length @@ -33110,6 +33832,10 @@ data = CommFunc.WriteBYTE(data, self.MemCount) for i in range(self.MemCount): data = CommFunc.WriteString(data, self.MemAwardItemList[i].GetLength(), self.MemAwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) return data def OutputString(self): @@ -33118,13 +33844,19 @@ Count:%d, AwardItemList:%s, MemCount:%d, - MemAwardItemList:%s + MemAwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s '''\ %( self.Rank, self.Count, "...", self.MemCount, + "...", + self.NeedScore, + self.CountEx, "..." ) return DumpString @@ -35624,6 +36356,363 @@ #------------------------------------------------------ +# AA 81 古宝养成活动信息 #tagMCActGubaoInfo + +class tagMCActGubaoItem(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(tagMCActGubaoItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 81 古宝养成活动信息 //tagMCActGubaoInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActGubaoAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCActGubaoItem> AwardItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActGubaoItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedScore = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedScore:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + +class tagMCActGubaoBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActGubaoItem> AwardItemList)// 奖励物品列表 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCActGubaoAwardEx> AwardItemExList)// 额外奖励列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActGubaoItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCActGubaoAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s + '''\ + %( + self.Rank, + self.Count, + "...", + self.NeedScore, + self.CountEx, + "..." + ) + return DumpString + + +class tagMCActGubaoInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss + JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ShopType = 0 #(WORD ShopType)// 开放商店类型,可能为0不开放 + PersonalBillCount = 0 #(BYTE PersonalBillCount) + PersonalBillboardInfoList = list() #(vector<tagMCActGubaoBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x81 + 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.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PersonalBillCount): + temPersonalBillboardInfoList = tagMCActGubaoBillard() + _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos) + self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x81 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.JoinStartTime = "" + self.JoinEndTime = "" + self.LimitLV = 0 + self.ShopType = 0 + self.PersonalBillCount = 0 + self.PersonalBillboardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 5 + length += 5 + length += 2 + length += 2 + length += 1 + for i in range(self.PersonalBillCount): + length += self.PersonalBillboardInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteString(data, 5, self.JoinStartTime) + data = CommFunc.WriteString(data, 5, self.JoinEndTime) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteWORD(data, self.ShopType) + data = CommFunc.WriteBYTE(data, self.PersonalBillCount) + for i in range(self.PersonalBillCount): + data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + JoinStartTime:%s, + JoinEndTime:%s, + LimitLV:%d, + ShopType:%d, + PersonalBillCount:%d, + PersonalBillboardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.JoinStartTime, + self.JoinEndTime, + self.LimitLV, + self.ShopType, + self.PersonalBillCount, + "..." + ) + return DumpString + + +m_NAtagMCActGubaoInfo=tagMCActGubaoInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGubaoInfo.Head.Cmd,m_NAtagMCActGubaoInfo.Head.SubCmd))] = m_NAtagMCActGubaoInfo + + +#------------------------------------------------------ +# AA 82 古宝养成活动玩家信息 #tagMCActGubaoPlayerInfo + +class tagMCActGubaoPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("Score", c_int), # 当前积分 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x82 + 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 = 0x82 + self.ActNum = 0 + self.Score = 0 + return + + def GetLength(self): + return sizeof(tagMCActGubaoPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 82 古宝养成活动玩家信息 //tagMCActGubaoPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + Score:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.Score + ) + return DumpString + + +m_NAtagMCActGubaoPlayerInfo=tagMCActGubaoPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGubaoPlayerInfo.Cmd,m_NAtagMCActGubaoPlayerInfo.SubCmd))] = m_NAtagMCActGubaoPlayerInfo + + +#------------------------------------------------------ # AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo class tagMCActHorsePetFeastTime(Structure): @@ -35763,6 +36852,363 @@ m_NAtagMCActHorsePetFeastInfo=tagMCActHorsePetFeastInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetFeastInfo.Head.Cmd,m_NAtagMCActHorsePetFeastInfo.Head.SubCmd))] = m_NAtagMCActHorsePetFeastInfo + + +#------------------------------------------------------ +# AA 84 骑宠养成活动信息 #tagMCActHorsePetTrainInfo + +class tagMCActHorsePetTrainItem(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(tagMCActHorsePetTrainItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 84 骑宠养成活动信息 //tagMCActHorsePetTrainInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActHorsePetTrainAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCActHorsePetTrainItem> AwardItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActHorsePetTrainItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedScore = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedScore:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + +class tagMCActHorsePetTrainBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActHorsePetTrainItem> AwardItemList)// 奖励物品列表 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCActHorsePetTrainAwardEx> AwardItemExList)// 额外奖励列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActHorsePetTrainItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCActHorsePetTrainAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s + '''\ + %( + self.Rank, + self.Count, + "...", + self.NeedScore, + self.CountEx, + "..." + ) + return DumpString + + +class tagMCActHorsePetTrainInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss + JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ShopType = 0 #(WORD ShopType)// 开放商店类型,可能为0不开放 + PersonalBillCount = 0 #(BYTE PersonalBillCount) + PersonalBillboardInfoList = list() #(vector<tagMCActHorsePetTrainBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x84 + 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.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ShopType,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PersonalBillCount): + temPersonalBillboardInfoList = tagMCActHorsePetTrainBillard() + _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos) + self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x84 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.JoinStartTime = "" + self.JoinEndTime = "" + self.LimitLV = 0 + self.ShopType = 0 + self.PersonalBillCount = 0 + self.PersonalBillboardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 5 + length += 5 + length += 2 + length += 2 + length += 1 + for i in range(self.PersonalBillCount): + length += self.PersonalBillboardInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteString(data, 5, self.JoinStartTime) + data = CommFunc.WriteString(data, 5, self.JoinEndTime) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteWORD(data, self.ShopType) + data = CommFunc.WriteBYTE(data, self.PersonalBillCount) + for i in range(self.PersonalBillCount): + data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + JoinStartTime:%s, + JoinEndTime:%s, + LimitLV:%d, + ShopType:%d, + PersonalBillCount:%d, + PersonalBillboardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.JoinStartTime, + self.JoinEndTime, + self.LimitLV, + self.ShopType, + self.PersonalBillCount, + "..." + ) + return DumpString + + +m_NAtagMCActHorsePetTrainInfo=tagMCActHorsePetTrainInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetTrainInfo.Head.Cmd,m_NAtagMCActHorsePetTrainInfo.Head.SubCmd))] = m_NAtagMCActHorsePetTrainInfo + + +#------------------------------------------------------ +# AA 85 骑宠养成活动玩家信息 #tagMCActHorsePetTrainPlayerInfo + +class tagMCActHorsePetTrainPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("Score", c_int), # 当前活动积分 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x85 + 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 = 0x85 + self.ActNum = 0 + self.Score = 0 + return + + def GetLength(self): + return sizeof(tagMCActHorsePetTrainPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 85 骑宠养成活动玩家信息 //tagMCActHorsePetTrainPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + Score:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.Score + ) + return DumpString + + +m_NAtagMCActHorsePetTrainPlayerInfo=tagMCActHorsePetTrainPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetTrainPlayerInfo.Cmd,m_NAtagMCActHorsePetTrainPlayerInfo.SubCmd))] = m_NAtagMCActHorsePetTrainPlayerInfo #------------------------------------------------------ @@ -37911,6 +39357,7 @@ LimitLV = 0 #(WORD LimitLV)// 限制等级 TaskCount = 0 #(BYTE TaskCount) TaskList = list() #(vector<tagMCActTask> TaskList)// 任务列表 + RoundMax = 0 #(BYTE RoundMax)// 最大可循环轮次,当小于等于1时代表不循环 data = None def __init__(self): @@ -37933,6 +39380,7 @@ temTaskList = tagMCActTask() _pos = temTaskList.ReadData(_lpData, _pos) self.TaskList.append(temTaskList) + self.RoundMax,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): @@ -37948,6 +39396,7 @@ self.LimitLV = 0 self.TaskCount = 0 self.TaskList = list() + self.RoundMax = 0 return def GetLength(self): @@ -37962,6 +39411,7 @@ length += 1 for i in range(self.TaskCount): length += self.TaskList[i].GetLength() + length += 1 return length @@ -37977,6 +39427,7 @@ data = CommFunc.WriteBYTE(data, self.TaskCount) for i in range(self.TaskCount): data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RoundMax) return data def OutputString(self): @@ -37989,7 +39440,8 @@ ResetType:%d, LimitLV:%d, TaskCount:%d, - TaskList:%s + TaskList:%s, + RoundMax:%d '''\ %( self.Head.OutputString(), @@ -38000,7 +39452,8 @@ self.ResetType, self.LimitLV, self.TaskCount, - "..." + "...", + self.RoundMax ) return DumpString @@ -38017,6 +39470,7 @@ ActNum = 0 #(BYTE ActNum)// 活动编号 AwardCount = 0 #(BYTE AwardCount) AwardRecordList = list() #(vector<DWORD> AwardRecordList)// 任务ID领奖记录值列表,根据任务ID位判断是否已领取,一个记录值存31位 [记录值0, 记录值1, ...] + RoundNum = 0 #(BYTE RoundNum)// 当前轮次,从1开始 data = None def __init__(self): @@ -38033,6 +39487,7 @@ for i in range(self.AwardCount): value,_pos=CommFunc.ReadDWORD(_lpData,_pos) self.AwardRecordList.append(value) + self.RoundNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): @@ -38043,6 +39498,7 @@ self.ActNum = 0 self.AwardCount = 0 self.AwardRecordList = list() + self.RoundNum = 0 return def GetLength(self): @@ -38051,6 +39507,7 @@ length += 1 length += 1 length += 4 * self.AwardCount + length += 1 return length @@ -38061,6 +39518,7 @@ data = CommFunc.WriteBYTE(data, self.AwardCount) for i in range(self.AwardCount): data = CommFunc.WriteDWORD(data, self.AwardRecordList[i]) + data = CommFunc.WriteBYTE(data, self.RoundNum) return data def OutputString(self): @@ -38068,13 +39526,15 @@ Head:%s, ActNum:%d, AwardCount:%d, - AwardRecordList:%s + AwardRecordList:%s, + RoundNum:%d '''\ %( self.Head.OutputString(), self.ActNum, self.AwardCount, - "..." + "...", + self.RoundNum ) return DumpString @@ -39344,10 +40804,10 @@ return DumpString -class tagMCActXianXiaMJBillard(Structure): - Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 - Count = 0 #(BYTE Count)// 奖励物品数 - AwardItemList = list() #(vector<tagMCActXianXiaMJItem> AwardItemList)// 奖励物品列表 +class tagMCActXianXiaMJAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCActXianXiaMJItem> AwardItemList)// 额外奖励物品列表 data = None def __init__(self): @@ -39356,7 +40816,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.Count): temAwardItemList = tagMCActXianXiaMJItem() @@ -39365,7 +40825,7 @@ return _pos def Clear(self): - self.Rank = 0 + self.NeedScore = 0 self.Count = 0 self.AwardItemList = list() return @@ -39381,7 +40841,7 @@ def GetBuffer(self): data = '' - data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteDWORD(data, self.NeedScore) data = CommFunc.WriteBYTE(data, self.Count) for i in range(self.Count): data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) @@ -39389,13 +40849,96 @@ def OutputString(self): DumpString = ''' - Rank:%d, + NeedScore:%d, Count:%d, AwardItemList:%s '''\ %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + +class tagMCActXianXiaMJBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActXianXiaMJItem> AwardItemList)// 奖励物品列表 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCActXianXiaMJAwardEx> AwardItemExList)// 额外奖励列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActXianXiaMJItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCActXianXiaMJAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s + '''\ + %( self.Rank, self.Count, + "...", + self.NeedScore, + self.CountEx, "..." ) return DumpString @@ -40692,12 +42235,72 @@ return DumpString +class tagMCCrossActBossTrialAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActBossTrialItem> AwardItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCCrossActBossTrialItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedScore = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedScore:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + class tagMCCrossActBossTrialBillard(Structure): Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 Count = 0 #(BYTE Count)// 奖励物品数 AwardItemList = list() #(vector<tagMCCrossActBossTrialItem> AwardItemList)// 奖励物品列表,当仙盟榜时,如果有该奖励则代表盟主奖励,否则默认均为成员奖励 MemCount = 0 #(BYTE MemCount)// 成员奖励物品数 MemAwardItemList = list() #(vector<tagMCCrossActBossTrialItem> MemAwardItemList)// 成员奖励物品列表,仅仙盟榜时有效 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCCrossActBossTrialAwardEx> AwardItemExList)// 额外奖励列表 data = None def __init__(self): @@ -40717,6 +42320,12 @@ temMemAwardItemList = tagMCCrossActBossTrialItem() _pos = temMemAwardItemList.ReadData(_lpData, _pos) self.MemAwardItemList.append(temMemAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCCrossActBossTrialAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) return _pos def Clear(self): @@ -40725,6 +42334,9 @@ self.AwardItemList = list() self.MemCount = 0 self.MemAwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() return def GetLength(self): @@ -40736,6 +42348,10 @@ length += 1 for i in range(self.MemCount): length += self.MemAwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() return length @@ -40748,6 +42364,10 @@ data = CommFunc.WriteBYTE(data, self.MemCount) for i in range(self.MemCount): data = CommFunc.WriteString(data, self.MemAwardItemList[i].GetLength(), self.MemAwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) return data def OutputString(self): @@ -40756,13 +42376,19 @@ Count:%d, AwardItemList:%s, MemCount:%d, - MemAwardItemList:%s + MemAwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s '''\ %( self.Rank, self.Count, "...", self.MemCount, + "...", + self.NeedScore, + self.CountEx, "..." ) return DumpString @@ -40779,8 +42405,6 @@ JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 - RankLimitPersonal = 0 #(WORD RankLimitPersonal)// 个人榜上榜个数保底限制; - RankLimitFamily = 0 #(WORD RankLimitFamily)// 仙盟榜上榜个数保底限制; PersonalBillCount = 0 #(BYTE PersonalBillCount) PersonalBillboardInfoList = list() #(vector<tagMCCrossActBossTrialBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励 FamilyBillCount = 0 #(BYTE FamilyBillCount) @@ -40805,8 +42429,6 @@ self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5) self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.RankLimitPersonal,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.RankLimitFamily,_pos = CommFunc.ReadWORD(_lpData, _pos) self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.PersonalBillCount): temPersonalBillboardInfoList = tagMCCrossActBossTrialBillard() @@ -40833,8 +42455,6 @@ self.JoinEndTime = "" self.IsDayReset = 0 self.ResetType = 0 - self.RankLimitPersonal = 0 - self.RankLimitFamily = 0 self.PersonalBillCount = 0 self.PersonalBillboardInfoList = list() self.FamilyBillCount = 0 @@ -40853,8 +42473,6 @@ length += 5 length += 1 length += 1 - length += 2 - length += 2 length += 1 for i in range(self.PersonalBillCount): length += self.PersonalBillboardInfoList[i].GetLength() @@ -40876,8 +42494,6 @@ data = CommFunc.WriteString(data, 5, self.JoinEndTime) data = CommFunc.WriteBYTE(data, self.IsDayReset) data = CommFunc.WriteBYTE(data, self.ResetType) - data = CommFunc.WriteWORD(data, self.RankLimitPersonal) - data = CommFunc.WriteWORD(data, self.RankLimitFamily) data = CommFunc.WriteBYTE(data, self.PersonalBillCount) for i in range(self.PersonalBillCount): data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer()) @@ -40898,8 +42514,6 @@ JoinEndTime:%s, IsDayReset:%d, ResetType:%d, - RankLimitPersonal:%d, - RankLimitFamily:%d, PersonalBillCount:%d, PersonalBillboardInfoList:%s, FamilyBillCount:%d, @@ -40916,8 +42530,6 @@ self.JoinEndTime, self.IsDayReset, self.ResetType, - self.RankLimitPersonal, - self.RankLimitFamily, self.PersonalBillCount, "...", self.FamilyBillCount, @@ -40928,6 +42540,608 @@ m_NAtagMCCrossActBossTrialInfo=tagMCCrossActBossTrialInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActBossTrialInfo.Head.Cmd,m_NAtagMCCrossActBossTrialInfo.Head.SubCmd))] = m_NAtagMCCrossActBossTrialInfo + + +#------------------------------------------------------ +# AA 83 古宝养成跨服活动信息 #tagMCCrossActGubaoInfo + +class tagMCCrossActGubaoItem(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(tagMCCrossActGubaoItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 83 古宝养成跨服活动信息 //tagMCCrossActGubaoInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCCrossActGubaoAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActGubaoItem> AwardItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCCrossActGubaoItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedScore = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedScore:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + +class tagMCCrossActGubaoBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActGubaoItem> AwardItemList)// 奖励物品列表 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCCrossActGubaoAwardEx> AwardItemExList)// 额外奖励列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCCrossActGubaoItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCCrossActGubaoAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s + '''\ + %( + self.Rank, + self.Count, + "...", + self.NeedScore, + self.CountEx, + "..." + ) + return DumpString + + +class tagMCCrossActGubaoInfo(Structure): + Head = tagHead() + ServerInfoLen = 0 #(BYTE ServerInfoLen) + ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服 + GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss + JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss + PersonalBillCount = 0 #(BYTE PersonalBillCount) + PersonalBillboardInfoList = list() #(vector<tagMCCrossActGubaoBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x83 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen) + self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PersonalBillCount): + temPersonalBillboardInfoList = tagMCCrossActGubaoBillard() + _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos) + self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x83 + self.ServerInfoLen = 0 + self.ServerIDRangeInfo = "" + self.GroupValue1 = 0 + self.StartDate = "" + self.EndtDate = "" + self.JoinStartTime = "" + self.JoinEndTime = "" + self.PersonalBillCount = 0 + self.PersonalBillboardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.ServerIDRangeInfo) + length += 1 + length += 10 + length += 10 + length += 5 + length += 5 + length += 1 + for i in range(self.PersonalBillCount): + length += self.PersonalBillboardInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ServerInfoLen) + data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo) + data = CommFunc.WriteBYTE(data, self.GroupValue1) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteString(data, 5, self.JoinStartTime) + data = CommFunc.WriteString(data, 5, self.JoinEndTime) + data = CommFunc.WriteBYTE(data, self.PersonalBillCount) + for i in range(self.PersonalBillCount): + data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ServerInfoLen:%d, + ServerIDRangeInfo:%s, + GroupValue1:%d, + StartDate:%s, + EndtDate:%s, + JoinStartTime:%s, + JoinEndTime:%s, + PersonalBillCount:%d, + PersonalBillboardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ServerInfoLen, + self.ServerIDRangeInfo, + self.GroupValue1, + self.StartDate, + self.EndtDate, + self.JoinStartTime, + self.JoinEndTime, + self.PersonalBillCount, + "..." + ) + return DumpString + + +m_NAtagMCCrossActGubaoInfo=tagMCCrossActGubaoInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActGubaoInfo.Head.Cmd,m_NAtagMCCrossActGubaoInfo.Head.SubCmd))] = m_NAtagMCCrossActGubaoInfo + + +#------------------------------------------------------ +# AA 86 骑宠养成跨服活动信息 #tagMCCrossActHorsePetTrainInfo + +class tagMCCrossActHorsePetTrainItem(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(tagMCCrossActHorsePetTrainItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 86 骑宠养成跨服活动信息 //tagMCCrossActHorsePetTrainInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCCrossActHorsePetTrainAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActHorsePetTrainItem> AwardItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCCrossActHorsePetTrainItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.NeedScore = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + NeedScore:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + +class tagMCCrossActHorsePetTrainBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActHorsePetTrainItem> AwardItemList)// 奖励物品列表 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCCrossActHorsePetTrainAwardEx> AwardItemExList)// 额外奖励列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCCrossActHorsePetTrainItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCCrossActHorsePetTrainAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s + '''\ + %( + self.Rank, + self.Count, + "...", + self.NeedScore, + self.CountEx, + "..." + ) + return DumpString + + +class tagMCCrossActHorsePetTrainInfo(Structure): + Head = tagHead() + ServerInfoLen = 0 #(BYTE ServerInfoLen) + ServerIDRangeInfo = "" #(String ServerIDRangeInfo)//开放该活动的服务器ID范围列表,json格式 [[IDA, IDB], ...], [] 为全服 + GroupValue1 = 0 #(BYTE GroupValue1)// 活动榜单分组值1,用于查询对应榜单 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss + JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss + PersonalBillCount = 0 #(BYTE PersonalBillCount) + PersonalBillboardInfoList = list() #(vector<tagMCCrossActHorsePetTrainBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x86 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ServerInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ServerIDRangeInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.ServerInfoLen) + self.GroupValue1,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PersonalBillCount): + temPersonalBillboardInfoList = tagMCCrossActHorsePetTrainBillard() + _pos = temPersonalBillboardInfoList.ReadData(_lpData, _pos) + self.PersonalBillboardInfoList.append(temPersonalBillboardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x86 + self.ServerInfoLen = 0 + self.ServerIDRangeInfo = "" + self.GroupValue1 = 0 + self.StartDate = "" + self.EndtDate = "" + self.JoinStartTime = "" + self.JoinEndTime = "" + self.PersonalBillCount = 0 + self.PersonalBillboardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.ServerIDRangeInfo) + length += 1 + length += 10 + length += 10 + length += 5 + length += 5 + length += 1 + for i in range(self.PersonalBillCount): + length += self.PersonalBillboardInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ServerInfoLen) + data = CommFunc.WriteString(data, self.ServerInfoLen, self.ServerIDRangeInfo) + data = CommFunc.WriteBYTE(data, self.GroupValue1) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteString(data, 5, self.JoinStartTime) + data = CommFunc.WriteString(data, 5, self.JoinEndTime) + data = CommFunc.WriteBYTE(data, self.PersonalBillCount) + for i in range(self.PersonalBillCount): + data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ServerInfoLen:%d, + ServerIDRangeInfo:%s, + GroupValue1:%d, + StartDate:%s, + EndtDate:%s, + JoinStartTime:%s, + JoinEndTime:%s, + PersonalBillCount:%d, + PersonalBillboardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ServerInfoLen, + self.ServerIDRangeInfo, + self.GroupValue1, + self.StartDate, + self.EndtDate, + self.JoinStartTime, + self.JoinEndTime, + self.PersonalBillCount, + "..." + ) + return DumpString + + +m_NAtagMCCrossActHorsePetTrainInfo=tagMCCrossActHorsePetTrainInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCrossActHorsePetTrainInfo.Head.Cmd,m_NAtagMCCrossActHorsePetTrainInfo.Head.SubCmd))] = m_NAtagMCCrossActHorsePetTrainInfo #------------------------------------------------------ @@ -40976,10 +43190,10 @@ return DumpString -class tagMCCrossActXianXiaMJBillard(Structure): - Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 - Count = 0 #(BYTE Count)// 奖励物品数 - AwardItemList = list() #(vector<tagMCCrossActXianXiaMJItem> AwardItemList)// 奖励物品列表 +class tagMCCrossActXianXiaMJAwardEx(Structure): + NeedScore = 0 #(DWORD NeedScore)// 额外奖励所需积分 + Count = 0 #(BYTE Count)// 额外奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActXianXiaMJItem> AwardItemList)// 额外奖励物品列表 data = None def __init__(self): @@ -40988,7 +43202,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.Count): temAwardItemList = tagMCCrossActXianXiaMJItem() @@ -40997,7 +43211,7 @@ return _pos def Clear(self): - self.Rank = 0 + self.NeedScore = 0 self.Count = 0 self.AwardItemList = list() return @@ -41013,7 +43227,7 @@ def GetBuffer(self): data = '' - data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteDWORD(data, self.NeedScore) data = CommFunc.WriteBYTE(data, self.Count) for i in range(self.Count): data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) @@ -41021,13 +43235,96 @@ def OutputString(self): DumpString = ''' - Rank:%d, + NeedScore:%d, Count:%d, AwardItemList:%s '''\ %( + self.NeedScore, + self.Count, + "..." + ) + return DumpString + + +class tagMCCrossActXianXiaMJBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCCrossActXianXiaMJItem> AwardItemList)// 奖励物品列表 + NeedScore = 0 #(DWORD NeedScore)// 上榜所需积分 + CountEx = 0 #(BYTE CountEx)// 额外奖励数 + AwardItemExList = list() #(vector<tagMCCrossActXianXiaMJAwardEx> AwardItemExList)// 额外奖励列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCCrossActXianXiaMJItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.NeedScore,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountEx,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CountEx): + temAwardItemExList = tagMCCrossActXianXiaMJAwardEx() + _pos = temAwardItemExList.ReadData(_lpData, _pos) + self.AwardItemExList.append(temAwardItemExList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + self.NeedScore = 0 + self.CountEx = 0 + self.AwardItemExList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + length += 4 + length += 1 + for i in range(self.CountEx): + length += self.AwardItemExList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.NeedScore) + data = CommFunc.WriteBYTE(data, self.CountEx) + for i in range(self.CountEx): + data = CommFunc.WriteString(data, self.AwardItemExList[i].GetLength(), self.AwardItemExList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s, + NeedScore:%d, + CountEx:%d, + AwardItemExList:%s + '''\ + %( self.Rank, self.Count, + "...", + self.NeedScore, + self.CountEx, "..." ) return DumpString @@ -41043,7 +43340,6 @@ JoinStartTime = "" #(char JoinStartTime[5])// 参与开始时间点 mm:ss JoinEndTime = "" #(char JoinEndTime[5])// 参与结束时间点 mm:ss IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 - RankLimitPersonal = 0 #(WORD RankLimitPersonal)// 个人榜上榜积分保底限制; PersonalBillCount = 0 #(BYTE PersonalBillCount) PersonalBillboardInfoList = list() #(vector<tagMCCrossActXianXiaMJBillard> PersonalBillboardInfoList)// 个人榜单奖励信息列表,如果没有代表本次活动没有该榜奖励 data = None @@ -41065,7 +43361,6 @@ self.JoinStartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) self.JoinEndTime,_pos = CommFunc.ReadString(_lpData, _pos,5) self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.RankLimitPersonal,_pos = CommFunc.ReadWORD(_lpData, _pos) self.PersonalBillCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.PersonalBillCount): temPersonalBillboardInfoList = tagMCCrossActXianXiaMJBillard() @@ -41086,7 +43381,6 @@ self.JoinStartTime = "" self.JoinEndTime = "" self.IsDayReset = 0 - self.RankLimitPersonal = 0 self.PersonalBillCount = 0 self.PersonalBillboardInfoList = list() return @@ -41102,7 +43396,6 @@ length += 5 length += 5 length += 1 - length += 2 length += 1 for i in range(self.PersonalBillCount): length += self.PersonalBillboardInfoList[i].GetLength() @@ -41120,7 +43413,6 @@ data = CommFunc.WriteString(data, 5, self.JoinStartTime) data = CommFunc.WriteString(data, 5, self.JoinEndTime) data = CommFunc.WriteBYTE(data, self.IsDayReset) - data = CommFunc.WriteWORD(data, self.RankLimitPersonal) data = CommFunc.WriteBYTE(data, self.PersonalBillCount) for i in range(self.PersonalBillCount): data = CommFunc.WriteString(data, self.PersonalBillboardInfoList[i].GetLength(), self.PersonalBillboardInfoList[i].GetBuffer()) @@ -41137,7 +43429,6 @@ JoinStartTime:%s, JoinEndTime:%s, IsDayReset:%d, - RankLimitPersonal:%d, PersonalBillCount:%d, PersonalBillboardInfoList:%s '''\ @@ -41151,7 +43442,6 @@ self.JoinStartTime, self.JoinEndTime, self.IsDayReset, - self.RankLimitPersonal, self.PersonalBillCount, "..." ) @@ -47828,6 +50118,238 @@ #------------------------------------------------------ +# B1 17 头像信息 #tagMCFaceInfo + +class tagMCFace(Structure): + _pack_ = 1 + _fields_ = [ + ("FaceID", c_int), #头像ID + ("State", c_ubyte), #是否已激活 + ("EndTime", c_int), #到期时间戳,0为永久 + ("Star", c_ubyte), #星级 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.FaceID = 0 + self.State = 0 + self.EndTime = 0 + self.Star = 0 + return + + def GetLength(self): + return sizeof(tagMCFace) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 17 头像信息 //tagMCFaceInfo: + FaceID:%d, + State:%d, + EndTime:%d, + Star:%d + '''\ + %( + self.FaceID, + self.State, + self.EndTime, + self.Star + ) + return DumpString + + +class tagMCFaceInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + FaceList = list() #(vector<tagMCFace> FaceList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x17 + 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): + temFaceList = tagMCFace() + _pos = temFaceList.ReadData(_lpData, _pos) + self.FaceList.append(temFaceList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x17 + self.Count = 0 + self.FaceList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.FaceList[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.FaceList[i].GetLength(), self.FaceList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + FaceList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCFaceInfo=tagMCFaceInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFaceInfo.Head.Cmd,m_NAtagMCFaceInfo.Head.SubCmd))] = m_NAtagMCFaceInfo + + +#------------------------------------------------------ +# B1 18 头像框信息 #tagMCFacePicInfo + +class tagMCFacePic(Structure): + _pack_ = 1 + _fields_ = [ + ("FacePicID", c_int), #头像框ID + ("State", c_ubyte), #是否已激活 + ("EndTime", c_int), #到期时间戳,0为永久 + ("Star", c_ubyte), #星级 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.FacePicID = 0 + self.State = 0 + self.EndTime = 0 + self.Star = 0 + return + + def GetLength(self): + return sizeof(tagMCFacePic) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 18 头像框信息 //tagMCFacePicInfo: + FacePicID:%d, + State:%d, + EndTime:%d, + Star:%d + '''\ + %( + self.FacePicID, + self.State, + self.EndTime, + self.Star + ) + return DumpString + + +class tagMCFacePicInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + FacePicList = list() #(vector<tagMCFacePic> FacePicList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x18 + 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): + temFacePicList = tagMCFacePic() + _pos = temFacePicList.ReadData(_lpData, _pos) + self.FacePicList.append(temFacePicList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x18 + self.Count = 0 + self.FacePicList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.FacePicList[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.FacePicList[i].GetLength(), self.FacePicList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + FacePicList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCFacePicInfo=tagMCFacePicInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFacePicInfo.Head.Cmd,m_NAtagMCFacePicInfo.Head.SubCmd))] = m_NAtagMCFacePicInfo + + +#------------------------------------------------------ # B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList class tagMCFuncSysPrivilegeInfo(Structure): @@ -48788,6 +51310,188 @@ #------------------------------------------------------ +# B1 15 天道树信息 #tagMCTiandaoTreeInfo + +class tagMCTiandaoTreeInfo(Structure): + Head = tagHead() + Qiyun = 0 #(DWORD Qiyun)// 当前气运值 + AwardCount = 0 #(BYTE AwardCount)// 天道果领取记录值个数 + AwardStateList = list() #(vector<DWORD> AwardStateList)// 天道果领取记录值列表,按奖励索引位二进制记录是否已领取,一个值可存31位,如值1存0~30,值2存31~61,... + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x15 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Qiyun,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.AwardStateList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x15 + self.Qiyun = 0 + self.AwardCount = 0 + self.AwardStateList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += 4 * self.AwardCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.Qiyun) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteDWORD(data, self.AwardStateList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Qiyun:%d, + AwardCount:%d, + AwardStateList:%s + '''\ + %( + self.Head.OutputString(), + self.Qiyun, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCTiandaoTreeInfo=tagMCTiandaoTreeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTiandaoTreeInfo.Head.Cmd,m_NAtagMCTiandaoTreeInfo.Head.SubCmd))] = m_NAtagMCTiandaoTreeInfo + + +#------------------------------------------------------ +# B1 12 培养功能境界信息 #tagMCTrainRealmLVInfo + +class tagMCTrainRealmLV(Structure): + _pack_ = 1 + _fields_ = [ + ("FuncType", c_ubyte), # 功能类型:1-坐骑;2-灵宠;3-灵器 + ("TrainRealmLV", 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.FuncType = 0 + self.TrainRealmLV = 0 + return + + def GetLength(self): + return sizeof(tagMCTrainRealmLV) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 12 培养功能境界信息 //tagMCTrainRealmLVInfo: + FuncType:%d, + TrainRealmLV:%d + '''\ + %( + self.FuncType, + self.TrainRealmLV + ) + return DumpString + + +class tagMCTrainRealmLVInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + InfoList = list() #(vector<tagMCTrainRealmLV> InfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x12 + 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): + temInfoList = tagMCTrainRealmLV() + _pos = temInfoList.ReadData(_lpData, _pos) + self.InfoList.append(temInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x12 + self.Count = 0 + self.InfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.InfoList[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.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + InfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCTrainRealmLVInfo=tagMCTrainRealmLVInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTrainRealmLVInfo.Head.Cmd,m_NAtagMCTrainRealmLVInfo.Head.SubCmd))] = m_NAtagMCTrainRealmLVInfo + + +#------------------------------------------------------ # B1 21 仙树信息 #tagMCTreeInfo class tagMCTreeInfo(Structure): @@ -48848,6 +51552,229 @@ #------------------------------------------------------ +# B1 16 累计消耗货币信息 #tagMCUseMoneyTotalInfo + +class tagMCUseMoneyTotal(Structure): + _pack_ = 1 + _fields_ = [ + ("MoneyType", c_ubyte), # 货币类型,仅同步需要记录的货币类型 + ("UseTotal", c_int), # 累计消耗货币值 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.MoneyType = 0 + self.UseTotal = 0 + return + + def GetLength(self): + return sizeof(tagMCUseMoneyTotal) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 16 累计消耗货币信息 //tagMCUseMoneyTotalInfo: + MoneyType:%d, + UseTotal:%d + '''\ + %( + self.MoneyType, + self.UseTotal + ) + return DumpString + + +class tagMCUseMoneyTotalInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + InfoList = list() #(vector<tagMCUseMoneyTotal> InfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x16 + 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): + temInfoList = tagMCUseMoneyTotal() + _pos = temInfoList.ReadData(_lpData, _pos) + self.InfoList.append(temInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x16 + self.Count = 0 + self.InfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.InfoList[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.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + InfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCUseMoneyTotalInfo=tagMCUseMoneyTotalInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCUseMoneyTotalInfo.Head.Cmd,m_NAtagMCUseMoneyTotalInfo.Head.SubCmd))] = m_NAtagMCUseMoneyTotalInfo + + +#------------------------------------------------------ +# B1 14 仙宫信息 #tagMCXiangongInfo + +class tagMCXiangong(Structure): + _pack_ = 1 + _fields_ = [ + ("XiangongID", c_ushort), # 仙宫ID + ("LikeStateToday", 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.XiangongID = 0 + self.LikeStateToday = 0 + return + + def GetLength(self): + return sizeof(tagMCXiangong) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 14 仙宫信息 //tagMCXiangongInfo: + XiangongID:%d, + LikeStateToday:%d + '''\ + %( + self.XiangongID, + self.LikeStateToday + ) + return DumpString + + +class tagMCXiangongInfo(Structure): + Head = tagHead() + LikeStateToday = 0 #(BYTE LikeStateToday)// 今日是否已点赞,指仙宫的外层点赞,非某个指定仙宫 + XiangongCount = 0 #(BYTE XiangongCount) + XiangongList = list() #(vector<tagMCXiangong> XiangongList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x14 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.LikeStateToday,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.XiangongCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.XiangongCount): + temXiangongList = tagMCXiangong() + _pos = temXiangongList.ReadData(_lpData, _pos) + self.XiangongList.append(temXiangongList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x14 + self.LikeStateToday = 0 + self.XiangongCount = 0 + self.XiangongList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.XiangongCount): + length += self.XiangongList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.LikeStateToday) + data = CommFunc.WriteBYTE(data, self.XiangongCount) + for i in range(self.XiangongCount): + data = CommFunc.WriteString(data, self.XiangongList[i].GetLength(), self.XiangongList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + LikeStateToday:%d, + XiangongCount:%d, + XiangongList:%s + '''\ + %( + self.Head.OutputString(), + self.LikeStateToday, + self.XiangongCount, + "..." + ) + return DumpString + + +m_NAtagMCXiangongInfo=tagMCXiangongInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCXiangongInfo.Head.Cmd,m_NAtagMCXiangongInfo.Head.SubCmd))] = m_NAtagMCXiangongInfo + + +#------------------------------------------------------ # B1 20 战令信息 #tagMCZhanlingInfo class tagMCZhanling(Structure): -- Gitblit v1.8.0