From 0ef7cd13abea0010fb9cb1f75738fd7421626da8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 29 一月 2026 18:21:00 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(修复属性触发击晕时没有通知buff问题;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  800 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 762 insertions(+), 38 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index edb273c..5986a54 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -5412,7 +5412,7 @@
                   ("GubaoID", c_ushort),    
                   ("GubaoStar", c_ubyte),    
                   ("GubaoLV", c_ubyte),    
-                  ("EffLayer", c_ubyte),    # 该特殊效果累加层值
+                  ("EffLayer", c_ushort),    # 该特殊效果累加层值
                   ]
 
     def __init__(self):
@@ -9008,6 +9008,9 @@
 
 class  tagMCTreasureResult(Structure):
     Head = tagHead()
+    TreasureType = 0    #(BYTE TreasureType)//寻宝类型
+    TreasureIndex = 0    #(BYTE TreasureIndex)//寻宝索引
+    CostType = 0    #(BYTE CostType)//消耗类型:0-默认仙玉;1-免费次数;2-寻宝道具
     AddMoneyType = 0    #(BYTE AddMoneyType)// 本次寻宝增加的积分货币类型,可能为0
     AddMoneyValue = 0    #(WORD AddMoneyValue)// 本次寻宝增加的积分货币值,可能为0
     AddTreasureLuck = 0    #(WORD AddTreasureLuck)// 本次寻宝增加的幸运值
@@ -9024,6 +9027,9 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
+        self.TreasureType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.TreasureIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.CostType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.AddMoneyType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.AddMoneyValue,_pos = CommFunc.ReadWORD(_lpData, _pos)
         self.AddTreasureLuck,_pos = CommFunc.ReadWORD(_lpData, _pos)
@@ -9036,6 +9042,9 @@
         self.Head.Clear()
         self.Head.Cmd = 0xA3
         self.Head.SubCmd = 0x50
+        self.TreasureType = 0
+        self.TreasureIndex = 0
+        self.CostType = 0
         self.AddMoneyType = 0
         self.AddMoneyValue = 0
         self.AddTreasureLuck = 0
@@ -9047,6 +9056,9 @@
         length = 0
         length += self.Head.GetLength()
         length += 1
+        length += 1
+        length += 1
+        length += 1
         length += 2
         length += 2
         length += 2
@@ -9057,6 +9069,9 @@
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.TreasureType)
+        data = CommFunc.WriteBYTE(data, self.TreasureIndex)
+        data = CommFunc.WriteBYTE(data, self.CostType)
         data = CommFunc.WriteBYTE(data, self.AddMoneyType)
         data = CommFunc.WriteWORD(data, self.AddMoneyValue)
         data = CommFunc.WriteWORD(data, self.AddTreasureLuck)
@@ -9067,6 +9082,9 @@
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
+                                TreasureType:%d,
+                                TreasureIndex:%d,
+                                CostType:%d,
                                 AddMoneyType:%d,
                                 AddMoneyValue:%d,
                                 AddTreasureLuck:%d,
@@ -9075,6 +9093,9 @@
                                 '''\
                                 %(
                                 self.Head.OutputString(),
+                                self.TreasureType,
+                                self.TreasureIndex,
+                                self.CostType,
                                 self.AddMoneyType,
                                 self.AddMoneyValue,
                                 self.AddTreasureLuck,
@@ -30165,6 +30186,114 @@
 
 
 #------------------------------------------------------
+# B1 63 战斗预设切换信息 #tagSCBatPresetSwitchInfo
+
+class  tagSCBatPresetSwitch(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("BatPresetType", c_ubyte),    #战斗预设类型:1-主线战斗;2-演武场防守;
+                  ("BatPresetID", c_ubyte),    #该战斗功能所使用的战斗预设ID
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        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.BatPresetType = 0
+        self.BatPresetID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCBatPresetSwitch)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 63 战斗预设切换信息 //tagSCBatPresetSwitchInfo:
+                                BatPresetType:%d,
+                                BatPresetID:%d
+                                '''\
+                                %(
+                                self.BatPresetType,
+                                self.BatPresetID
+                                )
+        return DumpString
+
+
+class  tagSCBatPresetSwitchInfo(Structure):
+    Head = tagHead()
+    BatFuncCnt = 0    #(BYTE BatFuncCnt)
+    BatPresetList = list()    #(vector<tagSCBatPresetSwitch> BatPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x63
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.BatFuncCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.BatFuncCnt):
+            temBatPresetList = tagSCBatPresetSwitch()
+            _pos = temBatPresetList.ReadData(_lpData, _pos)
+            self.BatPresetList.append(temBatPresetList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x63
+        self.BatFuncCnt = 0
+        self.BatPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.BatFuncCnt):
+            length += self.BatPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.BatFuncCnt)
+        for i in range(self.BatFuncCnt):
+            data = CommFunc.WriteString(data, self.BatPresetList[i].GetLength(), self.BatPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                BatFuncCnt:%d,
+                                BatPresetList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.BatFuncCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCBatPresetSwitchInfo=tagSCBatPresetSwitchInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBatPresetSwitchInfo.Head.Cmd,m_NAtagSCBatPresetSwitchInfo.Head.SubCmd))] = m_NAtagSCBatPresetSwitchInfo
+
+
+#------------------------------------------------------
 # B1 30 红颜信息 #tagSCBeautyInfo
 
 class  tagSCBeautySkin(Structure):
