From 3f862208516829ee806168cbb633bc9221f0cf6a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 11 十月 2025 20:30:10 +0800
Subject: [PATCH] 271 【内政】古宝系统-服务端

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  236 ++--------------------------------------------------------
 1 files changed, 10 insertions(+), 226 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 02d7e2a..a17f6a5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -6016,6 +6016,7 @@
                   ("GubaoID", c_ushort),    
                   ("GubaoStar", c_ubyte),    
                   ("GubaoLV", c_ubyte),    
+                  ("EffLayer", c_ubyte),    # 该特殊效果累加层值
                   ]
 
     def __init__(self):
@@ -6031,6 +6032,7 @@
         self.GubaoID = 0
         self.GubaoStar = 0
         self.GubaoLV = 0
+        self.EffLayer = 0
         return
 
     def GetLength(self):
@@ -6043,19 +6045,21 @@
         DumpString = '''// A3 C7 古宝信息 //tagMCGubaoInfo:
                                 GubaoID:%d,
                                 GubaoStar:%d,
-                                GubaoLV:%d
+                                GubaoLV:%d,
+                                EffLayer:%d
                                 '''\
                                 %(
                                 self.GubaoID,
                                 self.GubaoStar,
-                                self.GubaoLV
+                                self.GubaoLV,
+                                self.EffLayer
                                 )
         return DumpString
 
 
 class  tagMCGubaoInfo(Structure):
     Head = tagHead()
-    Count = 0    #(BYTE Count)
+    Count = 0    #(WORD Count)
     GubaoInfoList = list()    #(vector<tagMCGubao> GubaoInfoList)
     data = None
 
@@ -6068,7 +6072,7 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
-        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
         for i in range(self.Count):
             temGubaoInfoList = tagMCGubao()
             _pos = temGubaoInfoList.ReadData(_lpData, _pos)
@@ -6087,7 +6091,7 @@
     def GetLength(self):
         length = 0
         length += self.Head.GetLength()
-        length += 1
+        length += 2
         for i in range(self.Count):
             length += self.GubaoInfoList[i].GetLength()
 
@@ -6096,7 +6100,7 @@
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.Count)
+        data = CommFunc.WriteWORD(data, self.Count)
         for i in range(self.Count):
             data = CommFunc.WriteString(data, self.GubaoInfoList[i].GetLength(), self.GubaoInfoList[i].GetBuffer())
         return data
@@ -6117,226 +6121,6 @@
 
 m_NAtagMCGubaoInfo=tagMCGubaoInfo()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoInfo.Head.Cmd,m_NAtagMCGubaoInfo.Head.SubCmd))] = m_NAtagMCGubaoInfo
