From 62f26436a4a204a3919ba7fa98319ee72d66a411 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 22 十月 2018 21:11:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 0fbe5fd..80c8e0f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4234,6 +4234,114 @@
 
 
 #------------------------------------------------------
+# A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
+
+class  tagGCStoreServerBuyCnt(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("GoodsID", c_int),    #商品标识
+                  ("BuyCnt", 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.GoodsID = 0
+        self.BuyCnt = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagGCStoreServerBuyCnt)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A9 06 商城全服购买次数通知 //tagGCStoreServerBuyCntInfo:
+                                GoodsID:%d,
+                                BuyCnt:%d
+                                '''\
+                                %(
+                                self.GoodsID,
+                                self.BuyCnt
+                                )
+        return DumpString
+
+
+class  tagGCStoreServerBuyCntInfo(Structure):
+    Head = tagHead()
+    Count = 0    #(WORD Count)//数量
+    InfoList = list()    #(vector<tagGCStoreServerBuyCnt> InfoList)//次数信息
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA9
+        self.Head.SubCmd = 0x06
+        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):
+            temInfoList = tagGCStoreServerBuyCnt()
+            _pos = temInfoList.ReadData(_lpData, _pos)
+            self.InfoList.append(temInfoList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA9
+        self.Head.SubCmd = 0x06
+        self.Count = 0
+        self.InfoList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 2
+        for i in range(self.Count):
+            length += self.InfoList[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.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                InfoList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCStoreServerBuyCntInfo=tagGCStoreServerBuyCntInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCStoreServerBuyCntInfo.Head.Cmd,m_NAtagGCStoreServerBuyCntInfo.Head.SubCmd))] = m_NAtagGCStoreServerBuyCntInfo
+
+
+#------------------------------------------------------
 #A9 21 角色改名结果 #tagUpdatePlayerNameResult
 
 class  tagUpdatePlayerNameResult(Structure):
@@ -20177,6 +20285,420 @@
 
 
 #------------------------------------------------------
+# AA 18 限时抢购活动玩家预约信息 #tagMCFlashSaleAppointmentInfo
+
+class  tagMCFlashSaleAppointmentState(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("GoodsMark", c_int),    # 商品标识
+                  ("State", 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.GoodsMark = 0
+        self.State = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCFlashSaleAppointmentState)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// AA 18 限时抢购活动玩家预约信息 //tagMCFlashSaleAppointmentInfo:
+                                GoodsMark:%d,
+                                State:%d
+                                '''\
+                                %(
+                                self.GoodsMark,
+                                self.State
+                                )
+        return DumpString
+
+
+class  tagMCFlashSaleAppointmentInfo(Structure):
+    Head = tagHead()
+    IsAll = 0    #(BYTE IsAll)// 是否全部
+    GoodsCount = 0    #(WORD GoodsCount)// 商品数
+    GoodsList = list()    #(vector<tagMCFlashSaleAppointmentState> GoodsList)// 预约的商品
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xAA
+        self.Head.SubCmd = 0x18
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.GoodsCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        for i in range(self.GoodsCount):
+            temGoodsList = tagMCFlashSaleAppointmentState()
+            _pos = temGoodsList.ReadData(_lpData, _pos)
+            self.GoodsList.append(temGoodsList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xAA
+        self.Head.SubCmd = 0x18
+        self.IsAll = 0
+        self.GoodsCount = 0
+        self.GoodsList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 2
+        for i in range(self.GoodsCount):
+            length += self.GoodsList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.IsAll)
+        data = CommFunc.WriteWORD(data, self.GoodsCount)
+        for i in range(self.GoodsCount):
+            data = CommFunc.WriteString(data, self.GoodsList[i].GetLength(), self.GoodsList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                IsAll:%d,
+                                GoodsCount:%d,
+                                GoodsList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.IsAll,
+                                self.GoodsCount,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagMCFlashSaleAppointmentInfo=tagMCFlashSaleAppointmentInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFlashSaleAppointmentInfo.Head.Cmd,m_NAtagMCFlashSaleAppointmentInfo.Head.SubCmd))] = m_NAtagMCFlashSaleAppointmentInfo
+
+
+#------------------------------------------------------
+# AA 17 限时抢购活动信息 #tagMCFlashSaleInfo
+
+class  tagMCFlashSaleGiftbag(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("GiftID", c_int),    #商城表的物品ID
+                  ("BuyCountLimit", c_ubyte),    #限购数
+                  ("ServerBuyCountLimit", c_ushort),    #全服限购数
+                  ("MoneyType", c_ubyte),    #消耗货币类型
+                  ("MoneyNumber", c_int),    #消耗货币数量
+                  ("MoneyOriginal", c_int),    #原价
+                  ("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.GiftID = 0
+        self.BuyCountLimit = 0
+        self.ServerBuyCountLimit = 0
+        self.MoneyType = 0
+        self.MoneyNumber = 0
+        self.MoneyOriginal = 0
+        self.ItemID = 0
+        self.ItemCount = 0
+        self.IsBind = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCFlashSaleGiftbag)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// AA 17 限时抢购活动信息 //tagMCFlashSaleInfo:
+                                GiftID:%d,
+                                BuyCountLimit:%d,
+                                ServerBuyCountLimit:%d,
+                                MoneyType:%d,
+                                MoneyNumber:%d,
+                                MoneyOriginal:%d,
+                                ItemID:%d,
+                                ItemCount:%d,
+                                IsBind:%d
+                                '''\
+                                %(
+                                self.GiftID,
+                                self.BuyCountLimit,
+                                self.ServerBuyCountLimit,
+                                self.MoneyType,
+                                self.MoneyNumber,
+                                self.MoneyOriginal,
+                                self.ItemID,
+                                self.ItemCount,
+                                self.IsBind
+                                )
+        return DumpString
+
+
+class  tagMCFlashSaleShop(Structure):
+    DayIndex = 0    #(BYTE DayIndex)// 活动第几天
+    TimeIndex = 0    #(BYTE TimeIndex)// 第几个时间段
+    GiftbagCount = 0    #(BYTE GiftbagCount)// 商店礼包数
+    GiftbagInfo = list()    #(vector<tagMCFlashSaleGiftbag> GiftbagInfo)// 礼包信息
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.DayIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.TimeIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.GiftbagCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.GiftbagCount):
+            temGiftbagInfo = tagMCFlashSaleGiftbag()
+            _pos = temGiftbagInfo.ReadData(_lpData, _pos)
+            self.GiftbagInfo.append(temGiftbagInfo)
+        return _pos
+
+    def Clear(self):
+        self.DayIndex = 0
+        self.TimeIndex = 0
+        self.GiftbagCount = 0
+        self.GiftbagInfo = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        length += 1
+        for i in range(self.GiftbagCount):
+            length += self.GiftbagInfo[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.DayIndex)
+        data = CommFunc.WriteBYTE(data, self.TimeIndex)
+        data = CommFunc.WriteBYTE(data, self.GiftbagCount)
+        for i in range(self.GiftbagCount):
+            data = CommFunc.WriteString(data, self.GiftbagInfo[i].GetLength(), self.GiftbagInfo[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                DayIndex:%d,
+                                TimeIndex:%d,
+                                GiftbagCount:%d,
+                                GiftbagInfo:%s
+                                '''\
+                                %(
+                                self.DayIndex,
+                                self.TimeIndex,
+                                self.GiftbagCount,
+                                "..."
+                                )
+        return DumpString
+
+
+class  tagMCFlashSaleTime(Structure):
+    StartTime = ""    #(char StartTime[5])// 开始时间 H:M
+    EndtTime = ""    #(char EndtTime[5])// 结束时间 H:M
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.StartTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
+        self.EndtTime,_pos = CommFunc.ReadString(_lpData, _pos,5)
+        return _pos
+
+    def Clear(self):
+        self.StartTime = ""
+        self.EndtTime = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 5
+        length += 5
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, 5, self.StartTime)
+        data = CommFunc.WriteString(data, 5, self.EndtTime)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                StartTime:%s,
+                                EndtTime:%s
+                                '''\
+                                %(
+                                self.StartTime,
+                                self.EndtTime
+                                )
+        return DumpString
+
+
+class  tagMCFlashSaleInfo(Structure):
+    Head = tagHead()
+    StartDate = ""    #(char StartDate[10])// 开始日期 y-m-d
+    EndtDate = ""    #(char EndtDate[10])// 结束日期 y-m-d
+    AdvanceMinutes = 0    #(WORD AdvanceMinutes)// 提前显示分钟
+    ActivityTimeCount = 0    #(BYTE ActivityTimeCount)
+    ActivityTime = list()    #(vector<tagMCFlashSaleTime> ActivityTime)//活动时间
+    IsDayReset = 0    #(BYTE IsDayReset)//是否每天重置
+    LimitLV = 0    #(WORD LimitLV)// 限制等级
+    ShopCount = 0    #(BYTE ShopCount)// 商店数
+    ShopInfo = list()    #(vector<tagMCFlashSaleShop> ShopInfo)// 商店信息, 当有多个商店且有多个活动时间段时则每个时间段对应一个商店;
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xAA
+        self.Head.SubCmd = 0x17
+        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.ActivityTimeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.ActivityTimeCount):
+            temActivityTime = tagMCFlashSaleTime()
+            _pos = temActivityTime.ReadData(_lpData, _pos)
+            self.ActivityTime.append(temActivityTime)
+        self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.ShopCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.ShopCount):
+            temShopInfo = tagMCFlashSaleShop()
+            _pos = temShopInfo.ReadData(_lpData, _pos)
+            self.ShopInfo.append(temShopInfo)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xAA
+        self.Head.SubCmd = 0x17
+        self.StartDate = ""
+        self.EndtDate = ""
+        self.AdvanceMinutes = 0
+        self.ActivityTimeCount = 0
+        self.ActivityTime = list()
+        self.IsDayReset = 0
+        self.LimitLV = 0
+        self.ShopCount = 0
+        self.ShopInfo = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 10
+        length += 10
+        length += 2
+        length += 1
+        for i in range(self.ActivityTimeCount):
+            length += self.ActivityTime[i].GetLength()
+        length += 1
+        length += 2
+        length += 1
+        for i in range(self.ShopCount):
+            length += self.ShopInfo[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.ActivityTimeCount)
+        for i in range(self.ActivityTimeCount):
+            data = CommFunc.WriteString(data, self.ActivityTime[i].GetLength(), self.ActivityTime[i].GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.IsDayReset)
+        data = CommFunc.WriteWORD(data, self.LimitLV)
+        data = CommFunc.WriteBYTE(data, self.ShopCount)
+        for i in range(self.ShopCount):
+            data = CommFunc.WriteString(data, self.ShopInfo[i].GetLength(), self.ShopInfo[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                StartDate:%s,
+                                EndtDate:%s,
+                                AdvanceMinutes:%d,
+                                ActivityTimeCount:%d,
+                                ActivityTime:%s,
+                                IsDayReset:%d,
+                                LimitLV:%d,
+                                ShopCount:%d,
+                                ShopInfo:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.StartDate,
+                                self.EndtDate,
+                                self.AdvanceMinutes,
+                                self.ActivityTimeCount,
+                                "...",
+                                self.IsDayReset,
+                                self.LimitLV,
+                                self.ShopCount,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagMCFlashSaleInfo=tagMCFlashSaleInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFlashSaleInfo.Head.Cmd,m_NAtagMCFlashSaleInfo.Head.SubCmd))] = m_NAtagMCFlashSaleInfo
+
+
+#------------------------------------------------------
 # AA 05 充值排行特惠信息 #tagMCRechargeRankTeHuiInfo
 
 class  tagMCRechargeRankTeHuiInfo(Structure):

--
Gitblit v1.8.0