@@ -31096,6 +31225,356 @@
 
 
 #------------------------------------------------------
+# B1 61 功能预设信息 #tagSCFuncPresetInfoList
+
+class  tagSCFuncPreset(Structure):
+    PresetID = 0    #(BYTE PresetID)//预设方案ID
+    NameLen = 0    #(BYTE NameLen)
+    PresetName = ""    #(String PresetName)//预设名称
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.PresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PresetName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+        return _pos
+
+    def Clear(self):
+        self.PresetID = 0
+        self.NameLen = 0
+        self.PresetName = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        length += len(self.PresetName)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.PresetID)
+        data = CommFunc.WriteBYTE(data, self.NameLen)
+        data = CommFunc.WriteString(data, self.NameLen, self.PresetName)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                PresetID:%d,
+                                NameLen:%d,
+                                PresetName:%s
+                                '''\
+                                %(
+                                self.PresetID,
+                                self.NameLen,
+                                self.PresetName
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetInfo(Structure):
+    FuncPresetType = 0    #(BYTE FuncPresetType)//预设类型,1-全局战斗;2-阵容;3-命格;
+    UnlockState = 0    #(DWORD UnlockState)//该功能预设解锁状态,按预设ID二进制位运算记录是否已解锁
+    PresetCnt = 0    #(BYTE PresetCnt)
+    PresetList = list()    #(vector<tagSCFuncPreset> PresetList)//本功能下预设列表
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.FuncPresetType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.UnlockState,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.PresetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.PresetCnt):
+            temPresetList = tagSCFuncPreset()
+            _pos = temPresetList.ReadData(_lpData, _pos)
+            self.PresetList.append(temPresetList)
+        return _pos
+
+    def Clear(self):
+        self.FuncPresetType = 0
+        self.UnlockState = 0
+        self.PresetCnt = 0
+        self.PresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 4
+        length += 1
+        for i in range(self.PresetCnt):
+            length += self.PresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.FuncPresetType)
+        data = CommFunc.WriteDWORD(data, self.UnlockState)
+        data = CommFunc.WriteBYTE(data, self.PresetCnt)
+        for i in range(self.PresetCnt):
+            data = CommFunc.WriteString(data, self.PresetList[i].GetLength(), self.PresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                FuncPresetType:%d,
+                                UnlockState:%d,
+                                PresetCnt:%d,
+                                PresetList:%s
+                                '''\
+                                %(
+                                self.FuncPresetType,
+                                self.UnlockState,
+                                self.PresetCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetInfoList(Structure):
+    Head = tagHead()
+    FuncCnt = 0    #(BYTE FuncCnt)
+    FuncPresetList = list()    #(vector<tagSCFuncPresetInfo> FuncPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x61
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.FuncCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.FuncCnt):
+            temFuncPresetList = tagSCFuncPresetInfo()
+            _pos = temFuncPresetList.ReadData(_lpData, _pos)
+            self.FuncPresetList.append(temFuncPresetList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x61
+        self.FuncCnt = 0
+        self.FuncPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.FuncCnt):
+            length += self.FuncPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.FuncCnt)
+        for i in range(self.FuncCnt):
+            data = CommFunc.WriteString(data, self.FuncPresetList[i].GetLength(), self.FuncPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                FuncCnt:%d,
+                                FuncPresetList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.FuncCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCFuncPresetInfoList=tagSCFuncPresetInfoList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFuncPresetInfoList.Head.Cmd,m_NAtagSCFuncPresetInfoList.Head.SubCmd))] = m_NAtagSCFuncPresetInfoList
+
+
+#------------------------------------------------------
+# B1 62 功能预设切换信息 #tagSCFuncPresetSwitchInfo
+
+class  tagSCFuncPresetFunc(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("FuncPresetType", c_ubyte),    #预设类型,2-阵容;3-命格;
+                  ("FuncPresetID", c_ubyte),    #该全局战斗预设下本功能使用的预设ID
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        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.FuncPresetType = 0
+        self.FuncPresetID = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCFuncPresetFunc)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 62 功能预设切换信息 //tagSCFuncPresetSwitchInfo:
+                                FuncPresetType:%d,
+                                FuncPresetID:%d
+                                '''\
+                                %(
+                                self.FuncPresetType,
+                                self.FuncPresetID
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetBat(Structure):
+    BatPresetID = 0    #(BYTE BatPresetID)//所属全局战斗预设ID
+    FuncCnt = 0    #(BYTE FuncCnt)
+    FuncPresetList = list()    #(vector<tagSCFuncPresetFunc> FuncPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.BatPresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.FuncCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.FuncCnt):
+            temFuncPresetList = tagSCFuncPresetFunc()
+            _pos = temFuncPresetList.ReadData(_lpData, _pos)
+            self.FuncPresetList.append(temFuncPresetList)
+        return _pos
+
+    def Clear(self):
+        self.BatPresetID = 0
+        self.FuncCnt = 0
+        self.FuncPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 1
+        for i in range(self.FuncCnt):
+            length += self.FuncPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.BatPresetID)
+        data = CommFunc.WriteBYTE(data, self.FuncCnt)
+        for i in range(self.FuncCnt):
+            data = CommFunc.WriteString(data, self.FuncPresetList[i].GetLength(), self.FuncPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                BatPresetID:%d,
+                                FuncCnt:%d,
+                                FuncPresetList:%s
+                                '''\
+                                %(
+                                self.BatPresetID,
+                                self.FuncCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+class  tagSCFuncPresetSwitchInfo(Structure):
+    Head = tagHead()
+    BatPresetCnt = 0    #(BYTE BatPresetCnt)
+    BatPresetList = list()    #(vector<tagSCFuncPresetBat> BatPresetList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x62
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.BatPresetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.BatPresetCnt):
+            temBatPresetList = tagSCFuncPresetBat()
+            _pos = temBatPresetList.ReadData(_lpData, _pos)
+            self.BatPresetList.append(temBatPresetList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB1
+        self.Head.SubCmd = 0x62
+        self.BatPresetCnt = 0
+        self.BatPresetList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.BatPresetCnt):
+            length += self.BatPresetList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.BatPresetCnt)
+        for i in range(self.BatPresetCnt):
+            data = CommFunc.WriteString(data, self.BatPresetList[i].GetLength(), self.BatPresetList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                BatPresetCnt:%d,
+                                BatPresetList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.BatPresetCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCFuncPresetSwitchInfo=tagSCFuncPresetSwitchInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCFuncPresetSwitchInfo.Head.Cmd,m_NAtagSCFuncPresetSwitchInfo.Head.SubCmd))] = m_NAtagSCFuncPresetSwitchInfo
+
+
+#------------------------------------------------------
 # B1 11 功能系统特权信息 #tagMCFuncSysPrivilegeInfoList
 
 class  tagMCFuncSysPrivilegeInfo(Structure):
