From de55e89b8004896e736da4f8d63a8f974d9fc298 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 20 八月 2018 20:12:31 +0800
Subject: [PATCH] fix:挂机表
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 310 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 222 insertions(+), 88 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index efe69f1..b526613 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4129,84 +4129,6 @@
#------------------------------------------------------
-# AC 07 BOSS复活活动信息 #tagGCBossRebornInfo
-
-class tagGCBossRebornInfo(Structure):
- Head = tagHead()
- StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
- EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
- WorldLV = 0 #(WORD WorldLV)// 世界等级
- LimitLV = 0 #(WORD LimitLV)// 限制等级
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xAC
- self.Head.SubCmd = 0x07
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
- self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
- self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xAC
- self.Head.SubCmd = 0x07
- self.StartDate = ""
- self.EndtDate = ""
- self.WorldLV = 0
- self.LimitLV = 0
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 10
- length += 10
- length += 2
- length += 2
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteString(data, 10, self.StartDate)
- data = CommFunc.WriteString(data, 10, self.EndtDate)
- data = CommFunc.WriteWORD(data, self.WorldLV)
- data = CommFunc.WriteWORD(data, self.LimitLV)
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- StartDate:%s,
- EndtDate:%s,
- WorldLV:%d,
- LimitLV:%d
- '''\
- %(
- self.Head.OutputString(),
- self.StartDate,
- self.EndtDate,
- self.WorldLV,
- self.LimitLV
- )
- return DumpString
-
-
-m_NAtagGCBossRebornInfo=tagGCBossRebornInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCBossRebornInfo.Head.Cmd,m_NAtagGCBossRebornInfo.Head.SubCmd))] = m_NAtagGCBossRebornInfo
-
-
-#------------------------------------------------------
# AC 08 boss复活点数通知 #tagGCBossRebornPoint
class tagGCBossRebornPoint(Structure):
@@ -4215,6 +4137,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("Point", c_int), # 复活点数
+ ("TotalPoint", c_int), # 复活总点数
]
def __init__(self):
@@ -4232,6 +4155,7 @@
self.Cmd = 0xAC
self.SubCmd = 0x08
self.Point = 0
+ self.TotalPoint = 0
return
def GetLength(self):
@@ -4244,12 +4168,14 @@
DumpString = '''// AC 08 boss复活点数通知 //tagGCBossRebornPoint:
Cmd:%s,
SubCmd:%s,
- Point:%d
+ Point:%d,
+ TotalPoint:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.Point
+ self.Point,
+ self.TotalPoint
)
return DumpString
@@ -12703,6 +12629,7 @@
_pack_ = 1
_fields_ = [
("PriID", c_int), # 特权ID
+ ("State", c_ubyte), #激活状态
("CurValue", c_int), #当前总进度
("GotValue", c_int), #已领取进度
("ItemAwardState", c_ubyte), #物品奖励是否已领取
@@ -12719,6 +12646,7 @@
def Clear(self):
self.PriID = 0
+ self.State = 0
self.CurValue = 0
self.GotValue = 0
self.ItemAwardState = 0
@@ -12733,12 +12661,14 @@
def OutputString(self):
DumpString = '''// A3 53 法宝特权数据 //tagMCMWPrivilegeDataInfo:
PriID:%d,
+ State:%d,
CurValue:%d,
GotValue:%d,
ItemAwardState:%d
'''\
%(
self.PriID,
+ self.State,
self.CurValue,
self.GotValue,
self.ItemAwardState
@@ -18814,6 +18744,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("FirstGoldRewardState", c_ubyte), #首充奖励是否已领奖
+ ("FirstGoldTry", c_ubyte), #首充试用状态0-不可试用 1-可试用 2-已试用
]
def __init__(self):
@@ -18831,6 +18762,7 @@
self.Cmd = 0xAA
self.SubCmd = 0x02
self.FirstGoldRewardState = 0
+ self.FirstGoldTry = 0
return
def GetLength(self):
@@ -18843,12 +18775,14 @@
DumpString = '''// AA 02 首充信息 //tagMCFirstGoldInfo:
Cmd:%s,
SubCmd:%s,
- FirstGoldRewardState:%d
+ FirstGoldRewardState:%d,
+ FirstGoldTry:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.FirstGoldRewardState
+ self.FirstGoldRewardState,
+ self.FirstGoldTry
)
return DumpString
@@ -18866,7 +18800,6 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("FirstGoldRemainTime", c_int), #首充提示剩余时间
- ("FirstGoldTry", c_ubyte), #首充试用状态0-不可试用 1-可试用 2-已试用
]
def __init__(self):
@@ -18884,7 +18817,6 @@
self.Cmd = 0xAA
self.SubCmd = 0x08
self.FirstGoldRemainTime = 0
- self.FirstGoldTry = 0
return
def GetLength(self):
@@ -18897,14 +18829,12 @@
DumpString = '''// AA 08 首充提示剩余时间 //tagMCFirstGoldTime:
Cmd:%s,
SubCmd:%s,
- FirstGoldRemainTime:%d,
- FirstGoldTry:%d
+ FirstGoldRemainTime:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.FirstGoldRemainTime,
- self.FirstGoldTry
+ self.FirstGoldRemainTime
)
return DumpString
@@ -20431,6 +20361,210 @@
#------------------------------------------------------
+# AB 04 Boss复活活动信息 #tagMCBossRebornInfo
+
+class tagMCBossRebornAwardItem(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(tagMCBossRebornAwardItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// AB 04 Boss复活活动信息 //tagMCBossRebornInfo:
+ ItemID:%d,
+ ItemCount:%d,
+ IsBind:%d
+ '''\
+ %(
+ self.ItemID,
+ self.ItemCount,
+ self.IsBind
+ )
+ return DumpString
+
+
+class tagMCBossRebornTaskInfo(Structure):
+ TaskID = 0 #(BYTE TaskID)// id
+ TotalTimes = 0 #(BYTE TotalTimes)// 可完成总次数,0表示不限次数
+ SingleTimes = 0 #(BYTE SingleTimes)// 单次领奖需要次数
+ AwardItemCount = 0 #(BYTE AwardItemCount)// 奖励物品数
+ AwardItem = list() #(vector<tagMCBossRebornAwardItem> AwardItem)// 奖励物品信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.TaskID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.TotalTimes,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.SingleTimes,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.AwardItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.AwardItemCount):
+ temAwardItem = tagMCBossRebornAwardItem()
+ _pos = temAwardItem.ReadData(_lpData, _pos)
+ self.AwardItem.append(temAwardItem)
+ return _pos
+
+ def Clear(self):
+ self.TaskID = 0
+ self.TotalTimes = 0
+ self.SingleTimes = 0
+ self.AwardItemCount = 0
+ self.AwardItem = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 1
+ length += 1
+ length += 1
+ length += 1
+ for i in range(self.AwardItemCount):
+ length += self.AwardItem[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteBYTE(data, self.TaskID)
+ data = CommFunc.WriteBYTE(data, self.TotalTimes)
+ data = CommFunc.WriteBYTE(data, self.SingleTimes)
+ 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 = '''
+ TaskID:%d,
+ TotalTimes:%d,
+ SingleTimes:%d,
+ AwardItemCount:%d,
+ AwardItem:%s
+ '''\
+ %(
+ self.TaskID,
+ self.TotalTimes,
+ self.SingleTimes,
+ self.AwardItemCount,
+ "..."
+ )
+ return DumpString
+
+
+class tagMCBossRebornInfo(Structure):
+ Head = tagHead()
+ StartDate = "" #(char StartDate[10])// 开始日期 y-m-d
+ EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d
+ LimitLV = 0 #(WORD LimitLV)// 限制等级
+ TaskCnt = 0 #(BYTE TaskCnt)
+ TaskInfo = list() #(vector<tagMCBossRebornTaskInfo> TaskInfo)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xAB
+ self.Head.SubCmd = 0x04
+ 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.TaskCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.TaskCnt):
+ temTaskInfo = tagMCBossRebornTaskInfo()
+ _pos = temTaskInfo.ReadData(_lpData, _pos)
+ self.TaskInfo.append(temTaskInfo)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xAB
+ self.Head.SubCmd = 0x04
+ self.StartDate = ""
+ self.EndtDate = ""
+ self.LimitLV = 0
+ self.TaskCnt = 0
+ self.TaskInfo = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 10
+ length += 10
+ length += 2
+ length += 1
+ for i in range(self.TaskCnt):
+ length += self.TaskInfo[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.TaskCnt)
+ for i in range(self.TaskCnt):
+ data = CommFunc.WriteString(data, self.TaskInfo[i].GetLength(), self.TaskInfo[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ StartDate:%s,
+ EndtDate:%s,
+ LimitLV:%d,
+ TaskCnt:%d,
+ TaskInfo:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.StartDate,
+ self.EndtDate,
+ self.LimitLV,
+ self.TaskCnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCBossRebornInfo=tagMCBossRebornInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBossRebornInfo.Head.Cmd,m_NAtagMCBossRebornInfo.Head.SubCmd))] = m_NAtagMCBossRebornInfo
+
+
+#------------------------------------------------------
# AB 23 摇骰子奖励回包 #tagMCDiceAward
class tagMCDiceAward(Structure):
--
Gitblit v1.8.0