From 1e03fac0bcbd9c57ae5da827cb1ea3294c606781 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 22 九月 2023 13:22:07 +0800
Subject: [PATCH] 9936 【BT0.1】【主干】人族法宝(任务 进度)给予奖励

---
 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 e58e723..d99cced 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -18635,6 +18635,118 @@
 
 
 #------------------------------------------------------
+# A3 CC 自定义奖励信息 #tagMCCustomAwardInfo
+
+class  tagMCCustomAwardState(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("KeyNum", c_ubyte),    # 奖励记录key编号,0~255,每个key存31个ID记录  0-30为编号0, 31-61为编号1..
+                  ("CanGetState", c_int),    # 是否可领取;按位记录是否可领取
+                  ("GetState", 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.KeyNum = 0
+        self.CanGetState = 0
+        self.GetState = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCCustomAwardState)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A3 CC 自定义奖励信息 //tagMCCustomAwardInfo:
+                                KeyNum:%d,
+                                CanGetState:%d,
+                                GetState:%d
+                                '''\
+                                %(
+                                self.KeyNum,
+                                self.CanGetState,
+                                self.GetState
+                                )
+        return DumpString
+
+
+class  tagMCCustomAwardInfo(Structure):
+    Head = tagHead()
+    RecordStateCnt = 0    #(BYTE RecordStateCnt)// 记录个数
+    RecordStateList = list()    #(vector<tagMCCustomAwardState> RecordStateList)// 记录列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA3
+        self.Head.SubCmd = 0xCC
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.RecordStateCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.RecordStateCnt):
+            temRecordStateList = tagMCCustomAwardState()
+            _pos = temRecordStateList.ReadData(_lpData, _pos)
+            self.RecordStateList.append(temRecordStateList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA3
+        self.Head.SubCmd = 0xCC
+        self.RecordStateCnt = 0
+        self.RecordStateList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.RecordStateCnt):
+            length += self.RecordStateList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.RecordStateCnt)
+        for i in range(self.RecordStateCnt):
+            data = CommFunc.WriteString(data, self.RecordStateList[i].GetLength(), self.RecordStateList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                RecordStateCnt:%d,
+                                RecordStateList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.RecordStateCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagMCCustomAwardInfo=tagMCCustomAwardInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCustomAwardInfo.Head.Cmd,m_NAtagMCCustomAwardInfo.Head.SubCmd))] = m_NAtagMCCustomAwardInfo
+
+
+#------------------------------------------------------
 # A3 15 日常活动次数通知 #tagMCDailyActionCnt
 
 class  tagMCDailyActionInfo(Structure):

--
Gitblit v1.8.0