@@ -31448,11 +31927,10 @@
 
 
 #------------------------------------------------------
-# B1 24 阵容信息 #tagSCLineupInfo
+# B1 24 武将预设信息 #tagSCHeroPresetInfo
 
-class  tagSCLineup(Structure):
-    LineupID = 0    #(BYTE LineupID)// 阵容ID
-    ShapeType = 0    #(BYTE ShapeType)// 阵型
+class  tagSCHeroPreset(Structure):
+    PresetID = 0    #(BYTE PresetID)//阵容方案预设ID
     HeroCnt = 0    #(BYTE HeroCnt)
     HeroItemIndexList = list()    #(vector<WORD> HeroItemIndexList)// 所在武将背包索引+1列表 [站位1物品索引+1, 站位2, ...],站位无武将时为0
     data = None
@@ -31463,8 +31941,7 @@
 
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
-        self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.PresetID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.HeroCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         for i in range(self.HeroCnt):
             value,_pos=CommFunc.ReadWORD(_lpData,_pos)
@@ -31472,8 +31949,7 @@
         return _pos
 
     def Clear(self):
-        self.LineupID = 0
-        self.ShapeType = 0
+        self.PresetID = 0
         self.HeroCnt = 0
         self.HeroItemIndexList = list()
         return
@@ -31482,15 +31958,13 @@
         length = 0
         length += 1
         length += 1
