From 320a417a53a57a9cb7d7759f430afe5f6e6399a6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 29 一月 2019 16:28:30 +0800
Subject: [PATCH] 6087 【后端】【1.5.200】春节红包雨活动(额度特效增加红包类型参数)
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 200 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 198 insertions(+), 2 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 8455bd5..0116cd3 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -6089,6 +6089,62 @@
#------------------------------------------------------
+# A3 30 装备诛仙装备 #tagCMEquipZhuXianItem
+
+class tagCMEquipZhuXianItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("EquipIndex", c_ubyte), #装备在诛仙装备背包中的索引
+ ("ItemIndex", c_ubyte), #装备在诛仙物品背包中的索引
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0x30
+ 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 = 0x30
+ self.EquipIndex = 0
+ self.ItemIndex = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMEquipZhuXianItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 30 装备诛仙装备 //tagCMEquipZhuXianItem:
+ Cmd:%s,
+ SubCmd:%s,
+ EquipIndex:%d,
+ ItemIndex:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.EquipIndex,
+ self.ItemIndex
+ )
+ return DumpString
+
+
+m_NAtagCMEquipZhuXianItem=tagCMEquipZhuXianItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMEquipZhuXianItem.Cmd,m_NAtagCMEquipZhuXianItem.SubCmd))] = m_NAtagCMEquipZhuXianItem
+
+
+#------------------------------------------------------
# A3 12 守护拾取物品 #tagCMGuardPickupItem
class tagCMGuardPickupItem(Structure):
@@ -6849,6 +6905,58 @@
#------------------------------------------------------
+# A3 31 卸下诛仙装备 #tagCMUnEquipZhuXianItem
+
+class tagCMUnEquipZhuXianItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("EquipIndex", c_ubyte), #装备在诛仙装备背包中的索引
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0x31
+ 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 = 0x31
+ self.EquipIndex = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMUnEquipZhuXianItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 31 卸下诛仙装备 //tagCMUnEquipZhuXianItem:
+ Cmd:%s,
+ SubCmd:%s,
+ EquipIndex:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.EquipIndex
+ )
+ return DumpString
+
+
+m_NAtagCMUnEquipZhuXianItem=tagCMUnEquipZhuXianItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUnEquipZhuXianItem.Cmd,m_NAtagCMUnEquipZhuXianItem.SubCmd))] = m_NAtagCMUnEquipZhuXianItem
+
+
+#------------------------------------------------------
# A3 2B 一键使用属性果实 #tagCMUseAllAttrFruit
class tagCMUseAllAttrFruit(Structure):
@@ -7025,6 +7133,90 @@
m_NAtagCMWingUp=tagCMWingUp()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMWingUp.Head.Cmd,m_NAtagCMWingUp.Head.SubCmd))] = m_NAtagCMWingUp
+
+
+#------------------------------------------------------
+# A3 32 诛仙装备分解 #tagCMZhuXianEquipDecompose
+
+class tagCMZhuXianEquipDecompose(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)//材料所在背包索引的数量
+ IndexList = list() #(vector<WORD> IndexList)//材料所在背包索引列表
+ ItemIDList = list() #(vector<DWORD> ItemIDList)//材料所在背包物品ID列表
+ IsAuto = 0 #(BYTE IsAuto)//是否自动分解
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA3
+ self.Head.SubCmd = 0x32
+ 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):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.IndexList.append(value)
+ for i in range(self.Count):
+ value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
+ self.ItemIDList.append(value)
+ self.IsAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA3
+ self.Head.SubCmd = 0x32
+ self.Count = 0
+ self.IndexList = list()
+ self.ItemIDList = list()
+ self.IsAuto = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 2 * self.Count
+ length += 4 * self.Count
+ length += 1
+
+ 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.WriteWORD(data, self.IndexList[i])
+ for i in range(self.Count):
+ data = CommFunc.WriteDWORD(data, self.ItemIDList[i])
+ data = CommFunc.WriteBYTE(data, self.IsAuto)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ IndexList:%s,
+ ItemIDList:%s,
+ IsAuto:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "...",
+ "...",
+ self.IsAuto
+ )
+ return DumpString
+
+
+m_NAtagCMZhuXianEquipDecompose=tagCMZhuXianEquipDecompose()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMZhuXianEquipDecompose.Head.Cmd,m_NAtagCMZhuXianEquipDecompose.Head.SubCmd))] = m_NAtagCMZhuXianEquipDecompose
#------------------------------------------------------
@@ -12568,6 +12760,7 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("RedPaketID", c_int), # 红包ID
+ ("GetWay", c_ubyte), #获得途径
]
def __init__(self):
@@ -12585,6 +12778,7 @@
self.Cmd = 0xAB
self.SubCmd = 0x12
self.RedPaketID = 0
+ self.GetWay = 0
return
def GetLength(self):
@@ -12597,12 +12791,14 @@
DumpString = '''// AB 12 抢红包 //tagCMGrabFamilyRedPacket:
Cmd:%s,
SubCmd:%s,
- RedPaketID:%d
+ RedPaketID:%d,
+ GetWay:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.RedPaketID
+ self.RedPaketID,
+ self.GetWay
)
return DumpString
--
Gitblit v1.8.0