From e81315f997d75f900727af1c456c32277575fb24 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 10 七月 2025 17:01:18 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(主线掉落战利品、装备;主线击杀怪物获得经验、升级;主线装备穿戴、分解;)

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 4983cd7..658d84e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -19178,6 +19178,87 @@
 
 
 #------------------------------------------------------
+# B4 15 主线掉落物品操作 #tagCSMainDropItemOP
+
+class  tagCSMainDropItemOP(Structure):
+    Head = tagHead()
+    Count = 0    #(BYTE Count)
+    IndexList = list()    #(vector<WORD> IndexList)// 掉落背包中的物品格子索引列表
+    OPType = 0    #(BYTE OPType)// 0 - 拾取非装备物品;1 - 分解;2 - 穿戴/替换;
+    OPValue = 0    #(BYTE OPValue)// 操作额外指令值,由操作类型决定,如穿戴时可发送穿戴后是否自动分解
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB4
+        self.Head.SubCmd = 0x15
+        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)
+        self.OPType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.OPValue,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB4
+        self.Head.SubCmd = 0x15
+        self.Count = 0
+        self.IndexList = list()
+        self.OPType = 0
+        self.OPValue = 0
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 2 * self.Count
+        length += 1
+        length += 1
+
+        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])
+        data = CommFunc.WriteBYTE(data, self.OPType)
+        data = CommFunc.WriteBYTE(data, self.OPValue)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                Count:%d,
+                                IndexList:%s,
+                                OPType:%d,
+                                OPValue:%d
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.Count,
+                                "...",
+                                self.OPType,
+                                self.OPValue
+                                )
+        return DumpString
+
+
+m_NAtagCSMainDropItemOP=tagCSMainDropItemOP()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMainDropItemOP.Head.Cmd,m_NAtagCSMainDropItemOP.Head.SubCmd))] = m_NAtagCSMainDropItemOP
+
+
+#------------------------------------------------------
 # B4 13 主线战斗请求 #tagCSMainFightReq
 
 class  tagCSMainFightReq(Structure):
@@ -19185,7 +19266,7 @@
     _fields_ = [
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
-                  ("ReqType", c_ubyte),    # 0-停止战斗回城;1-设置消耗倍值;2-挑战小怪;3-挑战boss;4-下一段战报;5-下一队;
+                  ("ReqType", c_ubyte),    # 0-停止战斗回城;1-设置消耗倍值;2-挑战关卡小怪;3-挑战关卡boss;4-继续战斗;
                   ("ReqValue", c_int),    # 请求值,ReqType为1时发送消耗倍值
                   ]
 

--
Gitblit v1.8.0