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 | 289 ++++-----------------------------------------------------
1 files changed, 22 insertions(+), 267 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 0d42cf8..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
#------------------------------------------------------
@@ -6574,62 +6526,6 @@
#------------------------------------------------------
-# A5 42 领取成就奖励 #tagMCGetSuccessAward
-
-class tagMCGetSuccessAward(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("SuccID", c_int), #成就ID
- ("IsPassport", c_ubyte), #是否通行证奖励
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x42
- 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 = 0xA5
- self.SubCmd = 0x42
- self.SuccID = 0
- self.IsPassport = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCGetSuccessAward)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 42 领取成就奖励 //tagMCGetSuccessAward:
- Cmd:%s,
- SubCmd:%s,
- SuccID:%d,
- IsPassport:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.SuccID,
- self.IsPassport
- )
- return DumpString
-
-
-m_NAtagMCGetSuccessAward=tagMCGetSuccessAward()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGetSuccessAward.Cmd,m_NAtagMCGetSuccessAward.SubCmd))] = m_NAtagMCGetSuccessAward
-
-
-#------------------------------------------------------
# A5 44 通天令领取等级奖励 #tagCMGetTongTianLVAward
class tagCMGetTongTianLVAward(Structure):
@@ -9208,91 +9104,6 @@
#------------------------------------------------------
-# A6 08 发家族红包 #tagCMSendFamilyRedPacket
-
-class tagCMSendFamilyRedPacket(Structure):
- Head = tagHead()
- RedPacketID = 0 #(DWORD RedPacketID)// 红包ID,没有发0
- PacketCnt = 0 #(WORD PacketCnt)// 红包数量
- MoneyNum = 0 #(WORD MoneyNum)//金钱数量
- Wish = "" #(char Wish[33])//祝福语
- IsAnonymous = 0 #(BYTE IsAnonymous)//是否匿名
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA6
- self.Head.SubCmd = 0x08
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.RedPacketID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.PacketCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.MoneyNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.Wish,_pos = CommFunc.ReadString(_lpData, _pos,33)
- self.IsAnonymous,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA6
- self.Head.SubCmd = 0x08
- self.RedPacketID = 0
- self.PacketCnt = 0
- self.MoneyNum = 0
- self.Wish = ""
- self.IsAnonymous = 0
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 2
- length += 2
- length += 33
- length += 1
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.RedPacketID)
- data = CommFunc.WriteWORD(data, self.PacketCnt)
- data = CommFunc.WriteWORD(data, self.MoneyNum)
- data = CommFunc.WriteString(data, 33, self.Wish)
- data = CommFunc.WriteBYTE(data, self.IsAnonymous)
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- RedPacketID:%d,
- PacketCnt:%d,
- MoneyNum:%d,
- Wish:%s,
- IsAnonymous:%d
- '''\
- %(
- self.Head.OutputString(),
- self.RedPacketID,
- self.PacketCnt,
- self.MoneyNum,
- self.Wish,
- self.IsAnonymous
- )
- return DumpString
-
-
-m_NAtagCMSendFamilyRedPacket=tagCMSendFamilyRedPacket()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSendFamilyRedPacket.Head.Cmd,m_NAtagCMSendFamilyRedPacket.Head.SubCmd))] = m_NAtagCMSendFamilyRedPacket
-
-
-#------------------------------------------------------
# A6 20 搜索家族列表 #tagCMViewFamilyPage
class tagCMViewFamilyPage(Structure):
@@ -11445,62 +11256,6 @@
m_NAtagCMStartLuckyTreasure=tagCMStartLuckyTreasure()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMStartLuckyTreasure.Cmd,m_NAtagCMStartLuckyTreasure.SubCmd))] = m_NAtagCMStartLuckyTreasure
-
-
-#------------------------------------------------------
-# AB 12 抢红包 #tagCMGrabFamilyRedPacket
-
-class tagCMGrabFamilyRedPacket(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("RedPaketID", c_int), # 红包ID
- ("GetWay", c_ubyte), #获得途径
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xAB
- self.SubCmd = 0x12
- 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 = 0xAB
- self.SubCmd = 0x12
- self.RedPaketID = 0
- self.GetWay = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMGrabFamilyRedPacket)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// AB 12 抢红包 //tagCMGrabFamilyRedPacket:
- Cmd:%s,
- SubCmd:%s,
- RedPaketID:%d,
- GetWay:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.RedPaketID,
- self.GetWay
- )
- return DumpString
-
-
-m_NAtagCMGrabFamilyRedPacket=tagCMGrabFamilyRedPacket()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGrabFamilyRedPacket.Cmd,m_NAtagCMGrabFamilyRedPacket.SubCmd))] = m_NAtagCMGrabFamilyRedPacket
#------------------------------------------------------
--
Gitblit v1.8.0