From 320a417a53a57a9cb7d7759f430afe5f6e6399a6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 29 一月 2019 16:28:30 +0800
Subject: [PATCH] 6087 【后端】【1.5.200】春节红包雨活动(额度特效增加红包类型参数)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  213 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 209 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 1c222e0..a4a0e09 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -4715,6 +4715,151 @@
 
 
 #------------------------------------------------------
+# AC 11 节日红包活动信息 #tagGCFeastRedPacketInfo
+
+class  tagGCFeastRedPacketDay(Structure):
+    RedPacketCount = 0    #(BYTE RedPacketCount)
+    RedPacketIDList = list()    #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包表ID列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.RedPacketCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.RedPacketCount):
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.RedPacketIDList.append(value)
+        return _pos
+
+    def Clear(self):
+        self.RedPacketCount = 0
+        self.RedPacketIDList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 2 * self.RedPacketCount
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.RedPacketCount)
+        for i in range(self.RedPacketCount):
+            data = CommFunc.WriteWORD(data, self.RedPacketIDList[i])
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                RedPacketCount:%d,
+                                RedPacketIDList:%s
+                                '''\
+                                %(
+                                self.RedPacketCount,
+                                "..."
+                                )
+        return DumpString
+
+
+class  tagGCFeastRedPacketInfo(Structure):
+    Head = tagHead()
+    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
+    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
+    LimitLV = 0    #(WORD LimitLV)// 限制等级
+    ResetType = 0    #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置
+    RedPacketDays = 0    #(BYTE RedPacketDays)
+    RedPacketDayList = list()    #(vector<tagGCFeastRedPacketDay> RedPacketDayList)// 每日系统红包信息
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xAC
+        self.Head.SubCmd = 0x11
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+        self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10)
+        self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.RedPacketDays,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.RedPacketDays):
+            temRedPacketDayList = tagGCFeastRedPacketDay()
+            _pos = temRedPacketDayList.ReadData(_lpData, _pos)
+            self.RedPacketDayList.append(temRedPacketDayList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xAC
+        self.Head.SubCmd = 0x11
+        self.StartDate = ""
+        self.EndtDate = ""
+        self.LimitLV = 0
+        self.ResetType = 0
+        self.RedPacketDays = 0
+        self.RedPacketDayList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 10
+        length += 10
+        length += 2
+        length += 1
+        length += 1
+        for i in range(self.RedPacketDays):
+            length += self.RedPacketDayList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteString(data, 10, self.StartDate)
+        data = CommFunc.WriteString(data, 10, self.EndtDate)
+        data = CommFunc.WriteWORD(data, self.LimitLV)
+        data = CommFunc.WriteBYTE(data, self.ResetType)
+        data = CommFunc.WriteBYTE(data, self.RedPacketDays)
+        for i in range(self.RedPacketDays):
+            data = CommFunc.WriteString(data, self.RedPacketDayList[i].GetLength(), self.RedPacketDayList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                StartDate:%s,
+                                EndtDate:%s,
+                                LimitLV:%d,
+                                ResetType:%d,
+                                RedPacketDays:%d,
+                                RedPacketDayList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.StartDate,
+                                self.EndtDate,
+                                self.LimitLV,
+                                self.ResetType,
+                                self.RedPacketDays,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCFeastRedPacketInfo=tagGCFeastRedPacketInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFeastRedPacketInfo.Head.Cmd,m_NAtagGCFeastRedPacketInfo.Head.SubCmd))] = m_NAtagGCFeastRedPacketInfo
+
+
+#------------------------------------------------------
 # AC 02 通知仙魔之争信息 #tagGCXMZZInfo
 
 class  tagGCXMZZInfo(Structure):
@@ -22587,7 +22732,7 @@
 class  tagMCFeastWeekPartyPlayerInfo(Structure):
     Head = tagHead()
     Count = 0    #(BYTE Count)
-    DayInfoList = list()    #(vector<tagMCWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息
+    DayInfoList = list()    #(vector<tagMCFeastWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息
     data = None
 
     def __init__(self):
@@ -22601,7 +22746,7 @@
         _pos = self.Head.ReadData(_lpData, _pos)
         self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.Count):
-            temDayInfoList = tagMCWeekPartyDayPlayerInfo()
+            temDayInfoList = tagMCFeastWeekPartyDayPlayerInfo()
             _pos = temDayInfoList.ReadData(_lpData, _pos)
             self.DayInfoList.append(temDayInfoList)
         return _pos
@@ -25761,6 +25906,62 @@
 
 
 #------------------------------------------------------
+# AB 25 节日红包信息 #tagMCFeastRedPackInfo
+
+class  tagMCFeastRedPackInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("MoneyNum", c_int),    # 累积抢到多少钱
+                  ("GrabCnt", c_ushort),    # 已抢红包次数
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xAB
+        self.SubCmd = 0x25
+        return
+
+    def ReadData(self, stringData, _pos=0, _len=0):
+        self.Clear()
+        memmove(addressof(self), stringData[_pos:], self.GetLength())
+        return _pos + self.GetLength()
+
+    def Clear(self):
+        self.Cmd = 0xAB
+        self.SubCmd = 0x25
+        self.MoneyNum = 0
+        self.GrabCnt = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCFeastRedPackInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// AB 25 节日红包信息 //tagMCFeastRedPackInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                MoneyNum:%d,
+                                GrabCnt:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.MoneyNum,
+                                self.GrabCnt
+                                )
+        return DumpString
+
+
+m_NAtagMCFeastRedPackInfo=tagMCFeastRedPackInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastRedPackInfo.Cmd,m_NAtagMCFeastRedPackInfo.SubCmd))] = m_NAtagMCFeastRedPackInfo
+
+
+#------------------------------------------------------
 # AB 17 开服活动奖励状态 #tagMCOpenServerCampaignAwardList
 
 class  tagMCOpenServerCampaignAward(Structure):
@@ -28304,6 +28505,7 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("Floor", c_int),    # 已通关层
+                  ("LastFloor", c_int),    # 上次挑战层
                   ]
 
     def __init__(self):
@@ -28321,6 +28523,7 @@
         self.Cmd = 0xB2
         self.SubCmd = 0x13
         self.Floor = 0
+        self.LastFloor = 0
         return
 
     def GetLength(self):
@@ -28333,12 +28536,14 @@
         DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                Floor:%d
+                                Floor:%d,
+                                LastFloor:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.Floor
+                                self.Floor,
+                                self.LastFloor
                                 )
         return DumpString
 

--
Gitblit v1.8.0