From e85fa744148b683927baebf256f31ad65e069f27 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 18 二月 2025 15:15:23 +0800
Subject: [PATCH] 10393 2月11-14版本更新(商店限购改DWORD)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 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 de98383..bba43a4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -8193,6 +8193,62 @@
 
 
 #------------------------------------------------------
+# A3 10 购买商城物品 #tagCMBuyItem
+
+class  tagCMBuyItem(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("BuyItemIndex", c_ushort),    #购买的物品索引
+                  ("BuyCount", c_int),    #购买数量
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xA3
+        self.SubCmd = 0x10
+        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 = 0xA3
+        self.SubCmd = 0x10
+        self.BuyItemIndex = 0
+        self.BuyCount = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagCMBuyItem)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// A3 10 购买商城物品 //tagCMBuyItem:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                BuyItemIndex:%d,
+                                BuyCount:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.BuyItemIndex,
+                                self.BuyCount
+                                )
+        return DumpString
+
+
+m_NAtagCMBuyItem=tagCMBuyItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyItem.Cmd,m_NAtagCMBuyItem.SubCmd))] = m_NAtagCMBuyItem
+
+
+#------------------------------------------------------
 # A3 07 过期物品续费 #tagCMItemRenew
 
 class  tagCMItemRenew(Structure):

--
Gitblit v1.8.0