-        length += 1
         length += 2 * self.HeroCnt
 
         return length
 
     def GetBuffer(self):
         data = ''
-        data = CommFunc.WriteBYTE(data, self.LineupID)
-        data = CommFunc.WriteBYTE(data, self.ShapeType)
+        data = CommFunc.WriteBYTE(data, self.PresetID)
         data = CommFunc.WriteBYTE(data, self.HeroCnt)
         for i in range(self.HeroCnt):
             data = CommFunc.WriteWORD(data, self.HeroItemIndexList[i])
@@ -31498,24 +31972,22 @@
 
     def OutputString(self):
         DumpString = '''
-                                LineupID:%d,
-                                ShapeType:%d,
+                                PresetID:%d,
                                 HeroCnt:%d,
                                 HeroItemIndexList:%s
                                 '''\
                                 %(
-                                self.LineupID,
-                                self.ShapeType,
+                                self.PresetID,
                                 self.HeroCnt,
                                 "..."
                                 )
         return DumpString
 
 
-class  tagSCLineupInfo(Structure):
+class  tagSCHeroPresetInfo(Structure):
     Head = tagHead()
-    LineupCnt = 0    #(BYTE LineupCnt)
-    LineupList = list()    #(vector<tagSCLineup> LineupList)
+    PresetCnt = 0    #(BYTE PresetCnt)
+    PresetList = list()    #(vector<tagSCHeroPreset> PresetList)
     data = None
 
     def __init__(self):
@@ -31527,11 +31999,11 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         _pos = self.Head.ReadData(_lpData, _pos)
-        self.LineupCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
-        for i in range(self.LineupCnt):
-            temLineupList = tagSCLineup()
-            _pos = temLineupList.ReadData(_lpData, _pos)
-            self.LineupList.append(temLineupList)
+        self.PresetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.PresetCnt):
+            temPresetList = tagSCHeroPreset()
+            _pos = temPresetList.ReadData(_lpData, _pos)
+            self.PresetList.append(temPresetList)
         return _pos
 
     def Clear(self):
@@ -31539,43 +32011,43 @@
         self.Head.Clear()
         self.Head.Cmd = 0xB1
         self.Head.SubCmd = 0x24
-        self.LineupCnt = 0
-        self.LineupList = list()
+        self.PresetCnt = 0
+        self.PresetList = list()
         return
 
     def GetLength(self):
         length = 0
         length += self.Head.GetLength()
         length += 1
-        for i in range(self.LineupCnt):
-            length += self.LineupList[i].GetLength()
+        for i in range(self.PresetCnt):
+            length += self.PresetList[i].GetLength()
 
         return length
 
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
-        data = CommFunc.WriteBYTE(data, self.LineupCnt)
-        for i in range(self.LineupCnt):
-            data = CommFunc.WriteString(data, self.LineupList[i].GetLength(), self.LineupList[i].GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.PresetCnt)
+        for i in range(self.PresetCnt):
+            data = CommFunc.WriteString(data, self.PresetList[i].GetLength(), self.PresetList[i].GetBuffer())
         return data
 
     def OutputString(self):
         DumpString = '''
                                 Head:%s,
-                                LineupCnt:%d,
-                                LineupList:%s
+                                PresetCnt:%d,
+                                PresetList:%s
                                 '''\
                                 %(
                                 self.Head.OutputString(),
-                                self.LineupCnt,
+                                self.PresetCnt,
                                 "..."
                                 )
         return DumpString
 
 
