From a8e385260c4fc557bc23a9d9185c2f14ef140a36 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 22 二月 2019 10:45:25 +0800
Subject: [PATCH] 3023 【1.6】【2.0】七日巡礼道具使用加个提示
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 225 ++++++++++++++++++++++++++-----------------------------
1 files changed, 107 insertions(+), 118 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 9abbd8c..5f86b1a 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -6849,6 +6849,58 @@
#------------------------------------------------------
+# B5 04 拍卖行新上架拍品 #tagGCAddAuctionItem
+
+class tagGCAddAuctionItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ItemID", c_int),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB5
+ self.SubCmd = 0x04
+ 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 = 0x04
+ self.ItemID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagGCAddAuctionItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B5 04 拍卖行新上架拍品 //tagGCAddAuctionItem:
+ Cmd:%s,
+ SubCmd:%s,
+ ItemID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ItemID
+ )
+ return DumpString
+
+
+m_NAtagGCAddAuctionItem=tagGCAddAuctionItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAddAuctionItem.Cmd,m_NAtagGCAddAuctionItem.SubCmd))] = m_NAtagGCAddAuctionItem
+
+
+#------------------------------------------------------
# B5 01 拍卖行拍卖中的物品信息 #tagGCAuctionItemInfo
class tagGCAuctionItem(Structure):
@@ -6957,11 +7009,17 @@
class tagGCAuctionItemInfo(Structure):
Head = tagHead()
- QueryType = 0 #(DWORD QueryType)//查询的分类标识
- QueryCount = 0 #(BYTE QueryCount)//指定返回个数,0为全部
+ Job = 0 #(BYTE Job)//过滤职业,0为不限制
+ ItemType = 0 #(BYTE ItemType)//过滤类型,0为不限制
+ 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为全部
IsFamily = 0 #(BYTE IsFamily)//是否查询仙盟拍品
- AuctionItemCount = 0 #(WORD AuctionItemCount)//拍品数量
- AuctionItemList = list() #(vector<tagGCAuctionItem> AuctionItemList)//拍品列表
+ QueryTotalCount = 0 #(WORD QueryTotalCount)//查询条件实际总个数
+ AuctionItemCount = 0 #(WORD AuctionItemCount)//返回拍品数量
+ AuctionItemList = list() #(vector<tagGCAuctionItem> AuctionItemList)//返回拍品列表
data = None
def __init__(self):
@@ -6973,9 +7031,17 @@
def ReadData(self, _lpData, _pos=0, _Len=0):
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
- self.QueryType,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ItemType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ 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)
self.IsFamily,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.QueryTotalCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.AuctionItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
for i in range(self.AuctionItemCount):
temAuctionItemList = tagGCAuctionItem()
@@ -6988,9 +7054,15 @@
self.Head.Clear()
self.Head.Cmd = 0xB5
self.Head.SubCmd = 0x01
- self.QueryType = 0
+ self.Job = 0
+ self.ItemType = 0
+ self.ClassLV = 0
+ self.SpecItemIDCount = 0
+ self.SpecItemIDList = list()
+ self.FromNum = 0
self.QueryCount = 0
self.IsFamily = 0
+ self.QueryTotalCount = 0
self.AuctionItemCount = 0
self.AuctionItemList = list()
return
@@ -6998,9 +7070,15 @@
def GetLength(self):
length = 0
length += self.Head.GetLength()
- length += 4
length += 1
length += 1
+ length += 1
+ length += 1
+ length += 4 * self.SpecItemIDCount
+ length += 2
+ length += 1
+ length += 1
+ length += 2
length += 2
for i in range(self.AuctionItemCount):
length += self.AuctionItemList[i].GetLength()
@@ -7010,9 +7088,16 @@
def GetBuffer(self):
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.QueryType)
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteBYTE(data, self.ItemType)
+ 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)
data = CommFunc.WriteBYTE(data, self.IsFamily)
+ data = CommFunc.WriteWORD(data, self.QueryTotalCount)
data = CommFunc.WriteWORD(data, self.AuctionItemCount)
for i in range(self.AuctionItemCount):
data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer())
@@ -7021,17 +7106,29 @@
def OutputString(self):
DumpString = '''
Head:%s,
- QueryType:%d,
+ Job:%d,
+ ItemType:%d,
+ ClassLV:%d,
+ SpecItemIDCount:%d,
+ SpecItemIDList:%s,
+ FromNum:%d,
QueryCount:%d,
IsFamily:%d,
+ QueryTotalCount:%d,
AuctionItemCount:%d,
AuctionItemList:%s
'''\
%(
self.Head.OutputString(),
- self.QueryType,
+ self.Job,
+ self.ItemType,
+ self.ClassLV,
+ self.SpecItemIDCount,
+ "...",
+ self.FromNum,
self.QueryCount,
self.IsFamily,
+ self.QueryTotalCount,
self.AuctionItemCount,
"..."
)
@@ -14295,114 +14392,6 @@
m_NAtagMCMagicWeaponLVInfo=tagMCMagicWeaponLVInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponLVInfo.Head.Cmd,m_NAtagMCMagicWeaponLVInfo.Head.SubCmd))] = m_NAtagMCMagicWeaponLVInfo
-
-
-#------------------------------------------------------
-# A3 BE 通知客户端法宝精炼等级 #tagMCMagicWeaponMsg
-
-class tagMCMagicWeaponLV(Structure):
- _pack_ = 1
- _fields_ = [
- ("MWID", c_int), # 法宝ID
- ("MWLV", c_ubyte), # 精炼等级
- ]
-
- def __init__(self):
- self.Clear()
- 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.MWID = 0
- self.MWLV = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCMagicWeaponLV)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 BE 通知客户端法宝精炼等级 //tagMCMagicWeaponMsg:
- MWID:%d,
- MWLV:%d
- '''\
- %(
- self.MWID,
- self.MWLV
- )
- return DumpString
-
-
-class tagMCMagicWeaponMsg(Structure):
- Head = tagHead()
- Count = 0 #(BYTE Count)// 法宝个数
- MWInfo = list() #(vector<tagMCMagicWeaponLV> MWInfo)//法宝信息
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0xBE
- 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):
- temMWInfo = tagMCMagicWeaponLV()
- _pos = temMWInfo.ReadData(_lpData, _pos)
- self.MWInfo.append(temMWInfo)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0xBE
- self.Count = 0
- self.MWInfo = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.Count):
- length += self.MWInfo[i].GetLength()
-
- 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.WriteString(data, self.MWInfo[i].GetLength(), self.MWInfo[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- Count:%d,
- MWInfo:%s
- '''\
- %(
- self.Head.OutputString(),
- self.Count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCMagicWeaponMsg=tagMCMagicWeaponMsg()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponMsg.Head.Cmd,m_NAtagMCMagicWeaponMsg.Head.SubCmd))] = m_NAtagMCMagicWeaponMsg
#------------------------------------------------------
--
Gitblit v1.8.0