From 8e1a8e9db62b3409e6e0dcc244f1285547cae587 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 29 六月 2023 16:35:35 +0800
Subject: [PATCH] 9790 9762 【BT9】【后端】藏宝阁修改(增加领取物品奖励特殊效果)

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index f4e1af6..b8a04cc 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -20857,6 +20857,118 @@
 
 
 #------------------------------------------------------
+# 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 28 历史累积充值奖励领取记录 #tagMCHistoryReChargeAwardRecord
 
 class  tagMCHistoryReChargeAwardRecord(Structure):

--
Gitblit v1.8.0