-m_NAtagSCLineupInfo=tagSCLineupInfo()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLineupInfo.Head.Cmd,m_NAtagSCLineupInfo.Head.SubCmd))] = m_NAtagSCLineupInfo
+m_NAtagSCHeroPresetInfo=tagSCHeroPresetInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCHeroPresetInfo.Head.Cmd,m_NAtagSCHeroPresetInfo.Head.SubCmd))] = m_NAtagSCHeroPresetInfo
 
 
 #------------------------------------------------------
@@ -31748,6 +32220,66 @@
 
 m_NAtagSCLLMJInfo=tagSCLLMJInfo()
 ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLLMJInfo.Cmd,m_NAtagSCLLMJInfo.SubCmd))] = m_NAtagSCLLMJInfo
+
+
+#------------------------------------------------------
+# B1 32 命格信息 #tagSCMinggeInfo
+
+class  tagSCMinggeInfo(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("GanwuLV", c_ushort),    #感悟等级,从1开始
+                  ("GanwuExp", c_int),    #当前感悟等级经验,每级从0开始
+                  ("Lingying", c_int),    #当前灵应值
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB1
+        self.SubCmd = 0x32
+        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 = 0xB1
+        self.SubCmd = 0x32
+        self.GanwuLV = 0
+        self.GanwuExp = 0
+        self.Lingying = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCMinggeInfo)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B1 32 命格信息 //tagSCMinggeInfo:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                GanwuLV:%d,
+                                GanwuExp:%d,
+                                Lingying:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.GanwuLV,
+                                self.GanwuExp,
+                                self.Lingying
+                                )
+        return DumpString
+
+
+m_NAtagSCMinggeInfo=tagSCMinggeInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCMinggeInfo.Cmd,m_NAtagSCMinggeInfo.SubCmd))] = m_NAtagSCMinggeInfo
 
 
 #------------------------------------------------------
@@ -37433,6 +37965,8 @@
                   ("LV", c_ushort),    # 等级,玩家的武将等级或NPC成长等级,等级显示以该值为准
                   ("PosNum", c_ubyte),    # 在本阵容中的站位,从1开始,非主战斗武将为0,如红颜
                   ("AngreXP", c_ushort),    # 当前怒气值
+                  ("FightPower", c_int),    # 战力,求余亿部分
+                  ("FightPowerEx", c_int),    # 战力,整除亿部分
                   ]
 
     def __init__(self):
@@ -37456,6 +37990,8 @@
         self.LV = 0
         self.PosNum = 0
         self.AngreXP = 0
+        self.FightPower = 0
+        self.FightPowerEx = 0
         return
 
     def GetLength(self):
@@ -37476,7 +38012,9 @@
                                 MaxHPEx:%d,
                                 LV:%d,
                                 PosNum:%d,
