From 0c3ef8a641c968e6a2f51abeb84f890342e4cb0c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 15 十二月 2025 11:42:13 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(优化效果6011可指定检查自己还是检查目标的buff;)

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 470ff06..df6e0dc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -8961,62 +8961,6 @@
 
 
 #------------------------------------------------------
-# A9 01 获取Boss首杀奖励 #tagCGGetBossFirstKillAward
-
-class  tagCGGetBossFirstKillAward(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("NPCID", c_int),    
-                  ("AwardType", c_ubyte),    # 0-首杀红包奖励;1-个人首杀奖励
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xA9
-        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 = 0xA9
-        self.SubCmd = 0x01
-        self.NPCID = 0
-        self.AwardType = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCGGetBossFirstKillAward)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A9 01 获取Boss首杀奖励 //tagCGGetBossFirstKillAward:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                NPCID:%d,
-                                AwardType:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.NPCID,
-                                self.AwardType
-                                )
-        return DumpString
-
-
-m_NAtagCGGetBossFirstKillAward=tagCGGetBossFirstKillAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGGetBossFirstKillAward.Cmd,m_NAtagCGGetBossFirstKillAward.SubCmd))] = m_NAtagCGGetBossFirstKillAward
-
-
-#------------------------------------------------------
 # A9 07 点赞仙宫 #tagCGLikeXiangong
 
 class  tagCGLikeXiangong(Structure):
@@ -11916,6 +11860,87 @@
 
 
 #------------------------------------------------------
+# B2 41 武将宿缘 #tagCSHeroFates
+
+class  tagCSHeroFates(Structure):
+    Head = tagHead()
+    FatesID = 0    #(BYTE FatesID)// 宿缘ID
+    OPType = 0    #(BYTE OPType)// 0-激活领奖;1-升级
+    IndexCnt = 0    #(BYTE IndexCnt)
+    ItemIndexList = list()    #(vector<WORD> ItemIndexList)// 升级时消耗的材料卡在武将背包索引列表,升级时才发
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB2
+        self.Head.SubCmd = 0x41
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.FatesID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.OPType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.IndexCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.IndexCnt):
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.ItemIndexList.append(value)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB2
+        self.Head.SubCmd = 0x41
+        self.FatesID = 0
+        self.OPType = 0
+        self.IndexCnt = 0
+        self.ItemIndexList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        length += 1
+        length += 1
+        length += 2 * self.IndexCnt
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.FatesID)
+        data = CommFunc.WriteBYTE(data, self.OPType)
+        data = CommFunc.WriteBYTE(data, self.IndexCnt)
+        for i in range(self.IndexCnt):
+            data = CommFunc.WriteWORD(data, self.ItemIndexList[i])
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                FatesID:%d,
+                                OPType:%d,
+                                IndexCnt:%d,
+                                ItemIndexList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.FatesID,
+                                self.OPType,
+                                self.IndexCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagCSHeroFates=tagCSHeroFates()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroFates.Head.Cmd,m_NAtagCSHeroFates.Head.SubCmd))] = m_NAtagCSHeroFates
+
+
+#------------------------------------------------------
 # B2 38 武将锁定 #tagCSHeroLock
 
 class  tagCSHeroLock(Structure):

--
Gitblit v1.8.0