From f3aabd16f45385129e43fc215f85776dac84b0d4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 24 五月 2019 16:56:07 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(增加说明)

---
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py |  141 ++++++++++++++++++++---------------------------
 1 files changed, 60 insertions(+), 81 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 4431972..7d7bafe 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -28542,87 +28542,6 @@
 
 
 #------------------------------------------------------
-# B2 14 自定义副本奖励信息 #tagMCCuntomFBPrizeInfo
-
-class  tagMCCuntomFBPrizeInfo(Structure):
-    Head = tagHead()
-    MapID = 0    #(DWORD MapID)
-    FuncLineID = 0    #(WORD FuncLineID)
-    PrizeItemCount = 0    #(BYTE PrizeItemCount)
-    PrizeItemIDList = list()    #(vector<DWORD> PrizeItemIDList)
-    data = None
-
-    def __init__(self):
-        self.Clear()
-        self.Head.Cmd = 0xB2
-        self.Head.SubCmd = 0x14
-        return
-
-    def ReadData(self, _lpData, _pos=0, _Len=0):
-        self.Clear()
-        _pos = self.Head.ReadData(_lpData, _pos)
-        self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
-        self.FuncLineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
-        self.PrizeItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        for i in range(self.PrizeItemCount):
-            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
-            self.PrizeItemIDList.append(value)
-        return _pos
-
-    def Clear(self):
-        self.Head = tagHead()
-        self.Head.Clear()
-        self.Head.Cmd = 0xB2
-        self.Head.SubCmd = 0x14
-        self.MapID = 0
-        self.FuncLineID = 0
-        self.PrizeItemCount = 0
-        self.PrizeItemIDList = list()
-        return
-
-    def GetLength(self):
-        length = 0
-        length += self.Head.GetLength()
-        length += 4
-        length += 2
-        length += 1
-        length += 4 * self.PrizeItemCount
-
-        return length
-
-    def GetBuffer(self):
-        data = ''
-        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteDWORD(data, self.MapID)
-        data = CommFunc.WriteWORD(data, self.FuncLineID)
-        data = CommFunc.WriteBYTE(data, self.PrizeItemCount)
-        for i in range(self.PrizeItemCount):
-            data = CommFunc.WriteDWORD(data, self.PrizeItemIDList[i])
-        return data
-
-    def OutputString(self):
-        DumpString = '''
-                                Head:%s,
-                                MapID:%d,
-                                FuncLineID:%d,
-                                PrizeItemCount:%d,
-                                PrizeItemIDList:%s
-                                '''\
-                                %(
-                                self.Head.OutputString(),
-                                self.MapID,
-                                self.FuncLineID,
-                                self.PrizeItemCount,
-                                "..."
-                                )
-        return DumpString
-
-
-m_NAtagMCCuntomFBPrizeInfo=tagMCCuntomFBPrizeInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCuntomFBPrizeInfo.Head.Cmd,m_NAtagMCCuntomFBPrizeInfo.Head.SubCmd))] = m_NAtagMCCuntomFBPrizeInfo
-
-
-#------------------------------------------------------
 # B2 10 仙盟联赛玩家排名信息 #tagMCFamilyWarBillboard
 
 class  tagMCFamilyWarPlayer(Structure):
@@ -29809,6 +29728,66 @@
 
 
 #------------------------------------------------------
+# B2 16 开始自定义场景结果 #tagMCStartCustomSceneResult
+
+class  tagMCStartCustomSceneResult(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("MapID", c_int),    
+                  ("FuncLineID", c_ushort),    
+                  ("Result", c_ubyte),    #是否允许
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB2
+        self.SubCmd = 0x16
+        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 = 0xB2
+        self.SubCmd = 0x16
+        self.MapID = 0
+        self.FuncLineID = 0
+        self.Result = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagMCStartCustomSceneResult)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B2 16 开始自定义场景结果 //tagMCStartCustomSceneResult:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                MapID:%d,
+                                FuncLineID:%d,
+                                Result:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.MapID,
+                                self.FuncLineID,
+                                self.Result
+                                )
+        return DumpString
+
+
+m_NAtagMCStartCustomSceneResult=tagMCStartCustomSceneResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartCustomSceneResult.Cmd,m_NAtagMCStartCustomSceneResult.SubCmd))] = m_NAtagMCStartCustomSceneResult
+
+
+#------------------------------------------------------
 #B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
 
 class  tagMCPushNotificationsSetting(Structure):

--
Gitblit v1.8.0