From 217627970593db2f63ddb62d6c3d4c5e787871fe Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 25 三月 2019 20:43:11 +0800 Subject: [PATCH] 6385 【后端】【2.0】五行灵根开发 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 6466 +++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 5,149 insertions(+), 1,317 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index c16f2b3..e8ff6de 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -196,40 +196,60 @@ # A0 07 副本地图功能线路人数 #tagGCFBLinePlayerCnt class tagGCFBLineInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("FBLineID", c_ubyte), # 功能线路ID - ("PlayerCnt", c_ushort), # 线路当前玩家数 - ] + FBLineID = 0 #(BYTE FBLineID)// 功能线路ID + PlayerCnt = 0 #(WORD PlayerCnt)// 线路当前玩家数 + ExtraStrLen = 0 #(WORD ExtraStrLen)// 长度 + ExtraStr = "" #(String ExtraStr)// 额外信息 + data = None def __init__(self): self.Clear() return - def ReadData(self, stringData, _pos=0, _len=0): + def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() + self.FBLineID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlayerCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ExtraStrLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ExtraStr,_pos = CommFunc.ReadString(_lpData, _pos,self.ExtraStrLen) + return _pos def Clear(self): self.FBLineID = 0 self.PlayerCnt = 0 + self.ExtraStrLen = 0 + self.ExtraStr = "" return def GetLength(self): - return sizeof(tagGCFBLineInfo) + length = 0 + length += 1 + length += 2 + length += 2 + length += len(self.ExtraStr) + + return length def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) + data = '' + data = CommFunc.WriteBYTE(data, self.FBLineID) + data = CommFunc.WriteWORD(data, self.PlayerCnt) + data = CommFunc.WriteWORD(data, self.ExtraStrLen) + data = CommFunc.WriteString(data, self.ExtraStrLen, self.ExtraStr) + return data def OutputString(self): - DumpString = '''// A0 07 副本地图功能线路人数 //tagGCFBLinePlayerCnt: + DumpString = ''' FBLineID:%d, - PlayerCnt:%d + PlayerCnt:%d, + ExtraStrLen:%d, + ExtraStr:%s '''\ %( self.FBLineID, - self.PlayerCnt + self.PlayerCnt, + self.ExtraStrLen, + self.ExtraStr ) return DumpString @@ -876,6 +896,58 @@ m_NAtagUniversalGameRecInfo=tagUniversalGameRecInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagUniversalGameRecInfo.Head.Cmd,m_NAtagUniversalGameRecInfo.Head.SubCmd))] = m_NAtagUniversalGameRecInfo + + +#------------------------------------------------------ +# A4 0C 多仙盟boss活动信息 #tagGCAllFamilyBossInfo + +class tagGCAllFamilyBossInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("IsEnd", c_ubyte), # 是否已结束 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA4 + self.SubCmd = 0x0C + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xA4 + self.SubCmd = 0x0C + self.IsEnd = 0 + return + + def GetLength(self): + return sizeof(tagGCAllFamilyBossInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A4 0C 多仙盟boss活动信息 //tagGCAllFamilyBossInfo: + Cmd:%s, + SubCmd:%s, + IsEnd:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.IsEnd + ) + return DumpString + + +m_NAtagGCAllFamilyBossInfo=tagGCAllFamilyBossInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAllFamilyBossInfo.Cmd,m_NAtagGCAllFamilyBossInfo.SubCmd))] = m_NAtagGCAllFamilyBossInfo #------------------------------------------------------ @@ -4116,124 +4188,6 @@ #------------------------------------------------------ -# A9 07 定时商店刷新倒计时 #tagGCShopRefreshTimeList - -class tagGCShopRefreshTime(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ShopID", c_int), # 商店ID - ("RemainSecond", c_int), # 多少秒后刷新 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xA9 - self.SubCmd = 0x07 - return - - def ReadData(self, stringData, _pos=0, _len=0): - self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() - - def Clear(self): - self.Cmd = 0xA9 - self.SubCmd = 0x07 - self.ShopID = 0 - self.RemainSecond = 0 - return - - def GetLength(self): - return sizeof(tagGCShopRefreshTime) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A9 07 定时商店刷新倒计时 //tagGCShopRefreshTimeList: - Cmd:%s, - SubCmd:%s, - ShopID:%d, - RemainSecond:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.ShopID, - self.RemainSecond - ) - return DumpString - - -class tagGCShopRefreshTimeList(Structure): - Head = tagHead() - ShopCnt = 0 #(BYTE ShopCnt)//商店信息个数 - ShopTimeInfoList = list() #(vector<tagGCShopRefreshTime> ShopTimeInfoList)//商店信息列表 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA9 - self.Head.SubCmd = 0x07 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.ShopCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) - for i in range(self.ShopCnt): - temShopTimeInfoList = tagGCShopRefreshTime() - _pos = temShopTimeInfoList.ReadData(_lpData, _pos) - self.ShopTimeInfoList.append(temShopTimeInfoList) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA9 - self.Head.SubCmd = 0x07 - self.ShopCnt = 0 - self.ShopTimeInfoList = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.ShopCnt): - length += self.ShopTimeInfoList[i].GetLength() - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.ShopCnt) - for i in range(self.ShopCnt): - data = CommFunc.WriteString(data, self.ShopTimeInfoList[i].GetLength(), self.ShopTimeInfoList[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - ShopCnt:%d, - ShopTimeInfoList:%s - '''\ - %( - self.Head.OutputString(), - self.ShopCnt, - "..." - ) - return DumpString - - -m_NAtagGCShopRefreshTimeList=tagGCShopRefreshTimeList() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCShopRefreshTimeList.Head.Cmd,m_NAtagGCShopRefreshTimeList.Head.SubCmd))] = m_NAtagGCShopRefreshTimeList - - -#------------------------------------------------------ # A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo class tagGCStoreServerBuyCnt(Structure): @@ -4695,6 +4649,151 @@ #------------------------------------------------------ +# AC 11 节日红包活动信息 #tagGCFeastRedPacketInfo + +class tagGCFeastRedPacketDay(Structure): + RedPacketCount = 0 #(BYTE RedPacketCount) + RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包表ID列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.RedPacketCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RedPacketCount): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.RedPacketIDList.append(value) + return _pos + + def Clear(self): + self.RedPacketCount = 0 + self.RedPacketIDList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 * self.RedPacketCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.RedPacketCount) + for i in range(self.RedPacketCount): + data = CommFunc.WriteWORD(data, self.RedPacketIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + RedPacketCount:%d, + RedPacketIDList:%s + '''\ + %( + self.RedPacketCount, + "..." + ) + return DumpString + + +class tagGCFeastRedPacketInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置 + RedPacketDays = 0 #(BYTE RedPacketDays) + RedPacketDayList = list() #(vector<tagGCFeastRedPacketDay> RedPacketDayList)// 每日系统红包信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x11 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RedPacketDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RedPacketDays): + temRedPacketDayList = tagGCFeastRedPacketDay() + _pos = temRedPacketDayList.ReadData(_lpData, _pos) + self.RedPacketDayList.append(temRedPacketDayList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x11 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + self.RedPacketDays = 0 + self.RedPacketDayList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.RedPacketDays): + length += self.RedPacketDayList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteBYTE(data, self.RedPacketDays) + for i in range(self.RedPacketDays): + data = CommFunc.WriteString(data, self.RedPacketDayList[i].GetLength(), self.RedPacketDayList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d, + RedPacketDays:%d, + RedPacketDayList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType, + self.RedPacketDays, + "..." + ) + return DumpString + + +m_NAtagGCFeastRedPacketInfo=tagGCFeastRedPacketInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFeastRedPacketInfo.Head.Cmd,m_NAtagGCFeastRedPacketInfo.Head.SubCmd))] = m_NAtagGCFeastRedPacketInfo + + +#------------------------------------------------------ # AC 02 通知仙魔之争信息 #tagGCXMZZInfo class tagGCXMZZInfo(Structure): @@ -4876,6 +4975,58 @@ m_NAtagGCXMZZSelfInfo=tagGCXMZZSelfInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZSelfInfo.Head.Cmd,m_NAtagGCXMZZSelfInfo.Head.SubCmd))] = m_NAtagGCXMZZSelfInfo + + +#------------------------------------------------------ +# AC 07 骑宠Boss信息 #tagGCHorsePetBossInfo + +class tagGCHorsePetBossInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("IsEnd", c_int), # 是否已结束(按位代表对应线路是否结束) + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAC + self.SubCmd = 0x07 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAC + self.SubCmd = 0x07 + self.IsEnd = 0 + return + + def GetLength(self): + return sizeof(tagGCHorsePetBossInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AC 07 骑宠Boss信息 //tagGCHorsePetBossInfo: + Cmd:%s, + SubCmd:%s, + IsEnd:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.IsEnd + ) + return DumpString + + +m_NAtagGCHorsePetBossInfo=tagGCHorsePetBossInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHorsePetBossInfo.Cmd,m_NAtagGCHorsePetBossInfo.SubCmd))] = m_NAtagGCHorsePetBossInfo #------------------------------------------------------ @@ -5274,6 +5425,91 @@ #------------------------------------------------------ +# AC 0B 新仙界盛典活动信息 #tagGCNewFairyCeremonyInfo + +class tagGCNewFairyCeremonyInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + WorldLV = 0 #(WORD WorldLV)// 世界等级 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x0B + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x0B + self.StartDate = "" + self.EndtDate = "" + self.WorldLV = 0 + self.LimitLV = 0 + self.ResetType = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 2 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.WorldLV) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + WorldLV:%d, + LimitLV:%d, + ResetType:%d + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.WorldLV, + self.LimitLV, + self.ResetType + ) + return DumpString + + +m_NAtagGCNewFairyCeremonyInfo=tagGCNewFairyCeremonyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCNewFairyCeremonyInfo.Head.Cmd,m_NAtagGCNewFairyCeremonyInfo.Head.SubCmd))] = m_NAtagGCNewFairyCeremonyInfo + + +#------------------------------------------------------ # AC 05 红包删除 #tagGCRedPacketDel class tagGCRedPacketDel(Structure): @@ -5423,132 +5659,6 @@ m_NAtagGCXMZZFightInfo=tagGCXMZZFightInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZFightInfo.Head.Cmd,m_NAtagGCXMZZFightInfo.Head.SubCmd))] = m_NAtagGCXMZZFightInfo - - -#------------------------------------------------------ -# AD 01 特惠活动信息 #tagGCTeHuiActivityInfoList - -class tagGCTeHuiActivityInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ActivityType", c_ubyte), # 活动类型 - ("ActivityValue", c_int), # 活动值 - ("StartDate", c_int), # 开始时间time - ("EndDate", c_int), # 结束时间time - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAD - self.SubCmd = 0x01 - 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 = 0xAD - self.SubCmd = 0x01 - self.ActivityType = 0 - self.ActivityValue = 0 - self.StartDate = 0 - self.EndDate = 0 - return - - def GetLength(self): - return sizeof(tagGCTeHuiActivityInfo) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AD 01 特惠活动信息 //tagGCTeHuiActivityInfoList: - Cmd:%s, - SubCmd:%s, - ActivityType:%d, - ActivityValue:%d, - StartDate:%d, - EndDate:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.ActivityType, - self.ActivityValue, - self.StartDate, - self.EndDate - ) - return DumpString - - -class tagGCTeHuiActivityInfoList(Structure): - Head = tagHead() - ActivityCount = 0 #(BYTE ActivityCount)//活动信息个数 - ActivityInfoList = list() #(vector<tagGCTeHuiActivityInfo> ActivityInfoList)//活动信息列表 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xAD - self.Head.SubCmd = 0x01 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.ActivityCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) - for i in range(self.ActivityCount): - temActivityInfoList = tagGCTeHuiActivityInfo() - _pos = temActivityInfoList.ReadData(_lpData, _pos) - self.ActivityInfoList.append(temActivityInfoList) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xAD - self.Head.SubCmd = 0x01 - self.ActivityCount = 0 - self.ActivityInfoList = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.ActivityCount): - length += self.ActivityInfoList[i].GetLength() - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.ActivityCount) - for i in range(self.ActivityCount): - data = CommFunc.WriteString(data, self.ActivityInfoList[i].GetLength(), self.ActivityInfoList[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - ActivityCount:%d, - ActivityInfoList:%s - '''\ - %( - self.Head.OutputString(), - self.ActivityCount, - "..." - ) - return DumpString - - -m_NAtagGCTeHuiActivityInfoList=tagGCTeHuiActivityInfoList() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCTeHuiActivityInfoList.Head.Cmd,m_NAtagGCTeHuiActivityInfoList.Head.SubCmd))] = m_NAtagGCTeHuiActivityInfoList #------------------------------------------------------ @@ -5881,6 +5991,7 @@ RealmLV = 0 #(WORD RealmLV)//境界 OnlineType = 0 #(BYTE OnlineType)//在线状态, 0 不在线 1在线 IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍 + ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID data = None def __init__(self): @@ -5899,6 +6010,7 @@ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -5913,6 +6025,7 @@ self.RealmLV = 0 self.OnlineType = 0 self.IsInTeam = 0 + self.ServerGroupID = 0 return def GetLength(self): @@ -5925,6 +6038,7 @@ length += 2 length += 1 length += 1 + length += 4 return length @@ -5938,6 +6052,7 @@ data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteBYTE(data, self.OnlineType) data = CommFunc.WriteBYTE(data, self.IsInTeam) + data = CommFunc.WriteDWORD(data, self.ServerGroupID) return data def OutputString(self): @@ -5949,7 +6064,8 @@ LV:%d, RealmLV:%d, OnlineType:%d, - IsInTeam:%d + IsInTeam:%d, + ServerGroupID:%d '''\ %( self.Head.OutputString(), @@ -5959,7 +6075,8 @@ self.LV, self.RealmLV, self.OnlineType, - self.IsInTeam + self.IsInTeam, + self.ServerGroupID ) return DumpString @@ -6589,6 +6706,1490 @@ m_NAtagGCVoiceChat=tagGCVoiceChat() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCVoiceChat.Head.Cmd,m_NAtagGCVoiceChat.Head.SubCmd))] = m_NAtagGCVoiceChat + + +#------------------------------------------------------ +# B5 04 拍卖行新上架拍品 #tagGCAddAuctionItemInfo + +class tagGCAddAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + ItemID = 0 #(DWORD ItemID) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.ItemID = 0 + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.ItemID) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + ItemID:%d + '''\ + %( + self.ItemGUID, + self.ItemID + ) + return DumpString + + +class tagGCAddAuctionItemInfo(Structure): + Head = tagHead() + AddCount = 0 #(BYTE AddCount) + AddAuctionItemList = list() #(vector<tagGCAddAuctionItem> AddAuctionItemList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x04 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AddCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AddCount): + temAddAuctionItemList = tagGCAddAuctionItem() + _pos = temAddAuctionItemList.ReadData(_lpData, _pos) + self.AddAuctionItemList.append(temAddAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x04 + self.AddCount = 0 + self.AddAuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.AddCount): + length += self.AddAuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AddCount) + for i in range(self.AddCount): + data = CommFunc.WriteString(data, self.AddAuctionItemList[i].GetLength(), self.AddAuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AddCount:%d, + AddAuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.AddCount, + "..." + ) + return DumpString + + +m_NAtagGCAddAuctionItemInfo=tagGCAddAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAddAuctionItemInfo.Head.Cmd,m_NAtagGCAddAuctionItemInfo.Head.SubCmd))] = m_NAtagGCAddAuctionItemInfo + + +#------------------------------------------------------ +# B5 07 拍卖行关注的物品ID #tagGCAttentionAuctionItemID + +class tagGCAttentionAuctionItemID(Structure): + Head = tagHead() + AttentionCount = 0 #(BYTE AttentionCount) + AttentionItemIDList = list() #(vector<DWORD> AttentionItemIDList)// 关注的物品ID列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x07 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AttentionCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AttentionCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.AttentionItemIDList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x07 + self.AttentionCount = 0 + self.AttentionItemIDList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.AttentionCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AttentionCount) + for i in range(self.AttentionCount): + data = CommFunc.WriteDWORD(data, self.AttentionItemIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AttentionCount:%d, + AttentionItemIDList:%s + '''\ + %( + self.Head.OutputString(), + self.AttentionCount, + "..." + ) + return DumpString + + +m_NAtagGCAttentionAuctionItemID=tagGCAttentionAuctionItemID() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAttentionAuctionItemID.Head.Cmd,m_NAtagGCAttentionAuctionItemID.Head.SubCmd))] = m_NAtagGCAttentionAuctionItemID + + +#------------------------------------------------------ +# B5 06 拍卖行关注中的拍品信息 #tagGCAttentionAuctionItemInfo + +class tagGCAttentionAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 2 + length += 2 + length += len(self.UserData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderPrice, + self.UserDataLen, + self.UserData + ) + return DumpString + + +class tagGCAttentionAuctionItemInfo(Structure): + Head = tagHead() + AuctionItemCount = 0 #(BYTE AuctionItemCount)//拍品数量 + AuctionItemList = list() #(vector<tagGCAttentionAuctionItem> AuctionItemList)//拍品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x06 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AuctionItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCAttentionAuctionItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x06 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCAttentionAuctionItemInfo=tagGCAttentionAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAttentionAuctionItemInfo.Head.Cmd,m_NAtagGCAttentionAuctionItemInfo.Head.SubCmd))] = m_NAtagGCAttentionAuctionItemInfo + + +#------------------------------------------------------ +# B5 01 拍卖行拍卖中的物品信息 #tagGCAuctionItemInfo + +class tagGCAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 2 + length += 2 + length += len(self.UserData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderPrice, + self.UserDataLen, + self.UserData + ) + return DumpString + + +class tagGCAuctionItemInfo(Structure): + Head = tagHead() + Job = 0 #(BYTE Job)//过滤职业,0为不限制 + ItemTypeCount = 0 #(BYTE ItemTypeCount) + ItemTypeList = list() #(vector<DWORD> ItemTypeList)//指定的物品类型 + ClassLV = 0 #(BYTE ClassLV)//过滤阶数,0为不限制 + SpecItemIDCount = 0 #(BYTE SpecItemIDCount)//指定物品ID个数 + SpecItemIDList = list() #(vector<DWORD> SpecItemIDList)//指定物品ID + FromItemGUID = "" #(char FromItemGUID[40])//从哪个物品开始查询 + QueryDir = 0 #(BYTE QueryDir)//查询方向,1-往后查,2-往前查,3-定位查询 + QueryCount = 0 #(BYTE QueryCount)//查询个数,0为全部 + QueryRemainlCount = 0 #(WORD QueryRemainlCount)//查询条件对应查询方向剩余个数 + AuctionItemCount = 0 #(BYTE AuctionItemCount)//返回拍品数量 + AuctionItemList = list() #(vector<tagGCAuctionItem> AuctionItemList)//返回拍品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x01 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ItemTypeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ItemTypeCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.ItemTypeList.append(value) + self.ClassLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SpecItemIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SpecItemIDCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.SpecItemIDList.append(value) + self.FromItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.QueryDir,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.QueryCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.QueryRemainlCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AuctionItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCAuctionItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x01 + self.Job = 0 + self.ItemTypeCount = 0 + self.ItemTypeList = list() + self.ClassLV = 0 + self.SpecItemIDCount = 0 + self.SpecItemIDList = list() + self.FromItemGUID = "" + self.QueryDir = 0 + self.QueryCount = 0 + self.QueryRemainlCount = 0 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.ItemTypeCount + length += 1 + length += 1 + length += 4 * self.SpecItemIDCount + length += 40 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteBYTE(data, self.ItemTypeCount) + for i in range(self.ItemTypeCount): + data = CommFunc.WriteDWORD(data, self.ItemTypeList[i]) + data = CommFunc.WriteBYTE(data, self.ClassLV) + data = CommFunc.WriteBYTE(data, self.SpecItemIDCount) + for i in range(self.SpecItemIDCount): + data = CommFunc.WriteDWORD(data, self.SpecItemIDList[i]) + data = CommFunc.WriteString(data, 40, self.FromItemGUID) + data = CommFunc.WriteBYTE(data, self.QueryDir) + data = CommFunc.WriteBYTE(data, self.QueryCount) + data = CommFunc.WriteWORD(data, self.QueryRemainlCount) + data = CommFunc.WriteBYTE(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Job:%d, + ItemTypeCount:%d, + ItemTypeList:%s, + ClassLV:%d, + SpecItemIDCount:%d, + SpecItemIDList:%s, + FromItemGUID:%s, + QueryDir:%d, + QueryCount:%d, + QueryRemainlCount:%d, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.Job, + self.ItemTypeCount, + "...", + self.ClassLV, + self.SpecItemIDCount, + "...", + self.FromItemGUID, + self.QueryDir, + self.QueryCount, + self.QueryRemainlCount, + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCAuctionItemInfo=tagGCAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAuctionItemInfo.Head.Cmd,m_NAtagGCAuctionItemInfo.Head.SubCmd))] = m_NAtagGCAuctionItemInfo + + +#------------------------------------------------------ +# B5 10 拍卖行玩家竞价中的物品信息 #tagGCBiddingItemInfo + +class tagGCBiddingItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderID = 0 #(DWORD BidderID)//竞拍玩家ID,也就是当前最高竞价玩家ID + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderID = 0 + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 4 + length += 2 + length += 2 + length += len(self.UserData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteDWORD(data, self.BidderID) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderID:%d, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderID, + self.BidderPrice, + self.UserDataLen, + self.UserData + ) + return DumpString + + +class tagGCBiddingItemInfo(Structure): + Head = tagHead() + AuctionItemCount = 0 #(BYTE AuctionItemCount)//拍品数量 + AuctionItemList = list() #(vector<tagGCBiddingItem> AuctionItemList)//拍品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x10 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AuctionItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCBiddingItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x10 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCBiddingItemInfo=tagGCBiddingItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCBiddingItemInfo.Head.Cmd,m_NAtagGCBiddingItemInfo.Head.SubCmd))] = m_NAtagGCBiddingItemInfo + + +#------------------------------------------------------ +# B5 09 拍卖行清除拍品 #tagGCClearAuctionItemInfo + +class tagGCClearAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + return _pos + + def Clear(self): + self.ItemGUID = "" + return + + def GetLength(self): + length = 0 + length += 40 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s + '''\ + %( + self.ItemGUID + ) + return DumpString + + +class tagGCClearAuctionItemInfo(Structure): + Head = tagHead() + ClearCount = 0 #(BYTE ClearCount) + ClearAuctionItemList = list() #(vector<tagGCClearAuctionItem> ClearAuctionItemList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x09 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ClearCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ClearCount): + temClearAuctionItemList = tagGCClearAuctionItem() + _pos = temClearAuctionItemList.ReadData(_lpData, _pos) + self.ClearAuctionItemList.append(temClearAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x09 + self.ClearCount = 0 + self.ClearAuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.ClearCount): + length += self.ClearAuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ClearCount) + for i in range(self.ClearCount): + data = CommFunc.WriteString(data, self.ClearAuctionItemList[i].GetLength(), self.ClearAuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ClearCount:%d, + ClearAuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.ClearCount, + "..." + ) + return DumpString + + +m_NAtagGCClearAuctionItemInfo=tagGCClearAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCClearAuctionItemInfo.Head.Cmd,m_NAtagGCClearAuctionItemInfo.Head.SubCmd))] = m_NAtagGCClearAuctionItemInfo + + +#------------------------------------------------------ +# B5 05 拍卖行仙盟拍卖中的物品信息 #tagGCFamilyAuctionItemInfo + +class tagGCFamilyAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + FamilyPlayerIDLen = 0 #(WORD FamilyPlayerIDLen) + FamilyPlayerIDInfo = "" #(String FamilyPlayerIDInfo)//可获得收益的仙盟玩家ID信息 + AuctionType = 0 #(BYTE AuctionType)//拍品类型,0-全服拍品,1-仙盟拍品 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + self.FamilyPlayerIDLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.FamilyPlayerIDInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.FamilyPlayerIDLen) + self.AuctionType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + self.FamilyPlayerIDLen = 0 + self.FamilyPlayerIDInfo = "" + self.AuctionType = 0 + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 2 + length += 2 + length += len(self.UserData) + length += 2 + length += len(self.FamilyPlayerIDInfo) + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + data = CommFunc.WriteWORD(data, self.FamilyPlayerIDLen) + data = CommFunc.WriteString(data, self.FamilyPlayerIDLen, self.FamilyPlayerIDInfo) + data = CommFunc.WriteBYTE(data, self.AuctionType) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s, + FamilyPlayerIDLen:%d, + FamilyPlayerIDInfo:%s, + AuctionType:%d + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderPrice, + self.UserDataLen, + self.UserData, + self.FamilyPlayerIDLen, + self.FamilyPlayerIDInfo, + self.AuctionType + ) + return DumpString + + +class tagGCFamilyAuctionItemInfo(Structure): + Head = tagHead() + AuctionItemCount = 0 #(BYTE AuctionItemCount)//拍品数量 + AuctionItemList = list() #(vector<tagGCFamilyAuctionItem> AuctionItemList)//拍品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x05 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AuctionItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCFamilyAuctionItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x05 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCFamilyAuctionItemInfo=tagGCFamilyAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFamilyAuctionItemInfo.Head.Cmd,m_NAtagGCFamilyAuctionItemInfo.Head.SubCmd))] = m_NAtagGCFamilyAuctionItemInfo + + +#------------------------------------------------------ +# B5 02 拍卖行玩家拍卖中的物品信息 #tagGCPlayerAuctionItemInfo + +class tagGCPlayerAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 2 + length += 2 + length += len(self.UserData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderPrice, + self.UserDataLen, + self.UserData + ) + return DumpString + + +class tagGCPlayerAuctionItemInfo(Structure): + Head = tagHead() + AuctionItemCount = 0 #(BYTE AuctionItemCount)//拍品数量 + AuctionItemList = list() #(vector<tagGCPlayerAuctionItem> AuctionItemList)//拍品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x02 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AuctionItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCPlayerAuctionItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x02 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCPlayerAuctionItemInfo=tagGCPlayerAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerAuctionItemInfo.Head.Cmd,m_NAtagGCPlayerAuctionItemInfo.Head.SubCmd))] = m_NAtagGCPlayerAuctionItemInfo + + +#------------------------------------------------------ +# B5 03 拍卖行玩家拍卖记录 #tagGCPlayerAuctionRecordInfo + +class tagGCPlayerAuctionRecord(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + RecordType = 0 #(BYTE RecordType)//记录类型 0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录 + RecordResult = 0 #(BYTE RecordResult)//记录结果 0-流拍 1-拍卖成交 2-回收 3-竞价成功 4-竞价失败 + RecordTime = "" #(char RecordTime[19])//记录时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(DWORD BidderPrice)//成交价格 + BidderName = "" #(char BidderName[33])//成交玩家名 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RecordResult,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RecordTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BidderName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.RecordType = 0 + self.RecordResult = 0 + self.RecordTime = "" + self.BidderPrice = 0 + self.BidderName = "" + self.ItemID = 0 + self.ItemCount = 0 + self.UserDataLen = 0 + self.UserData = "" + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 1 + length += 1 + length += 19 + length += 4 + length += 33 + length += 4 + length += 2 + length += 2 + length += len(self.UserData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteBYTE(data, self.RecordType) + data = CommFunc.WriteBYTE(data, self.RecordResult) + data = CommFunc.WriteString(data, 19, self.RecordTime) + data = CommFunc.WriteDWORD(data, self.BidderPrice) + data = CommFunc.WriteString(data, 33, self.BidderName) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + RecordType:%d, + RecordResult:%d, + RecordTime:%s, + BidderPrice:%d, + BidderName:%s, + ItemID:%d, + ItemCount:%d, + UserDataLen:%d, + UserData:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.RecordType, + self.RecordResult, + self.RecordTime, + self.BidderPrice, + self.BidderName, + self.ItemID, + self.ItemCount, + self.UserDataLen, + self.UserData + ) + return DumpString + + +class tagGCPlayerAuctionRecordInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + AuctionRecordList = list() #(vector<tagGCPlayerAuctionRecord> AuctionRecordList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x03 + 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): + temAuctionRecordList = tagGCPlayerAuctionRecord() + _pos = temAuctionRecordList.ReadData(_lpData, _pos) + self.AuctionRecordList.append(temAuctionRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x03 + self.Count = 0 + self.AuctionRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.AuctionRecordList[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.AuctionRecordList[i].GetLength(), self.AuctionRecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + AuctionRecordList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCPlayerAuctionRecordInfo=tagGCPlayerAuctionRecordInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerAuctionRecordInfo.Head.Cmd,m_NAtagGCPlayerAuctionRecordInfo.Head.SubCmd))] = m_NAtagGCPlayerAuctionRecordInfo + + +#------------------------------------------------------ +# B5 08 拍卖行刷新拍品 #tagGCRefreshAuctionItemInfo + +class tagGCRefreshAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + AuctionType = 0 #(BYTE AuctionType)//拍品类型,0-全服拍品,1-仙盟拍品 + AddTime = "" #(char AddTime[19])//上架时间 + BidderID = 0 #(DWORD BidderID)//最高竞拍玩家ID,也就是当前最高竞价玩家ID + BidderPrice = 0 #(DWORD BidderPrice)//最高竞拍价格 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.AuctionType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.AuctionType = 0 + self.AddTime = "" + self.BidderID = 0 + self.BidderPrice = 0 + return + + def GetLength(self): + length = 0 + length += 40 + length += 1 + length += 19 + length += 4 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteBYTE(data, self.AuctionType) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteDWORD(data, self.BidderID) + data = CommFunc.WriteDWORD(data, self.BidderPrice) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + AuctionType:%d, + AddTime:%s, + BidderID:%d, + BidderPrice:%d + '''\ + %( + self.ItemGUID, + self.AuctionType, + self.AddTime, + self.BidderID, + self.BidderPrice + ) + return DumpString + + +class tagGCRefreshAuctionItemInfo(Structure): + Head = tagHead() + RefreshCount = 0 #(BYTE RefreshCount) + RefreshAuctionItemList = list() #(vector<tagGCRefreshAuctionItem> RefreshAuctionItemList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x08 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RefreshCount): + temRefreshAuctionItemList = tagGCRefreshAuctionItem() + _pos = temRefreshAuctionItemList.ReadData(_lpData, _pos) + self.RefreshAuctionItemList.append(temRefreshAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x08 + self.RefreshCount = 0 + self.RefreshAuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.RefreshCount): + length += self.RefreshAuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.RefreshCount) + for i in range(self.RefreshCount): + data = CommFunc.WriteString(data, self.RefreshAuctionItemList[i].GetLength(), self.RefreshAuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RefreshCount:%d, + RefreshAuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.RefreshCount, + "..." + ) + return DumpString + + +m_NAtagGCRefreshAuctionItemInfo=tagGCRefreshAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRefreshAuctionItemInfo.Head.Cmd,m_NAtagGCRefreshAuctionItemInfo.Head.SubCmd))] = m_NAtagGCRefreshAuctionItemInfo #------------------------------------------------------ @@ -8404,7 +10005,7 @@ RoundCount = 0 #(BYTE RoundCount)// PK回合数 RoundWinnerID = list() #(vector<DWORD> RoundWinnerID)// 回合获胜ID列表 AddScore = 0 #(WORD AddScore)// 本场加分 - Score = 0 #(WORD Score)// 当前积分 + Score = 0 #(DWORD Score)// 当前积分 DanLV = 0 #(BYTE DanLV)// 当前段位 CWinCnt = 0 #(WORD CWinCnt)// 当前连胜数 TagNameLen = 0 #(BYTE TagNameLen) @@ -8428,7 +10029,7 @@ value,_pos=CommFunc.ReadDWORD(_lpData,_pos) self.RoundWinnerID.append(value) self.AddScore,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.Score,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.DanLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.CWinCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) @@ -8462,7 +10063,7 @@ length += 1 length += 4 * self.RoundCount length += 2 - length += 2 + length += 4 length += 1 length += 2 length += 1 @@ -8480,7 +10081,7 @@ for i in range(self.RoundCount): data = CommFunc.WriteDWORD(data, self.RoundWinnerID[i]) data = CommFunc.WriteWORD(data, self.AddScore) - data = CommFunc.WriteWORD(data, self.Score) + data = CommFunc.WriteDWORD(data, self.Score) data = CommFunc.WriteBYTE(data, self.DanLV) data = CommFunc.WriteWORD(data, self.CWinCnt) data = CommFunc.WriteBYTE(data, self.TagNameLen) @@ -8726,64 +10327,92 @@ # C0 06 跨服PK本服赛季状态 #tagGCCrossRealmPKSeasonState class tagGCCrossRealmPKSeasonState(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ZoneID", c_ubyte), # 所属赛区ID - ("SeasonID", c_ushort), # 当前赛季ID - ("SeasonState", c_ubyte), # 赛季状态;0-未开启,1-开启中,2-已结束 - ("MatchState", c_ubyte), # 匹配状态;0-未开启;1-开启中 - ] + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 所属赛区ID + SeasonID = 0 #(WORD SeasonID)// 当前赛季ID + SeasonState = 0 #(BYTE SeasonState)// 赛季状态;0-未开启,1-开启中,2-已结束 + MatchState = 0 #(BYTE MatchState)// 匹配状态;0-未开启;1-开启中 + CrossZoneNameLen = 0 #(BYTE CrossZoneNameLen) + CrossZoneName = "" #(String CrossZoneName)// 跨服分区名 + data = None def __init__(self): self.Clear() - self.Cmd = 0xC0 - self.SubCmd = 0x06 + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x06 return - def ReadData(self, stringData, _pos=0, _len=0): + def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SeasonID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.SeasonState,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MatchState,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CrossZoneNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CrossZoneName,_pos = CommFunc.ReadString(_lpData, _pos,self.CrossZoneNameLen) + return _pos def Clear(self): - self.Cmd = 0xC0 - self.SubCmd = 0x06 + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x06 self.ZoneID = 0 self.SeasonID = 0 self.SeasonState = 0 self.MatchState = 0 + self.CrossZoneNameLen = 0 + self.CrossZoneName = "" return def GetLength(self): - return sizeof(tagGCCrossRealmPKSeasonState) + length = 0 + length += self.Head.GetLength() + length += 1 + length += 2 + length += 1 + length += 1 + length += 1 + length += len(self.CrossZoneName) + + return length def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteWORD(data, self.SeasonID) + data = CommFunc.WriteBYTE(data, self.SeasonState) + data = CommFunc.WriteBYTE(data, self.MatchState) + data = CommFunc.WriteBYTE(data, self.CrossZoneNameLen) + data = CommFunc.WriteString(data, self.CrossZoneNameLen, self.CrossZoneName) + return data def OutputString(self): - DumpString = '''// C0 06 跨服PK本服赛季状态 //tagGCCrossRealmPKSeasonState: - Cmd:%s, - SubCmd:%s, + DumpString = ''' + Head:%s, ZoneID:%d, SeasonID:%d, SeasonState:%d, - MatchState:%d + MatchState:%d, + CrossZoneNameLen:%d, + CrossZoneName:%s '''\ %( - self.Cmd, - self.SubCmd, + self.Head.OutputString(), self.ZoneID, self.SeasonID, self.SeasonState, - self.MatchState + self.MatchState, + self.CrossZoneNameLen, + self.CrossZoneName ) return DumpString m_NAtagGCCrossRealmPKSeasonState=tagGCCrossRealmPKSeasonState() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKSeasonState.Cmd,m_NAtagGCCrossRealmPKSeasonState.SubCmd))] = m_NAtagGCCrossRealmPKSeasonState +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKSeasonState.Head.Cmd,m_NAtagGCCrossRealmPKSeasonState.Head.SubCmd))] = m_NAtagGCCrossRealmPKSeasonState #------------------------------------------------------ @@ -9063,6 +10692,714 @@ m_NAtagMCCoinToGoldReport=tagMCCoinToGoldReport() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCoinToGoldReport.Head.Cmd,m_NAtagMCCoinToGoldReport.Head.SubCmd))] = m_NAtagMCCoinToGoldReport + + +#------------------------------------------------------ +# A1 12 玩家初始化 #tagMCDBPlayer + +class tagMCDBPlayer(Structure): + Head = tagHead() + AccID = "" #(char AccID[65])//帐号名, 该角色所在的帐号的用户名 + PlayerID = 0 #(DWORD PlayerID) + PlayerName = "" #(char PlayerName[33])//size = 14 + AccState = 0 #(BYTE AccState)//0: 未创建, 1: 创建OK,正常登录 2:封号 3:已删除 + GMLevel = 0 #(BYTE GMLevel)//GM等级, 0:不是GM >=1 : GM的等级 + Sex = 0 #(BYTE Sex)//性别 + Job = 0 #(BYTE Job)//职业, 0.新手 1.游侠 2.战士 3.弓箭手 4.术士 5.道士 + ReincarnationLv = 0 #(WORD ReincarnationLv)// 转生等级 + LV = 0 #(WORD LV)//等级 + LVEx = 0 #(WORD LVEx)//玩家等级副本,用于转生 + LV2 = 0 #(WORD LV2)//大师等级 + ExpPoint = 0 #(DWORD ExpPoint)//扩充经验点数 + TotalExp = 0 #(DWORD TotalExp)//总经验 + Family = 0 #(DWORD Family)//家族 + FamilyName = "" #(char FamilyName[33])//家族名称 + TeamHornor = 0 #(int TeamHornor)//组队荣誉 + FamilyHornor = 0 #(int FamilyHornor)//家族荣耀 + FamilyActiveValue = 0 #(int FamilyActiveValue)//家族活跃度 + LastWeekFamilyActiveValue = 0 #(int LastWeekFamilyActiveValue)//上周家族活跃度 + CountryHornor = 0 #(int CountryHornor)//本周国家功勋值 + CountryLastWeekHornor = 0 #(int CountryLastWeekHornor)//上周国家功勋值 + Mate = 0 #(DWORD Mate) + Gold = 0 #(DWORD Gold)//金子 + GoldPaper = 0 #(DWORD GoldPaper)//金票 + Silver = 0 #(DWORD Silver)//银子 + SilverPaper = 0 #(DWORD SilverPaper)//银票 + FightPoint = 0 #(DWORD FightPoint)//战斗值 + HappyPoint = 0 #(DWORD HappyPoint)//脱机挂时长(秒) + LineID = 0 #(BYTE LineID)//角色所在线路 + MapID = 0 #(WORD MapID)//角色所在地图 + PosX = 0 #(WORD PosX)//角色坐标 + PosY = 0 #(WORD PosY) + RebornMapID = 0 #(WORD RebornMapID)//重生点地图ID + RebornPosX = 0 #(WORD RebornPosX) + RebornPosY = 0 #(WORD RebornPosY) + State = 0 #(BYTE State)//角色状态 0.正常在线1.脱机挂在线 2脱机挂死亡 + HP = 0 #(DWORD HP)//当前HP + XP = 0 #(DWORD XP)//当前XP + HPRestoreSetting = 0 #(WORD HPRestoreSetting)//少于这个值%自动喝血 + MPRestoreSetting = 0 #(WORD MPRestoreSetting)//少于这个值%自动喝魔 + FreePoint = 0 #(DWORD FreePoint)//未分配点数 + FreeSkillPoint = 0 #(DWORD FreeSkillPoint)//未分配的技能点 + BaseSTR = 0 #(int BaseSTR)//裸体力量 + BasePNE = 0 #(int BasePNE)//裸体真元 + BasePHY = 0 #(int BasePHY)//裸体筋骨 + BaseCON = 0 #(int BaseCON)//裸体体魄 + STR = 0 #(int STR)//力量 + PNE = 0 #(int PNE)//真元 + PHY = 0 #(int PHY)//筋骨 + CON = 0 #(int CON)//体魄 + PKValue = 0 #(WORD PKValue)//衡量PK能力的一项属性,由攻防计算而得 + BackpackLV = 0 #(BYTE BackpackLV)//背包等级 + WarehouseLV = 0 #(BYTE WarehouseLV)//仓库等级 + TeamID = 0 #(DWORD TeamID)//队伍ID + UseGoldType = 0 #(BYTE UseGoldType)//默认用金子/金票 类型为MoneyType + UseSilverType = 0 #(BYTE UseSilverType)//默认用的银子/银票 + AttackMode = 0 #(BYTE AttackMode)//攻击模式 + LastWeekOnlineTime = 0 #(DWORD LastWeekOnlineTime)//上周在线时间 + FBID = 0 #(BYTE FBID)//fb id + FamilyLV = 0 #(BYTE FamilyLV)//家族等级 + FriendFavor = 0 #(DWORD FriendFavor)//好友人气值 + Energy = 0 #(DWORD Energy)//精力值 + EquipShowSwitch = 0 #(DWORD EquipShowSwitch)//装备显示开关 + LuckValue = 0 #(DWORD LuckValue)//幸运值 + ExAttr1 = 0 #(DWORD ExAttr1)//扩展属性1,各项目专用 + ExAttr2 = 0 #(DWORD ExAttr2)//扩展属性2,各项目专用 + ExAttr3 = 0 #(DWORD ExAttr3)//扩展属性3,各项目专用 + ExAttr4 = 0 #(DWORD ExAttr4)//扩展属性4,各项目专用 + ExAttr5 = 0 #(DWORD ExAttr5)//扩展属性5,各项目专用 + Faction = 0 #(BYTE Faction)//阵营 + InfamyValue = 0 #(DWORD InfamyValue)//恶名值 + OfficialRank = 0 #(BYTE OfficialRank)//官阶,官职等级 + ChangeCoinPointTotal = 0 #(DWORD ChangeCoinPointTotal)//兑换的点数总计 + VIPLv = 0 #(BYTE VIPLv)//VIP等级 + VIPLvForPhone = 0 #(BYTE VIPLvForPhone)//移动VIP等级 + ExAttr6 = 0 #(DWORD ExAttr6)//扩展属性6,各项目专用 + ExAttr7 = 0 #(DWORD ExAttr7)//扩展属性7,各项目专用 + ExAttr8 = 0 #(DWORD ExAttr8)//扩展属性8,各项目专用 + ExAttr9 = 0 #(DWORD ExAttr9)//扩展属性9,各项目专用 + ExAttr10 = 0 #(DWORD ExAttr10)//扩展属性10,各项目专用 + ModelMark = 0 #(DWORD ModelMark)// 变形模型mark + ExAttr11 = 0 #(DWORD ExAttr11)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr12 = 0 #(DWORD ExAttr12)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr13 = 0 #(DWORD ExAttr13)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr14 = 0 #(DWORD ExAttr14)//预留的扩展属性字段,用来存放项目特定的属性 + OperateInfo = 0 #(DWORD OperateInfo)//玩家附加运营商信息 + Operate = "" #(char Operate[15])//所属运营商平台名 + ServerID = 0 #(DWORD ServerID)//所属区服ID + ExAttr15 = 0 #(DWORD ExAttr15)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr16 = 0 #(DWORD ExAttr16)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr17 = 0 #(DWORD ExAttr17)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr18 = 0 #(DWORD ExAttr18)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr19 = 0 #(DWORD ExAttr19)//预留的扩展属性字段,用来存放项目特定的属性 + ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA1 + self.Head.SubCmd = 0x12 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AccID,_pos = CommFunc.ReadString(_lpData, _pos,65) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.AccState,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.GMLevel,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Sex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ReincarnationLv,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LVEx,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LV2,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TotalExp,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Family,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FamilyName,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.TeamHornor,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FamilyHornor,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FamilyActiveValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.LastWeekFamilyActiveValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountryHornor,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CountryLastWeekHornor,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Mate,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Gold,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.GoldPaper,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Silver,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SilverPaper,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FightPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.HappyPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.LineID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MapID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.PosX,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.PosY,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RebornMapID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RebornPosX,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.RebornPosY,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.HP,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.XP,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.HPRestoreSetting,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.MPRestoreSetting,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.FreePoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FreeSkillPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BaseSTR,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BasePNE,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BasePHY,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.BaseCON,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.STR,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PNE,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PHY,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.CON,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PKValue,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.BackpackLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.WarehouseLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TeamID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.UseGoldType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.UseSilverType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AttackMode,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LastWeekOnlineTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.FBID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FamilyLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.FriendFavor,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Energy,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.EquipShowSwitch,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.LuckValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr1,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr2,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr3,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr4,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr5,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Faction,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.InfamyValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.OfficialRank,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ChangeCoinPointTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.VIPLv,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.VIPLvForPhone,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ExAttr6,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr7,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr8,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr9,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr10,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ModelMark,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr11,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr12,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr13,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr14,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.OperateInfo,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Operate,_pos = CommFunc.ReadString(_lpData, _pos,15) + self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr15,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr16,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr17,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr18,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr19,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA1 + self.Head.SubCmd = 0x12 + self.AccID = "" + self.PlayerID = 0 + self.PlayerName = "" + self.AccState = 0 + self.GMLevel = 0 + self.Sex = 0 + self.Job = 0 + self.ReincarnationLv = 0 + self.LV = 0 + self.LVEx = 0 + self.LV2 = 0 + self.ExpPoint = 0 + self.TotalExp = 0 + self.Family = 0 + self.FamilyName = "" + self.TeamHornor = 0 + self.FamilyHornor = 0 + self.FamilyActiveValue = 0 + self.LastWeekFamilyActiveValue = 0 + self.CountryHornor = 0 + self.CountryLastWeekHornor = 0 + self.Mate = 0 + self.Gold = 0 + self.GoldPaper = 0 + self.Silver = 0 + self.SilverPaper = 0 + self.FightPoint = 0 + self.HappyPoint = 0 + self.LineID = 0 + self.MapID = 0 + self.PosX = 0 + self.PosY = 0 + self.RebornMapID = 0 + self.RebornPosX = 0 + self.RebornPosY = 0 + self.State = 0 + self.HP = 0 + self.XP = 0 + self.HPRestoreSetting = 0 + self.MPRestoreSetting = 0 + self.FreePoint = 0 + self.FreeSkillPoint = 0 + self.BaseSTR = 0 + self.BasePNE = 0 + self.BasePHY = 0 + self.BaseCON = 0 + self.STR = 0 + self.PNE = 0 + self.PHY = 0 + self.CON = 0 + self.PKValue = 0 + self.BackpackLV = 0 + self.WarehouseLV = 0 + self.TeamID = 0 + self.UseGoldType = 0 + self.UseSilverType = 0 + self.AttackMode = 0 + self.LastWeekOnlineTime = 0 + self.FBID = 0 + self.FamilyLV = 0 + self.FriendFavor = 0 + self.Energy = 0 + self.EquipShowSwitch = 0 + self.LuckValue = 0 + self.ExAttr1 = 0 + self.ExAttr2 = 0 + self.ExAttr3 = 0 + self.ExAttr4 = 0 + self.ExAttr5 = 0 + self.Faction = 0 + self.InfamyValue = 0 + self.OfficialRank = 0 + self.ChangeCoinPointTotal = 0 + self.VIPLv = 0 + self.VIPLvForPhone = 0 + self.ExAttr6 = 0 + self.ExAttr7 = 0 + self.ExAttr8 = 0 + self.ExAttr9 = 0 + self.ExAttr10 = 0 + self.ModelMark = 0 + self.ExAttr11 = 0 + self.ExAttr12 = 0 + self.ExAttr13 = 0 + self.ExAttr14 = 0 + self.OperateInfo = 0 + self.Operate = "" + self.ServerID = 0 + self.ExAttr15 = 0 + self.ExAttr16 = 0 + self.ExAttr17 = 0 + self.ExAttr18 = 0 + self.ExAttr19 = 0 + self.ExAttr20 = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 65 + length += 4 + length += 33 + length += 1 + length += 1 + length += 1 + length += 1 + length += 2 + length += 2 + length += 2 + length += 2 + length += 4 + length += 4 + length += 4 + length += 33 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 1 + length += 2 + length += 2 + length += 2 + length += 2 + length += 2 + length += 2 + length += 1 + length += 4 + length += 4 + length += 2 + length += 2 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 2 + length += 1 + length += 1 + length += 4 + length += 1 + length += 1 + length += 1 + length += 4 + length += 1 + length += 1 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 1 + length += 4 + length += 1 + length += 4 + length += 1 + length += 1 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 15 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + length += 4 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 65, self.AccID) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteString(data, 33, self.PlayerName) + data = CommFunc.WriteBYTE(data, self.AccState) + data = CommFunc.WriteBYTE(data, self.GMLevel) + data = CommFunc.WriteBYTE(data, self.Sex) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteWORD(data, self.ReincarnationLv) + data = CommFunc.WriteWORD(data, self.LV) + data = CommFunc.WriteWORD(data, self.LVEx) + data = CommFunc.WriteWORD(data, self.LV2) + data = CommFunc.WriteDWORD(data, self.ExpPoint) + data = CommFunc.WriteDWORD(data, self.TotalExp) + data = CommFunc.WriteDWORD(data, self.Family) + data = CommFunc.WriteString(data, 33, self.FamilyName) + data = CommFunc.WriteDWORD(data, self.TeamHornor) + data = CommFunc.WriteDWORD(data, self.FamilyHornor) + data = CommFunc.WriteDWORD(data, self.FamilyActiveValue) + data = CommFunc.WriteDWORD(data, self.LastWeekFamilyActiveValue) + data = CommFunc.WriteDWORD(data, self.CountryHornor) + data = CommFunc.WriteDWORD(data, self.CountryLastWeekHornor) + data = CommFunc.WriteDWORD(data, self.Mate) + data = CommFunc.WriteDWORD(data, self.Gold) + data = CommFunc.WriteDWORD(data, self.GoldPaper) + data = CommFunc.WriteDWORD(data, self.Silver) + data = CommFunc.WriteDWORD(data, self.SilverPaper) + data = CommFunc.WriteDWORD(data, self.FightPoint) + data = CommFunc.WriteDWORD(data, self.HappyPoint) + data = CommFunc.WriteBYTE(data, self.LineID) + data = CommFunc.WriteWORD(data, self.MapID) + data = CommFunc.WriteWORD(data, self.PosX) + data = CommFunc.WriteWORD(data, self.PosY) + data = CommFunc.WriteWORD(data, self.RebornMapID) + data = CommFunc.WriteWORD(data, self.RebornPosX) + data = CommFunc.WriteWORD(data, self.RebornPosY) + data = CommFunc.WriteBYTE(data, self.State) + data = CommFunc.WriteDWORD(data, self.HP) + data = CommFunc.WriteDWORD(data, self.XP) + data = CommFunc.WriteWORD(data, self.HPRestoreSetting) + data = CommFunc.WriteWORD(data, self.MPRestoreSetting) + data = CommFunc.WriteDWORD(data, self.FreePoint) + data = CommFunc.WriteDWORD(data, self.FreeSkillPoint) + data = CommFunc.WriteDWORD(data, self.BaseSTR) + data = CommFunc.WriteDWORD(data, self.BasePNE) + data = CommFunc.WriteDWORD(data, self.BasePHY) + data = CommFunc.WriteDWORD(data, self.BaseCON) + data = CommFunc.WriteDWORD(data, self.STR) + data = CommFunc.WriteDWORD(data, self.PNE) + data = CommFunc.WriteDWORD(data, self.PHY) + data = CommFunc.WriteDWORD(data, self.CON) + data = CommFunc.WriteWORD(data, self.PKValue) + data = CommFunc.WriteBYTE(data, self.BackpackLV) + data = CommFunc.WriteBYTE(data, self.WarehouseLV) + data = CommFunc.WriteDWORD(data, self.TeamID) + data = CommFunc.WriteBYTE(data, self.UseGoldType) + data = CommFunc.WriteBYTE(data, self.UseSilverType) + data = CommFunc.WriteBYTE(data, self.AttackMode) + data = CommFunc.WriteDWORD(data, self.LastWeekOnlineTime) + data = CommFunc.WriteBYTE(data, self.FBID) + data = CommFunc.WriteBYTE(data, self.FamilyLV) + data = CommFunc.WriteDWORD(data, self.FriendFavor) + data = CommFunc.WriteDWORD(data, self.Energy) + data = CommFunc.WriteDWORD(data, self.EquipShowSwitch) + data = CommFunc.WriteDWORD(data, self.LuckValue) + data = CommFunc.WriteDWORD(data, self.ExAttr1) + data = CommFunc.WriteDWORD(data, self.ExAttr2) + data = CommFunc.WriteDWORD(data, self.ExAttr3) + data = CommFunc.WriteDWORD(data, self.ExAttr4) + data = CommFunc.WriteDWORD(data, self.ExAttr5) + data = CommFunc.WriteBYTE(data, self.Faction) + data = CommFunc.WriteDWORD(data, self.InfamyValue) + data = CommFunc.WriteBYTE(data, self.OfficialRank) + data = CommFunc.WriteDWORD(data, self.ChangeCoinPointTotal) + data = CommFunc.WriteBYTE(data, self.VIPLv) + data = CommFunc.WriteBYTE(data, self.VIPLvForPhone) + data = CommFunc.WriteDWORD(data, self.ExAttr6) + data = CommFunc.WriteDWORD(data, self.ExAttr7) + data = CommFunc.WriteDWORD(data, self.ExAttr8) + data = CommFunc.WriteDWORD(data, self.ExAttr9) + data = CommFunc.WriteDWORD(data, self.ExAttr10) + data = CommFunc.WriteDWORD(data, self.ModelMark) + data = CommFunc.WriteDWORD(data, self.ExAttr11) + data = CommFunc.WriteDWORD(data, self.ExAttr12) + data = CommFunc.WriteDWORD(data, self.ExAttr13) + data = CommFunc.WriteDWORD(data, self.ExAttr14) + data = CommFunc.WriteDWORD(data, self.OperateInfo) + data = CommFunc.WriteString(data, 15, self.Operate) + data = CommFunc.WriteDWORD(data, self.ServerID) + data = CommFunc.WriteDWORD(data, self.ExAttr15) + data = CommFunc.WriteDWORD(data, self.ExAttr16) + data = CommFunc.WriteDWORD(data, self.ExAttr17) + data = CommFunc.WriteDWORD(data, self.ExAttr18) + data = CommFunc.WriteDWORD(data, self.ExAttr19) + data = CommFunc.WriteDWORD(data, self.ExAttr20) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AccID:%s, + PlayerID:%d, + PlayerName:%s, + AccState:%d, + GMLevel:%d, + Sex:%d, + Job:%d, + ReincarnationLv:%d, + LV:%d, + LVEx:%d, + LV2:%d, + ExpPoint:%d, + TotalExp:%d, + Family:%d, + FamilyName:%s, + TeamHornor:%d, + FamilyHornor:%d, + FamilyActiveValue:%d, + LastWeekFamilyActiveValue:%d, + CountryHornor:%d, + CountryLastWeekHornor:%d, + Mate:%d, + Gold:%d, + GoldPaper:%d, + Silver:%d, + SilverPaper:%d, + FightPoint:%d, + HappyPoint:%d, + LineID:%d, + MapID:%d, + PosX:%d, + PosY:%d, + RebornMapID:%d, + RebornPosX:%d, + RebornPosY:%d, + State:%d, + HP:%d, + XP:%d, + HPRestoreSetting:%d, + MPRestoreSetting:%d, + FreePoint:%d, + FreeSkillPoint:%d, + BaseSTR:%d, + BasePNE:%d, + BasePHY:%d, + BaseCON:%d, + STR:%d, + PNE:%d, + PHY:%d, + CON:%d, + PKValue:%d, + BackpackLV:%d, + WarehouseLV:%d, + TeamID:%d, + UseGoldType:%d, + UseSilverType:%d, + AttackMode:%d, + LastWeekOnlineTime:%d, + FBID:%d, + FamilyLV:%d, + FriendFavor:%d, + Energy:%d, + EquipShowSwitch:%d, + LuckValue:%d, + ExAttr1:%d, + ExAttr2:%d, + ExAttr3:%d, + ExAttr4:%d, + ExAttr5:%d, + Faction:%d, + InfamyValue:%d, + OfficialRank:%d, + ChangeCoinPointTotal:%d, + VIPLv:%d, + VIPLvForPhone:%d, + ExAttr6:%d, + ExAttr7:%d, + ExAttr8:%d, + ExAttr9:%d, + ExAttr10:%d, + ModelMark:%d, + ExAttr11:%d, + ExAttr12:%d, + ExAttr13:%d, + ExAttr14:%d, + OperateInfo:%d, + Operate:%s, + ServerID:%d, + ExAttr15:%d, + ExAttr16:%d, + ExAttr17:%d, + ExAttr18:%d, + ExAttr19:%d, + ExAttr20:%d + '''\ + %( + self.Head.OutputString(), + self.AccID, + self.PlayerID, + self.PlayerName, + self.AccState, + self.GMLevel, + self.Sex, + self.Job, + self.ReincarnationLv, + self.LV, + self.LVEx, + self.LV2, + self.ExpPoint, + self.TotalExp, + self.Family, + self.FamilyName, + self.TeamHornor, + self.FamilyHornor, + self.FamilyActiveValue, + self.LastWeekFamilyActiveValue, + self.CountryHornor, + self.CountryLastWeekHornor, + self.Mate, + self.Gold, + self.GoldPaper, + self.Silver, + self.SilverPaper, + self.FightPoint, + self.HappyPoint, + self.LineID, + self.MapID, + self.PosX, + self.PosY, + self.RebornMapID, + self.RebornPosX, + self.RebornPosY, + self.State, + self.HP, + self.XP, + self.HPRestoreSetting, + self.MPRestoreSetting, + self.FreePoint, + self.FreeSkillPoint, + self.BaseSTR, + self.BasePNE, + self.BasePHY, + self.BaseCON, + self.STR, + self.PNE, + self.PHY, + self.CON, + self.PKValue, + self.BackpackLV, + self.WarehouseLV, + self.TeamID, + self.UseGoldType, + self.UseSilverType, + self.AttackMode, + self.LastWeekOnlineTime, + self.FBID, + self.FamilyLV, + self.FriendFavor, + self.Energy, + self.EquipShowSwitch, + self.LuckValue, + self.ExAttr1, + self.ExAttr2, + self.ExAttr3, + self.ExAttr4, + self.ExAttr5, + self.Faction, + self.InfamyValue, + self.OfficialRank, + self.ChangeCoinPointTotal, + self.VIPLv, + self.VIPLvForPhone, + self.ExAttr6, + self.ExAttr7, + self.ExAttr8, + self.ExAttr9, + self.ExAttr10, + self.ModelMark, + self.ExAttr11, + self.ExAttr12, + self.ExAttr13, + self.ExAttr14, + self.OperateInfo, + self.Operate, + self.ServerID, + self.ExAttr15, + self.ExAttr16, + self.ExAttr17, + self.ExAttr18, + self.ExAttr19, + self.ExAttr20 + ) + return DumpString + + +m_NAtagMCDBPlayer=tagMCDBPlayer() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDBPlayer.Head.Cmd,m_NAtagMCDBPlayer.Head.SubCmd))] = m_NAtagMCDBPlayer #------------------------------------------------------ @@ -11305,70 +13642,57 @@ #------------------------------------------------------ -# A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo +# A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo -class tagMCEquipPartSuiteLV(Structure): - EquipIndex = 0 #(BYTE EquipIndex) - Len = 0 #(WORD Len)//长度 - SuiteLVInfo = "" #(String SuiteLVInfo)//{套装类型:等级} - data = None +class tagMCEquipPartStar(Structure): + _pack_ = 1 + _fields_ = [ + ("EquipPackIndex", c_ushort), + ("Star", c_ubyte), + ] def __init__(self): self.Clear() return - def ReadData(self, _lpData, _pos=0, _Len=0): + def ReadData(self, stringData, _pos=0, _len=0): self.Clear() - self.EquipIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.SuiteLVInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Len) - return _pos + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() def Clear(self): - self.EquipIndex = 0 - self.Len = 0 - self.SuiteLVInfo = "" + self.EquipPackIndex = 0 + self.Star = 0 return def GetLength(self): - length = 0 - length += 1 - length += 2 - length += len(self.SuiteLVInfo) - - return length + return sizeof(tagMCEquipPartStar) def GetBuffer(self): - data = '' - data = CommFunc.WriteBYTE(data, self.EquipIndex) - data = CommFunc.WriteWORD(data, self.Len) - data = CommFunc.WriteString(data, self.Len, self.SuiteLVInfo) - return data + return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = ''' - EquipIndex:%d, - Len:%d, - SuiteLVInfo:%s + DumpString = '''// A3 B1 装备部位星数信息 //tagMCEquipPartStarInfo: + EquipPackIndex:%d, + Star:%d '''\ %( - self.EquipIndex, - self.Len, - self.SuiteLVInfo + self.EquipPackIndex, + self.Star ) return DumpString -class tagMCEquipPartSuiteLVInfo(Structure): +class tagMCEquipPartStarInfo(Structure): Head = tagHead() Count = 0 #(BYTE Count)// 信息个数 - InfoList = list() #(vector<tagMCEquipPartSuiteLV> InfoList)// 信息列表 + InfoList = list() #(vector<tagMCEquipPartStar> InfoList)// 信息列表 data = None def __init__(self): self.Clear() self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0x09 + self.Head.SubCmd = 0xB1 return def ReadData(self, _lpData, _pos=0, _Len=0): @@ -11376,7 +13700,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.Count): - temInfoList = tagMCEquipPartSuiteLV() + temInfoList = tagMCEquipPartStar() _pos = temInfoList.ReadData(_lpData, _pos) self.InfoList.append(temInfoList) return _pos @@ -11385,7 +13709,7 @@ self.Head = tagHead() self.Head.Clear() self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0x09 + self.Head.SubCmd = 0xB1 self.Count = 0 self.InfoList = list() return @@ -11421,8 +13745,8 @@ return DumpString -m_NAtagMCEquipPartSuiteLVInfo=tagMCEquipPartSuiteLVInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartSuiteLVInfo.Head.Cmd,m_NAtagMCEquipPartSuiteLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartSuiteLVInfo +m_NAtagMCEquipPartStarInfo=tagMCEquipPartStarInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarInfo.Head.Cmd,m_NAtagMCEquipPartStarInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarInfo #------------------------------------------------------ @@ -12782,114 +15106,6 @@ #------------------------------------------------------ -# A3 BE 通知客户端法宝精炼等级 #tagMCMagicWeaponMsg - -class tagMCMagicWeaponLV(Structure): - _pack_ = 1 - _fields_ = [ - ("MWID", c_int), # 法宝ID - ("MWLV", 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.MWID = 0 - self.MWLV = 0 - return - - def GetLength(self): - return sizeof(tagMCMagicWeaponLV) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A3 BE 通知客户端法宝精炼等级 //tagMCMagicWeaponMsg: - MWID:%d, - MWLV:%d - '''\ - %( - self.MWID, - self.MWLV - ) - return DumpString - - -class tagMCMagicWeaponMsg(Structure): - Head = tagHead() - Count = 0 #(BYTE Count)// 法宝个数 - MWInfo = list() #(vector<tagMCMagicWeaponLV> MWInfo)//法宝信息 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0xBE - 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): - temMWInfo = tagMCMagicWeaponLV() - _pos = temMWInfo.ReadData(_lpData, _pos) - self.MWInfo.append(temMWInfo) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0xBE - self.Count = 0 - self.MWInfo = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.Count): - length += self.MWInfo[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.MWInfo[i].GetLength(), self.MWInfo[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - Count:%d, - MWInfo:%s - '''\ - %( - self.Head.OutputString(), - self.Count, - "..." - ) - return DumpString - - -m_NAtagMCMagicWeaponMsg=tagMCMagicWeaponMsg() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponMsg.Head.Cmd,m_NAtagMCMagicWeaponMsg.Head.SubCmd))] = m_NAtagMCMagicWeaponMsg - - -#------------------------------------------------------ # A3 46 大师经验信息 #tagMCGreatMasterExp class tagMCGreatMasterExp(Structure): @@ -13010,15 +15226,16 @@ #------------------------------------------------------ -# A3 B3 装备部位星级信息 #tagMCEquipPartStarLVInfo +# A3 B3 装备部位强化信息 #tagMCEquipPartPlusInfo -class tagMCEquipPartStarLV(Structure): +class tagMCEquipPartPlusLV(Structure): _pack_ = 1 _fields_ = [ ("PackType", c_ubyte), ("EquipIndex", c_ubyte), ("EquipPartStarLV", c_ushort), ("Proficiency", c_int), + ("EvolveLV", c_ubyte), ] def __init__(self): @@ -13035,34 +15252,37 @@ self.EquipIndex = 0 self.EquipPartStarLV = 0 self.Proficiency = 0 + self.EvolveLV = 0 return def GetLength(self): - return sizeof(tagMCEquipPartStarLV) + return sizeof(tagMCEquipPartPlusLV) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''// A3 B3 装备部位星级信息 //tagMCEquipPartStarLVInfo: + DumpString = '''// A3 B3 装备部位强化信息 //tagMCEquipPartPlusInfo: PackType:%d, EquipIndex:%d, EquipPartStarLV:%d, - Proficiency:%d + Proficiency:%d, + EvolveLV:%d '''\ %( self.PackType, self.EquipIndex, self.EquipPartStarLV, - self.Proficiency + self.Proficiency, + self.EvolveLV ) return DumpString -class tagMCEquipPartStarLVInfo(Structure): +class tagMCEquipPartPlusInfo(Structure): Head = tagHead() Count = 0 #(BYTE Count)// 信息个数 - InfoList = list() #(vector<tagMCEquipPartStarLV> InfoList)// 信息列表 + InfoList = list() #(vector<tagMCEquipPartPlusLV> InfoList)// 信息列表 data = None def __init__(self): @@ -13076,7 +15296,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.Count): - temInfoList = tagMCEquipPartStarLV() + temInfoList = tagMCEquipPartPlusLV() _pos = temInfoList.ReadData(_lpData, _pos) self.InfoList.append(temInfoList) return _pos @@ -13121,8 +15341,8 @@ return DumpString -m_NAtagMCEquipPartStarLVInfo=tagMCEquipPartStarLVInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarLVInfo.Head.Cmd,m_NAtagMCEquipPartStarLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarLVInfo +m_NAtagMCEquipPartPlusInfo=tagMCEquipPartPlusInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartPlusInfo.Head.Cmd,m_NAtagMCEquipPartPlusInfo.Head.SubCmd))] = m_NAtagMCEquipPartPlusInfo #------------------------------------------------------ @@ -13302,126 +15522,6 @@ m_NAtagMCModuleFightPowerInfo=tagMCModuleFightPowerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCModuleFightPowerInfo.Head.Cmd,m_NAtagMCModuleFightPowerInfo.Head.SubCmd))] = m_NAtagMCModuleFightPowerInfo - - -#------------------------------------------------------ -# A3 53 法宝特权数据 #tagMCMWPrivilegeDataInfo - -class tagMCMWPrivilegeData(Structure): - _pack_ = 1 - _fields_ = [ - ("PriID", c_int), # 特权ID - ("State", c_ubyte), #激活状态 - ("CurValue", c_int), #当前总进度 - ("GotValue", c_int), #已领取进度 - ("ItemAwardState", 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.PriID = 0 - self.State = 0 - self.CurValue = 0 - self.GotValue = 0 - self.ItemAwardState = 0 - return - - def GetLength(self): - return sizeof(tagMCMWPrivilegeData) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A3 53 法宝特权数据 //tagMCMWPrivilegeDataInfo: - PriID:%d, - State:%d, - CurValue:%d, - GotValue:%d, - ItemAwardState:%d - '''\ - %( - self.PriID, - self.State, - self.CurValue, - self.GotValue, - self.ItemAwardState - ) - return DumpString - - -class tagMCMWPrivilegeDataInfo(Structure): - Head = tagHead() - Count = 0 #(BYTE Count)// 信息个数 - InfoList = list() #(vector<tagMCMWPrivilegeData> InfoList)// 信息列表 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0x53 - 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 = tagMCMWPrivilegeData() - _pos = temInfoList.ReadData(_lpData, _pos) - self.InfoList.append(temInfoList) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0x53 - 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_NAtagMCMWPrivilegeDataInfo=tagMCMWPrivilegeDataInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMWPrivilegeDataInfo.Head.Cmd,m_NAtagMCMWPrivilegeDataInfo.Head.SubCmd))] = m_NAtagMCMWPrivilegeDataInfo #------------------------------------------------------ @@ -14168,6 +16268,66 @@ m_NAtagMCPrayElixirResult=tagMCPrayElixirResult() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPrayElixirResult.Cmd,m_NAtagMCPrayElixirResult.SubCmd))] = m_NAtagMCPrayElixirResult + + +#------------------------------------------------------ +# A3 27 境界修为池信息 #tagMCRealmExpInfo + +class tagMCRealmExpInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BeginTime", c_int), #开始计时时间 + ("CurExp", c_int), #当前总经验 + ("CurExpPoint", c_int), #当前总经验点 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0x27 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xA3 + self.SubCmd = 0x27 + self.BeginTime = 0 + self.CurExp = 0 + self.CurExpPoint = 0 + return + + def GetLength(self): + return sizeof(tagMCRealmExpInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 27 境界修为池信息 //tagMCRealmExpInfo: + Cmd:%s, + SubCmd:%s, + BeginTime:%d, + CurExp:%d, + CurExpPoint:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BeginTime, + self.CurExp, + self.CurExpPoint + ) + return DumpString + + +m_NAtagMCRealmExpInfo=tagMCRealmExpInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRealmExpInfo.Cmd,m_NAtagMCRealmExpInfo.SubCmd))] = m_NAtagMCRealmExpInfo #------------------------------------------------------ @@ -15025,18 +17185,14 @@ #------------------------------------------------------ -# A3 11 通知玩家境界渡劫是否开启 #tagMCSyncRealmFBIsOpen +# A3 11 通知玩家境界信息 #tagMCSyncRealmInfo -class tagMCSyncRealmFBIsOpen(Structure): +class tagMCSyncRealmInfo(Structure): _pack_ = 1 _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("IsOpen", c_ubyte), #是否开启 - ("SitAllTime", c_ushort), #打坐总时间秒 - ("SitRemainTime", c_int), #开始打坐前剩余时间秒 - ("SitStartTime", c_int), #开始打坐时间 - ("LastEnterTime", c_int), #上次进入渡劫副本时间 + ("IsPass", c_ubyte), #是否通关副本 ] def __init__(self): @@ -15053,43 +17209,31 @@ def Clear(self): self.Cmd = 0xA3 self.SubCmd = 0x11 - self.IsOpen = 0 - self.SitAllTime = 0 - self.SitRemainTime = 0 - self.SitStartTime = 0 - self.LastEnterTime = 0 + self.IsPass = 0 return def GetLength(self): - return sizeof(tagMCSyncRealmFBIsOpen) + return sizeof(tagMCSyncRealmInfo) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''// A3 11 通知玩家境界渡劫是否开启 //tagMCSyncRealmFBIsOpen: + DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo: Cmd:%s, SubCmd:%s, - IsOpen:%d, - SitAllTime:%d, - SitRemainTime:%d, - SitStartTime:%d, - LastEnterTime:%d + IsPass:%d '''\ %( self.Cmd, self.SubCmd, - self.IsOpen, - self.SitAllTime, - self.SitRemainTime, - self.SitStartTime, - self.LastEnterTime + self.IsPass ) return DumpString -m_NAtagMCSyncRealmFBIsOpen=tagMCSyncRealmFBIsOpen() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmFBIsOpen.Cmd,m_NAtagMCSyncRealmFBIsOpen.SubCmd))] = m_NAtagMCSyncRealmFBIsOpen +m_NAtagMCSyncRealmInfo=tagMCSyncRealmInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmInfo.Cmd,m_NAtagMCSyncRealmInfo.SubCmd))] = m_NAtagMCSyncRealmInfo #------------------------------------------------------ @@ -18069,7 +20213,6 @@ ItemData = "" #(String ItemData)//物品记录 PlusDataSize = 0 #(DWORD PlusDataSize) PlusData = "" #(String PlusData)//扩展记录 - CrossPlayer = 0 #(BYTE CrossPlayer)//是否跨服玩家 data = None def __init__(self): @@ -18088,7 +20231,6 @@ self.ItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemDataSize) self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize) - self.CrossPlayer,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): @@ -18103,7 +20245,6 @@ self.ItemData = "" self.PlusDataSize = 0 self.PlusData = "" - self.CrossPlayer = 0 return def GetLength(self): @@ -18116,7 +20257,6 @@ length += len(self.ItemData) length += 4 length += len(self.PlusData) - length += 1 return length @@ -18130,7 +20270,6 @@ data = CommFunc.WriteString(data, self.ItemDataSize, self.ItemData) data = CommFunc.WriteDWORD(data, self.PlusDataSize) data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData) - data = CommFunc.WriteBYTE(data, self.CrossPlayer) return data def OutputString(self): @@ -18142,8 +20281,7 @@ ItemDataSize:%d, ItemData:%s, PlusDataSize:%d, - PlusData:%s, - CrossPlayer:%d + PlusData:%s '''\ %( self.Head.OutputString(), @@ -18153,8 +20291,7 @@ self.ItemDataSize, self.ItemData, self.PlusDataSize, - self.PlusData, - self.CrossPlayer + self.PlusData ) return DumpString @@ -18629,6 +20766,117 @@ #------------------------------------------------------ +# A8 16 神秘商店商品信息 #tagMCMysticalShopInfo + +class tagMCMysticalShopGoods(Structure): + _pack_ = 1 + _fields_ = [ + ("GoodsID", c_int), # 商品ID + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.GoodsID = 0 + return + + def GetLength(self): + return sizeof(tagMCMysticalShopGoods) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A8 16 神秘商店商品信息 //tagMCMysticalShopInfo: + GoodsID:%d + '''\ + %( + self.GoodsID + ) + return DumpString + + +class tagMCMysticalShopInfo(Structure): + Head = tagHead() + RefreshCnt = 0 #(WORD RefreshCnt)// 刷新次数 + Count = 0 #(BYTE Count)// 商品数 + GoodsList = list() #(vector<tagMCMysticalShopGoods> GoodsList)// 商品信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x16 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.RefreshCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temGoodsList = tagMCMysticalShopGoods() + _pos = temGoodsList.ReadData(_lpData, _pos) + self.GoodsList.append(temGoodsList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x16 + self.RefreshCnt = 0 + self.Count = 0 + self.GoodsList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + for i in range(self.Count): + length += self.GoodsList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.RefreshCnt) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.GoodsList[i].GetLength(), self.GoodsList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + RefreshCnt:%d, + Count:%d, + GoodsList:%s + '''\ + %( + self.Head.OutputString(), + self.RefreshCnt, + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCMysticalShopInfo=tagMCMysticalShopInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMysticalShopInfo.Head.Cmd,m_NAtagMCMysticalShopInfo.Head.SubCmd))] = m_NAtagMCMysticalShopInfo + + +#------------------------------------------------------ # A8 06 通知神秘限购商品时间 #tagMCMysticalShopTimeInfo class tagMCMysticalShopTime(Structure): @@ -18829,126 +21077,6 @@ #------------------------------------------------------ -# A8 04 通知商店限购物品已购买次数信息 # tagMCShopItemBuyCntInfoList - -class tagMCShopItemBuyCntInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("ShopID", c_int), - ("ItemShopIndex", c_ushort), - ("ItemID", c_int), - ("BuyCnt", c_int), # 个人已购买数 - ("ServerBuyCnt", 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.ShopID = 0 - self.ItemShopIndex = 0 - self.ItemID = 0 - self.BuyCnt = 0 - self.ServerBuyCnt = 0 - return - - def GetLength(self): - return sizeof(tagMCShopItemBuyCntInfo) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A8 04 通知商店限购物品已购买次数信息 // tagMCShopItemBuyCntInfoList: - ShopID:%d, - ItemShopIndex:%d, - ItemID:%d, - BuyCnt:%d, - ServerBuyCnt:%d - '''\ - %( - self.ShopID, - self.ItemShopIndex, - self.ItemID, - self.BuyCnt, - self.ServerBuyCnt - ) - return DumpString - - -class tagMCShopItemBuyCntInfoList(Structure): - Head = tagHead() - Count = 0 #(BYTE Count)//通知个数 - BuyCntList = list() #(vector<tagMCShopItemBuyCntInfo> BuyCntList) - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA8 - self.Head.SubCmd = 0x04 - 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): - temBuyCntList = tagMCShopItemBuyCntInfo() - _pos = temBuyCntList.ReadData(_lpData, _pos) - self.BuyCntList.append(temBuyCntList) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA8 - self.Head.SubCmd = 0x04 - self.Count = 0 - self.BuyCntList = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.Count): - length += self.BuyCntList[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.BuyCntList[i].GetLength(), self.BuyCntList[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - Count:%d, - BuyCntList:%s - '''\ - %( - self.Head.OutputString(), - self.Count, - "..." - ) - return DumpString - - -m_NAtagMCShopItemBuyCntInfoList=tagMCShopItemBuyCntInfoList() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemBuyCntInfoList.Head.Cmd,m_NAtagMCShopItemBuyCntInfoList.Head.SubCmd))] = m_NAtagMCShopItemBuyCntInfoList - - -#------------------------------------------------------ # A8 02 通知NPC商店物品今日已购买次数 #tagMCShopItemDayBuyCntInfo class tagMCShopItemDayBuyCnt(Structure): @@ -19061,239 +21189,6 @@ #------------------------------------------------------ -# A8 03 通知自定义商店物品信息 #tagMCShopItemInfoList - -class tagMCShopItemInfo(Structure): - ShopID = 0 #(DWORD ShopID) - ItemShopIndex = 0 #(WORD ItemShopIndex) - DataSize = 0 #(DWORD DataSize) - ItemList = "" #(String ItemList)//物品列表[[物品ID,数量,是否绑定,是否定制]] - PriceType = 0 #(BYTE PriceType) - Price = 0 #(DWORD Price) - OriginalPrice = 0 #(DWORD OriginalPrice)// 原价 - PlayerLVLimit = 0 #(WORD PlayerLVLimit)// 购买等级限制 - FamilyLVLimit = 0 #(BYTE FamilyLVLimit)// 购买战盟等级限制 - MaxBuyCnt = 0 #(DWORD MaxBuyCnt)// 个人限购数 - ServerMaxBuyCnt = 0 #(DWORD ServerMaxBuyCnt)// 全服限购数 - data = None - - def __init__(self): - self.Clear() - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - self.ShopID,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.ItemShopIndex,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.DataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.ItemList,_pos = CommFunc.ReadString(_lpData, _pos,self.DataSize) - self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Price,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.OriginalPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.PlayerLVLimit,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.FamilyLVLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.MaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.ServerMaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos) - return _pos - - def Clear(self): - self.ShopID = 0 - self.ItemShopIndex = 0 - self.DataSize = 0 - self.ItemList = "" - self.PriceType = 0 - self.Price = 0 - self.OriginalPrice = 0 - self.PlayerLVLimit = 0 - self.FamilyLVLimit = 0 - self.MaxBuyCnt = 0 - self.ServerMaxBuyCnt = 0 - return - - def GetLength(self): - length = 0 - length += 4 - length += 2 - length += 4 - length += len(self.ItemList) - length += 1 - length += 4 - length += 4 - length += 2 - length += 1 - length += 4 - length += 4 - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteDWORD(data, self.ShopID) - data = CommFunc.WriteWORD(data, self.ItemShopIndex) - data = CommFunc.WriteDWORD(data, self.DataSize) - data = CommFunc.WriteString(data, self.DataSize, self.ItemList) - data = CommFunc.WriteBYTE(data, self.PriceType) - data = CommFunc.WriteDWORD(data, self.Price) - data = CommFunc.WriteDWORD(data, self.OriginalPrice) - data = CommFunc.WriteWORD(data, self.PlayerLVLimit) - data = CommFunc.WriteBYTE(data, self.FamilyLVLimit) - data = CommFunc.WriteDWORD(data, self.MaxBuyCnt) - data = CommFunc.WriteDWORD(data, self.ServerMaxBuyCnt) - return data - - def OutputString(self): - DumpString = ''' - ShopID:%d, - ItemShopIndex:%d, - DataSize:%d, - ItemList:%s, - PriceType:%d, - Price:%d, - OriginalPrice:%d, - PlayerLVLimit:%d, - FamilyLVLimit:%d, - MaxBuyCnt:%d, - ServerMaxBuyCnt:%d - '''\ - %( - self.ShopID, - self.ItemShopIndex, - self.DataSize, - self.ItemList, - self.PriceType, - self.Price, - self.OriginalPrice, - self.PlayerLVLimit, - self.FamilyLVLimit, - self.MaxBuyCnt, - self.ServerMaxBuyCnt - ) - return DumpString - - -class tagMCShopItemInfoList(Structure): - Head = tagHead() - Count = 0 #(BYTE Count)//通知个数 - ShopItemList = list() #(vector<tagMCShopItemInfo> ShopItemList) - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA8 - self.Head.SubCmd = 0x03 - 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): - temShopItemList = tagMCShopItemInfo() - _pos = temShopItemList.ReadData(_lpData, _pos) - self.ShopItemList.append(temShopItemList) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA8 - self.Head.SubCmd = 0x03 - self.Count = 0 - self.ShopItemList = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.Count): - length += self.ShopItemList[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.ShopItemList[i].GetLength(), self.ShopItemList[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - Count:%d, - ShopItemList:%s - '''\ - %( - self.Head.OutputString(), - self.Count, - "..." - ) - return DumpString - - -m_NAtagMCShopItemInfoList=tagMCShopItemInfoList() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemInfoList.Head.Cmd,m_NAtagMCShopItemInfoList.Head.SubCmd))] = m_NAtagMCShopItemInfoList - - -#------------------------------------------------------ -# A8 05 通知神秘商店刷新次数 #tagMCShopRefreshCnt - -class tagMCShopRefreshCnt(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ShopID", c_int), #商店ID - ("RefreshCnt", c_ushort), #已手动刷新次数 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xA8 - self.SubCmd = 0x05 - 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 = 0xA8 - self.SubCmd = 0x05 - self.ShopID = 0 - self.RefreshCnt = 0 - return - - def GetLength(self): - return sizeof(tagMCShopRefreshCnt) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A8 05 通知神秘商店刷新次数 //tagMCShopRefreshCnt: - Cmd:%s, - SubCmd:%s, - ShopID:%d, - RefreshCnt:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.ShopID, - self.RefreshCnt - ) - return DumpString - - -m_NAtagMCShopRefreshCnt=tagMCShopRefreshCnt() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopRefreshCnt.Cmd,m_NAtagMCShopRefreshCnt.SubCmd))] = m_NAtagMCShopRefreshCnt - - -#------------------------------------------------------ # A8 13 虚拟掉落物品 #tagMCVirtualItemDrop class tagMCVirtualItemDrop(Structure): @@ -19376,6 +21271,545 @@ m_NAtagMCVirtualItemDrop=tagMCVirtualItemDrop() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCVirtualItemDrop.Head.Cmd,m_NAtagMCVirtualItemDrop.Head.SubCmd))] = m_NAtagMCVirtualItemDrop + + +#------------------------------------------------------ +# A8 15 诛仙装备分解结果通知 #tagMCZhuXianDecomposeResult + +class tagMCZhuXianDecomposeItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), #物品ID + ("ItemCnt", c_ubyte), #物品数量 + ("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.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCZhuXianDecomposeItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A8 15 诛仙装备分解结果通知 //tagMCZhuXianDecomposeResult: + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +class tagMCZhuXianDecomposeResult(Structure): + Head = tagHead() + Cnt = 0 #(BYTE Cnt)//数量 + ItemList = list() #(vector<tagMCZhuXianDecomposeItem> ItemList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x15 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Cnt): + temItemList = tagMCZhuXianDecomposeItem() + _pos = temItemList.ReadData(_lpData, _pos) + self.ItemList.append(temItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x15 + self.Cnt = 0 + self.ItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Cnt): + length += self.ItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Cnt) + for i in range(self.Cnt): + data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Cnt:%d, + ItemList:%s + '''\ + %( + self.Head.OutputString(), + self.Cnt, + "..." + ) + return DumpString + + +m_NAtagMCZhuXianDecomposeResult=tagMCZhuXianDecomposeResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianDecomposeResult.Head.Cmd,m_NAtagMCZhuXianDecomposeResult.Head.SubCmd))] = m_NAtagMCZhuXianDecomposeResult + + +#------------------------------------------------------ +# AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo + +class tagMCActLoginAwardAction(Structure): + TemplateID = 0 #(DWORD TemplateID)// 模板ID + ActionType = 0 #(WORD ActionType)// 活动类别 + TotalTimes = 0 #(DWORD TotalTimes)// 可完成的总次数,0表示不限次数 + SingleTimes = 0 #(DWORD SingleTimes)// 单次领奖需要的次数 + Count = 0 #(WORD Count)// 物品配置长度 + ItemInfo = "" #(String ItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.TemplateID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ActionType,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.TotalTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SingleTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ItemInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Count) + return _pos + + def Clear(self): + self.TemplateID = 0 + self.ActionType = 0 + self.TotalTimes = 0 + self.SingleTimes = 0 + self.Count = 0 + self.ItemInfo = "" + return + + def GetLength(self): + length = 0 + length += 4 + length += 2 + length += 4 + length += 4 + length += 2 + length += len(self.ItemInfo) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.TemplateID) + data = CommFunc.WriteWORD(data, self.ActionType) + data = CommFunc.WriteDWORD(data, self.TotalTimes) + data = CommFunc.WriteDWORD(data, self.SingleTimes) + data = CommFunc.WriteWORD(data, self.Count) + data = CommFunc.WriteString(data, self.Count, self.ItemInfo) + return data + + def OutputString(self): + DumpString = ''' + TemplateID:%d, + ActionType:%d, + TotalTimes:%d, + SingleTimes:%d, + Count:%d, + ItemInfo:%s + '''\ + %( + self.TemplateID, + self.ActionType, + self.TotalTimes, + self.SingleTimes, + self.Count, + self.ItemInfo + ) + return DumpString + + +class tagMCActLoginAwardDayInfo(Structure): + ActCnt = 0 #(BYTE ActCnt)// 数量 + TemplateList = list() #(vector<WORD> TemplateList)// 模板列表 + WorldLV = 0 #(WORD WorldLV)// 世界等级 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ActCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ActCnt): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.TemplateList.append(value) + self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.ActCnt = 0 + self.TemplateList = list() + self.WorldLV = 0 + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 * self.ActCnt + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.ActCnt) + for i in range(self.ActCnt): + data = CommFunc.WriteWORD(data, self.TemplateList[i]) + data = CommFunc.WriteWORD(data, self.WorldLV) + return data + + def OutputString(self): + DumpString = ''' + ActCnt:%d, + TemplateList:%s, + WorldLV:%d + '''\ + %( + self.ActCnt, + "...", + self.WorldLV + ) + return DumpString + + +class tagMCActLoginAwardInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + DayCnt = 0 #(BYTE DayCnt)// 天数 + DayInfoList = list() #(vector<tagMCActLoginAwardDayInfo> DayInfoList)// 每天模板 + TCount = 0 #(BYTE TCount)// 模板数 + ActionInfo = list() #(vector<tagMCActLoginAwardAction> ActionInfo)// 活动模板信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0C + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.DayCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DayCnt): + temDayInfoList = tagMCActLoginAwardDayInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + self.TCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TCount): + temActionInfo = tagMCActLoginAwardAction() + _pos = temActionInfo.ReadData(_lpData, _pos) + self.ActionInfo.append(temActionInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0C + self.StartDate = "" + self.EndtDate = "" + self.AdvanceMinutes = 0 + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.DayCnt = 0 + self.DayInfoList = list() + self.TCount = 0 + self.ActionInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.DayCnt): + length += self.DayInfoList[i].GetLength() + length += 1 + for i in range(self.TCount): + length += self.ActionInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.AdvanceMinutes) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.DayCnt) + for i in range(self.DayCnt): + data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TCount) + for i in range(self.TCount): + data = CommFunc.WriteString(data, self.ActionInfo[i].GetLength(), self.ActionInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + AdvanceMinutes:%d, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + DayCnt:%d, + DayInfoList:%s, + TCount:%d, + ActionInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.AdvanceMinutes, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.DayCnt, + "...", + self.TCount, + "..." + ) + return DumpString + + +m_NAtagMCActLoginAwardInfo=tagMCActLoginAwardInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginAwardInfo.Head.Cmd,m_NAtagMCActLoginAwardInfo.Head.SubCmd))] = m_NAtagMCActLoginAwardInfo + + +#------------------------------------------------------ +# AA 0D 登录奖励玩家活动信息 #tagMCActLoginAwardPlayerInfo + +class tagMCActLoginAwardTaskInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("TemplateID", c_ushort), # 模板ID + ("CurTimes", c_ushort), #已完成次数 + ("GotTimes", 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.TemplateID = 0 + self.CurTimes = 0 + self.GotTimes = 0 + return + + def GetLength(self): + return sizeof(tagMCActLoginAwardTaskInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 0D 登录奖励玩家活动信息 //tagMCActLoginAwardPlayerInfo: + TemplateID:%d, + CurTimes:%d, + GotTimes:%d + '''\ + %( + self.TemplateID, + self.CurTimes, + self.GotTimes + ) + return DumpString + + +class tagMCActLoginAwardDayPlayerInfo(Structure): + DayIndex = 0 #(DWORD DayIndex)//第X天 + ACount = 0 #(DWORD ACount)//任务条目数 + TaskList = list() #(vector<tagMCActLoginAwardTaskInfo> TaskList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.DayIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ACount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + for i in range(self.ACount): + temTaskList = tagMCActLoginAwardTaskInfo() + _pos = temTaskList.ReadData(_lpData, _pos) + self.TaskList.append(temTaskList) + return _pos + + def Clear(self): + self.DayIndex = 0 + self.ACount = 0 + self.TaskList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + for i in range(self.ACount): + length += self.TaskList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.DayIndex) + data = CommFunc.WriteDWORD(data, self.ACount) + for i in range(self.ACount): + data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + DayIndex:%d, + ACount:%d, + TaskList:%s + '''\ + %( + self.DayIndex, + self.ACount, + "..." + ) + return DumpString + + +class tagMCActLoginAwardPlayerInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + DayInfoList = list() #(vector<tagMCActLoginAwardDayPlayerInfo> DayInfoList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0D + 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): + temDayInfoList = tagMCActLoginAwardDayPlayerInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0D + self.Count = 0 + self.DayInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.DayInfoList[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.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + DayInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCActLoginAwardPlayerInfo=tagMCActLoginAwardPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginAwardPlayerInfo.Head.Cmd,m_NAtagMCActLoginAwardPlayerInfo.Head.SubCmd))] = m_NAtagMCActLoginAwardPlayerInfo #------------------------------------------------------ @@ -20202,240 +22636,6 @@ #------------------------------------------------------ -# AA 03 升阶功能特惠奖励记录 #tagMCClassUPDayAwardRecordList - -class tagMCClassUPDayAwardRecord(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("DayType", c_ubyte), # 奖励日类型 - ("Record", c_int), # 奖励记录 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x03 - return - - def ReadData(self, stringData, _pos=0, _len=0): - self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() - - def Clear(self): - self.Cmd = 0xAA - self.SubCmd = 0x03 - self.DayType = 0 - self.Record = 0 - return - - def GetLength(self): - return sizeof(tagMCClassUPDayAwardRecord) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AA 03 升阶功能特惠奖励记录 //tagMCClassUPDayAwardRecordList: - Cmd:%s, - SubCmd:%s, - DayType:%d, - Record:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.DayType, - self.Record - ) - return DumpString - - -class tagMCClassUPDayAwardRecordList(Structure): - Head = tagHead() - RecordCount = 0 #(BYTE RecordCount)//记录个数 - RecordInfoList = list() #(vector<tagMCClassUPDayAwardRecord> RecordInfoList)//记录列表 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xAA - self.Head.SubCmd = 0x03 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) - for i in range(self.RecordCount): - temRecordInfoList = tagMCClassUPDayAwardRecord() - _pos = temRecordInfoList.ReadData(_lpData, _pos) - self.RecordInfoList.append(temRecordInfoList) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xAA - self.Head.SubCmd = 0x03 - self.RecordCount = 0 - self.RecordInfoList = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.RecordCount): - length += self.RecordInfoList[i].GetLength() - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.RecordCount) - for i in range(self.RecordCount): - data = CommFunc.WriteString(data, self.RecordInfoList[i].GetLength(), self.RecordInfoList[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - RecordCount:%d, - RecordInfoList:%s - '''\ - %( - self.Head.OutputString(), - self.RecordCount, - "..." - ) - return DumpString - - -m_NAtagMCClassUPDayAwardRecordList=tagMCClassUPDayAwardRecordList() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCClassUPDayAwardRecordList.Head.Cmd,m_NAtagMCClassUPDayAwardRecordList.Head.SubCmd))] = m_NAtagMCClassUPDayAwardRecordList - - -#------------------------------------------------------ -# AA 06 消费奖励信息 #tagMCCostProfitInfo - -class tagMCCostProfitInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ActionID", c_int), # 活动ID - ("TotalCost", c_int), # 总消费 - ("AwardState", c_int), # 奖励领取状态 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x06 - 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 = 0x06 - self.ActionID = 0 - self.TotalCost = 0 - self.AwardState = 0 - return - - def GetLength(self): - return sizeof(tagMCCostProfitInfo) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AA 06 消费奖励信息 //tagMCCostProfitInfo: - Cmd:%s, - SubCmd:%s, - ActionID:%d, - TotalCost:%d, - AwardState:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.ActionID, - self.TotalCost, - self.AwardState - ) - return DumpString - - -m_NAtagMCCostProfitInfo=tagMCCostProfitInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostProfitInfo.Cmd,m_NAtagMCCostProfitInfo.SubCmd))] = m_NAtagMCCostProfitInfo - - -#------------------------------------------------------ -# AA 07 消费排行特惠信息 #tagMCCostRankTeHuiInfo - -class tagMCCostRankTeHuiInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ActionID", c_int), # 活动ID - ("TotalCost", c_int), # 总累计消费钻石 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x07 - return - - def ReadData(self, stringData, _pos=0, _len=0): - self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() - - def Clear(self): - self.Cmd = 0xAA - self.SubCmd = 0x07 - self.ActionID = 0 - self.TotalCost = 0 - return - - def GetLength(self): - return sizeof(tagMCCostRankTeHuiInfo) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AA 07 消费排行特惠信息 //tagMCCostRankTeHuiInfo: - Cmd:%s, - SubCmd:%s, - ActionID:%d, - TotalCost:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.ActionID, - self.TotalCost - ) - return DumpString - - -m_NAtagMCCostRankTeHuiInfo=tagMCCostRankTeHuiInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostRankTeHuiInfo.Cmd,m_NAtagMCCostRankTeHuiInfo.SubCmd))] = m_NAtagMCCostRankTeHuiInfo - - -#------------------------------------------------------ # AA 09 消费返利活动信息 #tagMCCostRebateInfo class tagMCCostRebateAwardItem(Structure): @@ -20743,6 +22943,518 @@ m_NAtagMCCostRebatePlayerInfo=tagMCCostRebatePlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostRebatePlayerInfo.Cmd,m_NAtagMCCostRebatePlayerInfo.SubCmd))] = m_NAtagMCCostRebatePlayerInfo + + +#------------------------------------------------------ +# AA 20 节日巡礼活动信息 #tagMCFeastWeekPartyInfo + +class tagMCFeastWeekPartyItem(Structure): + _pack_ = 1 + _fields_ = [ + ("NeedPoint", c_ushort), # 领奖需要积分 + ("ItemID", c_int), # 物品ID + ("ItemCnt", 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.NeedPoint = 0 + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastWeekPartyItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 20 节日巡礼活动信息 //tagMCFeastWeekPartyInfo: + NeedPoint:%d, + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.NeedPoint, + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +class tagMCFeastWeekPartyAction(Structure): + TemplateID = 0 #(DWORD TemplateID)// 模板ID + ActionType = 0 #(WORD ActionType)// 活动类别 + TotalTimes = 0 #(DWORD TotalTimes)// 可完成的总次数,0表示不限次数 + SingleTimes = 0 #(DWORD SingleTimes)// 单次领奖需要的次数 + Point = 0 #(DWORD Point)// 单次领奖积分 + Count = 0 #(BYTE Count)// 物品数 + ItemInfo = list() #(vector<tagMCFeastWeekPartyItem> ItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.TemplateID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ActionType,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.TotalTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SingleTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temItemInfo = tagMCFeastWeekPartyItem() + _pos = temItemInfo.ReadData(_lpData, _pos) + self.ItemInfo.append(temItemInfo) + return _pos + + def Clear(self): + self.TemplateID = 0 + self.ActionType = 0 + self.TotalTimes = 0 + self.SingleTimes = 0 + self.Point = 0 + self.Count = 0 + self.ItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 2 + length += 4 + length += 4 + length += 4 + length += 1 + for i in range(self.Count): + length += self.ItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.TemplateID) + data = CommFunc.WriteWORD(data, self.ActionType) + data = CommFunc.WriteDWORD(data, self.TotalTimes) + data = CommFunc.WriteDWORD(data, self.SingleTimes) + data = CommFunc.WriteDWORD(data, self.Point) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + TemplateID:%d, + ActionType:%d, + TotalTimes:%d, + SingleTimes:%d, + Point:%d, + Count:%d, + ItemInfo:%s + '''\ + %( + self.TemplateID, + self.ActionType, + self.TotalTimes, + self.SingleTimes, + self.Point, + self.Count, + "..." + ) + return DumpString + + +class tagMCFeastWeekPartyDayInfo(Structure): + ActCnt = 0 #(BYTE ActCnt)// 数量 + TemplateList = list() #(vector<WORD> TemplateList)// 模板列表 + PCount = 0 #(BYTE PCount)// 物品数 + PItemInfo = list() #(vector<tagMCFeastWeekPartyItem> PItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ActCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ActCnt): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.TemplateList.append(value) + self.PCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PCount): + temPItemInfo = tagMCFeastWeekPartyItem() + _pos = temPItemInfo.ReadData(_lpData, _pos) + self.PItemInfo.append(temPItemInfo) + return _pos + + def Clear(self): + self.ActCnt = 0 + self.TemplateList = list() + self.PCount = 0 + self.PItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 * self.ActCnt + length += 1 + for i in range(self.PCount): + length += self.PItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.ActCnt) + for i in range(self.ActCnt): + data = CommFunc.WriteWORD(data, self.TemplateList[i]) + data = CommFunc.WriteBYTE(data, self.PCount) + for i in range(self.PCount): + data = CommFunc.WriteString(data, self.PItemInfo[i].GetLength(), self.PItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + ActCnt:%d, + TemplateList:%s, + PCount:%d, + PItemInfo:%s + '''\ + %( + self.ActCnt, + "...", + self.PCount, + "..." + ) + return DumpString + + +class tagMCFeastWeekPartyInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + DayCnt = 0 #(BYTE DayCnt)// 天数 + DayInfoList = list() #(vector<tagMCFeastWeekPartyDayInfo> DayInfoList)// 每天模板 + TCount = 0 #(BYTE TCount)// 模板数 + ActionInfo = list() #(vector<tagMCFeastWeekPartyAction> ActionInfo)// 活动模板信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.DayCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DayCnt): + temDayInfoList = tagMCFeastWeekPartyDayInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + self.TCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TCount): + temActionInfo = tagMCFeastWeekPartyAction() + _pos = temActionInfo.ReadData(_lpData, _pos) + self.ActionInfo.append(temActionInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x20 + self.StartDate = "" + self.EndtDate = "" + self.AdvanceMinutes = 0 + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.DayCnt = 0 + self.DayInfoList = list() + self.TCount = 0 + self.ActionInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.DayCnt): + length += self.DayInfoList[i].GetLength() + length += 1 + for i in range(self.TCount): + length += self.ActionInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.AdvanceMinutes) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.DayCnt) + for i in range(self.DayCnt): + data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TCount) + for i in range(self.TCount): + data = CommFunc.WriteString(data, self.ActionInfo[i].GetLength(), self.ActionInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + AdvanceMinutes:%d, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + DayCnt:%d, + DayInfoList:%s, + TCount:%d, + ActionInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.AdvanceMinutes, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.DayCnt, + "...", + self.TCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastWeekPartyInfo=tagMCFeastWeekPartyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWeekPartyInfo.Head.Cmd,m_NAtagMCFeastWeekPartyInfo.Head.SubCmd))] = m_NAtagMCFeastWeekPartyInfo + + +#------------------------------------------------------ +# AA 21 节日巡礼玩家活动信息 #tagMCFeastWeekPartyPlayerInfo + +class tagMCFeastWeekPartyTaskInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("TemplateID", c_ushort), # 模板ID + ("CurTimes", c_int), #已完成次数 + ("GotTimes", 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.TemplateID = 0 + self.CurTimes = 0 + self.GotTimes = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastWeekPartyTaskInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 21 节日巡礼玩家活动信息 //tagMCFeastWeekPartyPlayerInfo: + TemplateID:%d, + CurTimes:%d, + GotTimes:%d + '''\ + %( + self.TemplateID, + self.CurTimes, + self.GotTimes + ) + return DumpString + + +class tagMCFeastWeekPartyDayPlayerInfo(Structure): + DayIndex = 0 #(DWORD DayIndex)//第X天 + Point = 0 #(DWORD Point)//积分 + AwardRecord = 0 #(DWORD AwardRecord)//积分领奖记录 + ACount = 0 #(DWORD ACount)//任务条目数 + TaskList = list() #(vector<tagMCFeastWeekPartyTaskInfo> TaskList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.DayIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ACount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + for i in range(self.ACount): + temTaskList = tagMCFeastWeekPartyTaskInfo() + _pos = temTaskList.ReadData(_lpData, _pos) + self.TaskList.append(temTaskList) + return _pos + + def Clear(self): + self.DayIndex = 0 + self.Point = 0 + self.AwardRecord = 0 + self.ACount = 0 + self.TaskList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 4 + length += 4 + for i in range(self.ACount): + length += self.TaskList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.DayIndex) + data = CommFunc.WriteDWORD(data, self.Point) + data = CommFunc.WriteDWORD(data, self.AwardRecord) + data = CommFunc.WriteDWORD(data, self.ACount) + for i in range(self.ACount): + data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + DayIndex:%d, + Point:%d, + AwardRecord:%d, + ACount:%d, + TaskList:%s + '''\ + %( + self.DayIndex, + self.Point, + self.AwardRecord, + self.ACount, + "..." + ) + return DumpString + + +class tagMCFeastWeekPartyPlayerInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + DayInfoList = list() #(vector<tagMCFeastWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + 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): + temDayInfoList = tagMCFeastWeekPartyDayPlayerInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x21 + self.Count = 0 + self.DayInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.DayInfoList[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.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + DayInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCFeastWeekPartyPlayerInfo=tagMCFeastWeekPartyPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWeekPartyPlayerInfo.Head.Cmd,m_NAtagMCFeastWeekPartyPlayerInfo.Head.SubCmd))] = m_NAtagMCFeastWeekPartyPlayerInfo #------------------------------------------------------ @@ -21733,21 +24445,18 @@ #------------------------------------------------------ -# AA 05 充值排行特惠信息 #tagMCRechargeRankTeHuiInfo +# AA 1F 幸运鉴宝活动信息 #tagMCLuckyTreasureInfo -class tagMCRechargeRankTeHuiInfo(Structure): +class tagMCLuckyTreasureItem(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ActionID", c_int), # 活动ID - ("TotalGold", c_int), # 总累计充值元宝 + ("ItemID", c_int), # 物品ID + ("ItemCnt", c_ushort), # 物品数量 + ("IsBind", c_ubyte), # 是否绑定 ] def __init__(self): self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x05 return def ReadData(self, stringData, _pos=0, _len=0): @@ -21756,129 +24465,277 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xAA - self.SubCmd = 0x05 - self.ActionID = 0 - self.TotalGold = 0 + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 return def GetLength(self): - return sizeof(tagMCRechargeRankTeHuiInfo) + return sizeof(tagMCLuckyTreasureItem) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''// AA 05 充值排行特惠信息 //tagMCRechargeRankTeHuiInfo: - Cmd:%s, - SubCmd:%s, - ActionID:%d, - TotalGold:%d + DumpString = '''// AA 1F 幸运鉴宝活动信息 //tagMCLuckyTreasureInfo: + ItemID:%d, + ItemCnt:%d, + IsBind:%d '''\ %( - self.Cmd, - self.SubCmd, - self.ActionID, - self.TotalGold + self.ItemID, + self.ItemCnt, + self.IsBind ) return DumpString -m_NAtagMCRechargeRankTeHuiInfo=tagMCRechargeRankTeHuiInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRankTeHuiInfo.Cmd,m_NAtagMCRechargeRankTeHuiInfo.SubCmd))] = m_NAtagMCRechargeRankTeHuiInfo - - -#------------------------------------------------------ -# AA 04 充值特惠信息 #tagMCRechargeTeHuiInfoList - -class tagMCRechargeTeHuiInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("GotCnt", c_ubyte), # 已领取次数 - ("CanGetCnt", c_ubyte), # 当前可领取次数 - ("CurTotalGold", c_int), # 当前规则累计充值元宝-仅针对累充规则 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x04 - return - - def ReadData(self, stringData, _pos=0, _len=0): - self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() - - def Clear(self): - self.Cmd = 0xAA - self.SubCmd = 0x04 - self.GotCnt = 0 - self.CanGetCnt = 0 - self.CurTotalGold = 0 - return - - def GetLength(self): - return sizeof(tagMCRechargeTeHuiInfo) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AA 04 充值特惠信息 //tagMCRechargeTeHuiInfoList: - Cmd:%s, - SubCmd:%s, - GotCnt:%d, - CanGetCnt:%d, - CurTotalGold:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.GotCnt, - self.CanGetCnt, - self.CurTotalGold - ) - return DumpString - - -class tagMCRechargeTeHuiInfoList(Structure): +class tagMCLuckyTreasureInfo(Structure): Head = tagHead() - ActionID = 0 #(DWORD ActionID)// 活动ID - TotalGold = 0 #(DWORD TotalGold)// 总累计充值元宝 - InfoCnt = 0 #(BYTE InfoCnt)// 信息个数 - InfoList = list() #(vector<tagMCRechargeTeHuiInfo> InfoList)// 信息列表 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + LuckyPoint = 0 #(WORD LuckyPoint)// 总幸运值 + Count = 0 #(WORD Count)// 物品数 + ItemList = list() #(vector<tagMCLuckyTreasureItem> ItemList)// 随机库物品信息 data = None def __init__(self): self.Clear() self.Head.Cmd = 0xAA - self.Head.SubCmd = 0x04 + self.Head.SubCmd = 0x1F return def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) - self.ActionID,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.TotalGold,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.InfoCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) - for i in range(self.InfoCnt): - temInfoList = tagMCRechargeTeHuiInfo() - _pos = temInfoList.ReadData(_lpData, _pos) - self.InfoList.append(temInfoList) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LuckyPoint,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temItemList = tagMCLuckyTreasureItem() + _pos = temItemList.ReadData(_lpData, _pos) + self.ItemList.append(temItemList) return _pos def Clear(self): self.Head = tagHead() self.Head.Clear() self.Head.Cmd = 0xAA - self.Head.SubCmd = 0x04 - self.ActionID = 0 - self.TotalGold = 0 - self.InfoCnt = 0 - self.InfoList = list() + self.Head.SubCmd = 0x1F + self.StartDate = "" + self.EndtDate = "" + self.ResetType = 0 + self.LimitLV = 0 + self.LuckyPoint = 0 + self.Count = 0 + self.ItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 1 + length += 2 + length += 2 + length += 2 + for i in range(self.Count): + length += self.ItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteWORD(data, self.LuckyPoint) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + ResetType:%d, + LimitLV:%d, + LuckyPoint:%d, + Count:%d, + ItemList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.ResetType, + self.LimitLV, + self.LuckyPoint, + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCLuckyTreasureInfo=tagMCLuckyTreasureInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLuckyTreasureInfo.Head.Cmd,m_NAtagMCLuckyTreasureInfo.Head.SubCmd))] = m_NAtagMCLuckyTreasureInfo + + +#------------------------------------------------------ +# AA 1E 幸运鉴宝结果信息 #tagMCLuckyTreasureResultInfo + +class tagMCLuckyTreasureResultInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("LuckyPoint", c_ushort), # 当前幸运点 + ("HasFree", c_ubyte), # 是否免费过 + ("ItemID", c_int), # 物品ID + ("ItemCnt", c_ushort), #物品数量 + ("IsBind", c_ubyte), # 是否绑定 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x1E + 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 = 0x1E + self.LuckyPoint = 0 + self.HasFree = 0 + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCLuckyTreasureResultInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 1E 幸运鉴宝结果信息 //tagMCLuckyTreasureResultInfo: + Cmd:%s, + SubCmd:%s, + LuckyPoint:%d, + HasFree:%d, + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.LuckyPoint, + self.HasFree, + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +m_NAtagMCLuckyTreasureResultInfo=tagMCLuckyTreasureResultInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLuckyTreasureResultInfo.Cmd,m_NAtagMCLuckyTreasureResultInfo.SubCmd))] = m_NAtagMCLuckyTreasureResultInfo + + +#------------------------------------------------------ +# AA 23 新仙界盛典全民来嗨玩家信息 #tagMCNewAllPeoplePartyInfo + +class tagMCNewAllPeoplePartyCount(Structure): + _pack_ = 1 + _fields_ = [ + ("ActID", c_int), #活动ID + ("CurTimes", 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.ActID = 0 + self.CurTimes = 0 + return + + def GetLength(self): + return sizeof(tagMCNewAllPeoplePartyCount) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 23 新仙界盛典全民来嗨玩家信息 //tagMCNewAllPeoplePartyInfo: + ActID:%d, + CurTimes:%d + '''\ + %( + self.ActID, + self.CurTimes + ) + return DumpString + + +class tagMCNewAllPeoplePartyInfo(Structure): + Head = tagHead() + CurPoint = 0 #(DWORD CurPoint)//当前总点数 + AwardRecord = 0 #(DWORD AwardRecord)//领奖记录 按奖励索引二进制位存储是否已领取 + Count = 0 #(BYTE Count) + BuyCountList = list() #(vector<tagMCNewAllPeoplePartyCount> BuyCountList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.CurPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temBuyCountList = tagMCNewAllPeoplePartyCount() + _pos = temBuyCountList.ReadData(_lpData, _pos) + self.BuyCountList.append(temBuyCountList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x23 + self.CurPoint = 0 + self.AwardRecord = 0 + self.Count = 0 + self.BuyCountList = list() return def GetLength(self): @@ -21887,41 +24744,93 @@ length += 4 length += 4 length += 1 - for i in range(self.InfoCnt): - length += self.InfoList[i].GetLength() + for i in range(self.Count): + length += self.BuyCountList[i].GetLength() return length def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteDWORD(data, self.ActionID) - data = CommFunc.WriteDWORD(data, self.TotalGold) - data = CommFunc.WriteBYTE(data, self.InfoCnt) - for i in range(self.InfoCnt): - data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) + data = CommFunc.WriteDWORD(data, self.CurPoint) + data = CommFunc.WriteDWORD(data, self.AwardRecord) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.BuyCountList[i].GetLength(), self.BuyCountList[i].GetBuffer()) return data def OutputString(self): DumpString = ''' Head:%s, - ActionID:%d, - TotalGold:%d, - InfoCnt:%d, - InfoList:%s + CurPoint:%d, + AwardRecord:%d, + Count:%d, + BuyCountList:%s '''\ %( self.Head.OutputString(), - self.ActionID, - self.TotalGold, - self.InfoCnt, + self.CurPoint, + self.AwardRecord, + self.Count, "..." ) return DumpString -m_NAtagMCRechargeTeHuiInfoList=tagMCRechargeTeHuiInfoList() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeTeHuiInfoList.Head.Cmd,m_NAtagMCRechargeTeHuiInfoList.Head.SubCmd))] = m_NAtagMCRechargeTeHuiInfoList +m_NAtagMCNewAllPeoplePartyInfo=tagMCNewAllPeoplePartyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewAllPeoplePartyInfo.Head.Cmd,m_NAtagMCNewAllPeoplePartyInfo.Head.SubCmd))] = m_NAtagMCNewAllPeoplePartyInfo + + +#------------------------------------------------------ +# AA 22 新仙界盛典充值大礼 #tagMCNewXJSDRecharge + +class tagMCNewXJSDRecharge(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("State", c_ubyte), #0-不可领 1-可领 2-已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x22 + 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 = 0x22 + self.State = 0 + return + + def GetLength(self): + return sizeof(tagMCNewXJSDRecharge) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 22 新仙界盛典充值大礼 //tagMCNewXJSDRecharge: + Cmd:%s, + SubCmd:%s, + State:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.State + ) + return DumpString + + +m_NAtagMCNewXJSDRecharge=tagMCNewXJSDRecharge() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewXJSDRecharge.Cmd,m_NAtagMCNewXJSDRecharge.SubCmd))] = m_NAtagMCNewXJSDRecharge #------------------------------------------------------ @@ -22436,6 +25345,518 @@ m_NAtagMCTotalRechargePlayerInfo=tagMCTotalRechargePlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTotalRechargePlayerInfo.Cmd,m_NAtagMCTotalRechargePlayerInfo.SubCmd))] = m_NAtagMCTotalRechargePlayerInfo + + +#------------------------------------------------------ +# AA 0A 周狂欢活动信息 #tagMCWeekPartyInfo + +class tagMCWeekPartyItem(Structure): + _pack_ = 1 + _fields_ = [ + ("NeedPoint", c_ushort), # 领奖需要积分 + ("ItemID", c_int), # 物品ID + ("ItemCnt", 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.NeedPoint = 0 + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCWeekPartyItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 0A 周狂欢活动信息 //tagMCWeekPartyInfo: + NeedPoint:%d, + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.NeedPoint, + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +class tagMCWeekPartyAction(Structure): + TemplateID = 0 #(DWORD TemplateID)// 模板ID + ActionType = 0 #(WORD ActionType)// 活动类别 + TotalTimes = 0 #(DWORD TotalTimes)// 可完成的总次数,0表示不限次数 + SingleTimes = 0 #(DWORD SingleTimes)// 单次领奖需要的次数 + Point = 0 #(DWORD Point)// 单次领奖积分 + Count = 0 #(BYTE Count)// 物品数 + ItemInfo = list() #(vector<tagMCWeekPartyItem> ItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.TemplateID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ActionType,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.TotalTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SingleTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temItemInfo = tagMCWeekPartyItem() + _pos = temItemInfo.ReadData(_lpData, _pos) + self.ItemInfo.append(temItemInfo) + return _pos + + def Clear(self): + self.TemplateID = 0 + self.ActionType = 0 + self.TotalTimes = 0 + self.SingleTimes = 0 + self.Point = 0 + self.Count = 0 + self.ItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 2 + length += 4 + length += 4 + length += 4 + length += 1 + for i in range(self.Count): + length += self.ItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.TemplateID) + data = CommFunc.WriteWORD(data, self.ActionType) + data = CommFunc.WriteDWORD(data, self.TotalTimes) + data = CommFunc.WriteDWORD(data, self.SingleTimes) + data = CommFunc.WriteDWORD(data, self.Point) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + TemplateID:%d, + ActionType:%d, + TotalTimes:%d, + SingleTimes:%d, + Point:%d, + Count:%d, + ItemInfo:%s + '''\ + %( + self.TemplateID, + self.ActionType, + self.TotalTimes, + self.SingleTimes, + self.Point, + self.Count, + "..." + ) + return DumpString + + +class tagMCWeekPartyDayInfo(Structure): + ActCnt = 0 #(BYTE ActCnt)// 数量 + TemplateList = list() #(vector<WORD> TemplateList)// 模板列表 + PCount = 0 #(BYTE PCount)// 物品数 + PItemInfo = list() #(vector<tagMCWeekPartyItem> PItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ActCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ActCnt): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.TemplateList.append(value) + self.PCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PCount): + temPItemInfo = tagMCWeekPartyItem() + _pos = temPItemInfo.ReadData(_lpData, _pos) + self.PItemInfo.append(temPItemInfo) + return _pos + + def Clear(self): + self.ActCnt = 0 + self.TemplateList = list() + self.PCount = 0 + self.PItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 * self.ActCnt + length += 1 + for i in range(self.PCount): + length += self.PItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.ActCnt) + for i in range(self.ActCnt): + data = CommFunc.WriteWORD(data, self.TemplateList[i]) + data = CommFunc.WriteBYTE(data, self.PCount) + for i in range(self.PCount): + data = CommFunc.WriteString(data, self.PItemInfo[i].GetLength(), self.PItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + ActCnt:%d, + TemplateList:%s, + PCount:%d, + PItemInfo:%s + '''\ + %( + self.ActCnt, + "...", + self.PCount, + "..." + ) + return DumpString + + +class tagMCWeekPartyInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + DayCnt = 0 #(BYTE DayCnt)// 天数 + DayInfoList = list() #(vector<tagMCWeekPartyDayInfo> DayInfoList)// 每天模板 + TCount = 0 #(BYTE TCount)// 模板数 + ActionInfo = list() #(vector<tagMCWeekPartyAction> ActionInfo)// 活动模板信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0A + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.DayCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DayCnt): + temDayInfoList = tagMCWeekPartyDayInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + self.TCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TCount): + temActionInfo = tagMCWeekPartyAction() + _pos = temActionInfo.ReadData(_lpData, _pos) + self.ActionInfo.append(temActionInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0A + self.StartDate = "" + self.EndtDate = "" + self.AdvanceMinutes = 0 + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.DayCnt = 0 + self.DayInfoList = list() + self.TCount = 0 + self.ActionInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.DayCnt): + length += self.DayInfoList[i].GetLength() + length += 1 + for i in range(self.TCount): + length += self.ActionInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.AdvanceMinutes) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.DayCnt) + for i in range(self.DayCnt): + data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TCount) + for i in range(self.TCount): + data = CommFunc.WriteString(data, self.ActionInfo[i].GetLength(), self.ActionInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + AdvanceMinutes:%d, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + DayCnt:%d, + DayInfoList:%s, + TCount:%d, + ActionInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.AdvanceMinutes, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.DayCnt, + "...", + self.TCount, + "..." + ) + return DumpString + + +m_NAtagMCWeekPartyInfo=tagMCWeekPartyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCWeekPartyInfo.Head.Cmd,m_NAtagMCWeekPartyInfo.Head.SubCmd))] = m_NAtagMCWeekPartyInfo + + +#------------------------------------------------------ +# AA 0B 周狂欢玩家活动信息 #tagMCWeekPartyPlayerInfo + +class tagMCWeekPartyTaskInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("TemplateID", c_ushort), # 模板ID + ("CurTimes", c_int), #已完成次数 + ("GotTimes", 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.TemplateID = 0 + self.CurTimes = 0 + self.GotTimes = 0 + return + + def GetLength(self): + return sizeof(tagMCWeekPartyTaskInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 0B 周狂欢玩家活动信息 //tagMCWeekPartyPlayerInfo: + TemplateID:%d, + CurTimes:%d, + GotTimes:%d + '''\ + %( + self.TemplateID, + self.CurTimes, + self.GotTimes + ) + return DumpString + + +class tagMCWeekPartyDayPlayerInfo(Structure): + DayIndex = 0 #(DWORD DayIndex)//第X天 + Point = 0 #(DWORD Point)//积分 + AwardRecord = 0 #(DWORD AwardRecord)//积分领奖记录 + ACount = 0 #(DWORD ACount)//任务条目数 + TaskList = list() #(vector<tagMCWeekPartyTaskInfo> TaskList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.DayIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ACount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + for i in range(self.ACount): + temTaskList = tagMCWeekPartyTaskInfo() + _pos = temTaskList.ReadData(_lpData, _pos) + self.TaskList.append(temTaskList) + return _pos + + def Clear(self): + self.DayIndex = 0 + self.Point = 0 + self.AwardRecord = 0 + self.ACount = 0 + self.TaskList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 4 + length += 4 + for i in range(self.ACount): + length += self.TaskList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.DayIndex) + data = CommFunc.WriteDWORD(data, self.Point) + data = CommFunc.WriteDWORD(data, self.AwardRecord) + data = CommFunc.WriteDWORD(data, self.ACount) + for i in range(self.ACount): + data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + DayIndex:%d, + Point:%d, + AwardRecord:%d, + ACount:%d, + TaskList:%s + '''\ + %( + self.DayIndex, + self.Point, + self.AwardRecord, + self.ACount, + "..." + ) + return DumpString + + +class tagMCWeekPartyPlayerInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + DayInfoList = list() #(vector<tagMCWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0B + 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): + temDayInfoList = tagMCWeekPartyDayPlayerInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x0B + self.Count = 0 + self.DayInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.DayInfoList[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.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + DayInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCWeekPartyPlayerInfo=tagMCWeekPartyPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCWeekPartyPlayerInfo.Head.Cmd,m_NAtagMCWeekPartyPlayerInfo.Head.SubCmd))] = m_NAtagMCWeekPartyPlayerInfo #------------------------------------------------------ @@ -23167,6 +26588,62 @@ m_NAtagMCDiceAward=tagMCDiceAward() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDiceAward.Cmd,m_NAtagMCDiceAward.SubCmd))] = m_NAtagMCDiceAward + + +#------------------------------------------------------ +# AB 25 节日红包信息 #tagMCFeastRedPackInfo + +class tagMCFeastRedPackInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MoneyNum", c_int), # 累积抢到多少钱 + ("GrabCnt", c_ushort), # 已抢红包次数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAB + self.SubCmd = 0x25 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAB + self.SubCmd = 0x25 + self.MoneyNum = 0 + self.GrabCnt = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastRedPackInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AB 25 节日红包信息 //tagMCFeastRedPackInfo: + Cmd:%s, + SubCmd:%s, + MoneyNum:%d, + GrabCnt:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MoneyNum, + self.GrabCnt + ) + return DumpString + + +m_NAtagMCFeastRedPackInfo=tagMCFeastRedPackInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastRedPackInfo.Cmd,m_NAtagMCFeastRedPackInfo.SubCmd))] = m_NAtagMCFeastRedPackInfo #------------------------------------------------------ @@ -23991,16 +27468,12 @@ class tagMCClothesCoatLVInfo(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), ("CoatIndex", c_int), #时装索引 ("CoatLV", c_ubyte), #时装等级 ] def __init__(self): self.Clear() - self.Cmd = 0xB1 - self.SubCmd = 0x02 return def ReadData(self, stringData, _pos=0, _len=0): @@ -24009,8 +27482,6 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xB1 - self.SubCmd = 0x02 self.CoatIndex = 0 self.CoatLV = 0 return @@ -24023,14 +27494,10 @@ def OutputString(self): DumpString = '''// B1 02 玩家时装皮肤激活状态 //tagMCClothesCoatSkinState: - Cmd:%s, - SubCmd:%s, CoatIndex:%d, CoatLV:%d '''\ %( - self.Cmd, - self.SubCmd, self.CoatIndex, self.CoatLV ) @@ -24227,6 +27694,83 @@ m_NAtagMCPlayerDeadTime=tagMCPlayerDeadTime() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerDeadTime.Cmd,m_NAtagMCPlayerDeadTime.SubCmd))] = m_NAtagMCPlayerDeadTime + + +#------------------------------------------------------ +# B1 07 玩家点数信息 #tagMCRolePointInfo + +class tagMCRolePointInfo(Structure): + Head = tagHead() + PointAttrIDCount = 0 #(BYTE PointAttrIDCount)// 点类型个数 + PointAttrIDList = list() #(vector<BYTE> PointAttrIDList)// 点类型列表 + PointValueList = list() #(vector<WORD> PointValueList)// 点类型对应已加自由点数列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x07 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PointAttrIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PointAttrIDCount): + value,_pos=CommFunc.ReadBYTE(_lpData,_pos) + self.PointAttrIDList.append(value) + for i in range(self.PointAttrIDCount): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.PointValueList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x07 + self.PointAttrIDCount = 0 + self.PointAttrIDList = list() + self.PointValueList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 * self.PointAttrIDCount + length += 2 * self.PointAttrIDCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.PointAttrIDCount) + for i in range(self.PointAttrIDCount): + data = CommFunc.WriteBYTE(data, self.PointAttrIDList[i]) + for i in range(self.PointAttrIDCount): + data = CommFunc.WriteWORD(data, self.PointValueList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PointAttrIDCount:%d, + PointAttrIDList:%s, + PointValueList:%s + '''\ + %( + self.Head.OutputString(), + self.PointAttrIDCount, + "...", + "..." + ) + return DumpString + + +m_NAtagMCRolePointInfo=tagMCRolePointInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRolePointInfo.Head.Cmd,m_NAtagMCRolePointInfo.Head.SubCmd))] = m_NAtagMCRolePointInfo #------------------------------------------------------ @@ -25663,6 +29207,114 @@ #------------------------------------------------------ +# B2 12 诛仙BOSS协助次数 #tagMCZhuXianBossCnt + +class tagMCZhuXianBossCnt(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("Cnt", c_ubyte), # 剩余可协助次数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x12 + 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 = 0xB2 + self.SubCmd = 0x12 + self.Cnt = 0 + return + + def GetLength(self): + return sizeof(tagMCZhuXianBossCnt) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 12 诛仙BOSS协助次数 //tagMCZhuXianBossCnt: + Cmd:%s, + SubCmd:%s, + Cnt:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.Cnt + ) + return DumpString + + +m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt + + +#------------------------------------------------------ +# B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo + +class tagMCZhuXianTowerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("Floor", c_int), # 已通关层 + ("LastFloor", c_int), # 上次挑战层 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x13 + 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 = 0xB2 + self.SubCmd = 0x13 + self.Floor = 0 + self.LastFloor = 0 + return + + def GetLength(self): + return sizeof(tagMCZhuXianTowerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo: + Cmd:%s, + SubCmd:%s, + Floor:%d, + LastFloor:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.Floor, + self.LastFloor + ) + return DumpString + + +m_NAtagMCZhuXianTowerInfo=tagMCZhuXianTowerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianTowerInfo.Cmd,m_NAtagMCZhuXianTowerInfo.SubCmd))] = m_NAtagMCZhuXianTowerInfo + + +#------------------------------------------------------ # B4 11 新增恶意攻击玩家 #tagMCAddMaliciousAtkPlayer class tagMCAddMaliciousAtkPlayer(Structure): @@ -26026,6 +29678,70 @@ #------------------------------------------------------ +#B4 14 根据类型来决定移动的方式 #tagMCMoveByType + +class tagMCMoveByType(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ID", c_int), #玩家ID + ("PosX", c_ushort), # 目标X + ("PosY", c_ushort), # 目标Y + ("MoveType", c_ubyte), #移动方式 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB4 + self.SubCmd = 0x14 + 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 = 0xB4 + self.SubCmd = 0x14 + self.ID = 0 + self.PosX = 0 + self.PosY = 0 + self.MoveType = 0 + return + + def GetLength(self): + return sizeof(tagMCMoveByType) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''//B4 14 根据类型来决定移动的方式 //tagMCMoveByType: + Cmd:%s, + SubCmd:%s, + ID:%d, + PosX:%d, + PosY:%d, + MoveType:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ID, + self.PosX, + self.PosY, + self.MoveType + ) + return DumpString + + +m_NAtagMCMoveByType=tagMCMoveByType() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMoveByType.Cmd,m_NAtagMCMoveByType.SubCmd))] = m_NAtagMCMoveByType + + +#------------------------------------------------------ #B4 07 被动技能页选择(功法) # tagMCPassivePage class tagMCPassivePage(Structure): @@ -26252,6 +29968,118 @@ m_NAtagMCPassiveSetAnswer=tagMCPassiveSetAnswer() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPassiveSetAnswer.Cmd,m_NAtagMCPassiveSetAnswer.SubCmd))] = m_NAtagMCPassiveSetAnswer + + +#------------------------------------------------------ +# B4 13 通知玩家所有已学技能 #tagMCPlayerSkills + +class tagPlayerSkill(Structure): + _pack_ = 1 + _fields_ = [ + ("SkillID", c_int), #技能ID + ("RemainTime", c_int), #剩余时间 + ("Proficiency", 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.SkillID = 0 + self.RemainTime = 0 + self.Proficiency = 0 + return + + def GetLength(self): + return sizeof(tagPlayerSkill) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B4 13 通知玩家所有已学技能 //tagMCPlayerSkills: + SkillID:%d, + RemainTime:%d, + Proficiency:%d + '''\ + %( + self.SkillID, + self.RemainTime, + self.Proficiency + ) + return DumpString + + +class tagMCPlayerSkills(Structure): + Head = tagHead() + Count = 0 #(WORD Count)//技能个数 + Skills = list() #(vector<tagPlayerSkill> Skills)// 技能数据 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB4 + self.Head.SubCmd = 0x13 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temSkills = tagPlayerSkill() + _pos = temSkills.ReadData(_lpData, _pos) + self.Skills.append(temSkills) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB4 + self.Head.SubCmd = 0x13 + self.Count = 0 + self.Skills = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.Count): + length += self.Skills[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.Skills[i].GetLength(), self.Skills[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + Skills:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCPlayerSkills=tagMCPlayerSkills() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerSkills.Head.Cmd,m_NAtagMCPlayerSkills.Head.SubCmd))] = m_NAtagMCPlayerSkills #------------------------------------------------------ @@ -26985,6 +30813,7 @@ ("DayPKCount", c_ubyte), # 当日已PK次数 ("DayWinCount", c_ubyte), # 当日已胜利次数 ("DayBuyCount", c_ubyte), # 当日已购买次数 + ("DayItemAddCount", c_ubyte), # 当日物品增加次数 ] def __init__(self): @@ -27009,6 +30838,7 @@ self.DayPKCount = 0 self.DayWinCount = 0 self.DayBuyCount = 0 + self.DayItemAddCount = 0 return def GetLength(self): @@ -27028,7 +30858,8 @@ CWinCount:%d, DayPKCount:%d, DayWinCount:%d, - DayBuyCount:%d + DayBuyCount:%d, + DayItemAddCount:%d '''\ %( self.Cmd, @@ -27040,7 +30871,8 @@ self.CWinCount, self.DayPKCount, self.DayWinCount, - self.DayBuyCount + self.DayBuyCount, + self.DayItemAddCount ) return DumpString -- Gitblit v1.8.0