From 13fb4e5ff1721817d3eb0dd18b2cb6287d4be3bc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 09 七月 2024 15:33:27 +0800
Subject: [PATCH] 10205 【越南】【主干】【港台】【砍树】自选礼包

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |   63 ++++++-------------------------
 1 files changed, 13 insertions(+), 50 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index a78b626..e0b309b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -17413,6 +17413,7 @@
                   ("TotalPayCount", c_int),    # 累计总购买次数
                   ("WeekPayCount", c_ushort),    # 周总购买次数
                   ("MonthPayCount", c_ushort),    # 月总购买次数
+                  ("SelectItemValue", c_int),    # 自选物品索引值,每两位存储每个自选索引对应选择的物品索引+1,存储位值为0代表未选择,最多支持选择4种物品
                   ]
 
     def __init__(self):
@@ -17430,6 +17431,7 @@
         self.TotalPayCount = 0
         self.WeekPayCount = 0
         self.MonthPayCount = 0
+        self.SelectItemValue = 0
         return
 
     def GetLength(self):
@@ -17444,14 +17446,16 @@
                                 TodayPayCount:%d,
                                 TotalPayCount:%d,
                                 WeekPayCount:%d,
-                                MonthPayCount:%d
+                                MonthPayCount:%d,
+                                SelectItemValue:%d
                                 '''\
                                 %(
                                 self.RecordID,
                                 self.TodayPayCount,
                                 self.TotalPayCount,
                                 self.WeekPayCount,
-                                self.MonthPayCount
+                                self.MonthPayCount,
+                                self.SelectItemValue
                                 )
         return DumpString
 
@@ -32271,45 +32275,6 @@
         return DumpString
 
 
-class  tagMCActBuyCountCTGID(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("CTGID", c_ushort),    # 充值表ID
-                  ("Discount", 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.CTGID = 0
-        self.Discount = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCActBuyCountCTGID)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// AA 74 购买次数礼包活动信息 //tagMCActBuyCountGiftInfo:
-                                CTGID:%d,
-                                Discount:%d
-                                '''\
-                                %(
-                                self.CTGID,
-                                self.Discount
-                                )
-        return DumpString
-
-
 class  tagMCActBuyCountGiftInfo(Structure):
     Head = tagHead()
     ActNum = 0    #(BYTE ActNum)// 活动编号
@@ -32319,7 +32284,7 @@
     ResetType = 0    #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置
     LimitLV = 0    #(WORD LimitLV)// 限制等级
     CTGIDCount = 0    #(BYTE CTGIDCount)
-    CTGIDInfoList = list()    #(vector<tagMCActBuyCountCTGID> CTGIDInfoList)// CTGID信息列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
+    CTGIDList = list()    #(vector<WORD> CTGIDList)// CTGID列表;总购买次数前端自己统计,直接取CTGID对应的累计购买次数累加
     GiftCount = 0    #(BYTE GiftCount)
     BuyCountGiftList = list()    #(vector<tagMCActBuyCountGift> BuyCountGiftList)// 购买次数礼包列表
     data = None
@@ -32341,9 +32306,8 @@
         self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.CTGIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.CTGIDCount):
-            temCTGIDInfoList = tagMCActBuyCountCTGID()
-            _pos = temCTGIDInfoList.ReadData(_lpData, _pos)
-            self.CTGIDInfoList.append(temCTGIDInfoList)
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.CTGIDList.append(value)
         self.GiftCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.GiftCount):
             temBuyCountGiftList = tagMCActBuyCountGift()
@@ -32363,7 +32327,7 @@
         self.ResetType = 0
         self.LimitLV = 0
         self.CTGIDCount = 0
-        self.CTGIDInfoList = list()
+        self.CTGIDList = list()
         self.GiftCount = 0
         self.BuyCountGiftList = list()
         return
@@ -32378,8 +32342,7 @@
         length += 1
         length += 2
         length += 1
-        for i in range(self.CTGIDCount):
-            length += self.CTGIDInfoList[i].GetLength()
+        length += 2 * self.CTGIDCount
         length += 1
         for i in range(self.GiftCount):
             length += self.BuyCountGiftList[i].GetLength()
@@ -32397,7 +32360,7 @@
         data = CommFunc.WriteWORD(data, self.LimitLV)
         data = CommFunc.WriteBYTE(data, self.CTGIDCount)
         for i in range(self.CTGIDCount):
-            data = CommFunc.WriteString(data, self.CTGIDInfoList[i].GetLength(), self.CTGIDInfoList[i].GetBuffer())
+            data = CommFunc.WriteWORD(data, self.CTGIDList[i])
         data = CommFunc.WriteBYTE(data, self.GiftCount)
         for i in range(self.GiftCount):
             data = CommFunc.WriteString(data, self.BuyCountGiftList[i].GetLength(), self.BuyCountGiftList[i].GetBuffer())
@@ -32413,7 +32376,7 @@
                                 ResetType:%d,
                                 LimitLV:%d,
                                 CTGIDCount:%d,
-                                CTGIDInfoList:%s,
+                                CTGIDList:%s,
                                 GiftCount:%d,
                                 BuyCountGiftList:%s
                                 '''\

--
Gitblit v1.8.0