From dbf479ac2d1d2a1587fd9a984ac84a16ad0bb3d6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 07 一月 2026 12:04:02 +0800
Subject: [PATCH] 271 【内政】古宝系统-服务端(增加特殊效果类型3~6;新增特权效果支持,增加特权效果类型1、2;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  181 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 178 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index b7fb943..7763c91 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):
@@ -33232,6 +33232,173 @@
 
 
 #------------------------------------------------------
+# B2 02 定军阁信息 #tagSCDingjungeInfo
+
+class  tagSCDingjungeEff(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("EffIndex", c_ubyte),    #槽索引,0~n
+                  ("EffID", c_ushort),    
+                  ("EffLV", c_ubyte),    
+                  ]
+
+    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.EffIndex = 0
+        self.EffID = 0
+        self.EffLV = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagSCDingjungeEff)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B2 02 定军阁信息 //tagSCDingjungeInfo:
+                                EffIndex:%d,
+                                EffID:%d,
+                                EffLV:%d
+                                '''\
+                                %(
+                                self.EffIndex,
+                                self.EffID,
+                                self.EffLV
+                                )
+        return DumpString
+
+
+class  tagSCDingjungeInfo(Structure):
+    Head = tagHead()
+    TodayPass = 0    #(DWORD TodayPass)//今日过关进度 层*100+关卡编号,历史最高过关记录取A320中的PassLineID
+    EffCnt = 0    #(BYTE EffCnt)
+    EffList = list()    #(vector<tagSCDingjungeEff> EffList)//已生效的效果列表
+    SelectEffCnt = 0    #(BYTE SelectEffCnt)
+    SelectEffList = list()    #(vector<DWORD> SelectEffList)//待手动选择的效果ID列表
+    UnSelectCnt = 0    #(WORD UnSelectCnt)//还有几个未选择的效果
+    SelectAuto = 0    #(BYTE SelectAuto)//是否启用自动选择
+    SelectSetCnt = 0    #(BYTE SelectSetCnt)
+    SelectSetAttrIDList = list()    #(vector<WORD> SelectSetAttrIDList)//预设优先选择属性ID列表 [优先级1属性ID, ...]
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB2
+        self.Head.SubCmd = 0x02
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.TodayPass,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.EffCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.EffCnt):
+            temEffList = tagSCDingjungeEff()
+            _pos = temEffList.ReadData(_lpData, _pos)
+            self.EffList.append(temEffList)
+        self.SelectEffCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.SelectEffCnt):
+            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+            self.SelectEffList.append(value)
+        self.UnSelectCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.SelectAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.SelectSetCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.SelectSetCnt):
+            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+            self.SelectSetAttrIDList.append(value)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB2
+        self.Head.SubCmd = 0x02
+        self.TodayPass = 0
+        self.EffCnt = 0
+        self.EffList = list()
+        self.SelectEffCnt = 0
+        self.SelectEffList = list()
+        self.UnSelectCnt = 0
+        self.SelectAuto = 0
+        self.SelectSetCnt = 0
+        self.SelectSetAttrIDList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 4
+        length += 1
+        for i in range(self.EffCnt):
+            length += self.EffList[i].GetLength()
+        length += 1
+        length += 4 * self.SelectEffCnt
+        length += 2
+        length += 1
+        length += 1
+        length += 2 * self.SelectSetCnt
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteDWORD(data, self.TodayPass)
+        data = CommFunc.WriteBYTE(data, self.EffCnt)
+        for i in range(self.EffCnt):
+            data = CommFunc.WriteString(data, self.EffList[i].GetLength(), self.EffList[i].GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.SelectEffCnt)
+        for i in range(self.SelectEffCnt):
+            data = CommFunc.WriteDWORD(data, self.SelectEffList[i])
+        data = CommFunc.WriteWORD(data, self.UnSelectCnt)
+        data = CommFunc.WriteBYTE(data, self.SelectAuto)
+        data = CommFunc.WriteBYTE(data, self.SelectSetCnt)
+        for i in range(self.SelectSetCnt):
+            data = CommFunc.WriteWORD(data, self.SelectSetAttrIDList[i])
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                TodayPass:%d,
+                                EffCnt:%d,
+                                EffList:%s,
+                                SelectEffCnt:%d,
+                                SelectEffList:%s,
+                                UnSelectCnt:%d,
+                                SelectAuto:%d,
+                                SelectSetCnt:%d,
+                                SelectSetAttrIDList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.TodayPass,
+                                self.EffCnt,
+                                "...",
+                                self.SelectEffCnt,
+                                "...",
+                                self.UnSelectCnt,
+                                self.SelectAuto,
+                                self.SelectSetCnt,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagSCDingjungeInfo=tagSCDingjungeInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCDingjungeInfo.Head.Cmd,m_NAtagSCDingjungeInfo.Head.SubCmd))] = m_NAtagSCDingjungeInfo
+
+
+#------------------------------------------------------
 # B2 01 天子考验信息 #tagSCTianziKYInfo
 
 class  tagSCTianziKYInfo(Structure):
@@ -37266,6 +37433,8 @@
                   ("LV", c_ushort),    # 等级,玩家的武将等级或NPC成长等级,等级显示以该值为准
                   ("PosNum", c_ubyte),    # 在本阵容中的站位,从1开始,非主战斗武将为0,如红颜
                   ("AngreXP", c_ushort),    # 当前怒气值
+                  ("FightPower", c_int),    # 战力,求余亿部分
+                  ("FightPowerEx", c_int),    # 战力,整除亿部分
                   ]
 
     def __init__(self):
@@ -37289,6 +37458,8 @@
         self.LV = 0
         self.PosNum = 0
         self.AngreXP = 0
+        self.FightPower = 0
+        self.FightPowerEx = 0
         return
 
     def GetLength(self):
@@ -37309,7 +37480,9 @@
                                 MaxHPEx:%d,
                                 LV:%d,
                                 PosNum:%d,
-                                AngreXP:%d
+                                AngreXP:%d,
+                                FightPower:%d,
+                                FightPowerEx:%d
                                 '''\
                                 %(
                                 self.ObjID,
@@ -37322,7 +37495,9 @@
                                 self.MaxHPEx,
                                 self.LV,
                                 self.PosNum,
-                                self.AngreXP
+                                self.AngreXP,
+                                self.FightPower,
+                                self.FightPowerEx
                                 )
         return DumpString
 

--
Gitblit v1.8.0