From 9499a21f5be1a5b54b457a787c7df618a61d1cdc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 24 一月 2019 20:39:35 +0800
Subject: [PATCH] 5978 【后端】【1.5.200】节日活动时间管理
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 884 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 852 insertions(+), 32 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 4611140..def89d1 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -196,40 +196,60 @@
# A0 07 副本地图功能线路人数 #tagGCFBLinePlayerCnt
class tagGCFBLineInfo(Structure):
- _pack_ = 1
- _fields_ = [
- ("FBLineID", c_ubyte), # 功能线路ID
- ("PlayerCnt", c_ushort), # 线路当前玩家数
- ]
+ FBLineID = 0 #(BYTE FBLineID)// 功能线路ID
+ PlayerCnt = 0 #(WORD PlayerCnt)// 线路当前玩家数
+ ExtraStrLen = 0 #(WORD ExtraStrLen)// 长度
+ ExtraStr = "" #(String ExtraStr)// 额外信息
+ data = None
def __init__(self):
self.Clear()
return
- def ReadData(self, stringData, _pos=0, _len=0):
+ def ReadData(self, _lpData, _pos=0, _Len=0):
self.Clear()
- memmove(addressof(self), stringData[_pos:], self.GetLength())
- return _pos + self.GetLength()
+ self.FBLineID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.PlayerCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.ExtraStrLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.ExtraStr,_pos = CommFunc.ReadString(_lpData, _pos,self.ExtraStrLen)
+ return _pos
def Clear(self):
self.FBLineID = 0
self.PlayerCnt = 0
+ self.ExtraStrLen = 0
+ self.ExtraStr = ""
return
def GetLength(self):
- return sizeof(tagGCFBLineInfo)
+ length = 0
+ length += 1
+ length += 2
+ length += 2
+ length += len(self.ExtraStr)
+
+ return length
def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
+ data = ''
+ data = CommFunc.WriteBYTE(data, self.FBLineID)
+ data = CommFunc.WriteWORD(data, self.PlayerCnt)
+ data = CommFunc.WriteWORD(data, self.ExtraStrLen)
+ data = CommFunc.WriteString(data, self.ExtraStrLen, self.ExtraStr)
+ return data
def OutputString(self):
- DumpString = '''// A0 07 副本地图功能线路人数 //tagGCFBLinePlayerCnt:
+ DumpString = '''
FBLineID:%d,
- PlayerCnt:%d
+ PlayerCnt:%d,
+ ExtraStrLen:%d,
+ ExtraStr:%s
'''\
%(
self.FBLineID,
- self.PlayerCnt
+ self.PlayerCnt,
+ self.ExtraStrLen,
+ self.ExtraStr
)
return DumpString
@@ -5881,6 +5901,7 @@
RealmLV = 0 #(WORD RealmLV)//境界
OnlineType = 0 #(BYTE OnlineType)//在线状态, 0 不在线 1在线
IsInTeam = 0 #(BYTE IsInTeam)//是否有队伍
+ ServerGroupID = 0 #(DWORD ServerGroupID)//服务器组ID
data = None
def __init__(self):
@@ -5899,6 +5920,7 @@
self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.OnlineType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.IsInTeam,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ServerGroupID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
return _pos
def Clear(self):
@@ -5913,6 +5935,7 @@
self.RealmLV = 0
self.OnlineType = 0
self.IsInTeam = 0
+ self.ServerGroupID = 0
return
def GetLength(self):
@@ -5925,6 +5948,7 @@
length += 2
length += 1
length += 1
+ length += 4
return length
@@ -5938,6 +5962,7 @@
data = CommFunc.WriteWORD(data, self.RealmLV)
data = CommFunc.WriteBYTE(data, self.OnlineType)
data = CommFunc.WriteBYTE(data, self.IsInTeam)
+ data = CommFunc.WriteDWORD(data, self.ServerGroupID)
return data
def OutputString(self):
@@ -5949,7 +5974,8 @@
LV:%d,
RealmLV:%d,
OnlineType:%d,
- IsInTeam:%d
+ IsInTeam:%d,
+ ServerGroupID:%d
'''\
%(
self.Head.OutputString(),
@@ -5959,7 +5985,8 @@
self.LV,
self.RealmLV,
self.OnlineType,
- self.IsInTeam
+ self.IsInTeam,
+ self.ServerGroupID
)
return DumpString
@@ -8404,7 +8431,7 @@
RoundCount = 0 #(BYTE RoundCount)// PK回合数
RoundWinnerID = list() #(vector<DWORD> RoundWinnerID)// 回合获胜ID列表
AddScore = 0 #(WORD AddScore)// 本场加分
- Score = 0 #(WORD Score)// 当前积分
+ Score = 0 #(DWORD Score)// 当前积分
DanLV = 0 #(BYTE DanLV)// 当前段位
CWinCnt = 0 #(WORD CWinCnt)// 当前连胜数
TagNameLen = 0 #(BYTE TagNameLen)
@@ -8428,7 +8455,7 @@
value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
self.RoundWinnerID.append(value)
self.AddScore,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.Score,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.DanLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.CWinCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.TagNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
@@ -8462,7 +8489,7 @@
length += 1
length += 4 * self.RoundCount
length += 2
- length += 2
+ length += 4
length += 1
length += 2
length += 1
@@ -8480,7 +8507,7 @@
for i in range(self.RoundCount):
data = CommFunc.WriteDWORD(data, self.RoundWinnerID[i])
data = CommFunc.WriteWORD(data, self.AddScore)
- data = CommFunc.WriteWORD(data, self.Score)
+ data = CommFunc.WriteDWORD(data, self.Score)
data = CommFunc.WriteBYTE(data, self.DanLV)
data = CommFunc.WriteWORD(data, self.CWinCnt)
data = CommFunc.WriteBYTE(data, self.TagNameLen)
@@ -18777,7 +18804,6 @@
ItemData = "" #(String ItemData)//物品记录
PlusDataSize = 0 #(DWORD PlusDataSize)
PlusData = "" #(String PlusData)//扩展记录
- CrossPlayer = 0 #(BYTE CrossPlayer)//是否跨服玩家
data = None
def __init__(self):
@@ -18796,7 +18822,6 @@
self.ItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemDataSize)
self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize)
- self.CrossPlayer,_pos = CommFunc.ReadBYTE(_lpData, _pos)
return _pos
def Clear(self):
@@ -18811,7 +18836,6 @@
self.ItemData = ""
self.PlusDataSize = 0
self.PlusData = ""
- self.CrossPlayer = 0
return
def GetLength(self):
@@ -18824,7 +18848,6 @@
length += len(self.ItemData)
length += 4
length += len(self.PlusData)
- length += 1
return length
@@ -18838,7 +18861,6 @@
data = CommFunc.WriteString(data, self.ItemDataSize, self.ItemData)
data = CommFunc.WriteDWORD(data, self.PlusDataSize)
data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData)
- data = CommFunc.WriteBYTE(data, self.CrossPlayer)
return data
def OutputString(self):
@@ -18850,8 +18872,7 @@
ItemDataSize:%d,
ItemData:%s,
PlusDataSize:%d,
- PlusData:%s,
- CrossPlayer:%d
+ PlusData:%s
'''\
%(
self.Head.OutputString(),
@@ -18861,8 +18882,7 @@
self.ItemDataSize,
self.ItemData,
self.PlusDataSize,
- self.PlusData,
- self.CrossPlayer
+ self.PlusData
)
return DumpString
@@ -20084,6 +20104,586 @@
m_NAtagMCVirtualItemDrop=tagMCVirtualItemDrop()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCVirtualItemDrop.Head.Cmd,m_NAtagMCVirtualItemDrop.Head.SubCmd))] = m_NAtagMCVirtualItemDrop
+
+
+#------------------------------------------------------
+# A8 15 诛仙装备分解结果通知 #tagMCZhuXianDecomposeResult
+
+class tagMCZhuXianDecomposeItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemID", c_int), #物品ID
+ ("ItemCnt", c_ubyte), #物品数量
+ ("IsBind", c_ubyte), #是否绑定
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.ItemID = 0
+ self.ItemCnt = 0
+ self.IsBind = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCZhuXianDecomposeItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A8 15 诛仙装备分解结果通知 //tagMCZhuXianDecomposeResult:
+ ItemID:%d,
+ ItemCnt:%d,
+ IsBind:%d
+ '''\
+ %(
+ self.ItemID,
+ self.ItemCnt,
+ self.IsBind
+ )
+ return DumpString
+
+
+class tagMCZhuXianDecomposeResult(Structure):
+ Head = tagHead()
+ Cnt = 0 #(BYTE Cnt)//数量
+ ItemList = list() #(vector<tagMCZhuXianDecomposeItem> ItemList)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA8
+ self.Head.SubCmd = 0x15
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Cnt):
+ temItemList = tagMCZhuXianDecomposeItem()
+ _pos = temItemList.ReadData(_lpData, _pos)
+ self.ItemList.append(temItemList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA8
+ self.Head.SubCmd = 0x15
+ self.Cnt = 0
+ self.ItemList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.Cnt):
+ length += self.ItemList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Cnt)
+ for i in range(self.Cnt):
+ data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Cnt:%d,
+ ItemList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Cnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCZhuXianDecomposeResult=tagMCZhuXianDecomposeResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianDecomposeResult.Head.Cmd,m_NAtagMCZhuXianDecomposeResult.Head.SubCmd))] = m_NAtagMCZhuXianDecomposeResult
+
+
+#------------------------------------------------------
+# AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
+
+class tagMCActLoginAwardItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ItemID", c_int), # 物品ID
+ ("ItemCnt", c_ushort), # 物品数量
+ ("IsBind", c_ubyte), # 是否绑定
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.ItemID = 0
+ self.ItemCnt = 0
+ self.IsBind = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCActLoginAwardItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 0C 登录奖励活动信息 //tagMCActLoginAwardInfo:
+ ItemID:%d,
+ ItemCnt:%d,
+ IsBind:%d
+ '''\
+ %(
+ self.ItemID,
+ self.ItemCnt,
+ self.IsBind
+ )
+ return DumpString
+
+
+class tagMCActLoginAwardAction(Structure):
+ TemplateID = 0 #(DWORD TemplateID)// 模板ID
+ ActionType = 0 #(WORD ActionType)// 活动类别
+ TotalTimes = 0 #(DWORD TotalTimes)// 可完成的总次数,0表示不限次数
+ SingleTimes = 0 #(DWORD SingleTimes)// 单次领奖需要的次数
+ Count = 0 #(BYTE Count)// 物品数
+ ItemInfo = list() #(vector<tagMCActLoginAwardItem> ItemInfo)// 物品信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.TemplateID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.ActionType,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.TotalTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.SingleTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Count):
+ temItemInfo = tagMCActLoginAwardItem()
+ _pos = temItemInfo.ReadData(_lpData, _pos)
+ self.ItemInfo.append(temItemInfo)
+ return _pos
+
+ def Clear(self):
+ self.TemplateID = 0
+ self.ActionType = 0
+ self.TotalTimes = 0
+ self.SingleTimes = 0
+ self.Count = 0
+ self.ItemInfo = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 2
+ length += 4
+ length += 4
+ length += 1
+ for i in range(self.Count):
+ length += self.ItemInfo[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.TemplateID)
+ data = CommFunc.WriteWORD(data, self.ActionType)
+ data = CommFunc.WriteDWORD(data, self.TotalTimes)
+ data = CommFunc.WriteDWORD(data, self.SingleTimes)
+ data = CommFunc.WriteBYTE(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ TemplateID:%d,
+ ActionType:%d,
+ TotalTimes:%d,
+ SingleTimes:%d,
+ Count:%d,
+ ItemInfo:%s
+ '''\
+ %(
+ self.TemplateID,
+ self.ActionType,
+ self.TotalTimes,
+ self.SingleTimes,
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+class tagMCActLoginAwardDayInfo(Structure):
+ ActCnt = 0 #(BYTE ActCnt)// 数量
+ TemplateList = list() #(vector<WORD> TemplateList)// 模板列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.ActCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.ActCnt):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.TemplateList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.ActCnt = 0
+ self.TemplateList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 1
+ length += 2 * self.ActCnt
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteBYTE(data, self.ActCnt)
+ for i in range(self.ActCnt):
+ data = CommFunc.WriteWORD(data, self.TemplateList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ ActCnt:%d,
+ TemplateList:%s
+ '''\
+ %(
+ self.ActCnt,
+ "..."
+ )
+ return DumpString
+
+
+class tagMCActLoginAwardInfo(Structure):
+ Head = tagHead()
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟
+ IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置
+ ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ DayCnt = 0 #(BYTE DayCnt)// 天数
+ DayInfoList = list() #(vector<tagMCActLoginAwardDayInfo> DayInfoList)// 每天模板
+ TCount = 0 #(BYTE TCount)// 模板数
+ ActionInfo = list() #(vector<tagMCActLoginAwardAction> ActionInfo)// 活动模板信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x0C
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+ self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.DayCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.DayCnt):
+ temDayInfoList = tagMCActLoginAwardDayInfo()
+ _pos = temDayInfoList.ReadData(_lpData, _pos)
+ self.DayInfoList.append(temDayInfoList)
+ self.TCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.TCount):
+ temActionInfo = tagMCActLoginAwardAction()
+ _pos = temActionInfo.ReadData(_lpData, _pos)
+ self.ActionInfo.append(temActionInfo)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x0C
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.AdvanceMinutes = 0
+ self.IsDayReset = 0
+ self.ResetType = 0
+ self.LimitLV = 0
+ self.DayCnt = 0
+ self.DayInfoList = list()
+ self.TCount = 0
+ self.ActionInfo = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 10
+ length += 10
+ length += 2
+ length += 1
+ length += 1
+ length += 2
+ length += 1
+ for i in range(self.DayCnt):
+ length += self.DayInfoList[i].GetLength()
+ length += 1
+ for i in range(self.TCount):
+ length += self.ActionInfo[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteString(data, 10, self.StartDate)
+ data = CommFunc.WriteString(data, 10, self.EndtDate)
+ data = CommFunc.WriteWORD(data, self.AdvanceMinutes)
+ data = CommFunc.WriteBYTE(data, self.IsDayReset)
+ data = CommFunc.WriteBYTE(data, self.ResetType)
+ data = CommFunc.WriteWORD(data, self.LimitLV)
+ data = CommFunc.WriteBYTE(data, self.DayCnt)
+ for i in range(self.DayCnt):
+ data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.TCount)
+ for i in range(self.TCount):
+ data = CommFunc.WriteString(data, self.ActionInfo[i].GetLength(), self.ActionInfo[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ StartDate:%s,
+ EndtDate:%s,
+ AdvanceMinutes:%d,
+ IsDayReset:%d,
+ ResetType:%d,
+ LimitLV:%d,
+ DayCnt:%d,
+ DayInfoList:%s,
+ TCount:%d,
+ ActionInfo:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.StartDate,
+ self.EndtDate,
+ self.AdvanceMinutes,
+ self.IsDayReset,
+ self.ResetType,
+ self.LimitLV,
+ self.DayCnt,
+ "...",
+ self.TCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCActLoginAwardInfo=tagMCActLoginAwardInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginAwardInfo.Head.Cmd,m_NAtagMCActLoginAwardInfo.Head.SubCmd))] = m_NAtagMCActLoginAwardInfo
+
+
+#------------------------------------------------------
+# AA 0D 登录奖励玩家活动信息 #tagMCActLoginAwardPlayerInfo
+
+class tagMCActLoginAwardTaskInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("TemplateID", c_ushort), # 模板ID
+ ("CurTimes", c_ushort), #已完成次数
+ ("GotTimes", c_ushort), #已领取次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.TemplateID = 0
+ self.CurTimes = 0
+ self.GotTimes = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCActLoginAwardTaskInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AA 0D 登录奖励玩家活动信息 //tagMCActLoginAwardPlayerInfo:
+ TemplateID:%d,
+ CurTimes:%d,
+ GotTimes:%d
+ '''\
+ %(
+ self.TemplateID,
+ self.CurTimes,
+ self.GotTimes
+ )
+ return DumpString
+
+
+class tagMCActLoginAwardDayPlayerInfo(Structure):
+ DayIndex = 0 #(DWORD DayIndex)//第X天
+ ACount = 0 #(DWORD ACount)//任务条目数
+ TaskList = list() #(vector<tagMCActLoginAwardTaskInfo> TaskList)//活动完成次数信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.DayIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.ACount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ for i in range(self.ACount):
+ temTaskList = tagMCActLoginAwardTaskInfo()
+ _pos = temTaskList.ReadData(_lpData, _pos)
+ self.TaskList.append(temTaskList)
+ return _pos
+
+ def Clear(self):
+ self.DayIndex = 0
+ self.ACount = 0
+ self.TaskList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 4
+ for i in range(self.ACount):
+ length += self.TaskList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.DayIndex)
+ data = CommFunc.WriteDWORD(data, self.ACount)
+ for i in range(self.ACount):
+ data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ DayIndex:%d,
+ ACount:%d,
+ TaskList:%s
+ '''\
+ %(
+ self.DayIndex,
+ self.ACount,
+ "..."
+ )
+ return DumpString
+
+
+class tagMCActLoginAwardPlayerInfo(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)
+ DayInfoList = list() #(vector<tagMCActLoginAwardDayPlayerInfo> DayInfoList)//活动完成次数信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x0D
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Count):
+ temDayInfoList = tagMCActLoginAwardDayPlayerInfo()
+ _pos = temDayInfoList.ReadData(_lpData, _pos)
+ self.DayInfoList.append(temDayInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAA
+ self.Head.SubCmd = 0x0D
+ self.Count = 0
+ self.DayInfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.Count):
+ length += self.DayInfoList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ DayInfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCActLoginAwardPlayerInfo=tagMCActLoginAwardPlayerInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActLoginAwardPlayerInfo.Head.Cmd,m_NAtagMCActLoginAwardPlayerInfo.Head.SubCmd))] = m_NAtagMCActLoginAwardPlayerInfo
#------------------------------------------------------
@@ -23482,8 +24082,8 @@
_pack_ = 1
_fields_ = [
("TemplateID", c_ushort), # 模板ID
- ("CurTimes", c_ushort), #已完成次数
- ("GotTimes", c_ushort), #已领取次数
+ ("CurTimes", c_int), #已完成次数
+ ("GotTimes", c_int), #已领取次数
]
def __init__(self):
@@ -26873,6 +27473,110 @@
#------------------------------------------------------
+# B2 12 诛仙BOSS协助次数 #tagMCZhuXianBossCnt
+
+class tagMCZhuXianBossCnt(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Cnt", c_ubyte), # 剩余可协助次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x12
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xB2
+ self.SubCmd = 0x12
+ self.Cnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCZhuXianBossCnt)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 12 诛仙BOSS协助次数 //tagMCZhuXianBossCnt:
+ Cmd:%s,
+ SubCmd:%s,
+ Cnt:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Cnt
+ )
+ return DumpString
+
+
+m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt
+
+
+#------------------------------------------------------
+# B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo
+
+class tagMCZhuXianTowerInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Floor", c_int), # 已通关层
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x13
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xB2
+ self.SubCmd = 0x13
+ self.Floor = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCZhuXianTowerInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ Floor:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Floor
+ )
+ return DumpString
+
+
+m_NAtagMCZhuXianTowerInfo=tagMCZhuXianTowerInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianTowerInfo.Cmd,m_NAtagMCZhuXianTowerInfo.SubCmd))] = m_NAtagMCZhuXianTowerInfo
+
+
+#------------------------------------------------------
# B4 11 新增恶意攻击玩家 #tagMCAddMaliciousAtkPlayer
class tagMCAddMaliciousAtkPlayer(Structure):
@@ -27462,6 +28166,118 @@
m_NAtagMCPassiveSetAnswer=tagMCPassiveSetAnswer()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPassiveSetAnswer.Cmd,m_NAtagMCPassiveSetAnswer.SubCmd))] = m_NAtagMCPassiveSetAnswer
+
+
+#------------------------------------------------------
+# B4 13 通知玩家所有已学技能 #tagMCPlayerSkills
+
+class tagPlayerSkill(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("SkillID", c_int), #技能ID
+ ("RemainTime", c_int), #剩余时间
+ ("Proficiency", c_int), #熟练度
+ ]
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.SkillID = 0
+ self.RemainTime = 0
+ self.Proficiency = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagPlayerSkill)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B4 13 通知玩家所有已学技能 //tagMCPlayerSkills:
+ SkillID:%d,
+ RemainTime:%d,
+ Proficiency:%d
+ '''\
+ %(
+ self.SkillID,
+ self.RemainTime,
+ self.Proficiency
+ )
+ return DumpString
+
+
+class tagMCPlayerSkills(Structure):
+ Head = tagHead()
+ Count = 0 #(WORD Count)//技能个数
+ Skills = list() #(vector<tagPlayerSkill> Skills)// 技能数据
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x13
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ for i in range(self.Count):
+ temSkills = tagPlayerSkill()
+ _pos = temSkills.ReadData(_lpData, _pos)
+ self.Skills.append(temSkills)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x13
+ self.Count = 0
+ self.Skills = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 2
+ for i in range(self.Count):
+ length += self.Skills[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteWORD(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteString(data, self.Skills[i].GetLength(), self.Skills[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ Skills:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCPlayerSkills=tagMCPlayerSkills()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerSkills.Head.Cmd,m_NAtagMCPlayerSkills.Head.SubCmd))] = m_NAtagMCPlayerSkills
#------------------------------------------------------
@@ -28195,6 +29011,7 @@
("DayPKCount", c_ubyte), # 当日已PK次数
("DayWinCount", c_ubyte), # 当日已胜利次数
("DayBuyCount", c_ubyte), # 当日已购买次数
+ ("DayItemAddCount", c_ubyte), # 当日物品增加次数
]
def __init__(self):
@@ -28219,6 +29036,7 @@
self.DayPKCount = 0
self.DayWinCount = 0
self.DayBuyCount = 0
+ self.DayItemAddCount = 0
return
def GetLength(self):
@@ -28238,7 +29056,8 @@
CWinCount:%d,
DayPKCount:%d,
DayWinCount:%d,
- DayBuyCount:%d
+ DayBuyCount:%d,
+ DayItemAddCount:%d
'''\
%(
self.Cmd,
@@ -28250,7 +29069,8 @@
self.CWinCount,
self.DayPKCount,
self.DayWinCount,
- self.DayBuyCount
+ self.DayBuyCount,
+ self.DayItemAddCount
)
return DumpString
--
Gitblit v1.8.0