From 414e694600077975d13979e925e152a52f4f8d03 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 09 十二月 2025 18:08:05 +0800
Subject: [PATCH] 383 【武将】武将宿缘-服务端
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 81 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 81 insertions(+), 0 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..df6e0dc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -11860,6 +11860,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):
--
Gitblit v1.8.0