From 5f6d12a0c40e018be2516b4e81e7a43c16145b9d Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 28 十二月 2023 17:05:02 +0800 Subject: [PATCH] 10033 【后端】仙树升级系统及砍树产出规则(仙桃货币类型改为41) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 1010 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 977 insertions(+), 33 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index eaf1503..604bd86 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -9037,6 +9037,7 @@ OnlineType = 0 #(BYTE OnlineType)//在线状态, 0 不在线 1在线 IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍 ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID + Face = 0 #(DWORD Face)//基本脸型 data = None def __init__(self): @@ -9056,6 +9057,7 @@ self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -9071,6 +9073,7 @@ self.OnlineType = 0 self.IsInTeam = 0 self.ServerGroupID = 0 + self.Face = 0 return def GetLength(self): @@ -9083,6 +9086,7 @@ length += 2 length += 1 length += 1 + length += 4 length += 4 return length @@ -9098,6 +9102,7 @@ data = CommFunc.WriteBYTE(data, self.OnlineType) data = CommFunc.WriteBYTE(data, self.IsInTeam) data = CommFunc.WriteDWORD(data, self.ServerGroupID) + data = CommFunc.WriteDWORD(data, self.Face) return data def OutputString(self): @@ -9110,7 +9115,8 @@ RealmLV:%d, OnlineType:%d, IsInTeam:%d, - ServerGroupID:%d + ServerGroupID:%d, + Face:%d '''\ %( self.Head.OutputString(), @@ -9121,7 +9127,8 @@ self.RealmLV, self.OnlineType, self.IsInTeam, - self.ServerGroupID + self.ServerGroupID, + self.Face ) return DumpString @@ -9196,6 +9203,7 @@ LV = 0 #(WORD LV)//等级 RealmLV = 0 #(WORD RealmLV)//境界 OnlineType = 0 #(BYTE OnlineType)//0不在线 1在线 2脱机在线 + Face = 0 #(DWORD Face)//基本脸型 data = None def __init__(self): @@ -9210,6 +9218,7 @@ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos) self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -9219,6 +9228,7 @@ self.LV = 0 self.RealmLV = 0 self.OnlineType = 0 + self.Face = 0 return def GetLength(self): @@ -9229,6 +9239,7 @@ length += 2 length += 2 length += 1 + length += 4 return length @@ -9240,6 +9251,7 @@ data = CommFunc.WriteWORD(data, self.LV) data = CommFunc.WriteWORD(data, self.RealmLV) data = CommFunc.WriteBYTE(data, self.OnlineType) + data = CommFunc.WriteDWORD(data, self.Face) return data def OutputString(self): @@ -9249,7 +9261,8 @@ Job:%d, LV:%d, RealmLV:%d, - OnlineType:%d + OnlineType:%d, + Face:%d '''\ %( self.PlayerID, @@ -9257,7 +9270,8 @@ self.Job, self.LV, self.RealmLV, - self.OnlineType + self.OnlineType, + self.Face ) return DumpString @@ -16446,6 +16460,9 @@ OrderLen = 0 #(BYTE OrderLen) OrderID = "" #(String OrderID)// 订单id Coin = 0 #(DWORD Coin)// 充值的点卷 + RecordID = 0 #(BYTE RecordID)// ctgID + OrderInfoLen = 0 #(BYTE OrderInfoLen) + OrderInfo = "" #(String OrderInfo) data = None def __init__(self): @@ -16460,6 +16477,9 @@ self.OrderLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) self.OrderID,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderLen) self.Coin,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RecordID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen) return _pos def Clear(self): @@ -16470,6 +16490,9 @@ self.OrderLen = 0 self.OrderID = "" self.Coin = 0 + self.RecordID = 0 + self.OrderInfoLen = 0 + self.OrderInfo = "" return def GetLength(self): @@ -16478,6 +16501,9 @@ length += 1 length += len(self.OrderID) length += 4 + length += 1 + length += 1 + length += len(self.OrderInfo) return length @@ -16487,6 +16513,9 @@ data = CommFunc.WriteBYTE(data, self.OrderLen) data = CommFunc.WriteString(data, self.OrderLen, self.OrderID) data = CommFunc.WriteDWORD(data, self.Coin) + data = CommFunc.WriteBYTE(data, self.RecordID) + data = CommFunc.WriteBYTE(data, self.OrderInfoLen) + data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo) return data def OutputString(self): @@ -16494,13 +16523,19 @@ Head:%s, OrderLen:%d, OrderID:%s, - Coin:%d + Coin:%d, + RecordID:%d, + OrderInfoLen:%d, + OrderInfo:%s '''\ %( self.Head.OutputString(), self.OrderLen, self.OrderID, - self.Coin + self.Coin, + self.RecordID, + self.OrderInfoLen, + self.OrderInfo ) return DumpString @@ -29500,7 +29535,7 @@ class tagRefreshType(Structure): _pack_ = 1 _fields_ = [ - ("RefreshType", c_ubyte), + ("RefreshType", c_ushort), ("Value", c_int), ("ValueEx", c_int), ] @@ -30630,6 +30665,360 @@ m_NAtagMCVirtualItemDrop=tagMCVirtualItemDrop() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCVirtualItemDrop.Head.Cmd,m_NAtagMCVirtualItemDrop.Head.SubCmd))] = m_NAtagMCVirtualItemDrop + + +#------------------------------------------------------ +# AA 67 Boss历练活动信息 #tagMCActBossTrialInfo + +class tagMCActBossTrialItem(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(tagMCActBossTrialItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 67 Boss历练活动信息 //tagMCActBossTrialInfo: + ItemID:%d, + ItemCount:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCount, + self.IsBind + ) + return DumpString + + +class tagMCActBossTrialBillard(Structure): + Rank = 0 #(DWORD Rank)// 名次,1-代表第一名;支持夸段,如1,3 代表第1名,第2~3名 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActBossTrialItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.Rank = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.Rank) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Rank:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.Rank, + self.Count, + "..." + ) + return DumpString + + +class tagMCActBossTrialSubmitInfo(Structure): + RecordIndex = 0 #(BYTE RecordIndex)// 记录索引 + NeedCount = 0 #(WORD NeedCount)// 所需提交个数 + Count = 0 #(BYTE Count)// 奖励物品数 + AwardItemList = list() #(vector<tagMCActBossTrialItem> AwardItemList)// 奖励物品列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.RecordIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.NeedCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAwardItemList = tagMCActBossTrialItem() + _pos = temAwardItemList.ReadData(_lpData, _pos) + self.AwardItemList.append(temAwardItemList) + return _pos + + def Clear(self): + self.RecordIndex = 0 + self.NeedCount = 0 + self.Count = 0 + self.AwardItemList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 + length += 1 + for i in range(self.Count): + length += self.AwardItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.RecordIndex) + data = CommFunc.WriteWORD(data, self.NeedCount) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + RecordIndex:%d, + NeedCount:%d, + Count:%d, + AwardItemList:%s + '''\ + %( + self.RecordIndex, + self.NeedCount, + self.Count, + "..." + ) + return DumpString + + +class tagMCActBossTrialInfo(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)// 是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + SubmitCount = 0 #(BYTE SubmitCount) + SubmitInfoList = list() #(vector<tagMCActBossTrialSubmitInfo> SubmitInfoList)// 提交凭证信息列表 + BillardCount = 0 #(BYTE BillardCount) + BillboardInfoList = list() #(vector<tagMCActBossTrialBillard> BillboardInfoList)// 榜单信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x67 + 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.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.SubmitCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SubmitCount): + temSubmitInfoList = tagMCActBossTrialSubmitInfo() + _pos = temSubmitInfoList.ReadData(_lpData, _pos) + self.SubmitInfoList.append(temSubmitInfoList) + self.BillardCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.BillardCount): + temBillboardInfoList = tagMCActBossTrialBillard() + _pos = temBillboardInfoList.ReadData(_lpData, _pos) + self.BillboardInfoList.append(temBillboardInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x67 + self.ActNum = 0 + self.StartDate = "" + self.EndtDate = "" + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.SubmitCount = 0 + self.SubmitInfoList = list() + self.BillardCount = 0 + self.BillboardInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 10 + length += 10 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.SubmitCount): + length += self.SubmitInfoList[i].GetLength() + length += 1 + for i in range(self.BillardCount): + length += self.BillboardInfoList[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.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.SubmitCount) + for i in range(self.SubmitCount): + data = CommFunc.WriteString(data, self.SubmitInfoList[i].GetLength(), self.SubmitInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.BillardCount) + for i in range(self.BillardCount): + data = CommFunc.WriteString(data, self.BillboardInfoList[i].GetLength(), self.BillboardInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + StartDate:%s, + EndtDate:%s, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + SubmitCount:%d, + SubmitInfoList:%s, + BillardCount:%d, + BillboardInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.ActNum, + self.StartDate, + self.EndtDate, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.SubmitCount, + "...", + self.BillardCount, + "..." + ) + return DumpString + + +m_NAtagMCActBossTrialInfo=tagMCActBossTrialInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBossTrialInfo.Head.Cmd,m_NAtagMCActBossTrialInfo.Head.SubCmd))] = m_NAtagMCActBossTrialInfo + + +#------------------------------------------------------ +# AA 68 Boss历练活动玩家信息 #tagMCActBossTrialPlayerInfo + +class tagMCActBossTrialPlayerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), # 活动编号 + ("SubmitCount", c_ushort), # 已提交凭证个数 + ("SubmitCountAward", c_int), # 提交凭证奖励领奖状态 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x68 + 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 = 0x68 + self.ActNum = 0 + self.SubmitCount = 0 + self.SubmitCountAward = 0 + return + + def GetLength(self): + return sizeof(tagMCActBossTrialPlayerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 68 Boss历练活动玩家信息 //tagMCActBossTrialPlayerInfo: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + SubmitCount:%d, + SubmitCountAward:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.SubmitCount, + self.SubmitCountAward + ) + return DumpString + + +m_NAtagMCActBossTrialPlayerInfo=tagMCActBossTrialPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActBossTrialPlayerInfo.Cmd,m_NAtagMCActBossTrialPlayerInfo.SubCmd))] = m_NAtagMCActBossTrialPlayerInfo #------------------------------------------------------ @@ -33862,7 +34251,8 @@ class tagMCActSingleRechargeAward(Structure): - AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 0~31 + AwardIndex = 0 #(BYTE AwardIndex)// 奖励索引 + AwardCountMax = 0 #(WORD AwardCountMax)// 最大领奖次数 SingleRechargeValue = 0 #(DWORD SingleRechargeValue)// 单笔所需充值额度 AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数 AwardItem = list() #(vector<tagMCActSingleRechargeAwardItem> AwardItem)// 奖励物品信息 @@ -33875,6 +34265,7 @@ def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() self.AwardIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AwardCountMax,_pos = CommFunc.ReadWORD(_lpData, _pos) self.SingleRechargeValue,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) for i in range(self.AwardItemCount): @@ -33885,6 +34276,7 @@ def Clear(self): self.AwardIndex = 0 + self.AwardCountMax = 0 self.SingleRechargeValue = 0 self.AwardItemCount = 0 self.AwardItem = list() @@ -33893,6 +34285,7 @@ def GetLength(self): length = 0 length += 1 + length += 2 length += 4 length += 1 for i in range(self.AwardItemCount): @@ -33903,6 +34296,7 @@ def GetBuffer(self): data = '' data = CommFunc.WriteBYTE(data, self.AwardIndex) + data = CommFunc.WriteWORD(data, self.AwardCountMax) data = CommFunc.WriteDWORD(data, self.SingleRechargeValue) data = CommFunc.WriteBYTE(data, self.AwardItemCount) for i in range(self.AwardItemCount): @@ -33912,12 +34306,14 @@ def OutputString(self): DumpString = ''' AwardIndex:%d, + AwardCountMax:%d, SingleRechargeValue:%d, AwardItemCount:%d, AwardItem:%s '''\ %( self.AwardIndex, + self.AwardCountMax, self.SingleRechargeValue, self.AwardItemCount, "..." @@ -34036,20 +34432,16 @@ #------------------------------------------------------ # AA 51 单笔累充活动玩家信息 #tagMCActSingleRechargePlayerInfo -class tagMCActSingleRechargePlayerInfo(Structure): +class tagMCActSingleRechargePlayerAward(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ActNum", c_ubyte), #活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 - ("CanAwardValue", c_int), #可否领奖记录,按奖励索引二进制位存储是否可领取 - ("AwardRecord", c_int), #奖励领奖记录,按奖励索引二进制位存储是否已领取 + ("AwardIndex", c_ubyte), # 奖励索引 + ("CanGetCount", c_ushort), # 可领奖次数 + ("GetCount", c_ushort), # 已领奖次数 ] def __init__(self): self.Clear() - self.Cmd = 0xAA - self.SubCmd = 0x51 return def ReadData(self, stringData, _pos=0, _len=0): @@ -34058,39 +34450,102 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xAA - self.SubCmd = 0x51 - self.ActNum = 0 - self.CanAwardValue = 0 - self.AwardRecord = 0 + self.AwardIndex = 0 + self.CanGetCount = 0 + self.GetCount = 0 return def GetLength(self): - return sizeof(tagMCActSingleRechargePlayerInfo) + return sizeof(tagMCActSingleRechargePlayerAward) 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 + AwardIndex:%d, + CanGetCount:%d, + GetCount:%d '''\ %( - self.Cmd, - self.SubCmd, + self.AwardIndex, + self.CanGetCount, + self.GetCount + ) + return DumpString + + +class tagMCActSingleRechargePlayerInfo(Structure): + Head = tagHead() + ActNum = 0 #(BYTE ActNum)//活动编号从1开始,目前支持两个累充活动同时存在且相互独立 1或2 + RecordCount = 0 #(BYTE RecordCount) + AwardRecordList = list() #(vector<tagMCActSingleRechargePlayerAward> AwardRecordList)// 领奖次数记录列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x51 + 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.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RecordCount): + temAwardRecordList = tagMCActSingleRechargePlayerAward() + _pos = temAwardRecordList.ReadData(_lpData, _pos) + self.AwardRecordList.append(temAwardRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x51 + self.ActNum = 0 + self.RecordCount = 0 + self.AwardRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.RecordCount): + length += self.AwardRecordList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ActNum) + data = CommFunc.WriteBYTE(data, self.RecordCount) + for i in range(self.RecordCount): + data = CommFunc.WriteString(data, self.AwardRecordList[i].GetLength(), self.AwardRecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ActNum:%d, + RecordCount:%d, + AwardRecordList:%s + '''\ + %( + self.Head.OutputString(), self.ActNum, - self.CanAwardValue, - self.AwardRecord + self.RecordCount, + "..." ) return DumpString m_NAtagMCActSingleRechargePlayerInfo=tagMCActSingleRechargePlayerInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Cmd,m_NAtagMCActSingleRechargePlayerInfo.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActSingleRechargePlayerInfo.Head.Cmd,m_NAtagMCActSingleRechargePlayerInfo.Head.SubCmd))] = m_NAtagMCActSingleRechargePlayerInfo #------------------------------------------------------ @@ -36628,6 +37083,66 @@ #------------------------------------------------------ +# AA 03 每日打包直购礼包 #tagMCDailyPackBuyGiftInfo + +class tagMCDailyPackBuyGiftInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("PackBuyTime", c_int), # 打包购买的时间戳,如果有该值,代表已经一次性打包购买了,可根据次时间戳算出当前是第几天 + ("BuyStateToday", c_int), # 今日礼包购买状态,按礼包索引二进制位计算代表是否已购买,仅非打包购买状态下有用 + ("AwardState", c_int), # 今日礼包领奖状态,按礼包索引二进制位计算代表是否已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x03 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xAA + self.SubCmd = 0x03 + self.PackBuyTime = 0 + self.BuyStateToday = 0 + self.AwardState = 0 + return + + def GetLength(self): + return sizeof(tagMCDailyPackBuyGiftInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 03 每日打包直购礼包 //tagMCDailyPackBuyGiftInfo: + Cmd:%s, + SubCmd:%s, + PackBuyTime:%d, + BuyStateToday:%d, + AwardState:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.PackBuyTime, + self.BuyStateToday, + self.AwardState + ) + return DumpString + + +m_NAtagMCDailyPackBuyGiftInfo=tagMCDailyPackBuyGiftInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDailyPackBuyGiftInfo.Cmd,m_NAtagMCDailyPackBuyGiftInfo.SubCmd))] = m_NAtagMCDailyPackBuyGiftInfo + + +#------------------------------------------------------ # AA 24 每日免费直购礼包信息 #tagMCDayFreeGoldGiftState class tagMCDayFreeGoldGiftState(Structure): @@ -37209,7 +37724,7 @@ _pack_ = 1 _fields_ = [ ("AwardIndex", c_ubyte), #游历奖励索引 - ("GetAwardCount", c_ubyte), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 + ("GetAwardCount", c_int), #已领取次数;前端判断是否可领取: 总游历值 >= (已领取次数 + 1) * 单次所需游历值 ] def __init__(self): @@ -42681,6 +43196,121 @@ #------------------------------------------------------ +# B1 22 砍树结果 #tagMCCutTreeResult + +class tagMCCutTreeExItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), # 额外奖励物品ID + ("ItemCount", c_ushort), # 额外奖励物品ID对应个数 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ItemID = 0 + self.ItemCount = 0 + return + + def GetLength(self): + return sizeof(tagMCCutTreeExItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 22 砍树结果 //tagMCCutTreeResult: + ItemID:%d, + ItemCount:%d + '''\ + %( + self.ItemID, + self.ItemCount + ) + return DumpString + + +class tagMCCutTreeResult(Structure): + Head = tagHead() + EquipCount = 0 #(BYTE EquipCount)// 获得装备数量,默认展示在砍树背包中的装备即可,收到该封包前会先收到0704物品刷新 + ExItemCount = 0 #(BYTE ExItemCount)// 额外奖励物品数 + ExItemList = list() #(vector<tagMCCutTreeExItem> ExItemList)// 额外奖励物品列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x22 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.EquipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ExItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ExItemCount): + temExItemList = tagMCCutTreeExItem() + _pos = temExItemList.ReadData(_lpData, _pos) + self.ExItemList.append(temExItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x22 + self.EquipCount = 0 + self.ExItemCount = 0 + self.ExItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + for i in range(self.ExItemCount): + length += self.ExItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.EquipCount) + data = CommFunc.WriteBYTE(data, self.ExItemCount) + for i in range(self.ExItemCount): + data = CommFunc.WriteString(data, self.ExItemList[i].GetLength(), self.ExItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + EquipCount:%d, + ExItemCount:%d, + ExItemList:%s + '''\ + %( + self.Head.OutputString(), + self.EquipCount, + self.ExItemCount, + "..." + ) + return DumpString + + +m_NAtagMCCutTreeResult=tagMCCutTreeResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCutTreeResult.Head.Cmd,m_NAtagMCCutTreeResult.Head.SubCmd))] = m_NAtagMCCutTreeResult + + +#------------------------------------------------------ # B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList class tagMCFuncSysPrivilegeInfo(Structure): @@ -43321,6 +43951,248 @@ m_NAtagMCYinjiStartTime=tagMCYinjiStartTime() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCYinjiStartTime.Cmd,m_NAtagMCYinjiStartTime.SubCmd))] = m_NAtagMCYinjiStartTime + + +#------------------------------------------------------ +# B1 10 当前任务信息 #tagMCTaskInfo + +class tagMCTaskInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("TaskID", c_int), # 任务ID + ("CurValue", c_int), # 当前进度值 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB1 + self.SubCmd = 0x10 + 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 = 0xB1 + self.SubCmd = 0x10 + self.TaskID = 0 + self.CurValue = 0 + return + + def GetLength(self): + return sizeof(tagMCTaskInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 10 当前任务信息 //tagMCTaskInfo: + Cmd:%s, + SubCmd:%s, + TaskID:%d, + CurValue:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.TaskID, + self.CurValue + ) + return DumpString + + +m_NAtagMCTaskInfo=tagMCTaskInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTaskInfo.Cmd,m_NAtagMCTaskInfo.SubCmd))] = m_NAtagMCTaskInfo + + +#------------------------------------------------------ +# B1 21 仙树信息 #tagMCTreeInfo + +class tagMCTreeInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("TreeLV", c_ubyte), # 当前仙树等级 + ("LVUPState", c_ubyte), # 0-非升级中;1-升级中 + ("LVUPRemainTime", c_int), # 升级剩余时间,秒;当升级中且倒计时为0时可发送B223执行升级包进行升级 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB1 + self.SubCmd = 0x21 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB1 + self.SubCmd = 0x21 + self.TreeLV = 0 + self.LVUPState = 0 + self.LVUPRemainTime = 0 + return + + def GetLength(self): + return sizeof(tagMCTreeInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 21 仙树信息 //tagMCTreeInfo: + Cmd:%s, + SubCmd:%s, + TreeLV:%d, + LVUPState:%d, + LVUPRemainTime:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.TreeLV, + self.LVUPState, + self.LVUPRemainTime + ) + return DumpString + + +m_NAtagMCTreeInfo=tagMCTreeInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTreeInfo.Cmd,m_NAtagMCTreeInfo.SubCmd))] = m_NAtagMCTreeInfo + + +#------------------------------------------------------ +# B1 20 战令信息 #tagMCZhanlingInfo + +class tagMCZhanling(Structure): + _pack_ = 1 + _fields_ = [ + ("NeedValue", c_int), # 奖励所需值 + ("FreeRewardState", c_ubyte), # 免费奖励是否已领取 + ("ZLRewardState", 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.NeedValue = 0 + self.FreeRewardState = 0 + self.ZLRewardState = 0 + return + + def GetLength(self): + return sizeof(tagMCZhanling) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 20 战令信息 //tagMCZhanlingInfo: + NeedValue:%d, + FreeRewardState:%d, + ZLRewardState:%d + '''\ + %( + self.NeedValue, + self.FreeRewardState, + self.ZLRewardState + ) + return DumpString + + +class tagMCZhanlingInfo(Structure): + Head = tagHead() + ZhanlingType = 0 #(BYTE ZhanlingType)// 战令类型 + IsActivite = 0 #(BYTE IsActivite)// 是否已激活 + RewardCount = 0 #(WORD RewardCount) + RewardList = list() #(vector<tagMCZhanling> RewardList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZhanlingType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.IsActivite,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RewardCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.RewardCount): + temRewardList = tagMCZhanling() + _pos = temRewardList.ReadData(_lpData, _pos) + self.RewardList.append(temRewardList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB1 + self.Head.SubCmd = 0x20 + self.ZhanlingType = 0 + self.IsActivite = 0 + self.RewardCount = 0 + self.RewardList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 2 + for i in range(self.RewardCount): + length += self.RewardList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZhanlingType) + data = CommFunc.WriteBYTE(data, self.IsActivite) + data = CommFunc.WriteWORD(data, self.RewardCount) + for i in range(self.RewardCount): + data = CommFunc.WriteString(data, self.RewardList[i].GetLength(), self.RewardList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ZhanlingType:%d, + IsActivite:%d, + RewardCount:%d, + RewardList:%s + '''\ + %( + self.Head.OutputString(), + self.ZhanlingType, + self.IsActivite, + self.RewardCount, + "..." + ) + return DumpString + + +m_NAtagMCZhanlingInfo=tagMCZhanlingInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhanlingInfo.Head.Cmd,m_NAtagMCZhanlingInfo.Head.SubCmd))] = m_NAtagMCZhanlingInfo #------------------------------------------------------ @@ -46622,6 +47494,78 @@ #------------------------------------------------------ +# B4 20 回合制战斗状态 #tagMCTurnFightState + +class tagMCTurnFightState(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MapID", c_int), # 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等) + ("FuncLineID", c_ushort), + ("PlayerID", c_int), # 对应玩家ID,可为0,某些功能可能有用,如竞技场 + ("State", c_ubyte), # 0-开始;1-战斗中;2-胜利;3-失败;4-结束 + ("TurnNum", c_ubyte), # 当前轮次 + ("TurnMax", c_ubyte), # 最大轮次 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB4 + self.SubCmd = 0x20 + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.Cmd = 0xB4 + self.SubCmd = 0x20 + self.MapID = 0 + self.FuncLineID = 0 + self.PlayerID = 0 + self.State = 0 + self.TurnNum = 0 + self.TurnMax = 0 + return + + def GetLength(self): + return sizeof(tagMCTurnFightState) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B4 20 回合制战斗状态 //tagMCTurnFightState: + Cmd:%s, + SubCmd:%s, + MapID:%d, + FuncLineID:%d, + PlayerID:%d, + State:%d, + TurnNum:%d, + TurnMax:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MapID, + self.FuncLineID, + self.PlayerID, + self.State, + self.TurnNum, + self.TurnMax + ) + return DumpString + + +m_NAtagMCTurnFightState=tagMCTurnFightState() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightState.Cmd,m_NAtagMCTurnFightState.SubCmd))] = m_NAtagMCTurnFightState + + +#------------------------------------------------------ # C1 09 跨服排位玩家信息 #tagMCChampionshipPlayerInfo class tagMCChampionshipPlayerInfo(Structure): -- Gitblit v1.8.0