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/ChPyNetSendPack.py | 906 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 781 insertions(+), 125 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 8777856..5fabeab 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -3252,6 +3252,114 @@
#------------------------------------------------------
+# A2 07 背包购买格子信息 #tagSCPackBuyInfo
+
+class tagSCPackBuy(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("PackType", c_ubyte), # 背包类型
+ ("BuyCnt", c_ushort), # 已购买次数
+ ]
+
+ 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.PackType = 0
+ self.BuyCnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCPackBuy)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A2 07 背包购买格子信息 //tagSCPackBuyInfo:
+ PackType:%d,
+ BuyCnt:%d
+ '''\
+ %(
+ self.PackType,
+ self.BuyCnt
+ )
+ return DumpString
+
+
+class tagSCPackBuyInfo(Structure):
+ Head = tagHead()
+ Count = 0 #(BYTE Count)
+ BuyInfoList = list() #(vector<tagSCPackBuy> BuyInfoList)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA2
+ self.Head.SubCmd = 0x07
+ 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):
+ temBuyInfoList = tagSCPackBuy()
+ _pos = temBuyInfoList.ReadData(_lpData, _pos)
+ self.BuyInfoList.append(temBuyInfoList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA2
+ self.Head.SubCmd = 0x07
+ self.Count = 0
+ self.BuyInfoList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.Count):
+ length += self.BuyInfoList[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.BuyInfoList[i].GetLength(), self.BuyInfoList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Count:%d,
+ BuyInfoList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Count,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagSCPackBuyInfo=tagSCPackBuyInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCPackBuyInfo.Head.Cmd,m_NAtagSCPackBuyInfo.Head.SubCmd))] = m_NAtagSCPackBuyInfo
+
+
+#------------------------------------------------------
# A2 05 虚拟背包物品清空 #tagMCVPackClear
class tagMCVPackClear(Structure):
@@ -3870,122 +3978,6 @@
m_NAtagMCArrestTaskInfo=tagMCArrestTaskInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCArrestTaskInfo.Head.Cmd,m_NAtagMCArrestTaskInfo.Head.SubCmd))] = m_NAtagMCArrestTaskInfo
-
-
-#------------------------------------------------------
-# A3 39 玩家属性果实已使用个数信息#tagMCAttrFruitEatCntList
-
-class tagMCAttrFruitEatCnt(Structure):
- _pack_ = 1
- _fields_ = [
- ("ItemID", c_int), #果实物品ID
- ("EatCnt", c_int), #已使用个数
- ("ItemAddCnt", c_int), #增幅丹增加上限
- ("ItemBreakCnt", c_int), #增幅丹突破次数
- ]
-
- 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.ItemID = 0
- self.EatCnt = 0
- self.ItemAddCnt = 0
- self.ItemBreakCnt = 0
- return
-
- def GetLength(self):
- return sizeof(tagMCAttrFruitEatCnt)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''// A3 39 玩家属性果实已使用个数信息//tagMCAttrFruitEatCntList:
- ItemID:%d,
- EatCnt:%d,
- ItemAddCnt:%d,
- ItemBreakCnt:%d
- '''\
- %(
- self.ItemID,
- self.EatCnt,
- self.ItemAddCnt,
- self.ItemBreakCnt
- )
- return DumpString
-
-
-class tagMCAttrFruitEatCntList(Structure):
- Head = tagHead()
- count = 0 #(BYTE count)//信息个数
- EatCntList = list() #(vector<tagMCAttrFruitEatCnt> EatCntList)
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x39
- 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):
- temEatCntList = tagMCAttrFruitEatCnt()
- _pos = temEatCntList.ReadData(_lpData, _pos)
- self.EatCntList.append(temEatCntList)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0xA3
- self.Head.SubCmd = 0x39
- self.count = 0
- self.EatCntList = list()
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 1
- for i in range(self.count):
- length += self.EatCntList[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.EatCntList[i].GetLength(), self.EatCntList[i].GetBuffer())
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- count:%d,
- EatCntList:%s
- '''\
- %(
- self.Head.OutputString(),
- self.count,
- "..."
- )
- return DumpString
-
-
-m_NAtagMCAttrFruitEatCntList=tagMCAttrFruitEatCntList()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAttrFruitEatCntList.Head.Cmd,m_NAtagMCAttrFruitEatCntList.Head.SubCmd))] = m_NAtagMCAttrFruitEatCntList
#------------------------------------------------------
@@ -18839,7 +18831,8 @@
_pack_ = 1
_fields_ = [
("ItemID", c_int),
- ("Count", c_int),
+ ("Count", c_int), # 求余亿部分,个别功能单次汇总可能超20亿,如批量遣散,固统一规则
+ ("CountEx", c_int), # 整除亿部分
("IsBind", c_ubyte),
]
@@ -18855,6 +18848,7 @@
def Clear(self):
self.ItemID = 0
self.Count = 0
+ self.CountEx = 0
self.IsBind = 0
return
@@ -18868,11 +18862,13 @@
DumpString = '''// A8 01 获得奖励信息 //tagMCGiveAwardInfo:
ItemID:%d,
Count:%d,
+ CountEx:%d,
IsBind:%d
'''\
%(
self.ItemID,
self.Count,
+ self.CountEx,
self.IsBind
)
return DumpString
@@ -19317,7 +19313,7 @@
#------------------------------------------------------
-# A8 14 合成结果通知 #tagMCMakeItemAnswer
+# A8 14 操作结果通知 #tagMCMakeItemAnswer
class tagMCMakeItemAnswer(Structure):
_pack_ = 1
@@ -19326,7 +19322,7 @@
("SubCmd", c_ubyte),
("MakeType", c_ubyte), #类型 TMakeItemType
("Result", c_ubyte), #是否成功
- ("MakeItemID", c_int), #合成的物品ID
+ ("MakeValue", c_int), #操作值,如合成时为合成的物品ID
]
def __init__(self):
@@ -19345,7 +19341,7 @@
self.SubCmd = 0x14
self.MakeType = 0
self.Result = 0
- self.MakeItemID = 0
+ self.MakeValue = 0
return
def GetLength(self):
@@ -19355,19 +19351,19 @@
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// A8 14 合成结果通知 //tagMCMakeItemAnswer:
+ DumpString = '''// A8 14 操作结果通知 //tagMCMakeItemAnswer:
Cmd:%s,
SubCmd:%s,
MakeType:%d,
Result:%d,
- MakeItemID:%d
+ MakeValue:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.MakeType,
self.Result,
- self.MakeItemID
+ self.MakeValue
)
return DumpString
@@ -44322,6 +44318,137 @@
#------------------------------------------------------
+# B1 24 阵容信息 #tagSCLineupInfo
+
+class tagSCLineup(Structure):
+ LineupID = 0 #(BYTE LineupID)// 阵容ID
+ ShapeType = 0 #(BYTE ShapeType)// 阵型
+ HeroCnt = 0 #(BYTE HeroCnt)
+ HeroItemIndexList = list() #(vector<WORD> HeroItemIndexList)// 所在武将背包索引+1列表 [站位1物品索引+1, 站位2, ...],站位无武将时为0
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.HeroCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.HeroCnt):
+ value,_pos=CommFunc.ReadWORD(_lpData,_pos)
+ self.HeroItemIndexList.append(value)
+ return _pos
+
+ def Clear(self):
+ self.LineupID = 0
+ self.ShapeType = 0
+ self.HeroCnt = 0
+ self.HeroItemIndexList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 1
+ length += 1
+ length += 1
+ length += 2 * self.HeroCnt
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteBYTE(data, self.LineupID)
+ data = CommFunc.WriteBYTE(data, self.ShapeType)
+ data = CommFunc.WriteBYTE(data, self.HeroCnt)
+ for i in range(self.HeroCnt):
+ data = CommFunc.WriteWORD(data, self.HeroItemIndexList[i])
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ LineupID:%d,
+ ShapeType:%d,
+ HeroCnt:%d,
+ HeroItemIndexList:%s
+ '''\
+ %(
+ self.LineupID,
+ self.ShapeType,
+ self.HeroCnt,
+ "..."
+ )
+ return DumpString
+
+
+class tagSCLineupInfo(Structure):
+ Head = tagHead()
+ LineupCnt = 0 #(BYTE LineupCnt)
+ LineupList = list() #(vector<tagSCLineup> LineupList)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB1
+ self.Head.SubCmd = 0x24
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.LineupCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.LineupCnt):
+ temLineupList = tagSCLineup()
+ _pos = temLineupList.ReadData(_lpData, _pos)
+ self.LineupList.append(temLineupList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB1
+ self.Head.SubCmd = 0x24
+ self.LineupCnt = 0
+ self.LineupList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.LineupCnt):
+ length += self.LineupList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.LineupCnt)
+ for i in range(self.LineupCnt):
+ data = CommFunc.WriteString(data, self.LineupList[i].GetLength(), self.LineupList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ LineupCnt:%d,
+ LineupList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.LineupCnt,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagSCLineupInfo=tagSCLineupInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLineupInfo.Head.Cmd,m_NAtagSCLineupInfo.Head.SubCmd))] = m_NAtagSCLineupInfo
+
+
+#------------------------------------------------------
# B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove
class tagMCNotifyPlayerMove(Structure):
@@ -44505,6 +44632,58 @@
m_NAtagMCPlayerDeadTime=tagMCPlayerDeadTime()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerDeadTime.Cmd,m_NAtagMCPlayerDeadTime.SubCmd))] = m_NAtagMCPlayerDeadTime
+
+
+#------------------------------------------------------
+# B1 25 玩家武将公共信息 #tagSCPlayerHeroInfo
+
+class tagSCPlayerHeroInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("AwakeRebirthCnt", c_ubyte), # 今日觉醒过的武将已重生次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB1
+ self.SubCmd = 0x25
+ 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 = 0xB1
+ self.SubCmd = 0x25
+ self.AwakeRebirthCnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCPlayerHeroInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B1 25 玩家武将公共信息 //tagSCPlayerHeroInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ AwakeRebirthCnt:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.AwakeRebirthCnt
+ )
+ return DumpString
+
+
+m_NAtagSCPlayerHeroInfo=tagSCPlayerHeroInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCPlayerHeroInfo.Cmd,m_NAtagSCPlayerHeroInfo.SubCmd))] = m_NAtagSCPlayerHeroInfo
#------------------------------------------------------
@@ -49717,6 +49896,142 @@
#------------------------------------------------------
+# B4 29 Buff消失 #tagSCBuffDel
+
+class tagSCBuffDel(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ObjID", c_int),
+ ("BuffID", c_int),
+ ("RelatedSkillID", c_int), # 关联的技能ID,一般是主技能ID或由于某个技能释放引起的buff变更
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB4
+ self.SubCmd = 0x29
+ 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 = 0xB4
+ self.SubCmd = 0x29
+ self.ObjID = 0
+ self.BuffID = 0
+ self.RelatedSkillID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCBuffDel)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B4 29 Buff消失 //tagSCBuffDel:
+ Cmd:%s,
+ SubCmd:%s,
+ ObjID:%d,
+ BuffID:%d,
+ RelatedSkillID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ObjID,
+ self.BuffID,
+ self.RelatedSkillID
+ )
+ return DumpString
+
+
+m_NAtagSCBuffDel=tagSCBuffDel()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBuffDel.Cmd,m_NAtagSCBuffDel.SubCmd))] = m_NAtagSCBuffDel
+
+
+#------------------------------------------------------
+# B4 28 Buff刷新 #tagSCBuffRefresh
+
+class tagSCBuffRefresh(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ObjID", c_int), # 谁身上的buff
+ ("BuffID", c_int), # buffID,某个obj上的唯一buffID,不同的buffID可能skillID相同
+ ("SkillID", c_int), # 该buff对应技能表ID
+ ("RelatedSkillID", c_int), # 关联的技能ID,一般是主技能ID或由于某个技能释放引起的buff变更
+ ("LastTime", c_int), # 剩余时长毫秒/回合数
+ ("Layer", c_ushort), # 层数,不需要默认0
+ ("OwnerID", c_int), # buff来源者,即施法方
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB4
+ self.SubCmd = 0x28
+ 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 = 0xB4
+ self.SubCmd = 0x28
+ self.ObjID = 0
+ self.BuffID = 0
+ self.SkillID = 0
+ self.RelatedSkillID = 0
+ self.LastTime = 0
+ self.Layer = 0
+ self.OwnerID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCBuffRefresh)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B4 28 Buff刷新 //tagSCBuffRefresh:
+ Cmd:%s,
+ SubCmd:%s,
+ ObjID:%d,
+ BuffID:%d,
+ SkillID:%d,
+ RelatedSkillID:%d,
+ LastTime:%d,
+ Layer:%d,
+ OwnerID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ObjID,
+ self.BuffID,
+ self.SkillID,
+ self.RelatedSkillID,
+ self.LastTime,
+ self.Layer,
+ self.OwnerID
+ )
+ return DumpString
+
+
+m_NAtagSCBuffRefresh=tagSCBuffRefresh()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCBuffRefresh.Cmd,m_NAtagSCBuffRefresh.SubCmd))] = m_NAtagSCBuffRefresh
+
+
+#------------------------------------------------------
# B4 12 删除恶意攻击玩家 #tagMCDelMaliciousAtkPlayer
class tagMCDelMaliciousAtkPlayer(Structure):
@@ -49909,6 +50224,94 @@
m_NAtagMCNPCSkillWarn=tagMCNPCSkillWarn()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCSkillWarn.Head.Cmd,m_NAtagMCNPCSkillWarn.Head.SubCmd))] = m_NAtagMCNPCSkillWarn
+
+
+#------------------------------------------------------
+# B4 18 对象属性刷新展示 #tagSCObjPropertyRefreshView
+
+class tagSCObjPropertyRefreshView(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ObjID", c_int),
+ ("RefreshType", c_ushort), # 同0418刷新类型,如血量、怒气
+ ("AttackTypes", c_int), # 飘字类型汇总,支持多种类型并存,如无视防御且暴击同时被格挡,二进制或运算最终值;0-失败;1-普通;2-回血;5-格挡;6-无视防御;7-暴击;9-闪避
+ ("Value", c_int), # 更新值
+ ("ValueEx", c_int), # 更新值,如果是大数值的此值为整除亿部分
+ ("DiffType", c_ubyte), # 变化类型,0-减少;1-增加
+ ("DiffValue", c_int), # 变化值
+ ("DiffValueEx", c_int), # 变化值,如果是大数值的此值为整除亿部分
+ ("SkillID", c_int), # 使用的技能表ID
+ ("RelatedSkillID", c_int), # 关联的技能ID,一般是主技能ID,非主技能额外触发的为0
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB4
+ self.SubCmd = 0x18
+ 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 = 0xB4
+ self.SubCmd = 0x18
+ self.ObjID = 0
+ self.RefreshType = 0
+ self.AttackTypes = 0
+ self.Value = 0
+ self.ValueEx = 0
+ self.DiffType = 0
+ self.DiffValue = 0
+ self.DiffValueEx = 0
+ self.SkillID = 0
+ self.RelatedSkillID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCObjPropertyRefreshView)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B4 18 对象属性刷新展示 //tagSCObjPropertyRefreshView:
+ Cmd:%s,
+ SubCmd:%s,
+ ObjID:%d,
+ RefreshType:%d,
+ AttackTypes:%d,
+ Value:%d,
+ ValueEx:%d,
+ DiffType:%d,
+ DiffValue:%d,
+ DiffValueEx:%d,
+ SkillID:%d,
+ RelatedSkillID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ObjID,
+ self.RefreshType,
+ self.AttackTypes,
+ self.Value,
+ self.ValueEx,
+ self.DiffType,
+ self.DiffValue,
+ self.DiffValueEx,
+ self.SkillID,
+ self.RelatedSkillID
+ )
+ return DumpString
+
+
+m_NAtagSCObjPropertyRefreshView=tagSCObjPropertyRefreshView()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCObjPropertyRefreshView.Cmd,m_NAtagSCObjPropertyRefreshView.SubCmd))] = m_NAtagSCObjPropertyRefreshView
#------------------------------------------------------
@@ -51118,6 +51521,8 @@
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
("ObjID", c_int),
+ ("KillerObjID", c_int), # 被谁击杀的,可能为0
+ ("SkillID", c_int), # 被什么技能击杀,可能为0
]
def __init__(self):
@@ -51135,6 +51540,8 @@
self.Cmd = 0xB4
self.SubCmd = 0x22
self.ObjID = 0
+ self.KillerObjID = 0
+ self.SkillID = 0
return
def GetLength(self):
@@ -51147,12 +51554,16 @@
DumpString = '''// B4 22 回合战斗对象死亡 //tagMCTurnFightObjDead:
Cmd:%s,
SubCmd:%s,
- ObjID:%d
+ ObjID:%d,
+ KillerObjID:%d,
+ SkillID:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.ObjID
+ self.ObjID,
+ self.KillerObjID,
+ self.SkillID
)
return DumpString
@@ -51446,6 +51857,251 @@
#------------------------------------------------------
+# B4 26 回合战斗标签 #tagSCTurnFightTag
+
+class tagSCTurnFightTag(Structure):
+ Head = tagHead()
+ Len = 0 #(BYTE Len)
+ Tag = "" #(String Tag)// 标签,释放技能的标签格式: Skill_objID_skillID,其他标签格式可再扩展
+ Sign = 0 #(BYTE Sign)// 0-标签头;1-标签尾;
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x26
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.Len,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.Tag,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
+ self.Sign,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x26
+ self.Len = 0
+ self.Tag = ""
+ self.Sign = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += len(self.Tag)
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.Len)
+ data = CommFunc.WriteString(data, self.Len, self.Tag)
+ data = CommFunc.WriteBYTE(data, self.Sign)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ Len:%d,
+ Tag:%s,
+ Sign:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.Len,
+ self.Tag,
+ self.Sign
+ )
+ return DumpString
+
+
+m_NAtagSCTurnFightTag=tagSCTurnFightTag()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCTurnFightTag.Head.Cmd,m_NAtagSCTurnFightTag.Head.SubCmd))] = m_NAtagSCTurnFightTag
+
+
+#------------------------------------------------------
+# B4 27 使用技能 #tagSCUseSkill
+
+class tagSCUseSkillHurt(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("ObjID", c_int),
+ ("AttackTypes", c_int), # 飘血类型汇总,支持多种类型并存,如无视防御且暴击同时被格挡,二进制或运算最终值;0-失败;1-普通;2-回血;5-格挡;6-无视防御;7-暴击;9-闪避
+ ("HurtHP", c_int), # 飘血值,求余亿部分
+ ("HurtHPEx", c_int), # 飘血值,整除亿部分
+ ("CurHP", c_int), # 更新剩余血量,求余亿部分
+ ("CurHPEx", c_int), # 更新剩余血量,整除亿部分
+ ("SuckHP", c_int), # 本次伤害转化的吸血量
+ ("BounceHP", c_int), # 本次伤害反弹的伤害量
+ ]
+
+ 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.ObjID = 0
+ self.AttackTypes = 0
+ self.HurtHP = 0
+ self.HurtHPEx = 0
+ self.CurHP = 0
+ self.CurHPEx = 0
+ self.SuckHP = 0
+ self.BounceHP = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCUseSkillHurt)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B4 27 使用技能 //tagSCUseSkill:
+ ObjID:%d,
+ AttackTypes:%d,
+ HurtHP:%d,
+ HurtHPEx:%d,
+ CurHP:%d,
+ CurHPEx:%d,
+ SuckHP:%d,
+ BounceHP:%d
+ '''\
+ %(
+ self.ObjID,
+ self.AttackTypes,
+ self.HurtHP,
+ self.HurtHPEx,
+ self.CurHP,
+ self.CurHPEx,
+ self.SuckHP,
+ self.BounceHP
+ )
+ return DumpString
+
+
+class tagSCUseSkill(Structure):
+ Head = tagHead()
+ ObjID = 0 #(DWORD ObjID)
+ PMType = 0 #(BYTE PMType)// 物法类型 0或1-物理;2-法术
+ BattleType = 0 #(BYTE BattleType)// 战斗类型 0-常规;1-连击;2-反击;3-追击
+ CurHP = 0 #(DWORD CurHP)// 释放技能后剩余血量,吸血、反弹可能引起变化,求余亿部分
+ CurHPEx = 0 #(DWORD CurHPEx)// 释放技能后剩余血量,吸血、反弹可能引起变化,整除亿部分
+ SkillID = 0 #(DWORD SkillID)
+ HurtCount = 0 #(BYTE HurtCount)//伤害数目
+ HurtList = list() #(vector<tagSCUseSkillHurt> HurtList)//size = HurtCount
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x27
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.PMType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.BattleType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.CurHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.CurHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.SkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.HurtCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.HurtCount):
+ temHurtList = tagSCUseSkillHurt()
+ _pos = temHurtList.ReadData(_lpData, _pos)
+ self.HurtList.append(temHurtList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB4
+ self.Head.SubCmd = 0x27
+ self.ObjID = 0
+ self.PMType = 0
+ self.BattleType = 0
+ self.CurHP = 0
+ self.CurHPEx = 0
+ self.SkillID = 0
+ self.HurtCount = 0
+ self.HurtList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += 1
+ length += 4
+ length += 4
+ length += 4
+ length += 1
+ for i in range(self.HurtCount):
+ length += self.HurtList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteDWORD(data, self.ObjID)
+ data = CommFunc.WriteBYTE(data, self.PMType)
+ data = CommFunc.WriteBYTE(data, self.BattleType)
+ data = CommFunc.WriteDWORD(data, self.CurHP)
+ data = CommFunc.WriteDWORD(data, self.CurHPEx)
+ data = CommFunc.WriteDWORD(data, self.SkillID)
+ data = CommFunc.WriteBYTE(data, self.HurtCount)
+ for i in range(self.HurtCount):
+ data = CommFunc.WriteString(data, self.HurtList[i].GetLength(), self.HurtList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ ObjID:%d,
+ PMType:%d,
+ BattleType:%d,
+ CurHP:%d,
+ CurHPEx:%d,
+ SkillID:%d,
+ HurtCount:%d,
+ HurtList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.ObjID,
+ self.PMType,
+ self.BattleType,
+ self.CurHP,
+ self.CurHPEx,
+ self.SkillID,
+ self.HurtCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagSCUseSkill=tagSCUseSkill()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCUseSkill.Head.Cmd,m_NAtagSCUseSkill.Head.SubCmd))] = m_NAtagSCUseSkill
+
+
+#------------------------------------------------------
# B5 04 拍卖行新上架拍品 #tagGCAddAuctionItemInfo
class tagGCAddAuctionItem(Structure):
--
Gitblit v1.8.0