From 383717a8ea488971e4f665da9499bb030ba11a69 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 10 六月 2019 19:49:58 +0800
Subject: [PATCH] 7196 【后端】【2.0】冰晶矿脉找回规则

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 1abe51e..82e2247 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -10304,6 +10304,7 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("AlchemyID", c_int),    # 丹药ID
+                  ("AlchemyTimes", c_ushort),    # 丹药次数
                   ("DoType", c_ubyte),    # 0-学习 1-开始炼丹 2-停止炼丹 3-开炉取丹
                   ]
 
@@ -10322,6 +10323,7 @@
         self.Cmd = 0xA5
         self.SubCmd = 0x76
         self.AlchemyID = 0
+        self.AlchemyTimes = 0
         self.DoType = 0
         return
 
@@ -10336,12 +10338,14 @@
                                 Cmd:%s,
                                 SubCmd:%s,
                                 AlchemyID:%d,
+                                AlchemyTimes:%d,
                                 DoType:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
                                 self.AlchemyID,
+                                self.AlchemyTimes,
                                 self.DoType
                                 )
         return DumpString
@@ -11653,6 +11657,83 @@
 
 m_NAtagCMRenameFamily=tagCMRenameFamily()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRenameFamily.Head.Cmd,m_NAtagCMRenameFamily.Head.SubCmd))] = m_NAtagCMRenameFamily
+
+
+#------------------------------------------------------
+# A6 06 家族兑换活跃令 #tagCMFamilyActivityExchange
+
+class  tagCMFamilyActivityExchange(Structure):
+    Head = tagHead()
+    Count = 0    #(BYTE Count)//材料所在背包索引的数量
+    IndexList = list()    #(vector<WORD> IndexList)//材料所在背包索引列表
+    ItemIDList = list()    #(vector<DWORD> ItemIDList)//材料所在背包物品ID列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA6
+        self.Head.SubCmd = 0x06
+        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):
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.IndexList.append(value)
+        for i in range(self.Count):
+            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+            self.ItemIDList.append(value)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA6
+        self.Head.SubCmd = 0x06
+        self.Count = 0
+        self.IndexList = list()
+        self.ItemIDList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 2 * self.Count
+        length += 4 * self.Count
+
+        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.WriteWORD(data, self.IndexList[i])
+        for i in range(self.Count):
+            data = CommFunc.WriteDWORD(data, self.ItemIDList[i])
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                IndexList:%s,
+                                ItemIDList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "...",
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagCMFamilyActivityExchange=tagCMFamilyActivityExchange()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyActivityExchange.Head.Cmd,m_NAtagCMFamilyActivityExchange.Head.SubCmd))] = m_NAtagCMFamilyActivityExchange
 
 
 #------------------------------------------------------
@@ -14514,6 +14595,58 @@
 
 
 #------------------------------------------------------
+# B4 0F 回收私有专属木桩怪 #tagCMRecyclePriWoodPile
+
+class  tagCMRecyclePriWoodPile(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("ObjID", c_int),    
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB4
+        self.SubCmd = 0x0F
+        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 = 0xB4
+        self.SubCmd = 0x0F
+        self.ObjID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMRecyclePriWoodPile)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B4 0F 回收私有专属木桩怪 //tagCMRecyclePriWoodPile:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                ObjID:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.ObjID
+                                )
+        return DumpString
+
+
+m_NAtagCMRecyclePriWoodPile=tagCMRecyclePriWoodPile()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRecyclePriWoodPile.Cmd,m_NAtagCMRecyclePriWoodPile.SubCmd))] = m_NAtagCMRecyclePriWoodPile
+
+
+#------------------------------------------------------
 # B4 0E 玩家掉血 #tagCMRoleLostHP
 
 class  tagCMRoleLostHP(Structure):

--
Gitblit v1.8.0