From 14b330f7dd90ab09f2a7a00c2bcf3a8008e0abd3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 19 八月 2025 16:13:06 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(删除4012效果)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 975 ++++++++++++++++++++++++--------------------------------
1 files changed, 422 insertions(+), 553 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index cae4322..f4abfca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -673,54 +673,6 @@
#------------------------------------------------------
-# A1 09 同步打包玩家数据 #tagCMSycnPlayerPackData
-
-class tagCMSycnPlayerPackData(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA1
- self.SubCmd = 0x09
- 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 = 0xA1
- self.SubCmd = 0x09
- return
-
- def GetLength(self):
- return sizeof(tagCMSycnPlayerPackData)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A1 09 同步打包玩家数据 //tagCMSycnPlayerPackData:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMSycnPlayerPackData=tagCMSycnPlayerPackData()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSycnPlayerPackData.Cmd,m_NAtagCMSycnPlayerPackData.SubCmd))] = m_NAtagCMSycnPlayerPackData
-
-
-#------------------------------------------------------
#A1 03 设置是否成年 #tagCMAdult
class tagCMAdult(Structure):
@@ -2677,58 +2629,6 @@
#------------------------------------------------------
-# A3 17 增加果实使用上限 #tagCMAddFruitUseLimit
-
-class tagCMAddFruitUseLimit(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("ItemID", c_int), #果实物品ID
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA3
- self.SubCmd = 0x17
- 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 = 0x17
- self.ItemID = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMAddFruitUseLimit)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 17 增加果实使用上限 //tagCMAddFruitUseLimit:
- Cmd:%s,
- SubCmd:%s,
- ItemID:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.ItemID
- )
- return DumpString
-
-
-m_NAtagCMAddFruitUseLimit=tagCMAddFruitUseLimit()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMAddFruitUseLimit.Cmd,m_NAtagCMAddFruitUseLimit.SubCmd))] = m_NAtagCMAddFruitUseLimit
-
-
-#------------------------------------------------------
# A3 10 购买商城物品 #tagCMBuyItem
class tagCMBuyItem(Structure):
@@ -4091,83 +3991,6 @@
#------------------------------------------------------
-# A3 2A 回收魂石 #tagCMRecycleAttrFruit
-
-class tagCMRecycleAttrFruit(Structure):
- Head = tagHead()
- IndexCount = 0 #(BYTE IndexCount)//索引个数
- IndexList = list() #(vector<BYTE> IndexList)//物品在背包中索引列表
- RecycleCountList = list() #(vector<WORD> RecycleCountList)//索引对应回收个数列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x2A
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_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)
- for i in range(self.IndexCount):
- value,_pos=CommFunc.ReadWORD(_lpData,_pos)
- self.RecycleCountList.append(value)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x2A
- self.IndexCount = 0
- self.IndexList = list()
- self.RecycleCountList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- length += 1 * self.IndexCount
- length += 2 * self.IndexCount
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.IndexCount)
- for i in range(self.IndexCount):
- data = CommFunc.WriteBYTE(data, self.IndexList[i])
- for i in range(self.IndexCount):
- data = CommFunc.WriteWORD(data, self.RecycleCountList[i])
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- IndexCount:%d,
- IndexList:%s,
- RecycleCountList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.IndexCount,
- "...",
- "..."
- )
- return DumpString
-
-
-m_NAtagCMRecycleAttrFruit=tagCMRecycleAttrFruit()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRecycleAttrFruit.Head.Cmd,m_NAtagCMRecycleAttrFruit.Head.SubCmd))] = m_NAtagCMRecycleAttrFruit
-
-
-#------------------------------------------------------
#A3 03 物品合成 #tagCMItemCompound
class tagCMItemCompound(Structure):
@@ -4492,58 +4315,6 @@
#------------------------------------------------------
-# A3 2B 一键使用属性果实 #tagCMUseAllAttrFruit
-
-class tagCMUseAllAttrFruit(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("FuncIndex", c_ubyte), #功能索引
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA3
- self.SubCmd = 0x2B
- 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 = 0x2B
- self.FuncIndex = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMUseAllAttrFruit)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 2B 一键使用属性果实 //tagCMUseAllAttrFruit:
- Cmd:%s,
- SubCmd:%s,
- FuncIndex:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.FuncIndex
- )
- return DumpString
-
-
-m_NAtagCMUseAllAttrFruit=tagCMUseAllAttrFruit()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseAllAttrFruit.Cmd,m_NAtagCMUseAllAttrFruit.SubCmd))] = m_NAtagCMUseAllAttrFruit
-
-
-#------------------------------------------------------
# A3 23 使用物品 #tagCMUseItems
class tagCMUseItemsSelect(Structure):
@@ -4588,7 +4359,7 @@
class tagCMUseItems(Structure):
Head = tagHead()
ItemIndex = 0 #(BYTE ItemIndex)//物品在背包中索引
- UseCnt = 0 #(WORD UseCnt)//使用个数,0表示全部使用
+ UseCnt = 0 #(DWORD UseCnt)//使用个数,0表示全部使用
ExData = 0 #(DWORD ExData)//使用扩展值, 默认0, 选择物品宝箱时发送选择的物品ID
SelectCount = 0 #(BYTE SelectCount)//指定选择项,当批量使用单个箱子需要同时选中多种选项时使用该值
SelectList = list() #(vector<tagCMUseItemsSelect> SelectList)
@@ -4604,7 +4375,7 @@
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
self.ItemIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.UseCnt,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.UseCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ExData,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.SelectCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.SelectCount):
@@ -4629,7 +4400,7 @@
length = 0
length += self.Head.GetLength()
length += 1
- length += 2
+ length += 4
length += 4
length += 1
for i in range(self.SelectCount):
@@ -4641,7 +4412,7 @@
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
data = CommFunc.WriteBYTE(data, self.ItemIndex)
- data = CommFunc.WriteWORD(data, self.UseCnt)
+ data = CommFunc.WriteDWORD(data, self.UseCnt)
data = CommFunc.WriteDWORD(data, self.ExData)
data = CommFunc.WriteBYTE(data, self.SelectCount)
for i in range(self.SelectCount):
@@ -5491,58 +5262,6 @@
#------------------------------------------------------
-# A5 30 购买魔魂铜钱经验什么的 #tagCMBuySomething
-
-class tagCMBuySomething(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("Type", c_ubyte), #14铜钱,15经验
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- 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 = 0xA5
- self.SubCmd = 0x30
- self.Type = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMBuySomething)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 30 购买魔魂铜钱经验什么的 //tagCMBuySomething:
- Cmd:%s,
- SubCmd:%s,
- Type:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.Type
- )
- return DumpString
-
-
-m_NAtagCMBuySomething=tagCMBuySomething()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuySomething.Cmd,m_NAtagCMBuySomething.SubCmd))] = m_NAtagCMBuySomething
-
-
-#------------------------------------------------------
#A5 01 坐骑激活 #tagPlayerActivateHorse
class tagPlayerActivateHorse(Structure):
@@ -5704,124 +5423,6 @@
m_NAtagCMActiveAllEquipAttr=tagCMActiveAllEquipAttr()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActiveAllEquipAttr.Cmd,m_NAtagCMActiveAllEquipAttr.SubCmd))] = m_NAtagCMActiveAllEquipAttr
-
-
-#------------------------------------------------------
-# A5 49 大师天赋技能加点 #tagCMAddMasterSkillPoint
-
-class tagCMMasterSkillPoint(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("SkillID", c_int), # 天赋技能ID
- ("AddPoint", c_ubyte), # 加的点数
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x49
- 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 = 0x49
- self.SkillID = 0
- self.AddPoint = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMMasterSkillPoint)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 49 大师天赋技能加点 //tagCMAddMasterSkillPoint:
- Cmd:%s,
- SubCmd:%s,
- SkillID:%d,
- AddPoint:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.SkillID,
- self.AddPoint
- )
- return DumpString
-
-
-class tagCMAddMasterSkillPoint(Structure):
- Head = tagHead()
- SkillCnt = 0 #(BYTE SkillCnt)// 变更技能个数
- AddSkillPointList = list() #(vector<tagCMMasterSkillPoint> AddSkillPointList)// 加的技能点数列表
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA5
- self.Head.SubCmd = 0x49
- return
-
- def ReadData(self, _lpData, _pos=0, _Len=0):
- self.Clear()
- _pos = self.Head.ReadData(_lpData, _pos)
- self.SkillCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- for i in range(self.SkillCnt):
- temAddSkillPointList = tagCMMasterSkillPoint()
- _pos = temAddSkillPointList.ReadData(_lpData, _pos)
- self.AddSkillPointList.append(temAddSkillPointList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA5
- self.Head.SubCmd = 0x49
- self.SkillCnt = 0
- self.AddSkillPointList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.SkillCnt):
- length += self.AddSkillPointList[i].GetLength()
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.SkillCnt)
- for i in range(self.SkillCnt):
- data = CommFunc.WriteString(data, self.AddSkillPointList[i].GetLength(), self.AddSkillPointList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- SkillCnt:%d,
- AddSkillPointList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.SkillCnt,
- "..."
- )
- return DumpString
-
-
-m_NAtagCMAddMasterSkillPoint=tagCMAddMasterSkillPoint()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMAddMasterSkillPoint.Head.Cmd,m_NAtagCMAddMasterSkillPoint.Head.SubCmd))] = m_NAtagCMAddMasterSkillPoint
#------------------------------------------------------
@@ -7405,62 +7006,6 @@
m_NAtagCMEquipPartSuiteActivate=tagCMEquipPartSuiteActivate()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMEquipPartSuiteActivate.Cmd,m_NAtagCMEquipPartSuiteActivate.SubCmd))] = m_NAtagCMEquipPartSuiteActivate
-
-
-#------------------------------------------------------
-# A5 48 兑换大师等级经验 #tagCMExchangeMasterEXP
-
-class tagCMExchangeMasterEXP(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("Multiples", c_ubyte), # 20亿经验倍数
- ("ExtraExp", c_int), # 额外附加经验(不超过20亿)
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x48
- 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 = 0x48
- self.Multiples = 0
- self.ExtraExp = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMExchangeMasterEXP)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 48 兑换大师等级经验 //tagCMExchangeMasterEXP:
- Cmd:%s,
- SubCmd:%s,
- Multiples:%d,
- ExtraExp:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.Multiples,
- self.ExtraExp
- )
- return DumpString
-
-
-m_NAtagCMExchangeMasterEXP=tagCMExchangeMasterEXP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMExchangeMasterEXP.Cmd,m_NAtagCMExchangeMasterEXP.SubCmd))] = m_NAtagCMExchangeMasterEXP
#------------------------------------------------------
@@ -9465,54 +9010,6 @@
m_NAtagCMResetFBJoinCnt=tagCMResetFBJoinCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMResetFBJoinCnt.Cmd,m_NAtagCMResetFBJoinCnt.SubCmd))] = m_NAtagCMResetFBJoinCnt
-
-
-#------------------------------------------------------
-# A5 50 重置大师天赋技能 #tagCMResetMasterSkill
-
-class tagCMResetMasterSkill(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA5
- self.SubCmd = 0x50
- 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 = 0x50
- return
-
- def GetLength(self):
- return sizeof(tagCMResetMasterSkill)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A5 50 重置大师天赋技能 //tagCMResetMasterSkill:
- Cmd:%s,
- SubCmd:%s
- '''\
- %(
- self.Cmd,
- self.SubCmd
- )
- return DumpString
-
-
-m_NAtagCMResetMasterSkill=tagCMResetMasterSkill()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMResetMasterSkill.Cmd,m_NAtagCMResetMasterSkill.SubCmd))] = m_NAtagCMResetMasterSkill
#------------------------------------------------------
@@ -17372,6 +16869,66 @@
#------------------------------------------------------
+# B2 37 武将图鉴激活升级 #tagCSHeroBookUP
+
+class tagCSHeroBookUP(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("HeroID", c_int), #武将ID
+ ("ItemIndex", c_ushort), #关联武将物品所在武将背包索引,激活时可不用发
+ ("BookType", c_ubyte), #图鉴激活类型: 0-初始激活;1-星级升级;2-突破等级升级
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x37
+ 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 = 0xB2
+ self.SubCmd = 0x37
+ self.HeroID = 0
+ self.ItemIndex = 0
+ self.BookType = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSHeroBookUP)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 37 武将图鉴激活升级 //tagCSHeroBookUP:
+ Cmd:%s,
+ SubCmd:%s,
+ HeroID:%d,
+ ItemIndex:%d,
+ BookType:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.HeroID,
+ self.ItemIndex,
+ self.BookType
+ )
+ return DumpString
+
+
+m_NAtagCSHeroBookUP=tagCSHeroBookUP()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroBookUP.Cmd,m_NAtagCSHeroBookUP.SubCmd))] = m_NAtagCSHeroBookUP
+
+
+#------------------------------------------------------
# B2 32 武将突破 #tagCSHeroBreak
class tagCSHeroBreak(Structure):
@@ -17424,6 +16981,129 @@
#------------------------------------------------------
+# B2 40 武将遣散 #tagCSHeroDismiss
+
+class tagCSHeroDismiss(Structure):
+ Head = tagHead()
+ Count = 0 #(WORD Count)
+ ItemIndexList = list() #(vector<WORD> ItemIndexList)// 武将物品所在武将背包位置索引列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x40
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ for i in range(self.Count):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.ItemIndexList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x40
+ self.Count = 0
+ self.ItemIndexList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 2
+ length += 2 * self.Count
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteWORD(data, self.Count)
+ for i in range(self.Count):
+ data = CommFunc.WriteWORD(data, self.ItemIndexList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ ItemIndexList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagCSHeroDismiss=tagCSHeroDismiss()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroDismiss.Head.Cmd,m_NAtagCSHeroDismiss.Head.SubCmd))] = m_NAtagCSHeroDismiss
+
+
+#------------------------------------------------------
+# B2 38 武将锁定 #tagCSHeroLock
+
+class tagCSHeroLock(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
+ ("IsLock", c_ubyte), #0-解锁;1-锁定
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x38
+ 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 = 0xB2
+ self.SubCmd = 0x38
+ self.ItemIndex = 0
+ self.IsLock = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSHeroLock)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 38 武将锁定 //tagCSHeroLock:
+ Cmd:%s,
+ SubCmd:%s,
+ ItemIndex:%d,
+ IsLock:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ItemIndex,
+ self.IsLock
+ )
+ return DumpString
+
+
+m_NAtagCSHeroLock=tagCSHeroLock()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroLock.Cmd,m_NAtagCSHeroLock.SubCmd))] = m_NAtagCSHeroLock
+
+
+#------------------------------------------------------
# B2 30 武将升级 #tagCSHeroLVUP
class tagCSHeroLVUP(Structure):
@@ -17473,6 +17153,58 @@
m_NAtagCSHeroLVUP=tagCSHeroLVUP()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroLVUP.Cmd,m_NAtagCSHeroLVUP.SubCmd))] = m_NAtagCSHeroLVUP
+
+
+#------------------------------------------------------
+# B2 39 武将重生 #tagCSHeroRebirth
+
+class tagCSHeroRebirth(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x39
+ 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 = 0xB2
+ self.SubCmd = 0x39
+ self.ItemIndex = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCSHeroRebirth)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 39 武将重生 //tagCSHeroRebirth:
+ Cmd:%s,
+ SubCmd:%s,
+ ItemIndex:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ItemIndex
+ )
+ return DumpString
+
+
+m_NAtagCSHeroRebirth=tagCSHeroRebirth()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroRebirth.Cmd,m_NAtagCSHeroRebirth.SubCmd))] = m_NAtagCSHeroRebirth
#------------------------------------------------------
@@ -18940,9 +18672,9 @@
#------------------------------------------------------
-# B4 12 战斗阵型保存 #tagCSHeroBattlePosSave
+# B4 12 战斗阵容保存 #tagCSHeroLineupSave
-class tagCSHeroBattlePos(Structure):
+class tagCSHeroLineupPos(Structure):
_pack_ = 1
_fields_ = [
("ItemIndex", c_ushort), #武将物品所在武将背包位置索引
@@ -18964,13 +18696,13 @@
return
def GetLength(self):
- return sizeof(tagCSHeroBattlePos)
+ return sizeof(tagCSHeroLineupPos)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// B4 12 战斗阵型保存 //tagCSHeroBattlePosSave:
+ DumpString = '''// B4 12 战斗阵容保存 //tagCSHeroLineupSave:
ItemIndex:%d,
PosNum:%d
'''\
@@ -18981,11 +18713,12 @@
return DumpString
-class tagCSHeroBattlePosSave(Structure):
+class tagCSHeroLineupSave(Structure):
Head = tagHead()
- FuncType = 0 #(BYTE FuncType)//布阵功能类型:0-默认主阵型;其他待扩展,如某个活动的防守阵型
+ LineupID = 0 #(BYTE LineupID)//阵容ID:1-主阵容;其他待扩展,如某个防守阵容
+ ShapeType = 0 #(BYTE ShapeType)//本阵容阵型,0为默认阵型,可扩展不同的阵型
PosCnt = 0 #(BYTE PosCnt)
- HeroPosList = list() #(vector<tagCSHeroBattlePos> HeroPosList)// 保存的阵型,只要发送最终的阵型武将位置即可
+ HeroPosList = list() #(vector<tagCSHeroLineupPos> HeroPosList)// 保存的阵容,只发送最终的阵容武将位置即可
data = None
def __init__(self):
@@ -18997,10 +18730,11 @@
def ReadData(self, _lpData, _pos=0, _Len=0):
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
- self.FuncType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.PosCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.PosCnt):
- temHeroPosList = tagCSHeroBattlePos()
+ temHeroPosList = tagCSHeroLineupPos()
_pos = temHeroPosList.ReadData(_lpData, _pos)
self.HeroPosList.append(temHeroPosList)
return _pos
@@ -19010,7 +18744,8 @@
self.Head.Clear()
self.Head.Cmd = 0xB4
self.Head.SubCmd = 0x12
- self.FuncType = 0
+ self.LineupID = 0
+ self.ShapeType = 0
self.PosCnt = 0
self.HeroPosList = list()
return
@@ -19018,6 +18753,7 @@
def GetLength(self):
length = 0
length += self.Head.GetLength()
+ length += 1
length += 1
length += 1
for i in range(self.PosCnt):
@@ -19028,7 +18764,8 @@
def GetBuffer(self):
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteBYTE(data, self.FuncType)
+ data = CommFunc.WriteBYTE(data, self.LineupID)
+ data = CommFunc.WriteBYTE(data, self.ShapeType)
data = CommFunc.WriteBYTE(data, self.PosCnt)
for i in range(self.PosCnt):
data = CommFunc.WriteString(data, self.HeroPosList[i].GetLength(), self.HeroPosList[i].GetBuffer())
@@ -19037,41 +18774,122 @@
def OutputString(self):
DumpString = '''
Head:%s,
- FuncType:%d,
+ LineupID:%d,
+ ShapeType:%d,
PosCnt:%d,
HeroPosList:%s
'''\
%(
self.Head.OutputString(),
- self.FuncType,
+ self.LineupID,
+ self.ShapeType,
self.PosCnt,
"..."
)
return DumpString
-m_NAtagCSHeroBattlePosSave=tagCSHeroBattlePosSave()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroBattlePosSave.Head.Cmd,m_NAtagCSHeroBattlePosSave.Head.SubCmd))] = m_NAtagCSHeroBattlePosSave
+m_NAtagCSHeroLineupSave=tagCSHeroLineupSave()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroLineupSave.Head.Cmd,m_NAtagCSHeroLineupSave.Head.SubCmd))] = m_NAtagCSHeroLineupSave
#------------------------------------------------------
-# B4 11 镜像战斗 #tagCMMirrorFight
+# B4 15 主线掉落物品操作 #tagCSMainDropItemOP
-class tagCMMirrorFight(Structure):
+class tagCSMainDropItemOP(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)
+ IndexList = list() #(vector<WORD> IndexList)// 掉落背包中的物品格子索引列表
+ OPType = 0 #(BYTE OPType)// 0 - 拾取非装备物品;1 - 分解;2 - 穿戴/替换;
+ OPValue = 0 #(BYTE OPValue)// 操作额外指令值,由操作类型决定,如穿戴时可发送穿戴后是否自动分解
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x15
+ 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)
+ self.OPType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.OPValue,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x15
+ self.Count = 0
+ self.IndexList = list()
+ self.OPType = 0
+ self.OPValue = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 2 * self.Count
+ length += 1
+ 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])
+ data = CommFunc.WriteBYTE(data, self.OPType)
+ data = CommFunc.WriteBYTE(data, self.OPValue)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ IndexList:%s,
+ OPType:%d,
+ OPValue:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "...",
+ self.OPType,
+ self.OPValue
+ )
+ return DumpString
+
+
+m_NAtagCSMainDropItemOP=tagCSMainDropItemOP()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMainDropItemOP.Head.Cmd,m_NAtagCSMainDropItemOP.Head.SubCmd))] = m_NAtagCSMainDropItemOP
+
+
+#------------------------------------------------------
+# B4 13 主线战斗请求 #tagCSMainFightReq
+
+class tagCSMainFightReq(Structure):
_pack_ = 1
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
- ("MapID", c_int), # 自定义地图ID,如竞技场等
- ("FuncLineID", c_ushort),
- ("TagPlayeID", c_int), # 目标玩家ID,支持跨服玩家ID
- ("CmdType", c_ubyte), # 命令类型: 0-创建战斗;1-开始战斗;2-战斗中跳过;3-不创建战斗直接得结果
+ ("ReqType", c_ubyte), # 0-停止战斗回城;1-设置消耗倍值;2-挑战关卡小怪;3-挑战关卡boss;4-继续战斗;
+ ("ReqValue", c_int), # 请求值,ReqType为1时发送消耗倍值
]
def __init__(self):
self.Clear()
self.Cmd = 0xB4
- self.SubCmd = 0x11
+ self.SubCmd = 0x13
return
def ReadData(self, stringData, _pos=0, _len=0):
@@ -19081,41 +18899,35 @@
def Clear(self):
self.Cmd = 0xB4
- self.SubCmd = 0x11
- self.MapID = 0
- self.FuncLineID = 0
- self.TagPlayeID = 0
- self.CmdType = 0
+ self.SubCmd = 0x13
+ self.ReqType = 0
+ self.ReqValue = 0
return
def GetLength(self):
- return sizeof(tagCMMirrorFight)
+ return sizeof(tagCSMainFightReq)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// B4 11 镜像战斗 //tagCMMirrorFight:
+ DumpString = '''// B4 13 主线战斗请求 //tagCSMainFightReq:
Cmd:%s,
SubCmd:%s,
- MapID:%d,
- FuncLineID:%d,
- TagPlayeID:%d,
- CmdType:%d
+ ReqType:%d,
+ ReqValue:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.MapID,
- self.FuncLineID,
- self.TagPlayeID,
- self.CmdType
+ self.ReqType,
+ self.ReqValue
)
return DumpString
-m_NAtagCMMirrorFight=tagCMMirrorFight()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMMirrorFight.Cmd,m_NAtagCMMirrorFight.SubCmd))] = m_NAtagCMMirrorFight
+m_NAtagCSMainFightReq=tagCSMainFightReq()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSMainFightReq.Cmd,m_NAtagCSMainFightReq.SubCmd))] = m_NAtagCSMainFightReq
#------------------------------------------------------
@@ -20151,10 +19963,10 @@
class tagCMTurnFight(Structure):
Head = tagHead()
- MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等)
- FuncLineID = 0 #(WORD FuncLineID)
- TagType = 0 #(BYTE TagType)// 战斗目标类型,0-NPC,1-玩家,2-队伍
- TagID = 0 #(DWORD TagID)// 战斗目标类型对应的ID
+ MapID = 0 #(DWORD MapID)// 自定义地图ID,可用于绑定战斗地图场景功能(如主线关卡、主线boss、爬塔、竞技场等)
+ FuncLineID = 0 #(DWORD FuncLineID)// MapID对应的扩展值,如具体某个关卡等
+ TagType = 0 #(BYTE TagType)// 目标类型,0-NPC阵容,1-玩家
+ TagID = 0 #(DWORD TagID)// 目标类型对应的ID,如阵容ID或玩家ID
ValueCount = 0 #(BYTE ValueCount)
ValueList = list() #(vector<DWORD> ValueList)// 附加值列表,可选,具体含义由MapID决定
data = None
@@ -20169,7 +19981,7 @@
self.Clear()
_pos = self.Head.ReadData(_lpData, _pos)
self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
- self.FuncLineID,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.FuncLineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.TagType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.TagID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.ValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
@@ -20195,7 +20007,7 @@
length = 0
length += self.Head.GetLength()
length += 4
- length += 2
+ length += 4
length += 1
length += 4
length += 1
@@ -20207,7 +20019,7 @@
data = ''
data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
data = CommFunc.WriteDWORD(data, self.MapID)
- data = CommFunc.WriteWORD(data, self.FuncLineID)
+ data = CommFunc.WriteDWORD(data, self.FuncLineID)
data = CommFunc.WriteBYTE(data, self.TagType)
data = CommFunc.WriteDWORD(data, self.TagID)
data = CommFunc.WriteBYTE(data, self.ValueCount)
@@ -20242,6 +20054,63 @@
#------------------------------------------------------
+# B4 14 查看战报 #tagCSTurnFightReportView
+
+class tagCSTurnFightReportView(Structure):
+ Head = tagHead()
+ GUID = "" #(char GUID[40])//战报guid
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x14
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x14
+ self.GUID = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 40
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteString(data, 40, self.GUID)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ GUID:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.GUID
+ )
+ return DumpString
+
+
+m_NAtagCSTurnFightReportView=tagCSTurnFightReportView()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSTurnFightReportView.Head.Cmd,m_NAtagCSTurnFightReportView.Head.SubCmd))] = m_NAtagCSTurnFightReportView
+
+
+#------------------------------------------------------
# B5 18 拍卖行修改关注物品 #tagCGAttentionAuctionItemChange
class tagCGAttentionAuctionItemChange(Structure):
--
Gitblit v1.8.0