From 2362341e2a9f8467408ac4b99e1108ace98036fa Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 20 八月 2018 20:13:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 297 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 297 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 6862883..c69e43d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -7717,6 +7717,303 @@
#------------------------------------------------------
+# A5 C2 神兽变更助战状态 #tagCMDogzBattleStateChange
+
+class tagCMDogzBattleStateChange(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("DogzID", c_ubyte), # 神兽ID
+ ("BatteState", c_ubyte), #助战状态,0-召回,1-助战
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA5
+ self.SubCmd = 0xC2
+ 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 = 0xC2
+ self.DogzID = 0
+ self.BatteState = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMDogzBattleStateChange)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A5 C2 神兽变更助战状态 //tagCMDogzBattleStateChange:
+ Cmd:%s,
+ SubCmd:%s,
+ DogzID:%d,
+ BatteState:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.DogzID,
+ self.BatteState
+ )
+ return DumpString
+
+
+m_NAtagCMDogzBattleStateChange=tagCMDogzBattleStateChange()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDogzBattleStateChange.Cmd,m_NAtagCMDogzBattleStateChange.SubCmd))] = m_NAtagCMDogzBattleStateChange
+
+
+#------------------------------------------------------
+# A5 C3 神兽购买助战位 #tagCMDogzBuyBatteCount
+
+class tagCMDogzBuyBatteCount(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA5
+ self.SubCmd = 0xC3
+ 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 = 0xC3
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMDogzBuyBatteCount)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A5 C3 神兽购买助战位 //tagCMDogzBuyBatteCount:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCMDogzBuyBatteCount=tagCMDogzBuyBatteCount()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDogzBuyBatteCount.Cmd,m_NAtagCMDogzBuyBatteCount.SubCmd))] = m_NAtagCMDogzBuyBatteCount
+
+
+#------------------------------------------------------
+# A5 C0 神兽穿戴装备 #tagCMDogzEquipItem
+
+class tagCMDogzEquipItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("DogzID", c_ubyte), # 神兽ID
+ ("EquipIndex", c_ubyte), #神兽装备所在神兽背包索引
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA5
+ self.SubCmd = 0xC0
+ 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 = 0xC0
+ self.DogzID = 0
+ self.EquipIndex = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMDogzEquipItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A5 C0 神兽穿戴装备 //tagCMDogzEquipItem:
+ Cmd:%s,
+ SubCmd:%s,
+ DogzID:%d,
+ EquipIndex:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.DogzID,
+ self.EquipIndex
+ )
+ return DumpString
+
+
+m_NAtagCMDogzEquipItem=tagCMDogzEquipItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDogzEquipItem.Cmd,m_NAtagCMDogzEquipItem.SubCmd))] = m_NAtagCMDogzEquipItem
+
+
+#------------------------------------------------------
+# A5 C4 神兽装备强化 #tagCMDogzEquipPlus
+
+class tagCMDogzEquipPlus(Structure):
+ Head = tagHead()
+ EquipIndex = 0 #(BYTE EquipIndex)//神兽装备背包中索引
+ IndexCount = 0 #(BYTE IndexCount)//材料所在神兽物品背包索引的数量
+ IndexList = list() #(vector<BYTE> IndexList)//材料所在神兽物品背包索引列表
+ IsDouble = 0 #(BYTE IsDouble)//是否双倍强化
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA5
+ self.Head.SubCmd = 0xC4
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.EquipIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.IndexCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.IndexCount):
+ value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
+ self.IndexList.append(value)
+ self.IsDouble,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA5
+ self.Head.SubCmd = 0xC4
+ self.EquipIndex = 0
+ self.IndexCount = 0
+ self.IndexList = list()
+ self.IsDouble = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ length += 1 * self.IndexCount
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.EquipIndex)
+ data = CommFunc.WriteBYTE(data, self.IndexCount)
+ for i in range(self.IndexCount):
+ data = CommFunc.WriteBYTE(data, self.IndexList[i])
+ data = CommFunc.WriteBYTE(data, self.IsDouble)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ EquipIndex:%d,
+ IndexCount:%d,
+ IndexList:%s,
+ IsDouble:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.EquipIndex,
+ self.IndexCount,
+ "...",
+ self.IsDouble
+ )
+ return DumpString
+
+
+m_NAtagCMDogzEquipPlus=tagCMDogzEquipPlus()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDogzEquipPlus.Head.Cmd,m_NAtagCMDogzEquipPlus.Head.SubCmd))] = m_NAtagCMDogzEquipPlus
+
+
+#------------------------------------------------------
+# A5 C1 神兽卸下装备 #tagCMDogzUnEquipItem
+
+class tagCMDogzUnEquipItem(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("DogzID", c_ubyte), # 神兽ID
+ ("EquipPlace", c_ubyte), #卸下的装备位, 0代表卸下全部
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA5
+ self.SubCmd = 0xC1
+ 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 = 0xC1
+ self.DogzID = 0
+ self.EquipPlace = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMDogzUnEquipItem)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A5 C1 神兽卸下装备 //tagCMDogzUnEquipItem:
+ Cmd:%s,
+ SubCmd:%s,
+ DogzID:%d,
+ EquipPlace:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.DogzID,
+ self.EquipPlace
+ )
+ return DumpString
+
+
+m_NAtagCMDogzUnEquipItem=tagCMDogzUnEquipItem()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDogzUnEquipItem.Cmd,m_NAtagCMDogzUnEquipItem.SubCmd))] = m_NAtagCMDogzUnEquipItem
+
+
+#------------------------------------------------------
# A5 48 兑换大师等级经验 #tagCMExchangeMasterEXP
class tagCMExchangeMasterEXP(Structure):
--
Gitblit v1.8.0