From a6fe9b060edf315f6abde7443e48db5dea439f47 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 28 五月 2025 09:59:08 +0800
Subject: [PATCH] 16 卡牌服务端(功能队伍数据基础;不含功能逻辑;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py |  250 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 249 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py
index b6b8e0c..9cecba1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DB/DBStruct.py
@@ -2029,11 +2029,259 @@
         return output
 
 
+# 功能队伍表 #tagDBFuncTeam
+class tagDBFuncTeam(Structure):
+    _pack_ = 1
+    _fields_ = [
+        ('TeamID', ctypes.c_ulong),
+        ('TeamName', ctypes.c_char * 33),
+        ('ZoneID', ctypes.c_ubyte),
+        ('FuncMapID', ctypes.c_ulong),
+        ('FuncMapEx', ctypes.c_ulong),
+        ('CreateTime', ctypes.c_ulong),
+        ('CaptainID', ctypes.c_ulong),
+        ('MinLV', ctypes.c_ushort),
+        ('MinFightPower', ctypes.c_ulong),
+        ('MinFightPowerEx', ctypes.c_ulong),
+        ('ServerOnly', ctypes.c_ubyte),
+        ('NeedCheck', ctypes.c_ubyte),
+        ('ApplyIDLen', ctypes.c_ushort),
+        ('ApplyIDList', ctypes.c_char_p),
+        ('Value1', ctypes.c_ulong),
+        ('Value2', ctypes.c_ulong),
+        ('Value3', ctypes.c_ulong),
+        ('Value4', ctypes.c_ulong),
+        ('Value5', ctypes.c_ulong),
+        ('ADOResult', ctypes.c_ulong),
+    ]
+
+    def __init__(self):
+        Structure.__init__(self)
+        self.clear()
+
+    def clear(self):
+        self.TeamID = 0
+        self.TeamName = ''
+        self.ZoneID = 0
+        self.FuncMapID = 0
+        self.FuncMapEx = 0
+        self.CreateTime = 0
+        self.CaptainID = 0
+        self.MinLV = 0
+        self.MinFightPower = 0
+        self.MinFightPowerEx = 0
+        self.ServerOnly = 0
+        self.NeedCheck = 0
+        self.ApplyIDLen = 0
+        self.ApplyIDList = ''
+        self.Value1 = 0
+        self.Value2 = 0
+        self.Value3 = 0
+        self.Value4 = 0
+        self.Value5 = 0
+
+    def readData(self, buf, pos = 0, length = 0):
+        if not pos <= length:
+            return -1
+        if len(buf) < pos + self.getLength():
+            return -1
+        self.clear()
+        self.TeamID, pos = CommFunc.ReadDWORD(buf, pos)
+        self.TeamName, pos = CommFunc.ReadString(buf, pos, 33)
+        self.ZoneID, pos = CommFunc.ReadBYTE(buf, pos)
+        self.FuncMapID, pos = CommFunc.ReadDWORD(buf, pos)
+        self.FuncMapEx, pos = CommFunc.ReadDWORD(buf, pos)
+        self.CreateTime, pos = CommFunc.ReadDWORD(buf, pos)
+        self.CaptainID, pos = CommFunc.ReadDWORD(buf, pos)
+        self.MinLV, pos = CommFunc.ReadWORD(buf, pos)
+        self.MinFightPower, pos = CommFunc.ReadDWORD(buf, pos)
+        self.MinFightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
+        self.ServerOnly, pos = CommFunc.ReadBYTE(buf, pos)
+        self.NeedCheck, pos = CommFunc.ReadBYTE(buf, pos)
+        self.ApplyIDLen, pos = CommFunc.ReadWORD(buf, pos)
+        tmp, pos = CommFunc.ReadString(buf, pos, self.ApplyIDLen)
+        self.ApplyIDList = ctypes.c_char_p(tmp)
+        self.Value1, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value2, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value3, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value4, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value5, pos = CommFunc.ReadDWORD(buf, pos)
+        return self.getLength()
+
+    def getBuffer(self):
+        buf = ''
+        buf = CommFunc.WriteDWORD(buf, self.TeamID)
+        buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.TeamName)
+        buf = CommFunc.WriteBYTE(buf, self.ZoneID)
+        buf = CommFunc.WriteDWORD(buf, self.FuncMapID)
+        buf = CommFunc.WriteDWORD(buf, self.FuncMapEx)
+        buf = CommFunc.WriteDWORD(buf, self.CreateTime)
+        buf = CommFunc.WriteDWORD(buf, self.CaptainID)
+        buf = CommFunc.WriteWORD(buf, self.MinLV)
+        buf = CommFunc.WriteDWORD(buf, self.MinFightPower)
+        buf = CommFunc.WriteDWORD(buf, self.MinFightPowerEx)
+        buf = CommFunc.WriteBYTE(buf, self.ServerOnly)
+        buf = CommFunc.WriteBYTE(buf, self.NeedCheck)
+        buf = CommFunc.WriteWORD(buf, self.ApplyIDLen)
+        buf = CommFunc.WriteString(buf, self.ApplyIDLen, self.ApplyIDList)
+        buf = CommFunc.WriteDWORD(buf, self.Value1)
+        buf = CommFunc.WriteDWORD(buf, self.Value2)
+        buf = CommFunc.WriteDWORD(buf, self.Value3)
+        buf = CommFunc.WriteDWORD(buf, self.Value4)
+        buf = CommFunc.WriteDWORD(buf, self.Value5)
+        return buf
+
+    def getLength(self):
+        length = 0
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_char) * 33
+        length += sizeof(ctypes.c_ubyte)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ushort)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ubyte)
+        length += sizeof(ctypes.c_ubyte)
+        length += sizeof(ctypes.c_ushort)
+        length += self.ApplyIDLen
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
+        return length
+
+    def outputString(self):
+        output = '''// 功能队伍表 #tagDBFuncTeam:
+            TeamID = %s,
+            TeamName = %s,
+            ZoneID = %s,
+            FuncMapID = %s,
+            FuncMapEx = %s,
+            CreateTime = %s,
+            CaptainID = %s,
+            MinLV = %s,
+            MinFightPower = %s,
+            MinFightPowerEx = %s,
+            ServerOnly = %s,
+            NeedCheck = %s,
+            ApplyIDLen = %s,
+            ApplyIDList = %s,
+            Value1 = %s,
+            Value2 = %s,
+            Value3 = %s,
+            Value4 = %s,
+            Value5 = %s,
+            ADOResult = %s,
+            '''%(
+                self.TeamID,
+                self.TeamName,
+                self.ZoneID,
+                self.FuncMapID,
+                self.FuncMapEx,
+                self.CreateTime,
+                self.CaptainID,
+                self.MinLV,
+                self.MinFightPower,
+                self.MinFightPowerEx,
+                self.ServerOnly,
+                self.NeedCheck,
+                self.ApplyIDLen,
+                self.ApplyIDList,
+                self.Value1,
+                self.Value2,
+                self.Value3,
+                self.Value4,
+                self.Value5,
+                self.ADOResult,
+            )
+        return output
+
+    #Char数组类型Set接口,使用该接口对此类型数据赋值,防止赋值的数据过长报错
+    def SetTeamName(self,Str):
+        if len(Str)<=33:
+            self.TeamName = Str
+        else:
+            self.TeamName = Str[:33]
+            
+
+# 功能队伍成员表 #tagDBFuncTeamMem
+class tagDBFuncTeamMem(Structure):
+    _pack_ = 1
+    _fields_ = [
+        ('TeamID', ctypes.c_ulong),
+        ('PlayerID', ctypes.c_ulong),
+        ('Value1', ctypes.c_ulong),
+        ('Value2', ctypes.c_ulong),
+        ('Value3', ctypes.c_ulong),
+        ('Value4', ctypes.c_ulong),
+        ('Value5', ctypes.c_ulong),
+        ('ADOResult', ctypes.c_ulong),
+    ]
+
+    def __init__(self):
+        Structure.__init__(self)
+        self.clear()
+
+
+    def clear(self):
+        memset(addressof(self), 0, self.getLength())
+
+    def readData(self, buf, pos = 0, length = 0):
+        if not pos <= length:
+            return -1
+        if len(buf) < pos + self.getLength():
+            return -1
+        self.clear()
+        self.TeamID, pos = CommFunc.ReadDWORD(buf, pos)
+        self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value1, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value2, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value3, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value4, pos = CommFunc.ReadDWORD(buf, pos)
+        self.Value5, pos = CommFunc.ReadDWORD(buf, pos)
+        return self.getLength()
+
+
+    def getBuffer(self):
+        buf = create_string_buffer(self.getLength())
+        memmove(addressof(buf), addressof(self), self.getLength())
+        return string_at(addressof(buf), self.getLength())
+
+    def getLength(self):
+        return sizeof(tagDBFuncTeamMem)
+
+    def outputString(self):
+        output = '''// 功能队伍成员表 #tagDBFuncTeamMem:
+            TeamID = %s,
+            PlayerID = %s,
+            Value1 = %s,
+            Value2 = %s,
+            Value3 = %s,
+            Value4 = %s,
+            Value5 = %s,
+            ADOResult = %s,
+            '''%(
+                self.TeamID,
+                self.PlayerID,
+                self.Value1,
+                self.Value2,
+                self.Value3,
+                self.Value4,
+                self.Value5,
+                self.ADOResult,
+            )
+        return output
+
+
 
 #服务器世界数据表版本号
 GAMEWORLD_DATA_VERSION_NO = ctypes.c_ulong (\
     sizeof(tagDBEventTrig) + sizeof(tagDBFamily) + sizeof(tagDBFamilyMem) + sizeof(tagDBFamilyAction) + 
     sizeof(tagDBPlayerViewCache) + sizeof(tagDBMailPersonal) + sizeof(tagDBMailServer) + sizeof(tagDBMailItem) + 
-    sizeof(tagDBMailPlayerRec) + sizeof(tagDBBillboard) + sizeof(tagDBGameRec)
+    sizeof(tagDBMailPlayerRec) + sizeof(tagDBBillboard) + sizeof(tagDBGameRec) + sizeof(tagDBFuncTeam) + sizeof(tagDBFuncTeamMem)
     ).value
     
\ No newline at end of file

--
Gitblit v1.8.0