From 1d5f8059084add62f1073ad4b3534f1782abde75 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 03 六月 2019 11:03:24 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(修复在安全区中进入前端本无法对木桩怪造成伤害的bug)
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 72 +++++++++++++++++++++++++++++++-----
1 files changed, 62 insertions(+), 10 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index e56f530..406c6ca 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -14514,14 +14514,66 @@
#------------------------------------------------------
-# B4 0E 设置玩家自身血量 #tagCMSetRoleHP
+# B4 0F 回收私有专属木桩怪 #tagCMRecyclePriWoodPile
-class tagCMSetRoleHP(Structure):
+class tagCMRecyclePriWoodPile(Structure):
_pack_ = 1
_fields_ = [
("Cmd", c_ubyte),
("SubCmd", c_ubyte),
- ("HP", c_int),
+ ("ObjID", c_int),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB4
+ self.SubCmd = 0x0F
+ 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 = 0x0F
+ self.ObjID = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMRecyclePriWoodPile)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B4 0F 回收私有专属木桩怪 //tagCMRecyclePriWoodPile:
+ Cmd:%s,
+ SubCmd:%s,
+ ObjID:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ObjID
+ )
+ return DumpString
+
+
+m_NAtagCMRecyclePriWoodPile=tagCMRecyclePriWoodPile()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRecyclePriWoodPile.Cmd,m_NAtagCMRecyclePriWoodPile.SubCmd))] = m_NAtagCMRecyclePriWoodPile
+
+
+#------------------------------------------------------
+# B4 0E 玩家掉血 #tagCMRoleLostHP
+
+class tagCMRoleLostHP(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("LostHP", c_int),
]
def __init__(self):
@@ -14538,31 +14590,31 @@
def Clear(self):
self.Cmd = 0xB4
self.SubCmd = 0x0E
- self.HP = 0
+ self.LostHP = 0
return
def GetLength(self):
- return sizeof(tagCMSetRoleHP)
+ return sizeof(tagCMRoleLostHP)
def GetBuffer(self):
return string_at(addressof(self), self.GetLength())
def OutputString(self):
- DumpString = '''// B4 0E 设置玩家自身血量 //tagCMSetRoleHP:
+ DumpString = '''// B4 0E 玩家掉血 //tagCMRoleLostHP:
Cmd:%s,
SubCmd:%s,
- HP:%d
+ LostHP:%d
'''\
%(
self.Cmd,
self.SubCmd,
- self.HP
+ self.LostHP
)
return DumpString
-m_NAtagCMSetRoleHP=tagCMSetRoleHP()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSetRoleHP.Cmd,m_NAtagCMSetRoleHP.SubCmd))] = m_NAtagCMSetRoleHP
+m_NAtagCMRoleLostHP=tagCMRoleLostHP()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRoleLostHP.Cmd,m_NAtagCMRoleLostHP.SubCmd))] = m_NAtagCMRoleLostHP
#------------------------------------------------------
--
Gitblit v1.8.0