From 34520d2b2a4ac78f832169b7ea120651b7f43c26 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 06 一月 2026 13:02:05 +0800
Subject: [PATCH] 412 【挑战】定军阁-服务端(效果属性暂时无效;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 167 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 167 insertions(+), 0 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..edb273c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -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):
--
Gitblit v1.8.0