From 33afb14fa1def4e211793532bbeb463f9a0deaf8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 11 二月 2026 20:05:46 +0800
Subject: [PATCH] 16 卡牌服务端(删除旧的七天登录、活动登录、节日登录、节日祝福、等级奖励;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py |  239 ++++++++++++++++++-----------------------------------------
 1 files changed, 75 insertions(+), 164 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 040afff..b820f08 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -677,6 +677,77 @@
 
 
 #------------------------------------------------------
+# A1 31 前端自定义保存设置内容 #tagCSSettingData
+
+class  tagCSSettingData(Structure):
+    Head = tagHead()
+    KeyNum = 0    #(BYTE KeyNum)// 自定义key编号,后端使用数字key存储,前端自行进行转换定义,限制100个
+    DataLen = 0    #(BYTE DataLen)
+    SetData = ""    #(String SetData)//自定义保存的内容
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA1
+        self.Head.SubCmd = 0x31
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.KeyNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.DataLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.SetData,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA1
+        self.Head.SubCmd = 0x31
+        self.KeyNum = 0
+        self.DataLen = 0
+        self.SetData = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 1
+        length += len(self.SetData)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.KeyNum)
+        data = CommFunc.WriteBYTE(data, self.DataLen)
+        data = CommFunc.WriteString(data, self.DataLen, self.SetData)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                KeyNum:%d,
+                                DataLen:%d,
+                                SetData:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.KeyNum,
+                                self.DataLen,
+                                self.SetData
+                                )
+        return DumpString
+
+
+m_NAtagCSSettingData=tagCSSettingData()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSSettingData.Head.Cmd,m_NAtagCSSettingData.Head.SubCmd))] = m_NAtagCSSettingData
+
+
+#------------------------------------------------------
 #A1 03 设置是否成年 #tagCMAdult
 
 class  tagCMAdult(Structure):
@@ -7573,7 +7644,7 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("FamilyID", c_int),    
-                  ("ServerID", c_int),    #公会服务器ID,发0默认本服公会
+                  ("DataServerID", c_int),    #数据所在服务器ID
                   ]
 
     def __init__(self):
@@ -7591,7 +7662,7 @@
         self.Cmd = 0xA6
         self.SubCmd = 0x19
         self.FamilyID = 0
-        self.ServerID = 0
+        self.DataServerID = 0
         return
 
     def GetLength(self):
@@ -7605,13 +7676,13 @@
                                 Cmd:%s,
                                 SubCmd:%s,
                                 FamilyID:%d,
-                                ServerID:%d
+                                DataServerID:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.FamilyID,
-                                self.ServerID
+                                self.DataServerID
                                 )
         return DumpString
 
@@ -9374,114 +9445,6 @@
 
 
 #------------------------------------------------------
-# AA 10 节日祝福瓶选择奖励物品 #tagCMFeastWishBottleChooseItem
-
-class  tagCMFeastWishBottleChooseItem(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("BottleNum", c_ubyte),    #瓶子编号
-                  ("RecordIndex", c_ubyte),    #物品索引,用于选择及记录是否已选择
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xAA
-        self.SubCmd = 0x10
-        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 = 0xAA
-        self.SubCmd = 0x10
-        self.BottleNum = 0
-        self.RecordIndex = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCMFeastWishBottleChooseItem)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// AA 10 节日祝福瓶选择奖励物品 //tagCMFeastWishBottleChooseItem:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                BottleNum:%d,
-                                RecordIndex:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.BottleNum,
-                                self.RecordIndex
-                                )
-        return DumpString
-
-
-m_NAtagCMFeastWishBottleChooseItem=tagCMFeastWishBottleChooseItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishBottleChooseItem.Cmd,m_NAtagCMFeastWishBottleChooseItem.SubCmd))] = m_NAtagCMFeastWishBottleChooseItem
-
-
-#------------------------------------------------------
-# AA 11 节日祝福池祝福 #tagCMFeastWishPoolWish
-
-class  tagCMFeastWishPoolWish(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("WishCount", c_ubyte),    #祝福次数
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xAA
-        self.SubCmd = 0x11
-        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 = 0xAA
-        self.SubCmd = 0x11
-        self.WishCount = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCMFeastWishPoolWish)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// AA 11 节日祝福池祝福 //tagCMFeastWishPoolWish:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                WishCount:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.WishCount
-                                )
-        return DumpString
-
-
-m_NAtagCMFeastWishPoolWish=tagCMFeastWishPoolWish()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishPoolWish.Cmd,m_NAtagCMFeastWishPoolWish.SubCmd))] = m_NAtagCMFeastWishPoolWish
-
-
-#------------------------------------------------------
 # AA 05 限时抢购预约 #tagCMFlashSaleAppointment
 
 class  tagCMFlashSaleAppointment(Structure):
@@ -9539,58 +9502,6 @@
 
 m_NAtagCMFlashSaleAppointment=tagCMFlashSaleAppointment()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFlashSaleAppointment.Cmd,m_NAtagCMFlashSaleAppointment.SubCmd))] = m_NAtagCMFlashSaleAppointment
-
-
-#------------------------------------------------------
-#AA 01 领取累计登陆礼 # tagCMGetTotalLoginDayAward
-
-class  tagCMGetTotalLoginDayAward(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("Index", c_ubyte),    # 领取礼物
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xAA
-        self.SubCmd = 0x01
-        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 = 0xAA
-        self.SubCmd = 0x01
-        self.Index = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCMGetTotalLoginDayAward)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''//AA 01 领取累计登陆礼 // tagCMGetTotalLoginDayAward:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                Index:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.Index
-                                )
-        return DumpString
-
-
-m_NAtagCMGetTotalLoginDayAward=tagCMGetTotalLoginDayAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetTotalLoginDayAward.Cmd,m_NAtagCMGetTotalLoginDayAward.SubCmd))] = m_NAtagCMGetTotalLoginDayAward
 
 
 #------------------------------------------------------

--
Gitblit v1.8.0