From 32e3c66bc7738107e53208edc4efe644f0aee229 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 18 十二月 2018 21:03:44 +0800
Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(封包、表格)

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 358af9c..bded447 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -8825,6 +8825,220 @@
 
 
 #------------------------------------------------------
+# A5 1C 聚魂合成 #tagCMGatherSoulCompound
+
+class  tagCMGatherSoulCompound(Structure):
+    Head = tagHead()
+    Cnt = 0    #(BYTE Cnt)
+    PackList = list()    #(vector<BYTE> PackList)//所在位置 0-背包 1-孔
+    IndexList = list()    #(vector<WORD> IndexList)//物品索引
+    TagItemID = 0    #(DWORD TagItemID)//合成目标物品ID
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x1C
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.Cnt):
+            value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
+            self.PackList.append(value)
+        for i in range(self.Cnt):
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.IndexList.append(value)
+        self.TagItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x1C
+        self.Cnt = 0
+        self.PackList = list()
+        self.IndexList = list()
+        self.TagItemID = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 1 * self.Cnt
+        length += 2 * self.Cnt
+        length += 4
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.Cnt)
+        for i in range(self.Cnt):
+            data = CommFunc.WriteBYTE(data, self.PackList[i])
+        for i in range(self.Cnt):
+            data = CommFunc.WriteWORD(data, self.IndexList[i])
+        data = CommFunc.WriteDWORD(data, self.TagItemID)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Cnt:%d,
+                                PackList:%s,
+                                IndexList:%s,
+                                TagItemID:%d
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Cnt,
+                                "...",
+                                "...",
+                                self.TagItemID
+                                )
+        return DumpString
+
+
+m_NAtagCMGatherSoulCompound=tagCMGatherSoulCompound()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulCompound.Head.Cmd,m_NAtagCMGatherSoulCompound.Head.SubCmd))] = m_NAtagCMGatherSoulCompound
+
+
+#------------------------------------------------------
+# A5 19 聚魂分解 #tagCMGatherSoulDecompose
+
+class  tagCMGatherSoulDecompose(Structure):
+    Head = tagHead()
+    IsAuto = 0    #(BYTE IsAuto)// 是否自动分解
+    Count = 0    #(BYTE Count)// 指定批量分解数,最大不超过50个
+    PlaceIndexList = list()    #(vector<WORD> PlaceIndexList)// 批量分解位置索引列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x19
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.IsAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.Count):
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.PlaceIndexList.append(value)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xA5
+        self.Head.SubCmd = 0x19
+        self.IsAuto = 0
+        self.Count = 0
+        self.PlaceIndexList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 1
+        length += 2 * self.Count
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.IsAuto)
+        data = CommFunc.WriteBYTE(data, self.Count)
+        for i in range(self.Count):
+            data = CommFunc.WriteWORD(data, self.PlaceIndexList[i])
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                IsAuto:%d,
+                                Count:%d,
+                                PlaceIndexList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.IsAuto,
+                                self.Count,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagCMGatherSoulDecompose=tagCMGatherSoulDecompose()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulDecompose.Head.Cmd,m_NAtagCMGatherSoulDecompose.Head.SubCmd))] = m_NAtagCMGatherSoulDecompose
+
+
+#------------------------------------------------------
+# A5 18 聚魂升级 #tagCMGatherSoulUp
+
+class  tagCMGatherSoulUp(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("PlaceType", c_ubyte),    # 位置类型;0-背包,1-孔
+                  ("PlaceIndex", c_ushort),    # 位置索引
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA5
+        self.SubCmd = 0x18
+        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 = 0xA5
+        self.SubCmd = 0x18
+        self.PlaceType = 0
+        self.PlaceIndex = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMGatherSoulUp)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A5 18 聚魂升级 //tagCMGatherSoulUp:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                PlaceType:%d,
+                                PlaceIndex:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.PlaceType,
+                                self.PlaceIndex
+                                )
+        return DumpString
+
+
+m_NAtagCMGatherSoulUp=tagCMGatherSoulUp()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGatherSoulUp.Cmd,m_NAtagCMGatherSoulUp.SubCmd))] = m_NAtagCMGatherSoulUp
+
+
+#------------------------------------------------------
 # A5 41 领取投资理财回报 #tagCMGetInvestReward
 
 class  tagCMGetInvestReward(Structure):
@@ -15023,6 +15237,58 @@
 
 
 #------------------------------------------------------
+# C1 01 跨服PK匹配 #tagCMCrossRealmPKMatch
+
+class  tagCMCrossRealmPKMatch(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("Type", c_ubyte),    # 0-取消匹配; 1-进行匹配
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xC1
+        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 = 0xC1
+        self.SubCmd = 0x01
+        self.Type = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMCrossRealmPKMatch)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// C1 01 跨服PK匹配 //tagCMCrossRealmPKMatch:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                Type:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.Type
+                                )
+        return DumpString
+
+
+m_NAtagCMCrossRealmPKMatch=tagCMCrossRealmPKMatch()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCrossRealmPKMatch.Cmd,m_NAtagCMCrossRealmPKMatch.SubCmd))] = m_NAtagCMCrossRealmPKMatch
+
+
+#------------------------------------------------------
 # C1 11 跨服王者争霸押注 #tagCMMergeKingSupport
 
 class  tagCMMergeKingSupport(Structure):

--
Gitblit v1.8.0