-                                AngreXP:%d
+                                AngreXP:%d,
+                                FightPower:%d,
+                                FightPowerEx:%d
                                 '''\
                                 %(
                                 self.ObjID,
@@ -37489,7 +38027,9 @@
                                 self.MaxHPEx,
                                 self.LV,
                                 self.PosNum,
-                                self.AngreXP
+                                self.AngreXP,
+                                self.FightPower,
+                                self.FightPowerEx
                                 )
         return DumpString
 
@@ -38641,6 +39181,190 @@
 
 
 #------------------------------------------------------
+# B4 32 查看NPC属性结果 #tagSCViewNPCAttrRet
+
+class  tagSCViewNPCAttr(Structure):
+    PosNum = 0    #(BYTE PosNum)// 在本阵容中的站位,从1开始
+    NPCID = 0    #(DWORD NPCID)// 战斗NPCID,不同的实例ID对应的NPCID可能一样
+    HeroID = 0    #(DWORD HeroID)// 武将ID,玩家或NPC均可能有,如果有值则外观相关以该武将为准,否则以NPCID为准
+    LV = 0    #(WORD LV)// 等级,玩家的武将等级或NPC成长等级,等级显示以该值为准
+    Star = 0    #(BYTE Star)// 星级
+    BreakLV = 0    #(BYTE BreakLV)// 突破
+    AwakeLV = 0    #(BYTE AwakeLV)// 觉醒
+    AttrLen = 0    #(WORD AttrLen)
+    AttrMsg = ""    #(String AttrMsg)// 属性信息 {"属性ID":value, ...}
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.PosNum,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.NPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.HeroID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.Star,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.BreakLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.AwakeLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.AttrLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.AttrMsg,_pos = CommFunc.ReadString(_lpData, _pos,self.AttrLen)
+        return _pos
+
+    def Clear(self):
+        self.PosNum = 0
+        self.NPCID = 0
+        self.HeroID = 0
+        self.LV = 0
+        self.Star = 0
+        self.BreakLV = 0
+        self.AwakeLV = 0
+        self.AttrLen = 0
+        self.AttrMsg = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 4
+        length += 4
+        length += 2
+        length += 1
+        length += 1
+        length += 1
+        length += 2
+        length += len(self.AttrMsg)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.PosNum)
+        data = CommFunc.WriteDWORD(data, self.NPCID)
+        data = CommFunc.WriteDWORD(data, self.HeroID)
+        data = CommFunc.WriteWORD(data, self.LV)
+        data = CommFunc.WriteBYTE(data, self.Star)
+        data = CommFunc.WriteBYTE(data, self.BreakLV)
+        data = CommFunc.WriteBYTE(data, self.AwakeLV)
+        data = CommFunc.WriteWORD(data, self.AttrLen)
+        data = CommFunc.WriteString(data, self.AttrLen, self.AttrMsg)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                PosNum:%d,
+                                NPCID:%d,
+                                HeroID:%d,
+                                LV:%d,
+                                Star:%d,
+                                BreakLV:%d,
+                                AwakeLV:%d,
+                                AttrLen:%d,
+                                AttrMsg:%s
+                                '''\
+                                %(
+                                self.PosNum,
+                                self.NPCID,
+                                self.HeroID,
+                                self.LV,
+                                self.Star,
+                                self.BreakLV,
+                                self.AwakeLV,
+                                self.AttrLen,
+                                self.AttrMsg
+                                )
+        return DumpString
+
+
+class  tagSCViewNPCAttrRet(Structure):
+    Head = tagHead()
+    MapID = 0    #(DWORD MapID)// 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等)
+    FuncLineID = 0    #(DWORD FuncLineID)// MapID对应的扩展值,如具体某个关卡等
+    ViewNPCID = 0    #(DWORD ViewNPCID)// 指定查看某个NPCID,发0则查看该关卡阵容所有NPC
+    NPCCnt = 0    #(BYTE NPCCnt)
+    NPCAttrList = list()    #(vector<tagSCViewNPCAttr> NPCAttrList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB4
+        self.Head.SubCmd = 0x32
+        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.ReadDWORD(_lpData, _pos)
+        self.ViewNPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.NPCCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.NPCCnt):
+            temNPCAttrList = tagSCViewNPCAttr()
+            _pos = temNPCAttrList.ReadData(_lpData, _pos)
+            self.NPCAttrList.append(temNPCAttrList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB4
+        self.Head.SubCmd = 0x32
+        self.MapID = 0
+        self.FuncLineID = 0
+        self.ViewNPCID = 0
+        self.NPCCnt = 0
+        self.NPCAttrList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 4
+        length += 4
+        length += 4
+        length += 1
+        for i in range(self.NPCCnt):
+            length += self.NPCAttrList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.MapID)
+        data = CommFunc.WriteDWORD(data, self.FuncLineID)
+        data = CommFunc.WriteDWORD(data, self.ViewNPCID)
+        data = CommFunc.WriteBYTE(data, self.NPCCnt)
+        for i in range(self.NPCCnt):
+            data = CommFunc.WriteString(data, self.NPCAttrList[i].GetLength(), self.NPCAttrList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                MapID:%d,
+                                FuncLineID:%d,
+                                ViewNPCID:%d,
+                                NPCCnt:%d,
+                                NPCAttrList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.MapID,
+                                self.FuncLineID,
+                                self.ViewNPCID,
+                                self.NPCCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCViewNPCAttrRet=tagSCViewNPCAttrRet()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCViewNPCAttrRet.Head.Cmd,m_NAtagSCViewNPCAttrRet.Head.SubCmd))] = m_NAtagSCViewNPCAttrRet
+
+
+#------------------------------------------------------
 # B5 04 拍卖行新上架拍品 #tagGCAddAuctionItemInfo
 
 class  tagGCAddAuctionItem(Structure):

--
Gitblit v1.8.0