From f38208f069fcb1823f3ef4398e1c9715488dfaa3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 02 七月 2024 16:34:45 +0800
Subject: [PATCH] 10192 【越南】【主干】【港台】【砍树】上线增加膜拜主动推送(增加膜拜功能,目前支持跨服排位赛名次及服务器冠名膜拜;增加GameServer玩家记录表;玩家缓存增加记录佩戴称号ID)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py |  207 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 207 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index f3d3047..99e7294 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -8557,6 +8557,213 @@
 
 
 #------------------------------------------------------
+# B0 20 膜拜信息列表 #tagGCWorshipInfoList
+
+class  tagGCWorshipInfo(Structure):
+    PlayerID = 0    #(DWORD PlayerID)// 目标玩家ID
+    WorshipType = 0    #(BYTE WorshipType)// 膜拜类型
+    WorshipValue = 0    #(DWORD WorshipValue)// 膜拜类型对应的功能值,如名次或其他,由具体膜拜类型定义对应值含义
+    InfoLen = 0    #(WORD InfoLen)
+    PlayerInfo = ""    #(String PlayerInfo)// 玩家信息{k:v, ...}
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.WorshipType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.WorshipValue,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.InfoLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
+        self.PlayerInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.InfoLen)
+        return _pos
+
+    def Clear(self):
+        self.PlayerID = 0
+        self.WorshipType = 0
+        self.WorshipValue = 0
+        self.InfoLen = 0
+        self.PlayerInfo = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 4
+        length += 1
+        length += 4
+        length += 2
+        length += len(self.PlayerInfo)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteDWORD(data, self.PlayerID)
+        data = CommFunc.WriteBYTE(data, self.WorshipType)
+        data = CommFunc.WriteDWORD(data, self.WorshipValue)
+        data = CommFunc.WriteWORD(data, self.InfoLen)
+        data = CommFunc.WriteString(data, self.InfoLen, self.PlayerInfo)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                PlayerID:%d,
+                                WorshipType:%d,
+                                WorshipValue:%d,
+                                InfoLen:%d,
+                                PlayerInfo:%s
+                                '''\
+                                %(
+                                self.PlayerID,
+                                self.WorshipType,
+                                self.WorshipValue,
+                                self.InfoLen,
+                                self.PlayerInfo
+                                )
+        return DumpString
+
+
+class  tagGCWorshipInfoList(Structure):
+    Head = tagHead()
+    WorshipCount = 0    #(BYTE WorshipCount)
+    WorshipInfoList = list()    #(vector<tagGCWorshipInfo> WorshipInfoList)
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        self.Head.Cmd = 0xB0
+        self.Head.SubCmd = 0x20
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        _pos = self.Head.ReadData(_lpData, _pos)
+        self.WorshipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        for i in range(self.WorshipCount):
+            temWorshipInfoList = tagGCWorshipInfo()
+            _pos = temWorshipInfoList.ReadData(_lpData, _pos)
+            self.WorshipInfoList.append(temWorshipInfoList)
+        return _pos
+
+    def Clear(self):
+        self.Head = tagHead()
+        self.Head.Clear()
+        self.Head.Cmd = 0xB0
+        self.Head.SubCmd = 0x20
+        self.WorshipCount = 0
+        self.WorshipInfoList = list()
+        return
+
+    def GetLength(self):
+        length = 0
+        length += self.Head.GetLength()
+        length += 1
+        for i in range(self.WorshipCount):
+            length += self.WorshipInfoList[i].GetLength()
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+        data = CommFunc.WriteBYTE(data, self.WorshipCount)
+        for i in range(self.WorshipCount):
+            data = CommFunc.WriteString(data, self.WorshipInfoList[i].GetLength(), self.WorshipInfoList[i].GetBuffer())
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Head:%s,
+                                WorshipCount:%d,
+                                WorshipInfoList:%s
+                                '''\
+                                %(
+                                self.Head.OutputString(),
+                                self.WorshipCount,
+                                "..."
+                                )
+        return DumpString
+
+
+m_NAtagGCWorshipInfoList=tagGCWorshipInfoList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCWorshipInfoList.Head.Cmd,m_NAtagGCWorshipInfoList.Head.SubCmd))] = m_NAtagGCWorshipInfoList
+
+
+#------------------------------------------------------
+# B0 21 膜拜结果 #tagGCWorshipResult
+
+class  tagGCWorshipResult(Structure):
+    _pack_ = 1
+    _fields_ = [
+                  ("Cmd", c_ubyte),
+                  ("SubCmd", c_ubyte),
+                  ("PlayerID", c_int),    # 目标玩家ID
+                  ("WorshipType", c_ubyte),    # 膜拜类型
+                  ("WorshipValue", c_int),    # 膜拜类型对应的功能值,如名次或其他,由具体膜拜类型定义对应值含义
+                  ("Result", c_ubyte),    # 膜拜结果:0-成功;1-不存在该膜拜类型;2-不存在该目标膜拜;3-不能膜拜该目标;
+                  ("MoneyType", c_ubyte),    # 货币类型
+                  ("MoneyValue", c_int),    # 货币奖励
+                  ]
+
+    def __init__(self):
+        self.Clear()
+        self.Cmd = 0xB0
+        self.SubCmd = 0x21
+        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 = 0xB0
+        self.SubCmd = 0x21
+        self.PlayerID = 0
+        self.WorshipType = 0
+        self.WorshipValue = 0
+        self.Result = 0
+        self.MoneyType = 0
+        self.MoneyValue = 0
+        return
+
+    def GetLength(self):
+        return sizeof(tagGCWorshipResult)
+
+    def GetBuffer(self):
+        return string_at(addressof(self), self.GetLength())
+
+    def OutputString(self):
+        DumpString = '''// B0 21 膜拜结果 //tagGCWorshipResult:
+                                Cmd:%s,
+                                SubCmd:%s,
+                                PlayerID:%d,
+                                WorshipType:%d,
+                                WorshipValue:%d,
+                                Result:%d,
+                                MoneyType:%d,
+                                MoneyValue:%d
+                                '''\
+                                %(
+                                self.Cmd,
+                                self.SubCmd,
+                                self.PlayerID,
+                                self.WorshipType,
+                                self.WorshipValue,
+                                self.Result,
+                                self.MoneyType,
+                                self.MoneyValue
+                                )
+        return DumpString
+
+
+m_NAtagGCWorshipResult=tagGCWorshipResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCWorshipResult.Cmd,m_NAtagGCWorshipResult.SubCmd))] = m_NAtagGCWorshipResult
+
+
+#------------------------------------------------------
 #B3 03 询问是否允许添加好友#tagGCFriendAskIfJoin
 
 class  tagGCFriendAskIfJoin(Structure):

--
Gitblit v1.8.0