From 7144eee263494fb574a03d629a2b7fc8b6827f42 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 25 二月 2019 14:16:45 +0800
Subject: [PATCH] 6250 【后端】【2.0】拍卖行开发单(封包)
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 302 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 281 insertions(+), 21 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 8021f8b..e15e640 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -2427,22 +2427,19 @@
#------------------------------------------------------
-# B5 10 拍卖行查询拍卖中的物品 #tagCGQueryAuctionItem
+# B5 16 拍卖行查询关注中的拍品 #tagCGQueryAttentionAuctionItem
-class tagCGQueryAuctionItem(Structure):
+class tagCGQueryAttentionAuctionItem(Structure):
_pack_ = 1
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
- ("QueryType", c_ushort), #查询的分类标识
- ("QueryCount", c_ubyte), #指定返回个数,0为全部
- ("IsFamily", c_ubyte), #是否查询仙盟拍品
]
def __init__(self):
self.Clear()
self.Cmd = 0xB5
- self.SubCmd = 0x10
+ self.SubCmd = 0x16
return
def ReadData(self, stringData, _pos=0, _len=0):
@@ -2452,38 +2449,141 @@
def Clear(self):
self.Cmd = 0xB5
- self.SubCmd = 0x10
- self.QueryType = 0
- self.QueryCount = 0
- self.IsFamily = 0
+ self.SubCmd = 0x16
return
def GetLength(self):
- return sizeof(tagCGQueryAuctionItem)
+ return sizeof(tagCGQueryAttentionAuctionItem)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// B5 10 拍卖行查询拍卖中的物品 //tagCGQueryAuctionItem:
+ DumpString = '''// B5 16 拍卖行查询关注中的拍品 //tagCGQueryAttentionAuctionItem:
Cmd:%s,
- SubCmd:%s,
- QueryType:%d,
- QueryCount:%d,
- IsFamily:%d
+ SubCmd:%s
'''\
%(
self.Cmd,
- self.SubCmd,
- self.QueryType,
- self.QueryCount,
- self.IsFamily
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCGQueryAttentionAuctionItem=tagCGQueryAttentionAuctionItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryAttentionAuctionItem.Cmd,m_NAtagCGQueryAttentionAuctionItem.SubCmd))] = m_NAtagCGQueryAttentionAuctionItem
+
+
+#------------------------------------------------------
+# B5 10 拍卖行查询拍卖中的物品 #tagCGQueryAuctionItem
+
+class tagCGQueryAuctionItem(Structure):
+ Head = tagHead()
+ Job = 0 #(BYTE Job)//过滤职业,0为不限制
+ ItemTypeCount = 0 #(BYTE ItemTypeCount)
+ ItemTypeList = list() #(vector<DWORD> ItemTypeList)//指定的物品类型
+ ClassLV = 0 #(BYTE ClassLV)//过滤阶数,0为不限制
+ SpecItemIDCount = 0 #(BYTE SpecItemIDCount)//指定物品ID个数
+ SpecItemIDList = list() #(vector<DWORD> SpecItemIDList)//指定物品ID
+ FromNum = 0 #(WORD FromNum)//查询起始数 (从1开始)
+ QueryCount = 0 #(BYTE QueryCount)//查询个数,0为全部
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB5
+ self.Head.SubCmd = 0x10
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ItemTypeCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.ItemTypeCount):
+ value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+ self.ItemTypeList.append(value)
+ self.ClassLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.SpecItemIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.SpecItemIDCount):
+ value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+ self.SpecItemIDList.append(value)
+ self.FromNum,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.QueryCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB5
+ self.Head.SubCmd = 0x10
+ self.Job = 0
+ self.ItemTypeCount = 0
+ self.ItemTypeList = list()
+ self.ClassLV = 0
+ self.SpecItemIDCount = 0
+ self.SpecItemIDList = list()
+ self.FromNum = 0
+ self.QueryCount = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += 4 * self.ItemTypeCount
+ length += 1
+ length += 1
+ length += 4 * self.SpecItemIDCount
+ length += 2
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteBYTE(data, self.ItemTypeCount)
+ for i in range(self.ItemTypeCount):
+ data = CommFunc.WriteDWORD(data, self.ItemTypeList[i])
+ data = CommFunc.WriteBYTE(data, self.ClassLV)
+ data = CommFunc.WriteBYTE(data, self.SpecItemIDCount)
+ for i in range(self.SpecItemIDCount):
+ data = CommFunc.WriteDWORD(data, self.SpecItemIDList[i])
+ data = CommFunc.WriteWORD(data, self.FromNum)
+ data = CommFunc.WriteBYTE(data, self.QueryCount)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Job:%d,
+ ItemTypeCount:%d,
+ ItemTypeList:%s,
+ ClassLV:%d,
+ SpecItemIDCount:%d,
+ SpecItemIDList:%s,
+ FromNum:%d,
+ QueryCount:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Job,
+ self.ItemTypeCount,
+ "...",
+ self.ClassLV,
+ self.SpecItemIDCount,
+ "...",
+ self.FromNum,
+ self.QueryCount
)
return DumpString
m_NAtagCGQueryAuctionItem=tagCGQueryAuctionItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryAuctionItem.Cmd,m_NAtagCGQueryAuctionItem.SubCmd))] = m_NAtagCGQueryAuctionItem
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryAuctionItem.Head.Cmd,m_NAtagCGQueryAuctionItem.Head.SubCmd))] = m_NAtagCGQueryAuctionItem
#------------------------------------------------------
@@ -2535,6 +2635,54 @@
#------------------------------------------------------
+# B5 15 拍卖行查询仙盟拍卖中的拍品 #tagCGQueryFamilyAuctionItem
+
+class tagCGQueryFamilyAuctionItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB5
+ self.SubCmd = 0x15
+ 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 = 0xB5
+ self.SubCmd = 0x15
+ return
+
+ def GetLength(self):
+ return sizeof(tagCGQueryFamilyAuctionItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B5 15 拍卖行查询仙盟拍卖中的拍品 //tagCGQueryFamilyAuctionItem:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCGQueryFamilyAuctionItem=tagCGQueryFamilyAuctionItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryFamilyAuctionItem.Cmd,m_NAtagCGQueryFamilyAuctionItem.SubCmd))] = m_NAtagCGQueryFamilyAuctionItem
+
+
+#------------------------------------------------------
# B5 11 拍卖行查询个人拍卖中的物品 #tagCGQueryPlayerAuctionItem
class tagCGQueryPlayerAuctionItem(Structure):
@@ -2580,6 +2728,70 @@
m_NAtagCGQueryPlayerAuctionItem=tagCGQueryPlayerAuctionItem()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryPlayerAuctionItem.Cmd,m_NAtagCGQueryPlayerAuctionItem.SubCmd))] = m_NAtagCGQueryPlayerAuctionItem
+
+
+#------------------------------------------------------
+# B5 17 拍卖行查询定位目标拍品 #tagCGQueryTagAuctionItem
+
+class tagCGQueryTagAuctionItem(Structure):
+ Head = tagHead()
+ ItemGUID = "" #(char ItemGUID[40])
+ ItemID = 0 #(DWORD ItemID)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB5
+ self.Head.SubCmd = 0x17
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
+ self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB5
+ self.Head.SubCmd = 0x17
+ self.ItemGUID = ""
+ self.ItemID = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 40
+ length += 4
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteString(data, 40, self.ItemGUID)
+ data = CommFunc.WriteDWORD(data, self.ItemID)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ ItemGUID:%s,
+ ItemID:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.ItemGUID,
+ self.ItemID
+ )
+ return DumpString
+
+
+m_NAtagCGQueryTagAuctionItem=tagCGQueryTagAuctionItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryTagAuctionItem.Head.Cmd,m_NAtagCGQueryTagAuctionItem.Head.SubCmd))] = m_NAtagCGQueryTagAuctionItem
#------------------------------------------------------
@@ -4966,6 +5178,54 @@
#------------------------------------------------------
+# A2 32 神秘商店刷新 #tagCMRefreshMysticalShop
+
+class tagCMRefreshMysticalShop(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA2
+ self.SubCmd = 0x32
+ 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 = 0x32
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMRefreshMysticalShop)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A2 32 神秘商店刷新 //tagCMRefreshMysticalShop:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCMRefreshMysticalShop=tagCMRefreshMysticalShop()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshMysticalShop.Cmd,m_NAtagCMRefreshMysticalShop.SubCmd))] = m_NAtagCMRefreshMysticalShop
+
+
+#------------------------------------------------------
# A2 14 刷新定时神秘商店物品#tagCMRefreshShopItem
class tagCMRefreshShopItem(Structure):
--
Gitblit v1.8.0