From ec19547ca0985de3f1c4045411ee6c171204e535 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 21 十月 2025 19:00:45 +0800
Subject: [PATCH] 297 【常规】坊市系统-服务端(坊市、公会、将魂)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py |   92 +++++++++++-----------------------------------
 1 files changed, 22 insertions(+), 70 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 7b7a484..bfe39f1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -1645,58 +1645,6 @@
 
 
 #------------------------------------------------------
-#A2 01 请求npc商店物品信息 #tagCMQueryNPCShopItem
-
-class  tagCMQueryNPCShopItem(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("NPCShopID", c_int),    #商店npcid
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xA2
-        self.SubCmd = 0x01
-        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 = 0xA2
-        self.SubCmd = 0x01
-        self.NPCShopID = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCMQueryNPCShopItem)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''//A2 01 请求npc商店物品信息 //tagCMQueryNPCShopItem:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                NPCShopID:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.NPCShopID
-                                )
-        return DumpString
-
-
-m_NAtagCMQueryNPCShopItem=tagCMQueryNPCShopItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryNPCShopItem.Cmd,m_NAtagCMQueryNPCShopItem.SubCmd))] = m_NAtagCMQueryNPCShopItem
-
-
-#------------------------------------------------------
 # A2 06 快速完成任务#tagCMQuickFinishMission
 
 class  tagCMQuickFinishMission(Structure):
@@ -1753,13 +1701,14 @@
 
 
 #------------------------------------------------------
-# A2 32 神秘商店刷新 #tagCMRefreshMysticalShop
+# A2 32 刷新商店 #tagCSRefreshShop
 
-class  tagCMRefreshMysticalShop(Structure):
+class  tagCSRefreshShop(Structure):
     _pack_ = 1
     _fields_ = [
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
+                  ("ShopType", c_ushort),    
                   ]
 
     def __init__(self):
@@ -1776,28 +1725,31 @@
     def Clear(self):
         self.Cmd = 0xA2
         self.SubCmd = 0x32
+        self.ShopType = 0
         return
 
     def GetLength(self):
-        return sizeof(tagCMRefreshMysticalShop)
+        return sizeof(tagCSRefreshShop)
 
     def GetBuffer(self):
         return string_at(addressof(self), self.GetLength())
 
     def OutputString(self):
-        DumpString = '''// A2 32 神秘商店刷新 //tagCMRefreshMysticalShop:
+        DumpString = '''// A2 32 刷新商店 //tagCSRefreshShop:
                                 Cmd:%s,
-                                SubCmd:%s
+                                SubCmd:%s,
+                                ShopType:%d
                                 '''\
                                 %(
                                 self.Cmd,
-                                self.SubCmd
+                                self.SubCmd,
+                                self.ShopType
                                 )
         return DumpString
 
 
-m_NAtagCMRefreshMysticalShop=tagCMRefreshMysticalShop()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshMysticalShop.Cmd,m_NAtagCMRefreshMysticalShop.SubCmd))] = m_NAtagCMRefreshMysticalShop
+m_NAtagCSRefreshShop=tagCSRefreshShop()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSRefreshShop.Cmd,m_NAtagCSRefreshShop.SubCmd))] = m_NAtagCSRefreshShop
 
 
 #------------------------------------------------------
@@ -2261,14 +2213,14 @@
 
 
 #------------------------------------------------------
-# A3 10 购买商城物品 #tagCMBuyItem
+# A3 10 购买商城物品 #tagCSBuyItem
 
-class  tagCMBuyItem(Structure):
+class  tagCSBuyItem(Structure):
     _pack_ = 1
     _fields_ = [
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
-                  ("BuyItemIndex", c_ushort),    #购买的物品索引
+                  ("ShopID", c_int),    #商品ID
                   ("BuyCount", c_int),    #购买数量
                   ]
 
@@ -2286,34 +2238,34 @@
     def Clear(self):
         self.Cmd = 0xA3
         self.SubCmd = 0x10
-        self.BuyItemIndex = 0
+        self.ShopID = 0
         self.BuyCount = 0
         return
 
     def GetLength(self):
-        return sizeof(tagCMBuyItem)
+        return sizeof(tagCSBuyItem)
 
     def GetBuffer(self):
         return string_at(addressof(self), self.GetLength())
 
     def OutputString(self):
-        DumpString = '''// A3 10 购买商城物品 //tagCMBuyItem:
+        DumpString = '''// A3 10 购买商城物品 //tagCSBuyItem:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                BuyItemIndex:%d,
+                                ShopID:%d,
                                 BuyCount:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.BuyItemIndex,
+                                self.ShopID,
                                 self.BuyCount
                                 )
         return DumpString
 
 
-m_NAtagCMBuyItem=tagCMBuyItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyItem.Cmd,m_NAtagCMBuyItem.SubCmd))] = m_NAtagCMBuyItem
+m_NAtagCSBuyItem=tagCSBuyItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSBuyItem.Cmd,m_NAtagCSBuyItem.SubCmd))] = m_NAtagCSBuyItem
 
 
 #------------------------------------------------------

--
Gitblit v1.8.0