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/ChPyNetPack.py | 370 +++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 320 insertions(+), 50 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 475dfb6..4aacc12 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -6834,54 +6834,6 @@
#------------------------------------------------------
-# A5 69 刷新寻宝免费次数 #tagCMRefreshTreasureFreeCnt
-
-class tagCMRefreshTreasureFreeCnt(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x69
- 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 = 0xA5
- self.SubCmd = 0x69
- return
-
- def GetLength(self):
- return sizeof(tagCMRefreshTreasureFreeCnt)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 69 刷新寻宝免费次数 //tagCMRefreshTreasureFreeCnt:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMRefreshTreasureFreeCnt=tagCMRefreshTreasureFreeCnt()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshTreasureFreeCnt.Cmd,m_NAtagCMRefreshTreasureFreeCnt.SubCmd))] = m_NAtagCMRefreshTreasureFreeCnt
-
-
-#------------------------------------------------------
# A5 37 请求邮件操作 #tagCMRequestMail
class tagCMRequestMail(Structure):
@@ -7328,6 +7280,97 @@
m_NAtagCMTakeOutRealmExp=tagCMTakeOutRealmExp()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTakeOutRealmExp.Cmd,m_NAtagCMTakeOutRealmExp.SubCmd))] = m_NAtagCMTakeOutRealmExp
+
+
+#------------------------------------------------------
+# A5 69 寻宝心愿物品选择 #tagCSTreasureWishSelect
+
+class tagCSTreasureWishSelect(Structure):
+ Head = tagHead()
+ TreasureType = 0 #(BYTE TreasureType)//寻宝类型
+ WishCnt = 0 #(BYTE WishCnt)
+ WishIDList = list() #(vector<DWORD> WishIDList)// 选择的寻宝物品库中的数据ID,注意不是库ID
+ WishCardUseCnt = 0 #(BYTE WishCardUseCnt)
+ WishCardUseLibIDList = list() #(vector<WORD> WishCardUseLibIDList)// 使用心愿卡的库ID列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA5
+ self.Head.SubCmd = 0x69
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.TreasureType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.WishCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.WishCnt):
+ value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+ self.WishIDList.append(value)
+ self.WishCardUseCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.WishCardUseCnt):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.WishCardUseLibIDList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA5
+ self.Head.SubCmd = 0x69
+ self.TreasureType = 0
+ self.WishCnt = 0
+ self.WishIDList = list()
+ self.WishCardUseCnt = 0
+ self.WishCardUseLibIDList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += 4 * self.WishCnt
+ length += 1
+ length += 2 * self.WishCardUseCnt
+
+ return length
+
+ 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.WishCnt)
+ for i in range(self.WishCnt):
+ data = CommFunc.WriteDWORD(data, self.WishIDList[i])
+ data = CommFunc.WriteBYTE(data, self.WishCardUseCnt)
+ for i in range(self.WishCardUseCnt):
+ data = CommFunc.WriteWORD(data, self.WishCardUseLibIDList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ TreasureType:%d,
+ WishCnt:%d,
+ WishIDList:%s,
+ WishCardUseCnt:%d,
+ WishCardUseLibIDList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.TreasureType,
+ self.WishCnt,
+ "...",
+ self.WishCardUseCnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagCSTreasureWishSelect=tagCSTreasureWishSelect()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSTreasureWishSelect.Head.Cmd,m_NAtagCSTreasureWishSelect.Head.SubCmd))] = m_NAtagCSTreasureWishSelect
#------------------------------------------------------
@@ -10941,6 +10984,140 @@
#------------------------------------------------------
+# B1 02 定军阁效果选择 #tagCSDingjungeEffSelect
+
+class tagCSDingjungeEffSelect(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("SelectType", c_ubyte), #0-手动选择,1-放弃本次选择,2-一键选择(仅开启了自动选择时有效)
+ ("SelectIndex", c_ubyte), #手动选择索引 0~n
+ ("ReplaceHole", c_ubyte), #手动选择替换槽位 1~n,槽位=槽索引+1,升级时可直接发0
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB1
+ self.SubCmd = 0x02
+ 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 = 0x02
+ self.SelectType = 0
+ self.SelectIndex = 0
+ self.ReplaceHole = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSDingjungeEffSelect)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B1 02 定军阁效果选择 //tagCSDingjungeEffSelect:
+ Cmd:%s,
+ SubCmd:%s,
+ SelectType:%d,
+ SelectIndex:%d,
+ ReplaceHole:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.SelectType,
+ self.SelectIndex,
+ self.ReplaceHole
+ )
+ return DumpString
+
+
+m_NAtagCSDingjungeEffSelect=tagCSDingjungeEffSelect()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSDingjungeEffSelect.Cmd,m_NAtagCSDingjungeEffSelect.SubCmd))] = m_NAtagCSDingjungeEffSelect
+
+
+#------------------------------------------------------
+# B1 01 定军阁效果预设 #tagCSDingjungeEffSet
+
+class tagCSDingjungeEffSet(Structure):
+ Head = tagHead()
+ 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 = 0xB1
+ self.Head.SubCmd = 0x01
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_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 = 0xB1
+ self.Head.SubCmd = 0x01
+ self.SelectAuto = 0
+ self.SelectSetCnt = 0
+ self.SelectSetAttrIDList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ 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.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,
+ SelectAuto:%d,
+ SelectSetCnt:%d,
+ SelectSetAttrIDList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.SelectAuto,
+ self.SelectSetCnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagCSDingjungeEffSet=tagCSDingjungeEffSet()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSDingjungeEffSet.Head.Cmd,m_NAtagCSDingjungeEffSet.Head.SubCmd))] = m_NAtagCSDingjungeEffSet
+
+
+#------------------------------------------------------
# B1 08 快速一键过关副本 #tagCMFBQuickPass
class tagCMFBQuickPass(Structure):
@@ -11860,6 +12037,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):
@@ -11976,6 +12234,9 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
+ ("LVReset", c_ubyte), #重置等级
+ ("BreakReset", c_ubyte), #重置突破
+ ("AwakeReset", c_ubyte), #重置觉醒
]
def __init__(self):
@@ -11993,6 +12254,9 @@
self.Cmd = 0xB2
self.SubCmd = 0x39
self.ItemIndex = 0
+ self.LVReset = 0
+ self.BreakReset = 0
+ self.AwakeReset = 0
return
def GetLength(self):
@@ -12005,12 +12269,18 @@
DumpString = '''// B2 39 武将重生 //tagCSHeroRebirth:
Cmd:%s,
SubCmd:%s,
- ItemIndex:%d
+ ItemIndex:%d,
+ LVReset:%d,
+ BreakReset:%d,
+ AwakeReset:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.ItemIndex
+ self.ItemIndex,
+ self.LVReset,
+ self.BreakReset,
+ self.AwakeReset
)
return DumpString
--
Gitblit v1.8.0