From ba773b0ebfa18e9049234dba5bd16e791067ea84 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 06 一月 2026 16:11:16 +0800
Subject: [PATCH] 271 【内政】古宝系统-服务端(品质等级属性支持;效果层级调整为最大9999;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 276 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 257 insertions(+), 19 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 7a7f487..0b200ef 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):
@@ -8681,7 +8681,7 @@
_pack_ = 1
_fields_ = [
("WishID", c_ushort), # 寻宝物品库中的数据ID,注意不是库ID
- ("OutCnt", c_ubyte), # 做为心愿物品时已产出次数,有产出过的无法重新选择,未产出的可任意修改选择
+ ("OutCnt", c_ubyte), # 该心愿物品已产出次数
]
def __init__(self):
@@ -8712,6 +8712,77 @@
%(
self.WishID,
self.OutCnt
+ )
+ return DumpString
+
+
+class tagMCTreasureWishLib(Structure):
+ LibID = 0 #(WORD LibID)// 寻宝物品库ID
+ OutCntTotal = 0 #(WORD OutCntTotal)// 本库累计产出心愿总次数
+ IsUseWishCard = 0 #(BYTE IsUseWishCard)// 是否勾选了自动使用心愿卡
+ WishCnt = 0 #(BYTE WishCnt)
+ WishList = list() #(vector<tagMCTreasureWish> WishList)//已选心愿物品信息,只同步已选的
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.LibID,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.OutCntTotal,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.IsUseWishCard,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.WishCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.WishCnt):
+ temWishList = tagMCTreasureWish()
+ _pos = temWishList.ReadData(_lpData, _pos)
+ self.WishList.append(temWishList)
+ return _pos
+
+ def Clear(self):
+ self.LibID = 0
+ self.OutCntTotal = 0
+ self.IsUseWishCard = 0
+ self.WishCnt = 0
+ self.WishList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 2
+ length += 2
+ length += 1
+ length += 1
+ for i in range(self.WishCnt):
+ length += self.WishList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteWORD(data, self.LibID)
+ data = CommFunc.WriteWORD(data, self.OutCntTotal)
+ data = CommFunc.WriteBYTE(data, self.IsUseWishCard)
+ data = CommFunc.WriteBYTE(data, self.WishCnt)
+ for i in range(self.WishCnt):
+ data = CommFunc.WriteString(data, self.WishList[i].GetLength(), self.WishList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ LibID:%d,
+ OutCntTotal:%d,
+ IsUseWishCard:%d,
+ WishCnt:%d,
+ WishList:%s
+ '''\
+ %(
+ self.LibID,
+ self.OutCntTotal,
+ self.IsUseWishCard,
+ self.WishCnt,
+ "..."
)
return DumpString
@@ -8764,8 +8835,8 @@
TreasureCntAward = 0 #(DWORD TreasureCntAward)//累计寻宝次数对应奖励领奖状态,按奖励记录索引二进制记录是否已领取
GridLimitCnt = 0 #(BYTE GridLimitCnt)
GridLimitCntList = list() #(vector<tagMCTreasureGridLimit> GridLimitCntList)//有限制抽取次数的格子次数信息
- WishCnt = 0 #(BYTE WishCnt)
- WishList = list() #(vector<tagMCTreasureWish> WishList)//心愿物品信息
+ WishLibCnt = 0 #(BYTE WishLibCnt)
+ WishLibList = list() #(vector<tagMCTreasureWishLib> WishLibList)//心愿库信息
data = None
def __init__(self):
@@ -8785,11 +8856,11 @@
temGridLimitCntList = tagMCTreasureGridLimit()
_pos = temGridLimitCntList.ReadData(_lpData, _pos)
self.GridLimitCntList.append(temGridLimitCntList)
- self.WishCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.WishCnt):
- temWishList = tagMCTreasureWish()
- _pos = temWishList.ReadData(_lpData, _pos)
- self.WishList.append(temWishList)
+ self.WishLibCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.WishLibCnt):
+ temWishLibList = tagMCTreasureWishLib()
+ _pos = temWishLibList.ReadData(_lpData, _pos)
+ self.WishLibList.append(temWishLibList)
return _pos
def Clear(self):
@@ -8801,8 +8872,8 @@
self.TreasureCntAward = 0
self.GridLimitCnt = 0
self.GridLimitCntList = list()
- self.WishCnt = 0
- self.WishList = list()
+ self.WishLibCnt = 0
+ self.WishLibList = list()
return
def GetLength(self):
@@ -8817,8 +8888,8 @@
for i in range(self.GridLimitCnt):
length += self.GridLimitCntList[i].GetLength()
length += 1
- for i in range(self.WishCnt):
- length += self.WishList[i].GetLength()
+ for i in range(self.WishLibCnt):
+ length += self.WishLibList[i].GetLength()
return length
@@ -8833,9 +8904,9 @@
data = CommFunc.WriteBYTE(data, self.GridLimitCnt)
for i in range(self.GridLimitCnt):
data = CommFunc.WriteString(data, self.GridLimitCntList[i].GetLength(), self.GridLimitCntList[i].GetBuffer())
- data = CommFunc.WriteBYTE(data, self.WishCnt)
- for i in range(self.WishCnt):
- data = CommFunc.WriteString(data, self.WishList[i].GetLength(), self.WishList[i].GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.WishLibCnt)
+ for i in range(self.WishLibCnt):
+ data = CommFunc.WriteString(data, self.WishLibList[i].GetLength(), self.WishLibList[i].GetBuffer())
return data
def OutputString(self):
@@ -8848,8 +8919,8 @@
TreasureCntAward:%d,
GridLimitCnt:%d,
GridLimitCntList:%s,
- WishCnt:%d,
- WishList:%s
+ WishLibCnt:%d,
+ WishLibList:%s
'''\
%(
self.TreasureType,
@@ -8860,7 +8931,7 @@
self.TreasureCntAward,
self.GridLimitCnt,
"...",
- self.WishCnt,
+ self.WishLibCnt,
"..."
)
return DumpString
@@ -33161,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