From d37ff1be4e18dee345942f1cac676c616636cb61 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 18 一月 2024 15:57:41 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(每次攻击触发精怪技能支持)
---
ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py | 92 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 92 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py
index 2f08604..a372b1f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py
@@ -405,6 +405,98 @@
#------------------------------------------------------
+# 03 03 玩家缓存信息同步 #tagGMPlayerCache
+
+class tagGMPlayerCache(Structure):
+ Head = tagHead()
+ PlayerID = 0 #(DWORD PlayerID)//玩家ID
+ FindPlayerID = 0 #(DWORD FindPlayerID)//要查询的玩家ID
+ PropDataSize = 0 #(WORD PropDataSize)
+ PropData = "" #(String PropData)//属性记录
+ PlusDataSize = 0 #(WORD PlusDataSize)
+ PlusData = "" #(String PlusData)//扩展记录
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0x03
+ self.Head.SubCmd = 0x03
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.FindPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.PropDataSize,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.PropData,_pos = CommFunc.ReadString(_lpData, _pos,self.PropDataSize)
+ self.PlusDataSize,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0x03
+ self.Head.SubCmd = 0x03
+ self.PlayerID = 0
+ self.FindPlayerID = 0
+ self.PropDataSize = 0
+ self.PropData = ""
+ self.PlusDataSize = 0
+ self.PlusData = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 4
+ length += 2
+ length += len(self.PropData)
+ length += 2
+ length += len(self.PlusData)
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteDWORD(data, self.PlayerID)
+ data = CommFunc.WriteDWORD(data, self.FindPlayerID)
+ data = CommFunc.WriteWORD(data, self.PropDataSize)
+ data = CommFunc.WriteString(data, self.PropDataSize, self.PropData)
+ data = CommFunc.WriteWORD(data, self.PlusDataSize)
+ data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ PlayerID:%d,
+ FindPlayerID:%d,
+ PropDataSize:%d,
+ PropData:%s,
+ PlusDataSize:%d,
+ PlusData:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.PlayerID,
+ self.FindPlayerID,
+ self.PropDataSize,
+ self.PropData,
+ self.PlusDataSize,
+ self.PlusData
+ )
+ return DumpString
+
+
+m_NAtagGMPlayerCache=tagGMPlayerCache()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMPlayerCache.Head.Cmd,m_NAtagGMPlayerCache.Head.SubCmd))] = m_NAtagGMPlayerCache
+
+
+#------------------------------------------------------
#03 02 玩家领取补偿结果#tagGMRequestCompensationResult
class tagGMCompensationItem(Structure):
--
Gitblit v1.8.0