From bf78ded072f95e416e9f272813ec5c5cc7040a50 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 22 十二月 2020 11:35:00 +0800
Subject: [PATCH] 8665 【主干】【后端】移植-成长特惠; (BT单: 8611 【BT】成长必买;)

---
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py |  138 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index cdcc800..c2b51b1 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24231,6 +24231,144 @@
 
 
 #------------------------------------------------------
+# AA 31 成长必买活动信息 #tagMCActGrowupBuyInfo
+
+class  tagMCActGrowupBuyGroup(Structure):
+    BuyCount = 0    #(BYTE BuyCount)// 循环购买礼包数
+    BuyCTGIDList = list()    #(vector<DWORD> BuyCTGIDList)// 循环购买礼包充值ID列表
+    PlayerBuyIndex = 0    #(BYTE PlayerBuyIndex)// 玩家当前可购买的礼包充值ID在列表中索引
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.BuyCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.BuyCount):
+            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+            self.BuyCTGIDList.append(value)
+        self.PlayerBuyIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.BuyCount = 0
+        self.BuyCTGIDList = list()
+        self.PlayerBuyIndex = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 4 * self.BuyCount
+        length += 1
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.BuyCount)
+        for i in range(self.BuyCount):
+            data = CommFunc.WriteDWORD(data, self.BuyCTGIDList[i])
+        data = CommFunc.WriteBYTE(data, self.PlayerBuyIndex)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                BuyCount:%d,
+                                BuyCTGIDList:%s,
+                                PlayerBuyIndex:%d
+                                '''\
+                                %(
+                                self.BuyCount,
+                                "...",
+                                self.PlayerBuyIndex
+                                )
+        return DumpString
+
+
+class  tagMCActGrowupBuyInfo(Structure):
+    Head = tagHead()
+    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
+    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
+    GroupCount = 0    #(BYTE GroupCount)// 循环购买礼包组数
+    GroupList = list()    #(vector<tagMCActGrowupBuyGroup> GroupList)//循环购买礼包组列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xAA
+        self.Head.SubCmd = 0x31
+        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.GroupCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.GroupCount):
+            temGroupList = tagMCActGrowupBuyGroup()
+            _pos = temGroupList.ReadData(_lpData, _pos)
+            self.GroupList.append(temGroupList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xAA
+        self.Head.SubCmd = 0x31
+        self.StartDate = ""
+        self.EndtDate = ""
+        self.GroupCount = 0
+        self.GroupList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 10
+        length += 10
+        length += 1
+        for i in range(self.GroupCount):
+            length += self.GroupList[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.WriteBYTE(data, self.GroupCount)
+        for i in range(self.GroupCount):
+            data = CommFunc.WriteString(data, self.GroupList[i].GetLength(), self.GroupList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                StartDate:%s,
+                                EndtDate:%s,
+                                GroupCount:%d,
+                                GroupList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.StartDate,
+                                self.EndtDate,
+                                self.GroupCount,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagMCActGrowupBuyInfo=tagMCActGrowupBuyInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCActGrowupBuyInfo.Head.Cmd,m_NAtagMCActGrowupBuyInfo.Head.SubCmd))] = m_NAtagMCActGrowupBuyInfo
+
+
+#------------------------------------------------------
 # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
 
 class  tagMCActLoginAwardAction(Structure):

--
Gitblit v1.8.0