From 8683baa38581e664f92fcfd7d38edf6b01e8b157 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 07 八月 2025 16:19:09 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(重生扣除货币)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 119 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 eaaa9f9..cb78e1b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -17251,6 +17251,73 @@
#------------------------------------------------------
+# B2 40 武将遣散 #tagCSHeroDismiss
+
+class tagCSHeroDismiss(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)
+ ItemIndexList = list() #(vector<WORD> ItemIndexList)// 武将物品所在武将背包位置索引列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x40
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.Count):
+ 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 = 0x40
+ self.Count = 0
+ self.ItemIndexList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 2 * self.Count
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteWORD(data, self.ItemIndexList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ ItemIndexList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagCSHeroDismiss=tagCSHeroDismiss()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroDismiss.Head.Cmd,m_NAtagCSHeroDismiss.Head.SubCmd))] = m_NAtagCSHeroDismiss
+
+
+#------------------------------------------------------
# B2 38 武将锁定 #tagCSHeroLock
class tagCSHeroLock(Structure):
@@ -17359,6 +17426,58 @@
#------------------------------------------------------
+# B2 39 武将重生 #tagCSHeroRebirth
+
+class tagCSHeroRebirth(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x39
+ 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 = 0xB2
+ self.SubCmd = 0x39
+ self.ItemIndex = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSHeroRebirth)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 39 武将重生 //tagCSHeroRebirth:
+ Cmd:%s,
+ SubCmd:%s,
+ ItemIndex:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ItemIndex
+ )
+ return DumpString
+
+
+m_NAtagCSHeroRebirth=tagCSHeroRebirth()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroRebirth.Cmd,m_NAtagCSHeroRebirth.SubCmd))] = m_NAtagCSHeroRebirth
+
+
+#------------------------------------------------------
# B2 31 武将升星 #tagCSHeroStarUP
class tagCSHeroStarUP(Structure):
--
Gitblit v1.8.0