From 2930bdc1878ec66d0db331aad05d70562baa351d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 20 二月 2024 10:28:07 +0800
Subject: [PATCH] 10133 【后端】境界修改
---
ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py | 184 ++++++++++++++++++++++++++-------------------
1 files changed, 106 insertions(+), 78 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChGameToMapPyPack.py
index 7aea670..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):
@@ -478,12 +570,14 @@
PlayerID = 0 #(DWORD PlayerID)//玩家ID
CompensationType = 0 #(BYTE CompensationType)//补偿类型 0 全服 1 个人
GUID = "" #(char GUID[40])//对应的补偿ID
+ CreateTime = "" #(char CreateTime[30])//邮件接收时间
TextLen = 0 #(DWORD TextLen)//文字内容长度
Text = "" #(String Text)//文字内容
Count = 0 #(BYTE Count)//当前补偿物品数
Gold = 0 #(DWORD Gold)//仙玉
GoldPaper = 0 #(DWORD GoldPaper)//绑定仙玉
Silver = 0 #(DWORD Silver)//铜钱
+ MoneySource = 0 #(BYTE MoneySource)//货币来源
Items = list() #(vector<tagGMCompensationItem> Items)//补偿物品信息
data = None
@@ -499,12 +593,14 @@
self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.CompensationType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
+ self.CreateTime,_pos = CommFunc.ReadString(_lpData, _pos,30)
self.TextLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.Text,_pos = CommFunc.ReadString(_lpData, _pos,self.TextLen)
self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
self.Gold,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.GoldPaper,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.Silver,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.MoneySource,_pos = CommFunc.ReadBYTE(_lpData, _pos)
for i in range(self.Count):
temItems = tagGMCompensationItem()
_pos = temItems.ReadData(_lpData, _pos)
@@ -519,12 +615,14 @@
self.PlayerID = 0
self.CompensationType = 0
self.GUID = ""
+ self.CreateTime = ""
self.TextLen = 0
self.Text = ""
self.Count = 0
self.Gold = 0
self.GoldPaper = 0
self.Silver = 0
+ self.MoneySource = 0
self.Items = list()
return
@@ -534,12 +632,14 @@
length += 4
length += 1
length += 40
+ length += 30
length += 4
length += len(self.Text)
length += 1
length += 4
length += 4
length += 4
+ length += 1
for i in range(self.Count):
length += self.Items[i].GetLength()
@@ -551,12 +651,14 @@
data = CommFunc.WriteDWORD(data, self.PlayerID)
data = CommFunc.WriteBYTE(data, self.CompensationType)
data = CommFunc.WriteString(data, 40, self.GUID)
+ data = CommFunc.WriteString(data, 30, self.CreateTime)
data = CommFunc.WriteDWORD(data, self.TextLen)
data = CommFunc.WriteString(data, self.TextLen, self.Text)
data = CommFunc.WriteBYTE(data, self.Count)
data = CommFunc.WriteDWORD(data, self.Gold)
data = CommFunc.WriteDWORD(data, self.GoldPaper)
data = CommFunc.WriteDWORD(data, self.Silver)
+ data = CommFunc.WriteBYTE(data, self.MoneySource)
for i in range(self.Count):
data = CommFunc.WriteString(data, self.Items[i].GetLength(), self.Items[i].GetBuffer())
return data
@@ -567,12 +669,14 @@
PlayerID:%d,
CompensationType:%d,
GUID:%s,
+ CreateTime:%s,
TextLen:%d,
Text:%s,
Count:%d,
Gold:%d,
GoldPaper:%d,
Silver:%d,
+ MoneySource:%d,
Items:%s
'''\
%(
@@ -580,12 +684,14 @@
self.PlayerID,
self.CompensationType,
self.GUID,
+ self.CreateTime,
self.TextLen,
self.Text,
self.Count,
self.Gold,
self.GoldPaper,
self.Silver,
+ self.MoneySource,
"..."
)
return DumpString
@@ -593,84 +699,6 @@
m_NAtagGMRequestCompensationResult=tagGMRequestCompensationResult()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMRequestCompensationResult.Head.Cmd,m_NAtagGMRequestCompensationResult.Head.SubCmd))] = m_NAtagGMRequestCompensationResult
-
-
-#------------------------------------------------------
-#03 01 天梯竞技场玩家挑战结果同步#tagGMHighLadderChallengeReuslt
-
-class tagGMHighLadderChallengeReuslt(Structure):
- Head = tagHead()
- PlayerID = 0 #(DWORD PlayerID)//玩家ID
- Result = 0 #(BYTE Result)//结果
- PlusInfoSize = 0 #(WORD PlusInfoSize)
- PlusInfo = "" #(String PlusInfo)//附带信息
- data = None
-
- def __init__(self):
- self.Clear()
- self.Head.Cmd = 0x03
- self.Head.SubCmd = 0x01
- 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.Result,_pos = CommFunc.ReadBYTE(_lpData, _pos)
- self.PlusInfoSize,_pos = CommFunc.ReadWORD(_lpData, _pos)
- self.PlusInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusInfoSize)
- return _pos
-
- def Clear(self):
- self.Head = tagHead()
- self.Head.Clear()
- self.Head.Cmd = 0x03
- self.Head.SubCmd = 0x01
- self.PlayerID = 0
- self.Result = 0
- self.PlusInfoSize = 0
- self.PlusInfo = ""
- return
-
- def GetLength(self):
- length = 0
- length += self.Head.GetLength()
- length += 4
- length += 1
- length += 2
- length += len(self.PlusInfo)
-
- return length
-
- def GetBuffer(self):
- data = ''
- data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
- data = CommFunc.WriteDWORD(data, self.PlayerID)
- data = CommFunc.WriteBYTE(data, self.Result)
- data = CommFunc.WriteWORD(data, self.PlusInfoSize)
- data = CommFunc.WriteString(data, self.PlusInfoSize, self.PlusInfo)
- return data
-
- def OutputString(self):
- DumpString = '''
- Head:%s,
- PlayerID:%d,
- Result:%d,
- PlusInfoSize:%d,
- PlusInfo:%s
- '''\
- %(
- self.Head.OutputString(),
- self.PlayerID,
- self.Result,
- self.PlusInfoSize,
- self.PlusInfo
- )
- return DumpString
-
-
-m_NAtagGMHighLadderChallengeReuslt=tagGMHighLadderChallengeReuslt()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGMHighLadderChallengeReuslt.Head.Cmd,m_NAtagGMHighLadderChallengeReuslt.Head.SubCmd))] = m_NAtagGMHighLadderChallengeReuslt
#------------------------------------------------------
--
Gitblit v1.8.0