From 950be2d9a3e3f87f1bb247f6b904de9669ba9126 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 31 八月 2021 18:51:45 +0800 Subject: [PATCH] 8921 【主干】【gt_1.101.1】【BT3】【bt3_1.100.1】【后端】H.活动-节日活动-垃圾分类(优化仙匣秘境初始化首层失败后的处理,重登后可尝试重新初始化) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 2605 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 2,555 insertions(+), 50 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index d9a3161..76b41e7 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -346,6 +346,7 @@ ("NowMinute", c_ubyte), ("NowSecond", c_ubyte), ("NowMicSecond", c_int), + ("WeekOfYear", c_ubyte), #一年中的第几周 ] def __init__(self): @@ -373,6 +374,7 @@ self.NowMinute = 0 self.NowSecond = 0 self.NowMicSecond = 0 + self.WeekOfYear = 0 return def GetLength(self): @@ -395,7 +397,8 @@ NowHour:%d, NowMinute:%d, NowSecond:%d, - NowMicSecond:%d + NowMicSecond:%d, + WeekOfYear:%d '''\ %( self.Cmd, @@ -410,7 +413,8 @@ self.NowHour, self.NowMinute, self.NowSecond, - self.NowMicSecond + self.NowMicSecond, + self.WeekOfYear ) return DumpString @@ -1268,7 +1272,8 @@ # A4 05 家族红包抢的信息 #tagGCFamilyRedPacketGrabInfo class tagFGrabRedPacketInfo(Structure): - Name = "" #(char Name[33])//名字 + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)//名字 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 MoneyNum = 0 #(DWORD MoneyNum)//金钱数量 data = None @@ -1279,12 +1284,14 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.MoneyNum,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): + self.NameLen = 0 self.Name = "" self.PlayeJob = 0 self.MoneyNum = 0 @@ -1292,7 +1299,8 @@ def GetLength(self): length = 0 - length += 33 + length += 1 + length += len(self.Name) length += 1 length += 4 @@ -1300,18 +1308,21 @@ def GetBuffer(self): data = '' - data = CommFunc.WriteString(data, 33, self.Name) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteDWORD(data, self.MoneyNum) return data def OutputString(self): DumpString = ''' + NameLen:%d, Name:%s, PlayeJob:%d, MoneyNum:%d '''\ %( + self.NameLen, self.Name, self.PlayeJob, self.MoneyNum @@ -1398,7 +1409,8 @@ class tagFRedPacketInfo(Structure): RedPacketID = 0 #(DWORD RedPacketID)//红包唯一ID PlayerID = 0 #(DWORD PlayerID)//玩家ID - Name = "" #(char Name[33])//玩家名字 + NameLen = 0 #(BYTE NameLen) + Name = "" #(String Name)//玩家名字 Time = 0 #(DWORD Time)//时间 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 MoneyType = 0 #(BYTE MoneyType)//金钱类型 @@ -1406,7 +1418,9 @@ GetWay = 0 #(BYTE GetWay)//获得途径 PacketCnt = 0 #(BYTE PacketCnt)//可抢个数 State = 0 #(BYTE State)//0未发,1未领取,2已领取,3全部领完 - Wish = "" #(char Wish[33])//祝福语 + WishLen = 0 #(BYTE WishLen) + Wish = "" #(String Wish)//祝福语 + IsAnonymous = 0 #(BYTE IsAnonymous)//是否匿名 data = None def __init__(self): @@ -1417,7 +1431,8 @@ self.Clear() self.RedPacketID,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen) self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) @@ -1425,12 +1440,15 @@ self.GetWay,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.PacketCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Wish,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.WishLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Wish,_pos = CommFunc.ReadString(_lpData, _pos,self.WishLen) + self.IsAnonymous,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): self.RedPacketID = 0 self.PlayerID = 0 + self.NameLen = 0 self.Name = "" self.Time = 0 self.PlayeJob = 0 @@ -1439,14 +1457,17 @@ self.GetWay = 0 self.PacketCnt = 0 self.State = 0 + self.WishLen = 0 self.Wish = "" + self.IsAnonymous = 0 return def GetLength(self): length = 0 length += 4 length += 4 - length += 33 + length += 1 + length += len(self.Name) length += 4 length += 1 length += 1 @@ -1454,7 +1475,9 @@ length += 1 length += 1 length += 1 - length += 33 + length += 1 + length += len(self.Wish) + length += 1 return length @@ -1462,7 +1485,8 @@ data = '' data = CommFunc.WriteDWORD(data, self.RedPacketID) data = CommFunc.WriteDWORD(data, self.PlayerID) - data = CommFunc.WriteString(data, 33, self.Name) + data = CommFunc.WriteBYTE(data, self.NameLen) + data = CommFunc.WriteString(data, self.NameLen, self.Name) data = CommFunc.WriteDWORD(data, self.Time) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteBYTE(data, self.MoneyType) @@ -1470,13 +1494,16 @@ data = CommFunc.WriteBYTE(data, self.GetWay) data = CommFunc.WriteBYTE(data, self.PacketCnt) data = CommFunc.WriteBYTE(data, self.State) - data = CommFunc.WriteString(data, 33, self.Wish) + data = CommFunc.WriteBYTE(data, self.WishLen) + data = CommFunc.WriteString(data, self.WishLen, self.Wish) + data = CommFunc.WriteBYTE(data, self.IsAnonymous) return data def OutputString(self): DumpString = ''' RedPacketID:%d, PlayerID:%d, + NameLen:%d, Name:%s, Time:%d, PlayeJob:%d, @@ -1485,11 +1512,14 @@ GetWay:%d, PacketCnt:%d, State:%d, - Wish:%s + WishLen:%d, + Wish:%s, + IsAnonymous:%d '''\ %( self.RedPacketID, self.PlayerID, + self.NameLen, self.Name, self.Time, self.PlayeJob, @@ -1498,7 +1528,9 @@ self.GetWay, self.PacketCnt, self.State, - self.Wish + self.WishLen, + self.Wish, + self.IsAnonymous ) return DumpString @@ -2181,7 +2213,8 @@ Name = "" #(String Name)//size=NameLen PlayerLV = 0 #(WORD PlayerLV)//玩家等级 PlayeJob = 0 #(BYTE PlayeJob)//玩家职业 - PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力 + PlayeFightPower = 0 #(DWORD PlayeFightPower)//玩家战斗力,求余亿部分 + PlayeFightPowerEx = 0 #(DWORD PlayeFightPowerEx)//玩家战斗力,整除亿部分,1代表1亿 RequestTime = 0 #(DWORD RequestTime)//申请时间 IsOnLine = 0 #(BYTE IsOnLine)//是否在线 data = None @@ -2198,6 +2231,7 @@ self.PlayerLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.PlayeJob,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.PlayeFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.PlayeFightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.RequestTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.IsOnLine,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos @@ -2209,6 +2243,7 @@ self.PlayerLV = 0 self.PlayeJob = 0 self.PlayeFightPower = 0 + self.PlayeFightPowerEx = 0 self.RequestTime = 0 self.IsOnLine = 0 return @@ -2220,6 +2255,7 @@ length += len(self.Name) length += 2 length += 1 + length += 4 length += 4 length += 4 length += 1 @@ -2234,6 +2270,7 @@ data = CommFunc.WriteWORD(data, self.PlayerLV) data = CommFunc.WriteBYTE(data, self.PlayeJob) data = CommFunc.WriteDWORD(data, self.PlayeFightPower) + data = CommFunc.WriteDWORD(data, self.PlayeFightPowerEx) data = CommFunc.WriteDWORD(data, self.RequestTime) data = CommFunc.WriteBYTE(data, self.IsOnLine) return data @@ -2246,6 +2283,7 @@ PlayerLV:%d, PlayeJob:%d, PlayeFightPower:%d, + PlayeFightPowerEx:%d, RequestTime:%d, IsOnLine:%d '''\ @@ -2256,6 +2294,7 @@ self.PlayerLV, self.PlayeJob, self.PlayeFightPower, + self.PlayeFightPowerEx, self.RequestTime, self.IsOnLine ) @@ -11466,7 +11505,8 @@ PlayerName = "" #(String PlayerName)// 跨服名字 Job = 0 #(BYTE Job) LV = 0 #(WORD LV) - MaxHP = 0 #(DWORD MaxHP)// 默认满血 + MaxHP = 0 #(DWORD MaxHP)// 默认满血,求余亿部分 + MaxHPEx = 0 #(DWORD MaxHPEx)// 默认满血,整除亿部分 MaxProDef = 0 #(DWORD MaxProDef)// 最大护盾 data = None @@ -11482,6 +11522,7 @@ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.MaxHP,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.MaxHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.MaxProDef,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos @@ -11492,6 +11533,7 @@ self.Job = 0 self.LV = 0 self.MaxHP = 0 + self.MaxHPEx = 0 self.MaxProDef = 0 return @@ -11502,6 +11544,7 @@ length += len(self.PlayerName) length += 1 length += 2 + length += 4 length += 4 length += 4 @@ -11515,6 +11558,7 @@ data = CommFunc.WriteBYTE(data, self.Job) data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteDWORD(data, self.MaxHP) + data = CommFunc.WriteDWORD(data, self.MaxHPEx) data = CommFunc.WriteDWORD(data, self.MaxProDef) return data @@ -11526,6 +11570,7 @@ Job:%d, LV:%d, MaxHP:%d, + MaxHPEx:%d, MaxProDef:%d '''\ %( @@ -11535,6 +11580,7 @@ self.Job, self.LV, self.MaxHP, + self.MaxHPEx, self.MaxProDef ) return DumpString @@ -12437,6 +12483,7 @@ ExAttr18 = 0 #(DWORD ExAttr18)//预留的扩展属性字段,用来存放项目特定的属性 ExAttr19 = 0 #(DWORD ExAttr19)//预留的扩展属性字段,用来存放项目特定的属性 ExAttr20 = 0 #(DWORD ExAttr20)//预留的扩展属性字段,用来存放项目特定的属性 + HPEx = 0 #(DWORD HPEx)//当前血量 超过E的记录 data = None def __init__(self): @@ -12542,6 +12589,7 @@ self.ExAttr18,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ExAttr19,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.ExAttr20,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.HPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -12643,6 +12691,7 @@ self.ExAttr18 = 0 self.ExAttr19 = 0 self.ExAttr20 = 0 + self.HPEx = 0 return def GetLength(self): @@ -12735,6 +12784,7 @@ length += 4 length += 4 length += 15 + length += 4 length += 4 length += 4 length += 4 @@ -12842,6 +12892,7 @@ data = CommFunc.WriteDWORD(data, self.ExAttr18) data = CommFunc.WriteDWORD(data, self.ExAttr19) data = CommFunc.WriteDWORD(data, self.ExAttr20) + data = CommFunc.WriteDWORD(data, self.HPEx) return data def OutputString(self): @@ -12940,7 +12991,8 @@ ExAttr17:%d, ExAttr18:%d, ExAttr19:%d, - ExAttr20:%d + ExAttr20:%d, + HPEx:%d '''\ %( self.Head.OutputString(), @@ -13037,7 +13089,8 @@ self.ExAttr17, self.ExAttr18, self.ExAttr19, - self.ExAttr20 + self.ExAttr20, + self.HPEx ) return DumpString @@ -15371,6 +15424,87 @@ m_NAtagMCEquipDecomposeInfo=tagMCEquipDecomposeInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipDecomposeInfo.Head.Cmd,m_NAtagMCEquipDecomposeInfo.Head.SubCmd))] = m_NAtagMCEquipDecomposeInfo + + +#------------------------------------------------------ +# A3 C4 装备神装拆解结果 #tagMCEquipDecomposeRet + +class tagMCEquipDecomposeRet(Structure): + Head = tagHead() + DecomposeEquipIDCount = 0 #(BYTE DecomposeEquipIDCount)// 已分解的装备个数 + DecomposeEquipIDList = list() #(vector<DWORD> DecomposeEquipIDList)// 已分解的神装装备ID列表 + GetItemLen = 0 #(WORD GetItemLen) + GetItemData = "" #(String GetItemData)// 获得物品信息 [[itemID,itemCount,isBind], [或itemID,itemCount,isBind,isAppoint], {或物品信息字典}, ...] + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC4 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.DecomposeEquipIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DecomposeEquipIDCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.DecomposeEquipIDList.append(value) + self.GetItemLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.GetItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.GetItemLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC4 + self.DecomposeEquipIDCount = 0 + self.DecomposeEquipIDList = list() + self.GetItemLen = 0 + self.GetItemData = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.DecomposeEquipIDCount + length += 2 + length += len(self.GetItemData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.DecomposeEquipIDCount) + for i in range(self.DecomposeEquipIDCount): + data = CommFunc.WriteDWORD(data, self.DecomposeEquipIDList[i]) + data = CommFunc.WriteWORD(data, self.GetItemLen) + data = CommFunc.WriteString(data, self.GetItemLen, self.GetItemData) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + DecomposeEquipIDCount:%d, + DecomposeEquipIDList:%s, + GetItemLen:%d, + GetItemData:%s + '''\ + %( + self.Head.OutputString(), + self.DecomposeEquipIDCount, + "...", + self.GetItemLen, + self.GetItemData + ) + return DumpString + + +m_NAtagMCEquipDecomposeRet=tagMCEquipDecomposeRet() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipDecomposeRet.Head.Cmd,m_NAtagMCEquipDecomposeRet.Head.SubCmd))] = m_NAtagMCEquipDecomposeRet #------------------------------------------------------ @@ -17800,7 +17934,8 @@ class tagMCModuleFightPowerInfo(Structure): Head = tagHead() - TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力 + TotalFightPower = 0 #(DWORD TotalFightPower)//总战斗力,求余亿部分 + TotalFightPoweEx = 0 #(DWORD TotalFightPoweEx)//总战斗力,整除亿部分,1代表1亿 MFPCnt = 0 #(BYTE MFPCnt)//模块战斗力总数 MFPList = list() #(vector<tagMCModuleFightPower> MFPList) data = None @@ -17815,6 +17950,7 @@ self.Clear() _pos = self.Head.ReadData(_lpData, _pos) self.TotalFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TotalFightPoweEx,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.MFPCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.MFPCnt): temMFPList = tagMCModuleFightPower() @@ -17828,6 +17964,7 @@ self.Head.Cmd = 0xA3 self.Head.SubCmd = 0xA1 self.TotalFightPower = 0 + self.TotalFightPoweEx = 0 self.MFPCnt = 0 self.MFPList = list() return @@ -17835,6 +17972,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 4 length += 4 length += 1 for i in range(self.MFPCnt): @@ -17846,6 +17984,7 @@ data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteDWORD(data, self.TotalFightPower) + data = CommFunc.WriteDWORD(data, self.TotalFightPoweEx) data = CommFunc.WriteBYTE(data, self.MFPCnt) for i in range(self.MFPCnt): data = CommFunc.WriteString(data, self.MFPList[i].GetLength(), self.MFPList[i].GetBuffer()) @@ -17855,12 +17994,14 @@ DumpString = ''' Head:%s, TotalFightPower:%d, + TotalFightPoweEx:%d, MFPCnt:%d, MFPList:%s '''\ %( self.Head.OutputString(), self.TotalFightPower, + self.TotalFightPoweEx, self.MFPCnt, "..." ) @@ -19963,60 +20104,98 @@ #A3 01 坐骑培养信息 #tagTrainHorseData class tagTrainHorseData(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("LV", c_ubyte), #等阶 - ("EatItemCount", c_int), #当前阶已吃丹个数 - ("SkinPlusState", c_int), #幻化激活状态,按位存储是否激活,幻化编号ID对应位 - ] + Head = tagHead() + LV = 0 #(BYTE LV)//等阶 + EatItemCount = 0 #(DWORD EatItemCount)//当前阶已吃丹个数 + SkinPlusState = 0 #(DWORD SkinPlusState)//幻化激活状态,按位存储是否激活,幻化编号ID对应位 + TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 + TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 + TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + data = None def __init__(self): self.Clear() - self.Cmd = 0xA3 - self.SubCmd = 0x01 + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x01 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.LV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.EatItemCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SkinPlusState,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.TrainTypes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainLVList.append(value) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainItemCountList.append(value) + return _pos def Clear(self): - self.Cmd = 0xA3 - self.SubCmd = 0x01 + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x01 self.LV = 0 self.EatItemCount = 0 self.SkinPlusState = 0 + self.TrainTypes = 0 + self.TrainLVList = list() + self.TrainItemCountList = list() return def GetLength(self): - return sizeof(tagTrainHorseData) + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 + length += 4 + length += 1 + length += 4 * self.TrainTypes + length += 4 * self.TrainTypes + + return length def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.LV) + data = CommFunc.WriteDWORD(data, self.EatItemCount) + data = CommFunc.WriteDWORD(data, self.SkinPlusState) + data = CommFunc.WriteBYTE(data, self.TrainTypes) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + return data def OutputString(self): - DumpString = '''//A3 01 坐骑培养信息 //tagTrainHorseData: - Cmd:%s, - SubCmd:%s, + DumpString = ''' + Head:%s, LV:%d, EatItemCount:%d, - SkinPlusState:%d + SkinPlusState:%d, + TrainTypes:%d, + TrainLVList:%s, + TrainItemCountList:%s '''\ %( - self.Cmd, - self.SubCmd, + self.Head.OutputString(), self.LV, self.EatItemCount, - self.SkinPlusState + self.SkinPlusState, + self.TrainTypes, + "...", + "..." ) return DumpString m_NAtagTrainHorseData=tagTrainHorseData() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagTrainHorseData.Cmd,m_NAtagTrainHorseData.SubCmd))] = m_NAtagTrainHorseData +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagTrainHorseData.Head.Cmd,m_NAtagTrainHorseData.Head.SubCmd))] = m_NAtagTrainHorseData #------------------------------------------------------ @@ -20811,6 +20990,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("HasSendGold", c_int), # 已用额度 + ("ServerGrabCnt", c_int), # 全服红包已抢次数 ] def __init__(self): @@ -20828,6 +21008,7 @@ self.Cmd = 0xA5 self.SubCmd = 0x05 self.HasSendGold = 0 + self.ServerGrabCnt = 0 return def GetLength(self): @@ -20840,12 +21021,14 @@ DumpString = '''// A5 05 通知家族钻石红包已用额度 //tagMCFamilyRedPacketGoldLimit: Cmd:%s, SubCmd:%s, - HasSendGold:%d + HasSendGold:%d, + ServerGrabCnt:%d '''\ %( self.Cmd, self.SubCmd, - self.HasSendGold + self.HasSendGold, + self.ServerGrabCnt ) return DumpString @@ -23257,6 +23440,7 @@ _fields_ = [ ("RefreshType", c_ubyte), ("Value", c_int), + ("ValueEx", c_int), ] def __init__(self): @@ -23271,6 +23455,7 @@ def Clear(self): self.RefreshType = 0 self.Value = 0 + self.ValueEx = 0 return def GetLength(self): @@ -23282,11 +23467,13 @@ def OutputString(self): DumpString = '''//A7 09 周围对象刷新合并包 //tagObjInfoListRefresh: RefreshType:%d, - Value:%d + Value:%d, + ValueEx:%d '''\ %( self.RefreshType, - self.Value + self.Value, + self.ValueEx ) return DumpString @@ -23596,6 +23783,90 @@ m_NAtagMCLingQiEquipBreakResult=tagMCLingQiEquipBreakResult() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLingQiEquipBreakResult.Cmd,m_NAtagMCLingQiEquipBreakResult.SubCmd))] = m_NAtagMCLingQiEquipBreakResult + + +#------------------------------------------------------ +# A8 18 灵器培养信息 #tagMCLingQiTrainInfo + +class tagMCLingQiTrainInfo(Structure): + Head = tagHead() + EquipPlace = 0 #(BYTE EquipPlace)//灵器装备位 + TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 + TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 + TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x18 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.EquipPlace,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.TrainTypes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainLVList.append(value) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainItemCountList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x18 + self.EquipPlace = 0 + self.TrainTypes = 0 + self.TrainLVList = list() + self.TrainItemCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.TrainTypes + length += 4 * self.TrainTypes + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.EquipPlace) + data = CommFunc.WriteBYTE(data, self.TrainTypes) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + EquipPlace:%d, + TrainTypes:%d, + TrainLVList:%s, + TrainItemCountList:%s + '''\ + %( + self.Head.OutputString(), + self.EquipPlace, + self.TrainTypes, + "...", + "..." + ) + return DumpString + + +m_NAtagMCLingQiTrainInfo=tagMCLingQiTrainInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLingQiTrainInfo.Head.Cmd,m_NAtagMCLingQiTrainInfo.Head.SubCmd))] = m_NAtagMCLingQiTrainInfo #------------------------------------------------------ @@ -24023,6 +24294,83 @@ m_NAtagMCNotifyUseItemGetItem=tagMCNotifyUseItemGetItem() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNotifyUseItemGetItem.Head.Cmd,m_NAtagMCNotifyUseItemGetItem.Head.SubCmd))] = m_NAtagMCNotifyUseItemGetItem + + +#------------------------------------------------------ +# A8 17 宠物培养信息 #tagMCPetTrainInfo + +class tagMCPetTrainInfo(Structure): + Head = tagHead() + TrainTypes = 0 #(BYTE TrainTypes)//培养类型数 + TrainLVList = list() #(vector<DWORD> TrainLVList)//培养等阶列表,索引为培养类型减1 + TrainItemCountList = list() #(vector<DWORD> TrainItemCountList)//培养当前阶已吃培养丹个数列表,索引为培养类型减1 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x17 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.TrainTypes,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainLVList.append(value) + for i in range(self.TrainTypes): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.TrainItemCountList.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x17 + self.TrainTypes = 0 + self.TrainLVList = list() + self.TrainItemCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 * self.TrainTypes + length += 4 * self.TrainTypes + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TrainTypes) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainLVList[i]) + for i in range(self.TrainTypes): + data = CommFunc.WriteDWORD(data, self.TrainItemCountList[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + TrainTypes:%d, + TrainLVList:%s, + TrainItemCountList:%s + '''\ + %( + self.Head.OutputString(), + self.TrainTypes, + "...", + "..." + ) + return DumpString + + +m_NAtagMCPetTrainInfo=tagMCPetTrainInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPetTrainInfo.Head.Cmd,m_NAtagMCPetTrainInfo.Head.SubCmd))] = m_NAtagMCPetTrainInfo #------------------------------------------------------ @@ -24570,6 +24918,285 @@ #------------------------------------------------------ +# AA 55 垃圾收集活动信息 #tagMCActGarbageSortingInfo + +class tagMCActGarbageSortingInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x55 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x55 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType + ) + return DumpString + + +m_NAtagMCActGarbageSortingInfo=tagMCActGarbageSortingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageSortingInfo.Head.Cmd,m_NAtagMCActGarbageSortingInfo.Head.SubCmd))] = m_NAtagMCActGarbageSortingInfo + + +#------------------------------------------------------ +# AA 57 垃圾收集活动分类结果 #tagMCActGarbageSortingResult + +class tagMCActGarbageSortingResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 + ("GarbageSortingType", c_ubyte), #垃圾分类类型 + ("IsRight", c_ubyte), #是否正确 + ("AddEnvValue", c_int), #增加环保值 + ("HisEnvValueTotal", c_int), # 当前活动累计获得环保值 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x57 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x57 + self.ActNum = 0 + self.GarbageSortingType = 0 + self.IsRight = 0 + self.AddEnvValue = 0 + self.HisEnvValueTotal = 0 + return + + def GetLength(self): + return sizeof(tagMCActGarbageSortingResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 57 垃圾收集活动分类结果 //tagMCActGarbageSortingResult: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + GarbageSortingType:%d, + IsRight:%d, + AddEnvValue:%d, + HisEnvValueTotal:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.GarbageSortingType, + self.IsRight, + self.AddEnvValue, + self.HisEnvValueTotal + ) + return DumpString + + +m_NAtagMCActGarbageSortingResult=tagMCActGarbageSortingResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageSortingResult.Cmd,m_NAtagMCActGarbageSortingResult.SubCmd))] = m_NAtagMCActGarbageSortingResult + + +#------------------------------------------------------ +# AA 56 垃圾收集活动任务进度信息 #tagMCActGarbageTaskInfo + +class tagMCActGarbageTask(Structure): + _pack_ = 1 + _fields_ = [ + ("GarbageTaskID", c_ubyte), #垃圾任务ID + ("GarbageTaskValue", c_int), #当前进度值,一直累加 + ("GarbageTaskFinishCount", c_int), #当前已完成次数; 前端计算未完成次数的进度值=max(0, 当前进度值 - (完成次数 * 单次所需进度)) + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.GarbageTaskID = 0 + self.GarbageTaskValue = 0 + self.GarbageTaskFinishCount = 0 + return + + def GetLength(self): + return sizeof(tagMCActGarbageTask) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 56 垃圾收集活动任务进度信息 //tagMCActGarbageTaskInfo: + GarbageTaskID:%d, + GarbageTaskValue:%d, + GarbageTaskFinishCount:%d + '''\ + %( + self.GarbageTaskID, + self.GarbageTaskValue, + self.GarbageTaskFinishCount + ) + return DumpString + + +class tagMCActGarbageTaskInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + HisEnvValueTotal = 0 #(DWORD HisEnvValueTotal)// 当前活动累计获得环保值 + GarbageTaskCount = 0 #(BYTE GarbageTaskCount)//任务数 + GarbageTaskList = list() #(vector<tagMCActGarbageTask> GarbageTaskList)//任务信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x56 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.HisEnvValueTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.GarbageTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GarbageTaskCount): + temGarbageTaskList = tagMCActGarbageTask() + _pos = temGarbageTaskList.ReadData(_lpData, _pos) + self.GarbageTaskList.append(temGarbageTaskList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x56 + self.ActNum = 0 + self.HisEnvValueTotal = 0 + self.GarbageTaskCount = 0 + self.GarbageTaskList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 4 + length += 1 + for i in range(self.GarbageTaskCount): + length += self.GarbageTaskList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteDWORD(data, self.HisEnvValueTotal) + data = CommFunc.WriteBYTE(data, self.GarbageTaskCount) + for i in range(self.GarbageTaskCount): + data = CommFunc.WriteString(data, self.GarbageTaskList[i].GetLength(), self.GarbageTaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + HisEnvValueTotal:%d, + GarbageTaskCount:%d, + GarbageTaskList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.HisEnvValueTotal, + self.GarbageTaskCount, + "..." + ) + return DumpString + + +m_NAtagMCActGarbageTaskInfo=tagMCActGarbageTaskInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGarbageTaskInfo.Head.Cmd,m_NAtagMCActGarbageTaskInfo.Head.SubCmd))] = m_NAtagMCActGarbageTaskInfo + + +#------------------------------------------------------ # AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo class tagMCActGrowupBuyCTGItem(Structure): @@ -24733,6 +25360,7 @@ Head = tagHead() StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 GroupCount = 0 #(BYTE GroupCount)// 循环购买礼包组数 GroupList = list() #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表 data = None @@ -24748,6 +25376,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.GroupCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.GroupCount): temGroupList = tagMCActGrowupBuyGroup() @@ -24762,6 +25391,7 @@ self.Head.SubCmd = 0x31 self.StartDate = "" self.EndtDate = "" + self.LimitLV = 0 self.GroupCount = 0 self.GroupList = list() return @@ -24771,6 +25401,7 @@ length += self.Head.GetLength() length += 10 length += 10 + length += 2 length += 1 for i in range(self.GroupCount): length += self.GroupList[i].GetLength() @@ -24782,6 +25413,7 @@ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) data = CommFunc.WriteBYTE(data, self.GroupCount) for i in range(self.GroupCount): data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer()) @@ -24792,6 +25424,7 @@ Head:%s, StartDate:%s, EndtDate:%s, + LimitLV:%d, GroupCount:%d, GroupList:%s '''\ @@ -24799,6 +25432,7 @@ self.Head.OutputString(), self.StartDate, self.EndtDate, + self.LimitLV, self.GroupCount, "..." ) @@ -24807,6 +25441,148 @@ m_NAtagMCActGrowupBuyInfo=tagMCActGrowupBuyInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGrowupBuyInfo.Head.Cmd,m_NAtagMCActGrowupBuyInfo.Head.SubCmd))] = m_NAtagMCActGrowupBuyInfo + + +#------------------------------------------------------ +# AA 54 骑宠盛宴活动信息 #tagMCActHorsePetFeastInfo + +class tagMCActHorsePetFeastTime(Structure): + StartTime = "" #(char StartTime[5])// 开始时间 H:M + EndtTime = "" #(char EndtTime[5])// 结束时间 H:M + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5) + return _pos + + def Clear(self): + self.StartTime = "" + self.EndtTime = "" + return + + def GetLength(self): + length = 0 + length += 5 + length += 5 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 5, self.StartTime) + data = CommFunc.WriteString(data, 5, self.EndtTime) + return data + + def OutputString(self): + DumpString = ''' + StartTime:%s, + EndtTime:%s + '''\ + %( + self.StartTime, + self.EndtTime + ) + return DumpString + + +class tagMCActHorsePetFeastInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + TimeCount = 0 #(BYTE TimeCount) + ActTimeList = list() #(vector<tagMCActHorsePetFeastTime> ActTimeList)// 活动时间 H:M 列表 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x54 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.TimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TimeCount): + temActTimeList = tagMCActHorsePetFeastTime() + _pos = temActTimeList.ReadData(_lpData, _pos) + self.ActTimeList.append(temActTimeList) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x54 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.TimeCount = 0 + self.ActTimeList = list() + self.LimitLV = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + for i in range(self.TimeCount): + length += self.ActTimeList[i].GetLength() + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.TimeCount) + for i in range(self.TimeCount): + data = CommFunc.WriteString(data, self.ActTimeList[i].GetLength(), self.ActTimeList[i].GetBuffer()) + data = CommFunc.WriteWORD(data, self.LimitLV) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + TimeCount:%d, + ActTimeList:%s, + LimitLV:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.TimeCount, + "...", + self.LimitLV + ) + return DumpString + + +m_NAtagMCActHorsePetFeastInfo=tagMCActHorsePetFeastInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActHorsePetFeastInfo.Head.Cmd,m_NAtagMCActHorsePetFeastInfo.Head.SubCmd))] = m_NAtagMCActHorsePetFeastInfo #------------------------------------------------------ @@ -25237,6 +26013,308 @@ #------------------------------------------------------ +# AA 48 多日连充活动信息 #tagMCActManyDayRechargeInfo + +class tagMCActManyDayRechargeItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActManyDayRechargeItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 48 多日连充活动信息 //tagMCActManyDayRechargeInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActManyDayRechargeAward(Structure): + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + NeedRecharge = 0 #(DWORD NeedRecharge)// 单天所需充值额度 + NeedDays = 0 #(BYTE NeedDays)// 所需充值天数 + AwardItemCount = 0 #(BYTE AwardItemCount) + AwardItemList = list() #(vector<tagMCActManyDayRechargeItem> AwardItemList)// 奖励物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedRecharge,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.NeedDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCActManyDayRechargeItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.AwardIndex = 0 + self.NeedRecharge = 0 + self.NeedDays = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 4 + length += 1 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteDWORD(data, self.NeedRecharge) + data = CommFunc.WriteBYTE(data, self.NeedDays) + data = CommFunc.WriteBYTE(data, self.AwardItemCount) + for i in range(self.AwardItemCount): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + AwardIndex:%d, + NeedRecharge:%d, + NeedDays:%d, + AwardItemCount:%d, + AwardItemList:%s + '''\ + %( + self.AwardIndex, + self.NeedRecharge, + self.NeedDays, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCActManyDayRechargeInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + AwardCount = 0 #(BYTE AwardCount) + AwardList = list() #(vector<tagMCActManyDayRechargeAward> AwardList)// 奖励信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x48 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + temAwardList = tagMCActManyDayRechargeAward() + _pos = temAwardList.ReadData(_lpData, _pos) + self.AwardList.append(temAwardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x48 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.AwardCount = 0 + self.AwardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + for i in range(self.AwardCount): + length += self.AwardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteString(data, self.AwardList[i].GetLength(), self.AwardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + AwardCount:%d, + AwardList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCActManyDayRechargeInfo=tagMCActManyDayRechargeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActManyDayRechargeInfo.Head.Cmd,m_NAtagMCActManyDayRechargeInfo.Head.SubCmd))] = m_NAtagMCActManyDayRechargeInfo + + +#------------------------------------------------------ +# AA 49 多日连充活动玩家信息 #tagMCActManyDayRechargePlayerInfo + +class tagMCActManyDayRechargePlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 + Days = 0 #(BYTE Days) + DayRechargeValues = list() #(vector<DWORD> DayRechargeValues)//活动每天充值列表 + RecordCount = 0 #(BYTE RecordCount) + AwardRecord = list() #(vector<DWORD> AwardRecord)//奖励领奖记录,按奖励索引二进制位存储是否已领取 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x49 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Days,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Days): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.DayRechargeValues.append(value) + self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.AwardRecord.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x49 + self.ActNum = 0 + self.Days = 0 + self.DayRechargeValues = list() + self.RecordCount = 0 + self.AwardRecord = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 4 * self.Days + length += 1 + length += 4 * self.RecordCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteBYTE(data, self.Days) + for i in range(self.Days): + data = CommFunc.WriteDWORD(data, self.DayRechargeValues[i]) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteDWORD(data, self.AwardRecord[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + Days:%d, + DayRechargeValues:%s, + RecordCount:%d, + AwardRecord:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.Days, + "...", + self.RecordCount, + "..." + ) + return DumpString + + +m_NAtagMCActManyDayRechargePlayerInfo=tagMCActManyDayRechargePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActManyDayRechargePlayerInfo.Head.Cmd,m_NAtagMCActManyDayRechargePlayerInfo.Head.SubCmd))] = m_NAtagMCActManyDayRechargePlayerInfo + + +#------------------------------------------------------ # AA 27 充值返利活动信息 #tagMCActRechargePrizeInfo class tagMCActRechargePrize(Structure): @@ -25336,6 +26414,7 @@ Head = tagHead() StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 PrizeDays = 0 #(BYTE PrizeDays) PrizeDayInfo = list() #(vector<tagMCActRechargePrizeDay> PrizeDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样 @@ -25352,6 +26431,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.PrizeDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.PrizeDays): @@ -25367,6 +26447,7 @@ self.Head.SubCmd = 0x27 self.StartDate = "" self.EndtDate = "" + self.LimitLV = 0 self.IsDayReset = 0 self.PrizeDays = 0 self.PrizeDayInfo = list() @@ -25377,6 +26458,7 @@ length += self.Head.GetLength() length += 10 length += 10 + length += 2 length += 1 length += 1 for i in range(self.PrizeDays): @@ -25389,6 +26471,7 @@ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) data = CommFunc.WriteBYTE(data, self.IsDayReset) data = CommFunc.WriteBYTE(data, self.PrizeDays) for i in range(self.PrizeDays): @@ -25400,6 +26483,7 @@ Head:%s, StartDate:%s, EndtDate:%s, + LimitLV:%d, IsDayReset:%d, PrizeDays:%d, PrizeDayInfo:%s @@ -25408,6 +26492,7 @@ self.Head.OutputString(), self.StartDate, self.EndtDate, + self.LimitLV, self.IsDayReset, self.PrizeDays, "..." @@ -25417,6 +26502,474 @@ m_NAtagMCActRechargePrizeInfo=tagMCActRechargePrizeInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargePrizeInfo.Head.Cmd,m_NAtagMCActRechargePrizeInfo.Head.SubCmd))] = m_NAtagMCActRechargePrizeInfo + + +#------------------------------------------------------ +# AA 29 累计充值返利仙玉活动信息 #tagMCActRechargeRebateGoldInfo + +class tagMCActRechargeRebate(Structure): + _pack_ = 1 + _fields_ = [ + ("RMBMin", c_int), # 充值RMB最小值 + ("RMBMax", c_int), # 充值RMB最大值,0代表无上限 + ("RebateRate", c_ushort), # 返利仙玉比例百分比 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.RMBMin = 0 + self.RMBMax = 0 + self.RebateRate = 0 + return + + def GetLength(self): + return sizeof(tagMCActRechargeRebate) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 29 累计充值返利仙玉活动信息 //tagMCActRechargeRebateGoldInfo: + RMBMin:%d, + RMBMax:%d, + RebateRate:%d + '''\ + %( + self.RMBMin, + self.RMBMax, + self.RebateRate + ) + return DumpString + + +class tagMCActRechargeRebateDay(Structure): + Rebates = 0 #(BYTE Rebates)// 返利档数 + RebateInfo = list() #(vector<tagMCActRechargeRebate> RebateInfo)// 返利档信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rebates,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Rebates): + temRebateInfo = tagMCActRechargeRebate() + _pos = temRebateInfo.ReadData(_lpData, _pos) + self.RebateInfo.append(temRebateInfo) + return _pos + + def Clear(self): + self.Rebates = 0 + self.RebateInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + for i in range(self.Rebates): + length += self.RebateInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.Rebates) + for i in range(self.Rebates): + data = CommFunc.WriteString(data, self.RebateInfo[i].GetLength(), self.RebateInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rebates:%d, + RebateInfo:%s + '''\ + %( + self.Rebates, + "..." + ) + return DumpString + + +class tagMCActRechargeRebateGoldInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + RebateDays = 0 #(BYTE RebateDays) + RebateDayInfo = list() #(vector<tagMCActRechargeRebateDay> RebateDayInfo)//每天对应信息; 如果只有一天,但是活动有多天,则代表每天奖励都一样 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x29 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RebateDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RebateDays): + temRebateDayInfo = tagMCActRechargeRebateDay() + _pos = temRebateDayInfo.ReadData(_lpData, _pos) + self.RebateDayInfo.append(temRebateDayInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x29 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.IsDayReset = 0 + self.RebateDays = 0 + self.RebateDayInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.RebateDays): + length += self.RebateDayInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.RebateDays) + for i in range(self.RebateDays): + data = CommFunc.WriteString(data, self.RebateDayInfo[i].GetLength(), self.RebateDayInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + IsDayReset:%d, + RebateDays:%d, + RebateDayInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.IsDayReset, + self.RebateDays, + "..." + ) + return DumpString + + +m_NAtagMCActRechargeRebateGoldInfo=tagMCActRechargeRebateGoldInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActRechargeRebateGoldInfo.Head.Cmd,m_NAtagMCActRechargeRebateGoldInfo.Head.SubCmd))] = m_NAtagMCActRechargeRebateGoldInfo + + +#------------------------------------------------------ +# AA 50 单笔累充活动信息 #tagMCActSingleRechargeInfo + +class tagMCActSingleRechargeAwardItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("ItemCount", c_ushort), + ("IsBind", c_ubyte), + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ItemID = 0 + self.ItemCount = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCActSingleRechargeAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 50 单笔累充活动信息 //tagMCActSingleRechargeInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActSingleRechargeAward(Structure): + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + SingleRechargeValue = 0 #(DWORD SingleRechargeValue)// 单笔所需充值额度 + AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数 + AwardItem = list() #(vector<tagMCActSingleRechargeAwardItem> AwardItem)// 奖励物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SingleRechargeValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItem = tagMCActSingleRechargeAwardItem() + _pos = temAwardItem.ReadData(_lpData, _pos) + self.AwardItem.append(temAwardItem) + return _pos + + def Clear(self): + self.AwardIndex = 0 + self.SingleRechargeValue = 0 + self.AwardItemCount = 0 + self.AwardItem = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 4 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItem[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteDWORD(data, self.SingleRechargeValue) + data = CommFunc.WriteBYTE(data, self.AwardItemCount) + for i in range(self.AwardItemCount): + data = CommFunc.WriteString(data, self.AwardItem[i].GetLength(), self.AwardItem[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + AwardIndex:%d, + SingleRechargeValue:%d, + AwardItemCount:%d, + AwardItem:%s + '''\ + %( + self.AwardIndex, + self.SingleRechargeValue, + self.AwardItemCount, + "..." + ) + return DumpString + + +class tagMCActSingleRechargeInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + AwardRuleType = 0 #(BYTE AwardRuleType)// 领奖规则类型 0-向下兼容;1-匹配最高档;2-精确匹配对应档次 + AwardCount = 0 #(BYTE AwardCount)// 奖励档数 + AwardInfo = list() #(vector<tagMCActSingleRechargeAward> AwardInfo)// 奖励档信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x50 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AwardRuleType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardCount): + temAwardInfo = tagMCActSingleRechargeAward() + _pos = temAwardInfo.ReadData(_lpData, _pos) + self.AwardInfo.append(temAwardInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x50 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.AwardRuleType = 0 + self.AwardCount = 0 + self.AwardInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 2 + length += 1 + length += 1 + for i in range(self.AwardCount): + length += self.AwardInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.AwardRuleType) + data = CommFunc.WriteBYTE(data, self.AwardCount) + for i in range(self.AwardCount): + data = CommFunc.WriteString(data, self.AwardInfo[i].GetLength(), self.AwardInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + AwardRuleType:%d, + AwardCount:%d, + AwardInfo:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.AwardRuleType, + self.AwardCount, + "..." + ) + return DumpString + + +m_NAtagMCActSingleRechargeInfo=tagMCActSingleRechargeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargeInfo.Head.Cmd,m_NAtagMCActSingleRechargeInfo.Head.SubCmd))] = m_NAtagMCActSingleRechargeInfo + + +#------------------------------------------------------ +# AA 51 单笔累充活动玩家信息 #tagMCActSingleRechargePlayerInfo + +class tagMCActSingleRechargePlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 + ("CanAwardValue", c_int), #可否领奖记录,按奖励索引二进制位存储是否可领取 + ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x51 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x51 + self.ActNum = 0 + self.CanAwardValue = 0 + self.AwardRecord = 0 + return + + def GetLength(self): + return sizeof(tagMCActSingleRechargePlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 51 单笔累充活动玩家信息 //tagMCActSingleRechargePlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + CanAwardValue:%d, + AwardRecord:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.CanAwardValue, + self.AwardRecord + ) + return DumpString + + +m_NAtagMCActSingleRechargePlayerInfo=tagMCActSingleRechargePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Cmd,m_NAtagMCActSingleRechargePlayerInfo.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo #------------------------------------------------------ @@ -25678,6 +27231,322 @@ m_NAtagMCActTotalRechargeInfo=tagMCActTotalRechargeInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTotalRechargeInfo.Head.Cmd,m_NAtagMCActTotalRechargeInfo.Head.SubCmd))] = m_NAtagMCActTotalRechargeInfo + + +#------------------------------------------------------ +# AA 52 转盘活动信息 #tagMCActTurntableInfo + +class tagMCActTurntableItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemNum", c_ubyte), #物品编号 1~n;注意转盘已确定物品编号 与 极品终极物品待选择库编号可能相同,但并不代表同一物品 + ("ItemLibType", c_ubyte), #物品库类型;1-常规,2-极品,3-终极 + ("ItemID", c_int), + ("ItemCount", c_ushort), + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ItemNum = 0 + self.ItemLibType = 0 + self.ItemID = 0 + self.ItemCount = 0 + return + + def GetLength(self): + return sizeof(tagMCActTurntableItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 52 转盘活动信息 //tagMCActTurntableInfo: + ItemNum:%d, + ItemLibType:%d, + ItemID:%d, + ItemCount:%d + '''\ + %( + self.ItemNum, + self.ItemLibType, + self.ItemID, + self.ItemCount + ) + return DumpString + + +class tagMCActTurntableInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + IsDayReset = 0 #(BYTE IsDayReset)// 是否每天重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + CTGPrizeCount = 0 #(BYTE CTGPrizeCount) + CTGPrizeList = list() #(vector<DWORD> CTGPrizeList)// 累计充值额度奖励次数列表 [奖励第1次所需累计充值额度, 第2次, ...] + UseMoneyType = 0 #(BYTE UseMoneyType)// 累计消费货币类型 + UseMoneyPrizeCount = 0 #(BYTE UseMoneyPrizeCount) + UseMoneyPrizeList = list() #(vector<DWORD> UseMoneyPrizeList)// 累计消费货币奖励次数列表 [奖励第1次所需累计消费货币, 第2次, ...] + TurnItemCount = 0 #(BYTE TurnItemCount) + TurnItemList = list() #(vector<tagMCActTurntableItem> TurnItemList)// 转盘已确定的物品列表,包含常规物品+极品物品+终极物品,活动开始时,后端直接随机生成常规物品,已确定的物品不包含极品、终极物品时需要先选择才能使用转盘; + GoodItemCount = 0 #(BYTE GoodItemCount) + GoodItemList = list() #(vector<tagMCActTurntableItem> GoodItemList)// 极品物品待选择库,由玩家从库中选择放入转盘的物品;注意此库中的物品编号仅表示在该库中的编号,可能与转盘已确定的物品编号重复,但并不代表同一物品; + GoodItemCanChooseCount = 0 #(BYTE GoodItemCanChooseCount)// 极品物品可选择个数 + SuperItemCount = 0 #(BYTE SuperItemCount) + SuperItemList = list() #(vector<tagMCActTurntableItem> SuperItemList)// 终极物品待选择库,由玩家从库中选择放入转盘的物品;注意此库中的物品编号仅表示在该库中的编号,可能与转盘已确定的物品编号重复,但并不代表同一物品; + SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 终极物品可选择个数 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x52 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.CTGPrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.CTGPrizeCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.CTGPrizeList.append(value) + self.UseMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.UseMoneyPrizeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.UseMoneyPrizeCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.UseMoneyPrizeList.append(value) + self.TurnItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TurnItemCount): + temTurnItemList = tagMCActTurntableItem() + _pos = temTurnItemList.ReadData(_lpData, _pos) + self.TurnItemList.append(temTurnItemList) + self.GoodItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.GoodItemCount): + temGoodItemList = tagMCActTurntableItem() + _pos = temGoodItemList.ReadData(_lpData, _pos) + self.GoodItemList.append(temGoodItemList) + self.GoodItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SuperItemCount): + temSuperItemList = tagMCActTurntableItem() + _pos = temSuperItemList.ReadData(_lpData, _pos) + self.SuperItemList.append(temSuperItemList) + self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x52 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.LimitLV = 0 + self.CTGPrizeCount = 0 + self.CTGPrizeList = list() + self.UseMoneyType = 0 + self.UseMoneyPrizeCount = 0 + self.UseMoneyPrizeList = list() + self.TurnItemCount = 0 + self.TurnItemList = list() + self.GoodItemCount = 0 + self.GoodItemList = list() + self.GoodItemCanChooseCount = 0 + self.SuperItemCount = 0 + self.SuperItemList = list() + self.SuperItemCanChooseCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 2 + length += 1 + length += 4 * self.CTGPrizeCount + length += 1 + length += 1 + length += 4 * self.UseMoneyPrizeCount + length += 1 + for i in range(self.TurnItemCount): + length += self.TurnItemList[i].GetLength() + length += 1 + for i in range(self.GoodItemCount): + length += self.GoodItemList[i].GetLength() + length += 1 + length += 1 + for i in range(self.SuperItemCount): + length += self.SuperItemList[i].GetLength() + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.CTGPrizeCount) + for i in range(self.CTGPrizeCount): + data = CommFunc.WriteDWORD(data, self.CTGPrizeList[i]) + data = CommFunc.WriteBYTE(data, self.UseMoneyType) + data = CommFunc.WriteBYTE(data, self.UseMoneyPrizeCount) + for i in range(self.UseMoneyPrizeCount): + data = CommFunc.WriteDWORD(data, self.UseMoneyPrizeList[i]) + data = CommFunc.WriteBYTE(data, self.TurnItemCount) + for i in range(self.TurnItemCount): + data = CommFunc.WriteString(data, self.TurnItemList[i].GetLength(), self.TurnItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.GoodItemCount) + for i in range(self.GoodItemCount): + data = CommFunc.WriteString(data, self.GoodItemList[i].GetLength(), self.GoodItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.GoodItemCanChooseCount) + data = CommFunc.WriteBYTE(data, self.SuperItemCount) + for i in range(self.SuperItemCount): + data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + LimitLV:%d, + CTGPrizeCount:%d, + CTGPrizeList:%s, + UseMoneyType:%d, + UseMoneyPrizeCount:%d, + UseMoneyPrizeList:%s, + TurnItemCount:%d, + TurnItemList:%s, + GoodItemCount:%d, + GoodItemList:%s, + GoodItemCanChooseCount:%d, + SuperItemCount:%d, + SuperItemList:%s, + SuperItemCanChooseCount:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.LimitLV, + self.CTGPrizeCount, + "...", + self.UseMoneyType, + self.UseMoneyPrizeCount, + "...", + self.TurnItemCount, + "...", + self.GoodItemCount, + "...", + self.GoodItemCanChooseCount, + self.SuperItemCount, + "...", + self.SuperItemCanChooseCount + ) + return DumpString + + +m_NAtagMCActTurntableInfo=tagMCActTurntableInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTurntableInfo.Head.Cmd,m_NAtagMCActTurntableInfo.Head.SubCmd))] = m_NAtagMCActTurntableInfo + + +#------------------------------------------------------ +# AA 53 转盘活动玩家信息 #tagMCActTurntablePlayerInfo + +class tagMCActTurntablePlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 + ("CanUseCount", c_ubyte), #可转盘次数 + ("CTGTotal", c_int), #累计充值额度 + ("UseMoneyTotal", c_int), #累计消费货币额度 + ("TurnItemState", c_int), #转盘物品已抽中记录,按转盘物品编号二进制位代表是否已抽中 + ("GetItemNum", c_ubyte), #本次抽中的物品编号,非转盘结果时为0,大于0时为通知本次转到的物品编号 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x53 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x53 + self.ActNum = 0 + self.CanUseCount = 0 + self.CTGTotal = 0 + self.UseMoneyTotal = 0 + self.TurnItemState = 0 + self.GetItemNum = 0 + return + + def GetLength(self): + return sizeof(tagMCActTurntablePlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 53 转盘活动玩家信息 //tagMCActTurntablePlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + CanUseCount:%d, + CTGTotal:%d, + UseMoneyTotal:%d, + TurnItemState:%d, + GetItemNum:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.CanUseCount, + self.CTGTotal, + self.UseMoneyTotal, + self.TurnItemState, + self.GetItemNum + ) + return DumpString + + +m_NAtagMCActTurntablePlayerInfo=tagMCActTurntablePlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActTurntablePlayerInfo.Cmd,m_NAtagMCActTurntablePlayerInfo.SubCmd))] = m_NAtagMCActTurntablePlayerInfo #------------------------------------------------------ @@ -26125,6 +27994,288 @@ m_NAtagMCActWishingWellPlayerInfo=tagMCActWishingWellPlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActWishingWellPlayerInfo.Head.Cmd,m_NAtagMCActWishingWellPlayerInfo.Head.SubCmd))] = m_NAtagMCActWishingWellPlayerInfo + + +#------------------------------------------------------ +# AA 59 仙匣秘境抽奖结果 #tagMCActXianXiaMJAwardItemResult + +class tagMCActXianXiaMJAwardItemResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库 + ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同 + ("ItemCount", c_ushort), + ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中; + ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x59 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x59 + self.ActNum = 0 + self.ItemLibType = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.PosNum = 0 + self.TotalTimesNow = 0 + return + + def GetLength(self): + return sizeof(tagMCActXianXiaMJAwardItemResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 59 仙匣秘境抽奖结果 //tagMCActXianXiaMJAwardItemResult: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + ItemLibType:%d, + ItemID:%d, + ItemCount:%d, + PosNum:%d, + TotalTimesNow:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.ItemLibType, + self.ItemID, + self.ItemCount, + self.PosNum, + self.TotalTimesNow + ) + return DumpString + + +m_NAtagMCActXianXiaMJAwardItemResult=tagMCActXianXiaMJAwardItemResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJAwardItemResult.Cmd,m_NAtagMCActXianXiaMJAwardItemResult.SubCmd))] = m_NAtagMCActXianXiaMJAwardItemResult + + +#------------------------------------------------------ +# AA 58 仙匣秘境活动信息 #tagMCActXianXiaMJInfo + +class tagMCActXianXiaMJAwardItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemLibType", c_ubyte), #物品库类型;9-固定为大奖库,非9-策划自定义库 + ("ItemID", c_int), # 注意: 不同库物品ID可能相同,但个数不同 + ("ItemCount", c_ushort), + ("PosNum", c_ubyte), # 被抽中时的位置编号,1~99,前端自定义展示位置编号,0代表未被抽中; + ("TotalTimesNow", c_ubyte), #当前已产出次数,不限制次数时不记录,即同样为0 + ("TotalTimesMax", c_ubyte), #最大可产出次数,0不限 + ("LayerLimit", c_ubyte), #大于等于X层后可产出,0不限 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ItemLibType = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.PosNum = 0 + self.TotalTimesNow = 0 + self.TotalTimesMax = 0 + self.LayerLimit = 0 + return + + def GetLength(self): + return sizeof(tagMCActXianXiaMJAwardItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 58 仙匣秘境活动信息 //tagMCActXianXiaMJInfo: + ItemLibType:%d, + ItemID:%d, + ItemCount:%d, + PosNum:%d, + TotalTimesNow:%d, + TotalTimesMax:%d, + LayerLimit:%d + '''\ + %( + self.ItemLibType, + self.ItemID, + self.ItemCount, + self.PosNum, + self.TotalTimesNow, + self.TotalTimesMax, + self.LayerLimit + ) + return DumpString + + +class tagMCActXianXiaMJInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)// 活动编号 + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 + MoneyType = 0 #(BYTE MoneyType)//消耗货币类型 + MoneyValue = 0 #(WORD MoneyValue)//消耗货币值 + LayerNum = 0 #(BYTE LayerNum)//当前奖池第几层 + AwardItemCount = 0 #(BYTE AwardItemCount) + AwardItemList = list() #(vector<tagMCActXianXiaMJAwardItem> AwardItemList)// 奖池物品列表,已生成的,包含已选择的大奖物品 + SuperItemCount = 0 #(BYTE SuperItemCount) + SuperItemList = list() #(vector<tagMCActXianXiaMJAwardItem> SuperItemList)// 大奖物品待选择库,由玩家从库中选择放入奖池的物品; + SuperItemCanChooseCount = 0 #(BYTE SuperItemCanChooseCount)// 大奖物品可选择个数 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x58 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LayerNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.AwardItemCount): + temAwardItemList = tagMCActXianXiaMJAwardItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + self.SuperItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SuperItemCount): + temSuperItemList = tagMCActXianXiaMJAwardItem() + _pos = temSuperItemList.ReadData(_lpData, _pos) + self.SuperItemList.append(temSuperItemList) + self.SuperItemCanChooseCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x58 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + self.MoneyType = 0 + self.MoneyValue = 0 + self.LayerNum = 0 + self.AwardItemCount = 0 + self.AwardItemList = list() + self.SuperItemCount = 0 + self.SuperItemList = list() + self.SuperItemCanChooseCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 2 + length += 1 + length += 1 + for i in range(self.AwardItemCount): + length += self.AwardItemList[i].GetLength() + length += 1 + for i in range(self.SuperItemCount): + length += self.SuperItemList[i].GetLength() + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteBYTE(data, self.MoneyType) + data = CommFunc.WriteWORD(data, self.MoneyValue) + data = CommFunc.WriteBYTE(data, self.LayerNum) + data = CommFunc.WriteBYTE(data, self.AwardItemCount) + for i in range(self.AwardItemCount): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.SuperItemCount) + for i in range(self.SuperItemCount): + data = CommFunc.WriteString(data, self.SuperItemList[i].GetLength(), self.SuperItemList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.SuperItemCanChooseCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d, + MoneyType:%d, + MoneyValue:%d, + LayerNum:%d, + AwardItemCount:%d, + AwardItemList:%s, + SuperItemCount:%d, + SuperItemList:%s, + SuperItemCanChooseCount:%d + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType, + self.MoneyType, + self.MoneyValue, + self.LayerNum, + self.AwardItemCount, + "...", + self.SuperItemCount, + "...", + self.SuperItemCanChooseCount + ) + return DumpString + + +m_NAtagMCActXianXiaMJInfo=tagMCActXianXiaMJInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActXianXiaMJInfo.Head.Cmd,m_NAtagMCActXianXiaMJInfo.Head.SubCmd))] = m_NAtagMCActXianXiaMJInfo #------------------------------------------------------ @@ -26832,6 +28983,7 @@ class tagMCCostRebateInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 @@ -26849,6 +29001,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) @@ -26865,6 +29018,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x09 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.IsDayReset = 0 @@ -26876,6 +29030,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 1 @@ -26889,6 +29044,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteBYTE(data, self.IsDayReset) @@ -26901,6 +29057,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, IsDayReset:%d, @@ -26910,6 +29067,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.IsDayReset, @@ -26932,6 +29090,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 ("CostGoldTotal", c_int), #本次活动已累计消费仙玉数 ("AwardRecord", c_int), #返利奖励领奖记录,按奖励索引二进制位存储是否已领取 ] @@ -26950,6 +29109,7 @@ def Clear(self): self.Cmd = 0xAA self.SubCmd = 0x10 + self.ActNum = 0 self.CostGoldTotal = 0 self.AwardRecord = 0 return @@ -26964,12 +29124,14 @@ DumpString = '''// AA 10 消费返利玩家活动信息 //tagMCCostRebatePlayerInfo: Cmd:%s, SubCmd:%s, + ActNum:%d, CostGoldTotal:%d, AwardRecord:%d '''\ %( self.Cmd, self.SubCmd, + self.ActNum, self.CostGoldTotal, self.AwardRecord ) @@ -27109,6 +29271,7 @@ class tagMCDailyGiftbagInfo(Structure): Head = tagHead() + LimitLV = 0 #(WORD LimitLV)// 限制等级 GiftbagCount = 0 #(BYTE GiftbagCount)// 礼包数 GiftbagInfo = list() #(vector<tagMCDailyGiftbag> GiftbagInfo)// 礼包信息 data = None @@ -27122,6 +29285,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.GiftbagCount): temGiftbagInfo = tagMCDailyGiftbag() @@ -27134,6 +29298,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x25 + self.LimitLV = 0 self.GiftbagCount = 0 self.GiftbagInfo = list() return @@ -27141,6 +29306,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 2 length += 1 for i in range(self.GiftbagCount): length += self.GiftbagInfo[i].GetLength() @@ -27150,6 +29316,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.LimitLV) data = CommFunc.WriteBYTE(data, self.GiftbagCount) for i in range(self.GiftbagCount): data = CommFunc.WriteString(data, self.GiftbagInfo[i].GetLength(), self.GiftbagInfo[i].GetBuffer()) @@ -27158,11 +29325,13 @@ def OutputString(self): DumpString = ''' Head:%s, + LimitLV:%d, GiftbagCount:%d, GiftbagInfo:%s '''\ %( self.Head.OutputString(), + self.LimitLV, self.GiftbagCount, "..." ) @@ -27440,6 +29609,7 @@ Head = tagHead() StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 DayCount = 0 #(BYTE DayCount)// 总共几天 DayAwardList = list() #(vector<tagMCFeastLoginDayAward> DayAwardList)//登录天奖励列表 data = None @@ -27455,6 +29625,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.DayCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.DayCount): temDayAwardList = tagMCFeastLoginDayAward() @@ -27469,6 +29640,7 @@ self.Head.SubCmd = 0x42 self.StartDate = "" self.EndtDate = "" + self.LimitLV = 0 self.DayCount = 0 self.DayAwardList = list() return @@ -27478,6 +29650,7 @@ length += self.Head.GetLength() length += 10 length += 10 + length += 2 length += 1 for i in range(self.DayCount): length += self.DayAwardList[i].GetLength() @@ -27489,6 +29662,7 @@ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) data = CommFunc.WriteBYTE(data, self.DayCount) for i in range(self.DayCount): data = CommFunc.WriteString(data, self.DayAwardList[i].GetLength(), self.DayAwardList[i].GetBuffer()) @@ -27499,6 +29673,7 @@ Head:%s, StartDate:%s, EndtDate:%s, + LimitLV:%d, DayCount:%d, DayAwardList:%s '''\ @@ -27506,6 +29681,7 @@ self.Head.OutputString(), self.StartDate, self.EndtDate, + self.LimitLV, self.DayCount, "..." ) @@ -27740,6 +29916,7 @@ Head = tagHead() StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 TravelTaskCount = 0 #(BYTE TravelTaskCount)// 游历任务数 TravelTaskList = list() #(vector<tagMCFeastTravelTask> TravelTaskList)//游历任务信息列表 @@ -27758,6 +29935,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.TravelTaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.TravelTaskCount): @@ -27778,6 +29956,7 @@ self.Head.SubCmd = 0x46 self.StartDate = "" self.EndtDate = "" + self.LimitLV = 0 self.ResetType = 0 self.TravelTaskCount = 0 self.TravelTaskList = list() @@ -27790,6 +29969,7 @@ length += self.Head.GetLength() length += 10 length += 10 + length += 2 length += 1 length += 1 for i in range(self.TravelTaskCount): @@ -27805,6 +29985,7 @@ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) data = CommFunc.WriteBYTE(data, self.ResetType) data = CommFunc.WriteBYTE(data, self.TravelTaskCount) for i in range(self.TravelTaskCount): @@ -27819,6 +30000,7 @@ Head:%s, StartDate:%s, EndtDate:%s, + LimitLV:%d, ResetType:%d, TravelTaskCount:%d, TravelTaskList:%s, @@ -27829,6 +30011,7 @@ self.Head.OutputString(), self.StartDate, self.EndtDate, + self.LimitLV, self.ResetType, self.TravelTaskCount, "...", @@ -28656,6 +30839,7 @@ Head = tagHead() StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点开,5点重置;2-5点开,0点重置 WishPoolShowCount = 0 #(BYTE WishPoolShowCount)//祝福池展示物品数 WishPoolShowItemList = list() #(vector<DWORD> WishPoolShowItemList)//祝福池展示物品ID列表 @@ -28674,6 +30858,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.WishPoolShowCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.WishPoolShowCount): @@ -28693,6 +30878,7 @@ self.Head.SubCmd = 0x43 self.StartDate = "" self.EndtDate = "" + self.LimitLV = 0 self.ResetType = 0 self.WishPoolShowCount = 0 self.WishPoolShowItemList = list() @@ -28705,6 +30891,7 @@ length += self.Head.GetLength() length += 10 length += 10 + length += 2 length += 1 length += 1 length += 4 * self.WishPoolShowCount @@ -28719,6 +30906,7 @@ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) data = CommFunc.WriteBYTE(data, self.ResetType) data = CommFunc.WriteBYTE(data, self.WishPoolShowCount) for i in range(self.WishPoolShowCount): @@ -28733,6 +30921,7 @@ Head:%s, StartDate:%s, EndtDate:%s, + LimitLV:%d, ResetType:%d, WishPoolShowCount:%d, WishPoolShowItemList:%s, @@ -28743,6 +30932,7 @@ self.Head.OutputString(), self.StartDate, self.EndtDate, + self.LimitLV, self.ResetType, self.WishPoolShowCount, "...", @@ -29574,6 +31764,7 @@ class tagMCFlashSaleAppointmentInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 IsAll = 0 #(BYTE IsAll)// 是否全部 GoodsCount = 0 #(WORD GoodsCount)// 商品数 GoodsList = list() #(vector<tagMCFlashSaleAppointmentState> GoodsList)// 预约的商品 @@ -29588,6 +31779,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.GoodsCount,_pos = CommFunc.ReadWORD(_lpData, _pos) for i in range(self.GoodsCount): @@ -29601,6 +31793,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x18 + self.ActNum = 0 self.IsAll = 0 self.GoodsCount = 0 self.GoodsList = list() @@ -29609,6 +31802,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 1 length += 2 for i in range(self.GoodsCount): @@ -29619,6 +31813,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteBYTE(data, self.IsAll) data = CommFunc.WriteWORD(data, self.GoodsCount) for i in range(self.GoodsCount): @@ -29628,12 +31823,14 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, IsAll:%d, GoodsCount:%d, GoodsList:%s '''\ %( self.Head.OutputString(), + self.ActNum, self.IsAll, self.GoodsCount, "..." @@ -29826,6 +32023,7 @@ class tagMCFlashSaleInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 @@ -29846,6 +32044,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) @@ -29868,6 +32067,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x17 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.AdvanceMinutes = 0 @@ -29882,6 +32082,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 2 @@ -29899,6 +32100,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteWORD(data, self.AdvanceMinutes) @@ -29915,6 +32117,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, AdvanceMinutes:%d, @@ -29927,6 +32130,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.AdvanceMinutes, @@ -30334,6 +32538,58 @@ #------------------------------------------------------ +# AA 04 创角在线充值特惠信息 #tagMCOnlineRechargeTH + +class tagMCOnlineRechargeTH(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("AwardState", c_ubyte), #是否已领取奖励 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x04 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x04 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCOnlineRechargeTH) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 04 创角在线充值特惠信息 //tagMCOnlineRechargeTH: + Cmd:%s, + SubCmd:%s, + AwardState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.AwardState + ) + return DumpString + + +m_NAtagMCOnlineRechargeTH=tagMCOnlineRechargeTH() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCOnlineRechargeTH.Cmd,m_NAtagMCOnlineRechargeTH.SubCmd))] = m_NAtagMCOnlineRechargeTH + + +#------------------------------------------------------ # AA 28 充值返利玩家活动信息 #tagMCRechargePrizePlayerInfo class tagMCRechargePrizeInfo(Structure): @@ -30439,6 +32695,58 @@ m_NAtagMCRechargePrizePlayerInfo=tagMCRechargePrizePlayerInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargePrizePlayerInfo.Head.Cmd,m_NAtagMCRechargePrizePlayerInfo.Head.SubCmd))] = m_NAtagMCRechargePrizePlayerInfo + + +#------------------------------------------------------ +# AA 30 累计充值返利仙玉玩家活动信息 #tagMCRechargeRebateGoldPlayerInfo + +class tagMCRechargeRebateGoldPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("RechargeRMBTotal", c_int), # 活动已累计充值RMB + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x30 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x30 + self.RechargeRMBTotal = 0 + return + + def GetLength(self): + return sizeof(tagMCRechargeRebateGoldPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 30 累计充值返利仙玉玩家活动信息 //tagMCRechargeRebateGoldPlayerInfo: + Cmd:%s, + SubCmd:%s, + RechargeRMBTotal:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.RechargeRMBTotal + ) + return DumpString + + +m_NAtagMCRechargeRebateGoldPlayerInfo=tagMCRechargeRebateGoldPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRebateGoldPlayerInfo.Cmd,m_NAtagMCRechargeRebateGoldPlayerInfo.SubCmd))] = m_NAtagMCRechargeRebateGoldPlayerInfo #------------------------------------------------------ @@ -30673,6 +32981,7 @@ class tagMCSpringSaleInfo(Structure): Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号 StartDate = "" #(char StartDate[10])// 开始日期 y-m-d EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 @@ -30693,6 +33002,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() _pos = self.Head.ReadData(_lpData, _pos) + self.ActNum,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) @@ -30715,6 +33025,7 @@ self.Head.Clear() self.Head.Cmd = 0xAA self.Head.SubCmd = 0x11 + self.ActNum = 0 self.StartDate = "" self.EndtDate = "" self.AdvanceMinutes = 0 @@ -30729,6 +33040,7 @@ def GetLength(self): length = 0 length += self.Head.GetLength() + length += 1 length += 10 length += 10 length += 2 @@ -30746,6 +33058,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) data = CommFunc.WriteString(data, 10, self.StartDate) data = CommFunc.WriteString(data, 10, self.EndtDate) data = CommFunc.WriteWORD(data, self.AdvanceMinutes) @@ -30762,6 +33075,7 @@ def OutputString(self): DumpString = ''' Head:%s, + ActNum:%d, StartDate:%s, EndtDate:%s, AdvanceMinutes:%d, @@ -30774,6 +33088,7 @@ '''\ %( self.Head.OutputString(), + self.ActNum, self.StartDate, self.EndtDate, self.AdvanceMinutes, @@ -33182,6 +35497,118 @@ #------------------------------------------------------ +# B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList + +class tagMCFuncSysPrivilegeInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("FuncSysID", c_ubyte), # 功能系统ID + ("ActivateTime", c_int), # 激活时间戳 + ("AwardState", c_int), # 领奖状态,按天对应二进制位计算是否领奖 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.FuncSysID = 0 + self.ActivateTime = 0 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCFuncSysPrivilegeInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 11 功能系统特权信息 //tagMCFuncSysPrivilegeInfoList: + FuncSysID:%d, + ActivateTime:%d, + AwardState:%d + '''\ + %( + self.FuncSysID, + self.ActivateTime, + self.AwardState + ) + return DumpString + + +class tagMCFuncSysPrivilegeInfoList(Structure): + Head = tagHead() + PrivilegeCount = 0 #(BYTE PrivilegeCount)// 特权个数 + PrivilegeInfoList = list() #(vector<tagMCFuncSysPrivilegeInfo> PrivilegeInfoList)// 特权信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x11 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PrivilegeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PrivilegeCount): + temPrivilegeInfoList = tagMCFuncSysPrivilegeInfo() + _pos = temPrivilegeInfoList.ReadData(_lpData, _pos) + self.PrivilegeInfoList.append(temPrivilegeInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x11 + self.PrivilegeCount = 0 + self.PrivilegeInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.PrivilegeCount): + length += self.PrivilegeInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.PrivilegeCount) + for i in range(self.PrivilegeCount): + data = CommFunc.WriteString(data, self.PrivilegeInfoList[i].GetLength(), self.PrivilegeInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PrivilegeCount:%d, + PrivilegeInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.PrivilegeCount, + "..." + ) + return DumpString + + +m_NAtagMCFuncSysPrivilegeInfoList=tagMCFuncSysPrivilegeInfoList() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFuncSysPrivilegeInfoList.Head.Cmd,m_NAtagMCFuncSysPrivilegeInfoList.Head.SubCmd))] = m_NAtagMCFuncSysPrivilegeInfoList + + +#------------------------------------------------------ # B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove class tagMCNotifyPlayerMove(Structure): @@ -33239,6 +35666,80 @@ m_NAtagMCNotifyPlayerMove=tagMCNotifyPlayerMove() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNotifyPlayerMove.Cmd,m_NAtagMCNotifyPlayerMove.SubCmd))] = m_NAtagMCNotifyPlayerMove + + +#------------------------------------------------------ +# B1 13 在线奖励信息新 #tagMCOnlinePrizeNew + +class tagMCOnlinePrizeNew(Structure): + Head = tagHead() + OnlineTime = 0 #(DWORD OnlineTime)//在线时间毫秒 + Len = 0 #(BYTE Len) + PrizeInfo = list() #(vector<DWORD> PrizeInfo)//领奖记录 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x13 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.OnlineTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Len,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Len): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.PrizeInfo.append(value) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x13 + self.OnlineTime = 0 + self.Len = 0 + self.PrizeInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += 4 * self.Len + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.OnlineTime) + data = CommFunc.WriteBYTE(data, self.Len) + for i in range(self.Len): + data = CommFunc.WriteDWORD(data, self.PrizeInfo[i]) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + OnlineTime:%d, + Len:%d, + PrizeInfo:%s + '''\ + %( + self.Head.OutputString(), + self.OnlineTime, + self.Len, + "..." + ) + return DumpString + + +m_NAtagMCOnlinePrizeNew=tagMCOnlinePrizeNew() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCOnlinePrizeNew.Head.Cmd,m_NAtagMCOnlinePrizeNew.Head.SubCmd))] = m_NAtagMCOnlinePrizeNew #------------------------------------------------------ @@ -36277,6 +38778,7 @@ ("ObjID", c_int), ("AttackType", c_ubyte), #爆击, miss ("HurtHP", c_int), + ("HurtHPEx", c_int), ("CurHP", c_int), ("CurHPEx", c_int), ] @@ -36295,6 +38797,7 @@ self.ObjID = 0 self.AttackType = 0 self.HurtHP = 0 + self.HurtHPEx = 0 self.CurHP = 0 self.CurHPEx = 0 return @@ -36311,6 +38814,7 @@ ObjID:%d, AttackType:%d, HurtHP:%d, + HurtHPEx:%d, CurHP:%d, CurHPEx:%d '''\ @@ -36319,6 +38823,7 @@ self.ObjID, self.AttackType, self.HurtHP, + self.HurtHPEx, self.CurHP, self.CurHPEx ) -- Gitblit v1.8.0