-
-
-#------------------------------------------------------
-# A3 CA 古宝物品特殊效果信息 #tagMCGubaoItemEffInfo
-
-class  tagMCGubaoItemEff(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("GubaoID", c_ushort),    
-                  ("EffType", c_ubyte),    # 不同古宝ID允许拥有相同效果类型,进度值每个古宝ID单独统计
-                  ("EffValue", 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.GubaoID = 0
-        self.EffType = 0
-        self.EffValue = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCGubaoItemEff)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A3 CA 古宝物品特殊效果信息 //tagMCGubaoItemEffInfo:
-                                GubaoID:%d,
-                                EffType:%d,
-                                EffValue:%d
-                                '''\
-                                %(
-                                self.GubaoID,
-                                self.EffType,
-                                self.EffValue
-                                )
-        return DumpString
-
-
-class  tagMCGubaoItemEffInfo(Structure):
-    Head = tagHead()
-    Count = 0    #(WORD Count)
-    ItemEffInfoList = list()    #(vector<tagMCGubaoItemEff> ItemEffInfoList)
-    data = None
-
-    def __init__(self):
-        self.Clear()
-        self.Head.Cmd = 0xA3
-        self.Head.SubCmd = 0xCA
-        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):
-            temItemEffInfoList = tagMCGubaoItemEff()
-            _pos = temItemEffInfoList.ReadData(_lpData, _pos)
-            self.ItemEffInfoList.append(temItemEffInfoList)
-        return _pos
-
-    def Clear(self):
-        self.Head = tagHead()
-        self.Head.Clear()
-        self.Head.Cmd = 0xA3
-        self.Head.SubCmd = 0xCA
-        self.Count = 0
-        self.ItemEffInfoList = list()
-        return
-
-    def GetLength(self):
-        length = 0
-        length += self.Head.GetLength()
-        length += 2
-        for i in range(self.Count):
-            length += self.ItemEffInfoList[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.ItemEffInfoList[i].GetLength(), self.ItemEffInfoList[i].GetBuffer())
-        return data
-
-    def OutputString(self):
-        DumpString = '''
-                                Head:%s,
-                                Count:%d,
-                                ItemEffInfoList:%s
-                                '''\
-                                %(
-                                self.Head.OutputString(),
-                                self.Count,
-                                "..."
-                                )
-        return DumpString
-
-
-m_NAtagMCGubaoItemEffInfo=tagMCGubaoItemEffInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoItemEffInfo.Head.Cmd,m_NAtagMCGubaoItemEffInfo.Head.SubCmd))] = m_NAtagMCGubaoItemEffInfo
-
-
-#------------------------------------------------------
-# A3 CB 古宝碎片信息 #tagMCGubaoPieceInfo
-
-class  tagMCGubaoPiece(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("GubaoID", c_ushort),    
-                  ("PieceCount", 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.GubaoID = 0
-        self.PieceCount = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagMCGubaoPiece)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A3 CB 古宝碎片信息 //tagMCGubaoPieceInfo:
-                                GubaoID:%d,
-                                PieceCount:%d
-                                '''\
-                                %(
-                                self.GubaoID,
-                                self.PieceCount
-                                )
-        return DumpString
-
-
-class  tagMCGubaoPieceInfo(Structure):
-    Head = tagHead()
-    Count = 0    #(BYTE Count)
-    PieceInfoList = list()    #(vector<tagMCGubaoPiece> PieceInfoList)
-    data = None
-
-    def __init__(self):
-        self.Clear()
-        self.Head.Cmd = 0xA3
-        self.Head.SubCmd = 0xCB
-        return
-
-    def ReadData(self, _lpData, _pos=0, _Len=0):
-        self.Clear()
-        _pos = self.Head.ReadData(_lpData, _pos)
-        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        for i in range(self.Count):
-            temPieceInfoList = tagMCGubaoPiece()
-            _pos = temPieceInfoList.ReadData(_lpData, _pos)
-            self.PieceInfoList.append(temPieceInfoList)
-        return _pos
-
-    def Clear(self):
-        self.Head = tagHead()
-        self.Head.Clear()
-        self.Head.Cmd = 0xA3
-        self.Head.SubCmd = 0xCB
-        self.Count = 0
-        self.PieceInfoList = list()
-        return
-
-    def GetLength(self):
-        length = 0
-        length += self.Head.GetLength()
-        length += 1
-        for i in range(self.Count):
-            length += self.PieceInfoList[i].GetLength()
-
-        return length
-
-    def GetBuffer(self):
-        data = ''
-        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.Count)
-        for i in range(self.Count):
-            data = CommFunc.WriteString(data, self.PieceInfoList[i].GetLength(), self.PieceInfoList[i].GetBuffer())
-        return data
-
-    def OutputString(self):
-        DumpString = '''
-                                Head:%s,
-                                Count:%d,
-                                PieceInfoList:%s
-                                '''\
-                                %(
-                                self.Head.OutputString(),
-                                self.Count,
-                                "..."
-                                )
-        return DumpString
-
-
-m_NAtagMCGubaoPieceInfo=tagMCGubaoPieceInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoPieceInfo.Head.Cmd,m_NAtagMCGubaoPieceInfo.Head.SubCmd))] = m_NAtagMCGubaoPieceInfo
 
 
 #------------------------------------------------------

--
Gitblit v1.8.0