From f198885f31c9c7eb19eb28adce562e39e64d581c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 18 七月 2025 16:23:11 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(属性计算、战斗力计算;新角色初始给默认装备、默认阵容武将;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Protocol/RecvPackProtocol.py |   76 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Protocol/RecvPackProtocol.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Protocol/RecvPackProtocol.py
index 598c471..41ea402 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Protocol/RecvPackProtocol.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Protocol/RecvPackProtocol.py
@@ -941,6 +941,7 @@
 
 class  tagGMCommand(Structure):
     Type = 0    #(BYTE Type)
+    ServerID = 0    #(DWORD ServerID)
     OrderLen = 0    #(BYTE OrderLen)
     OrderId = ""    #(String OrderId)
     CmdLen = 0    #(DWORD CmdLen)
@@ -956,6 +957,7 @@
     def ReadData(self, _lpData, _pos=0, _Len=0):
         self.Clear()
         self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
         self.OrderLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
         self.OrderId,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderLen)
         self.CmdLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
@@ -966,6 +968,7 @@
 
     def Clear(self):
         self.Type = 0
+        self.ServerID = 0
         self.OrderLen = 0
         self.OrderId = ""
         self.CmdLen = 0
@@ -977,6 +980,7 @@
     def GetLength(self):
         length = 0
         length += 1
+        length += 4
         length += 1
         length += len(self.OrderId)
         length += 4
@@ -989,6 +993,7 @@
     def GetBuffer(self):
         data = ''
         data = CommFunc.WriteBYTE(data, self.Type)
+        data = CommFunc.WriteDWORD(data, self.ServerID)
         data = CommFunc.WriteBYTE(data, self.OrderLen)
         data = CommFunc.WriteString(data, self.OrderLen, self.OrderId)
         data = CommFunc.WriteDWORD(data, self.CmdLen)
@@ -1000,6 +1005,7 @@
     def OutputString(self):
         DumpString = '''
                                 Type:%d,
+                                ServerID:%d,
                                 OrderLen:%d,
                                 OrderId:%s,
                                 CmdLen:%d,
@@ -1009,6 +1015,7 @@
                                 '''\
                                 %(
                                 self.Type,
+                                self.ServerID,
                                 self.OrderLen,
                                 self.OrderId,
                                 self.CmdLen,
@@ -1017,6 +1024,7 @@
                                 self.UserData
                                 )
         return DumpString
+
     
     
 #GM命令数据库请求#tagGMCommandDBRequest
@@ -2315,6 +2323,74 @@
         return DumpString
     
 #------------------------------------------------------
+#GameSever向DB请求信息#tagGDGameServerToDBLogic
+
+class  tagGDGameServerToDBLogic(Structure):
+    Type = 0    #(BYTE Type)//封包类型
+    ID = 0    #(DWORD ID)//查询对象ID
+    QueryType = 0    #(BYTE QueryType)//查询事件类型
+    DataLen = 0    #(DWORD DataLen)
+    Data = ""    #(String Data)//附加信息
+    data = None
+
+    def __init__(self):
+        self.Clear()
+        return
+
+    def ReadData(self, _lpData, _pos=0, _Len=0):
+        self.Clear()
+        self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.ID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.QueryType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+        self.DataLen,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+        self.Data,_pos = CommFunc.ReadString(_lpData, _pos,self.DataLen)
+        return _pos
+
+    def Clear(self):
+        self.Type = 0
+        self.ID = 0
+        self.QueryType = 0
+        self.DataLen = 0
+        self.Data = ""
+        return
+
+    def GetLength(self):
+        length = 0
+        length += 1
+        length += 4
+        length += 1
+        length += 4
+        length += len(self.Data)
+
+        return length
+
+    def GetBuffer(self):
+        data = ''
+        data = CommFunc.WriteBYTE(data, self.Type)
+        data = CommFunc.WriteDWORD(data, self.ID)
+        data = CommFunc.WriteBYTE(data, self.QueryType)
+        data = CommFunc.WriteDWORD(data, self.DataLen)
+        data = CommFunc.WriteString(data, self.DataLen, self.Data)
+        return data
+
+    def OutputString(self):
+        DumpString = '''
+                                Type:%d,
+                                ID:%d,
+                                QueryType:%d,
+                                DataLen:%d,
+                                Data:%s
+                                '''\
+                                %(
+                                self.Type,
+                                self.ID,
+                                self.QueryType,
+                                self.DataLen,
+                                self.Data
+                                )
+        return DumpString
+
+#------------------------------------------------------
 #向指定子服发送消息#tagGDMergeMsgToClient
 
 class  tagGDMergeMsgToClient(Structure):

--
Gitblit v1.8.0