From f6e55772b80bf536223e6e949e28fb7b1812a54d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 19 九月 2025 12:02:36 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(甘夫人潜能1、3;增加使用技能后触发方式9;层级buff属性支持;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py |  965 +++++++++++++++++++++++++-------------------------------
 1 files changed, 438 insertions(+), 527 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py
index 75fc0a3..a2e642b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Collections/DataServerPlayerData.py
@@ -1898,7 +1898,7 @@
         ('ItemGUID', ctypes.c_char * 40),
         ('PlayerID', ctypes.c_ulong),
         ('ItemTypeID', ctypes.c_ulong),
-        ('Count', ctypes.c_ushort),
+        ('Count', ctypes.c_ulong),
         ('IsLocked', ctypes.c_ubyte),
         ('ItemPlaceType', ctypes.c_ubyte),
         ('ItemPlaceIndex', ctypes.c_ushort),
@@ -1946,7 +1946,7 @@
         self.ItemGUID, pos = CommFunc.ReadString(buf, pos, 40)
         self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
         self.ItemTypeID, pos = CommFunc.ReadDWORD(buf, pos)
-        self.Count, pos = CommFunc.ReadWORD(buf, pos)
+        self.Count, pos = CommFunc.ReadDWORD(buf, pos)
         self.IsLocked, pos = CommFunc.ReadBYTE(buf, pos)
         self.ItemPlaceType, pos = CommFunc.ReadBYTE(buf, pos)
         self.ItemPlaceIndex, pos = CommFunc.ReadWORD(buf, pos)
@@ -1965,7 +1965,7 @@
         buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 40, self.ItemGUID)
         buf = CommFunc.WriteDWORD(buf, self.PlayerID)
         buf = CommFunc.WriteDWORD(buf, self.ItemTypeID)
-        buf = CommFunc.WriteWORD(buf, self.Count)
+        buf = CommFunc.WriteDWORD(buf, self.Count)
         buf = CommFunc.WriteBYTE(buf, self.IsLocked)
         buf = CommFunc.WriteBYTE(buf, self.ItemPlaceType)
         buf = CommFunc.WriteWORD(buf, self.ItemPlaceIndex)
@@ -1983,7 +1983,7 @@
         length += sizeof(ctypes.c_char) * 40
         length += sizeof(ctypes.c_ulong)
         length += sizeof(ctypes.c_ulong)
-        length += sizeof(ctypes.c_ushort)
+        length += sizeof(ctypes.c_ulong)
         length += sizeof(ctypes.c_ubyte)
         length += sizeof(ctypes.c_ubyte)
         length += sizeof(ctypes.c_ushort)
@@ -2259,7 +2259,6 @@
             self.CreateTime = Str
         else:
             self.CreateTime = Str[:30]
-            
 
 
                          
@@ -24589,527 +24588,6 @@
             )
         return output
 
- 
-# 福地矿物表 #tagDBPyMineAreaItem
-class tagDBPyMineAreaItem(Structure):
-    _pack_ = 1
-    _fields_ = [
-        ('PlayerID', ctypes.c_ulong),
-        ('Index', ctypes.c_ubyte),
-        ('MineID', ctypes.c_ushort),
-        ('MineType', ctypes.c_ubyte),
-        ('UpdTime', ctypes.c_ulong),
-        ('PosLen', ctypes.c_ubyte),
-        ('Position', ctypes.c_char_p),
-        ('WorkerCount', ctypes.c_ubyte),
-        ('WorkerState', ctypes.c_ubyte),
-        ('RobPlayerID', ctypes.c_ulong),
-        ('RobWorkerCount', ctypes.c_ubyte),
-        ('RobWorkerState', ctypes.c_ubyte),
-        ('ADOResult', ctypes.c_ulong),
-    ]
-
-    def __init__(self):
-        Structure.__init__(self)
-        self.clear()
-
-    def clear(self):
-        self.PlayerID = 0
-        self.Index = 0
-        self.MineID = 0
-        self.MineType = 0
-        self.UpdTime = 0
-        self.PosLen = 0
-        self.Position = ''
-        self.WorkerCount = 0
-        self.WorkerState = 0
-        self.RobPlayerID = 0
-        self.RobWorkerCount = 0
-        self.RobWorkerState = 0
-
-    def readData(self, buf, pos = 0, length = 0):
-        if not pos <= length:
-            msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
-            mylog.error(msg)
-            return -1
-        if len(buf) < pos + self.getLength():
-            msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
-            mylog.error(msg)
-        self.clear()
-        self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
-        self.Index, pos = CommFunc.ReadBYTE(buf, pos)
-        self.MineID, pos = CommFunc.ReadWORD(buf, pos)
-        self.MineType, pos = CommFunc.ReadBYTE(buf, pos)
-        self.UpdTime, pos = CommFunc.ReadDWORD(buf, pos)
-        self.PosLen, pos = CommFunc.ReadBYTE(buf, pos)
-        tmp, pos = CommFunc.ReadString(buf, pos, self.PosLen)
-        self.Position = ctypes.c_char_p(tmp)
-        self.WorkerCount, pos = CommFunc.ReadBYTE(buf, pos)
-        self.WorkerState, pos = CommFunc.ReadBYTE(buf, pos)
-        self.RobPlayerID, pos = CommFunc.ReadDWORD(buf, pos)
-        self.RobWorkerCount, pos = CommFunc.ReadBYTE(buf, pos)
-        self.RobWorkerState, pos = CommFunc.ReadBYTE(buf, pos)
-        return self.getLength()
-
-    def getBuffer(self):
-        buf = ''
-        buf = CommFunc.WriteDWORD(buf, self.PlayerID)
-        buf = CommFunc.WriteBYTE(buf, self.Index)
-        buf = CommFunc.WriteWORD(buf, self.MineID)
-        buf = CommFunc.WriteBYTE(buf, self.MineType)
-        buf = CommFunc.WriteDWORD(buf, self.UpdTime)
-        buf = CommFunc.WriteBYTE(buf, self.PosLen)
-        buf = CommFunc.WriteString(buf, self.PosLen, self.Position)
-        buf = CommFunc.WriteBYTE(buf, self.WorkerCount)
-        buf = CommFunc.WriteBYTE(buf, self.WorkerState)
-        buf = CommFunc.WriteDWORD(buf, self.RobPlayerID)
-        buf = CommFunc.WriteBYTE(buf, self.RobWorkerCount)
-        buf = CommFunc.WriteBYTE(buf, self.RobWorkerState)
-        return buf
-
-    def getLength(self):
-        length = 0
-        length += sizeof(ctypes.c_ulong)
-        length += sizeof(ctypes.c_ubyte)
-        length += sizeof(ctypes.c_ushort)
-        length += sizeof(ctypes.c_ubyte)
-        length += sizeof(ctypes.c_ulong)
-        length += sizeof(ctypes.c_ubyte)
-        length += self.PosLen
-        length += sizeof(ctypes.c_ubyte)
-        length += sizeof(ctypes.c_ubyte)
-        length += sizeof(ctypes.c_ulong)
-        length += sizeof(ctypes.c_ubyte)
-        length += sizeof(ctypes.c_ubyte)
-        return length
-
-    def getRecord(self):
-        '''组织存储记录'''
-        rec = {}
-        rec[u'PlayerID'] = self.PlayerID
-        rec[u'Index'] = self.Index
-        rec[u'MineID'] = self.MineID
-        rec[u'MineType'] = self.MineType
-        rec[u'UpdTime'] = self.UpdTime
-        rec[u'PosLen'] = self.PosLen
-        rec[u'Position'] = fix_incomingText(self.Position)
-        rec[u'WorkerCount'] = self.WorkerCount
-        rec[u'WorkerState'] = self.WorkerState
-        rec[u'RobPlayerID'] = self.RobPlayerID
-        rec[u'RobWorkerCount'] = self.RobWorkerCount
-        rec[u'RobWorkerState'] = self.RobWorkerState
-        return rec
-
-    def readRecord(self, rec):
-        '''由于MongoDB读出来是unicode,所有字符串需要进行转换'''
-        self.PlayerID = rec.get(u'PlayerID', 0)
-        self.Index = rec.get(u'Index', 0)
-        self.MineID = rec.get(u'MineID', 0)
-        self.MineType = rec.get(u'MineType', 0)
-        self.UpdTime = rec.get(u'UpdTime', 0)
-        self.PosLen = rec.get(u'PosLen', 0)
-        self.Position = fix_outgoingText(rec.get(u'Position', u''))
-        self.WorkerCount = rec.get(u'WorkerCount', 0)
-        self.WorkerState = rec.get(u'WorkerState', 0)
-        self.RobPlayerID = rec.get(u'RobPlayerID', 0)
-        self.RobWorkerCount = rec.get(u'RobWorkerCount', 0)
-        self.RobWorkerState = rec.get(u'RobWorkerState', 0)
-
-#Can not implement adoLoadStr method:No key defined!
-#Can not implement adoInsertStr method:No key defined!
-#Can not implement adoUpdateStr method:No key defined!
-#Can not implement adoUpdateStr method:No key defined!
-#Can not implement adoCheckUpdateStr method:No key defined!
-#Can not implement adoCheckUpdateExStr method:No key defined!
-
-    def getAdoRecords(self, resultCollection):
-        '''查询结果打包成二进制流'''
-        result = ''
-        result = CommFunc.WriteDWORD(result, resultCollection.count())
-        for rec in resultCollection:
-            self.readRecord(rec)
-            result += self.getBuffer()
-        return result
-
-#Can not implement adoQueryIndexStr method:No key defined!
-
-    def adoQueryCustom(self, collection, queryDict):
-        '''自定义查询'''
-        resultCollection = collection.find(queryDict)
-
-        return self.getAdoRecords(resultCollection)
-
-
-    def adoQueryAll(self, collection):
-        '''查询所有''' 
-        resultCollection = collection.find()
-         
-        return self.getAdoRecords(resultCollection)
-
-#Can not implement adoDeleteByIndexStr method:No key defined!
-    def outputString(self):
-        output = '''// 福地矿物表 #tagDBPyMineAreaItem:
-            PlayerID = %s,
-            Index = %s,
-            MineID = %s,
-            MineType = %s,
-            UpdTime = %s,
-            PosLen = %s,
-            Position = %s,
-            WorkerCount = %s,
-            WorkerState = %s,
-            RobPlayerID = %s,
-            RobWorkerCount = %s,
-            RobWorkerState = %s,
-            ADOResult = %s,
-            '''%(
-                self.PlayerID,
-                self.Index,
-                self.MineID,
-                self.MineType,
-                self.UpdTime,
-                self.PosLen,
-                self.Position,
-                self.WorkerCount,
-                self.WorkerState,
-                self.RobPlayerID,
-                self.RobWorkerCount,
-                self.RobWorkerState,
-                self.ADOResult,
-            )
-        return output
-
-    def dumpString(self):
-        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
-                self.PlayerID,
-                self.Index,
-                self.MineID,
-                self.MineType,
-                self.UpdTime,
-                self.PosLen,
-                self.Position,
-                self.WorkerCount,
-                self.WorkerState,
-                self.RobPlayerID,
-                self.RobWorkerCount,
-                self.RobWorkerState,
-            )
-        return output
-
-
-# 福地记录表 #tagDBPyMineAreaRecord
-class tagDBPyMineAreaRecord(Structure):
-    _pack_ = 1
-    _fields_ = [
-        ('PlayerID', ctypes.c_ulong),
-        ('RecordType', ctypes.c_ulong),
-        ('TagPlayerID', ctypes.c_ulong),
-        ('RecordTime', ctypes.c_ulong),
-        ('MineID', ctypes.c_ushort),
-        ('DataLen', ctypes.c_ushort),
-        ('Data', ctypes.c_char_p),
-        ('ADOResult', ctypes.c_ulong),
-    ]
-
-    def __init__(self):
-        Structure.__init__(self)
-        self.clear()
-
-    def clear(self):
-        self.PlayerID = 0
-        self.RecordType = 0
-        self.TagPlayerID = 0
-        self.RecordTime = 0
-        self.MineID = 0
-        self.DataLen = 0
-        self.Data = ''
-
-    def readData(self, buf, pos = 0, length = 0):
-        if not pos <= length:
-            msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
-            mylog.error(msg)
-            return -1
-        if len(buf) < pos + self.getLength():
-            msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
-            mylog.error(msg)
-        self.clear()
-        self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
-        self.RecordType, pos = CommFunc.ReadDWORD(buf, pos)
-        self.TagPlayerID, pos = CommFunc.ReadDWORD(buf, pos)
-        self.RecordTime, pos = CommFunc.ReadDWORD(buf, pos)
-        self.MineID, pos = CommFunc.ReadWORD(buf, pos)
-        self.DataLen, pos = CommFunc.ReadWORD(buf, pos)
-        tmp, pos = CommFunc.ReadString(buf, pos, self.DataLen)
-        self.Data = ctypes.c_char_p(tmp)
-        return self.getLength()
-
-    def getBuffer(self):
-        buf = ''
-        buf = CommFunc.WriteDWORD(buf, self.PlayerID)
-        buf = CommFunc.WriteDWORD(buf, self.RecordType)
-        buf = CommFunc.WriteDWORD(buf, self.TagPlayerID)
-        buf = CommFunc.WriteDWORD(buf, self.RecordTime)
-        buf = CommFunc.WriteWORD(buf, self.MineID)
-        buf = CommFunc.WriteWORD(buf, self.DataLen)
-        buf = CommFunc.WriteString(buf, self.DataLen, self.Data)
-        return buf
-
-    def getLength(self):
-        length = 0
-        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_ushort)
-        length += self.DataLen
-        return length
-
-    def getRecord(self):
-        '''组织存储记录'''
-        rec = {}
-        rec[u'PlayerID'] = self.PlayerID
-        rec[u'RecordType'] = self.RecordType
-        rec[u'TagPlayerID'] = self.TagPlayerID
-        rec[u'RecordTime'] = self.RecordTime
-        rec[u'MineID'] = self.MineID
-        rec[u'DataLen'] = self.DataLen
-        rec[u'Data'] = fix_incomingText(self.Data)
-        return rec
-
-    def readRecord(self, rec):
-        '''由于MongoDB读出来是unicode,所有字符串需要进行转换'''
-        self.PlayerID = rec.get(u'PlayerID', 0)
-        self.RecordType = rec.get(u'RecordType', 0)
-        self.TagPlayerID = rec.get(u'TagPlayerID', 0)
-        self.RecordTime = rec.get(u'RecordTime', 0)
-        self.MineID = rec.get(u'MineID', 0)
-        self.DataLen = rec.get(u'DataLen', 0)
-        self.Data = fix_outgoingText(rec.get(u'Data', u''))
-
-#Can not implement adoLoadStr method:No key defined!
-#Can not implement adoInsertStr method:No key defined!
-#Can not implement adoUpdateStr method:No key defined!
-#Can not implement adoUpdateStr method:No key defined!
-#Can not implement adoCheckUpdateStr method:No key defined!
-#Can not implement adoCheckUpdateExStr method:No key defined!
-
-    def getAdoRecords(self, resultCollection):
-        '''查询结果打包成二进制流'''
-        result = ''
-        result = CommFunc.WriteDWORD(result, resultCollection.count())
-        for rec in resultCollection:
-            self.readRecord(rec)
-            result += self.getBuffer()
-        return result
-
-#Can not implement adoQueryIndexStr method:No key defined!
-
-    def adoQueryCustom(self, collection, queryDict):
-        '''自定义查询'''
-        resultCollection = collection.find(queryDict)
-
-        return self.getAdoRecords(resultCollection)
-
-
-    def adoQueryAll(self, collection):
-        '''查询所有''' 
-        resultCollection = collection.find()
-         
-        return self.getAdoRecords(resultCollection)
-
-#Can not implement adoDeleteByIndexStr method:No key defined!
-    def outputString(self):
-        output = '''// 福地记录表 #tagDBPyMineAreaRecord:
-            PlayerID = %s,
-            RecordType = %s,
-            TagPlayerID = %s,
-            RecordTime = %s,
-            MineID = %s,
-            DataLen = %s,
-            Data = %s,
-            ADOResult = %s,
-            '''%(
-                self.PlayerID,
-                self.RecordType,
-                self.TagPlayerID,
-                self.RecordTime,
-                self.MineID,
-                self.DataLen,
-                self.Data,
-                self.ADOResult,
-            )
-        return output
-
-    def dumpString(self):
-        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
-                self.PlayerID,
-                self.RecordType,
-                self.TagPlayerID,
-                self.RecordTime,
-                self.MineID,
-                self.DataLen,
-                self.Data,
-            )
-        return output
-
-
-# 福地结算奖励表 #tagDBPyMineAreaAward
-class tagDBPyMineAreaAward(Structure):
-    _pack_ = 1
-    _fields_ = [
-        ('GUIDLen', ctypes.c_ubyte),
-        ('GUID', ctypes.c_char_p),
-        ('PlayerID', ctypes.c_ulong),
-        ('AwardTime', ctypes.c_ulong),
-        ('MineID', ctypes.c_ushort),
-        ('WorkerCount', ctypes.c_ubyte),
-        ('AreaPlayerID', ctypes.c_ulong),
-        ('ADOResult', ctypes.c_ulong),
-    ]
-
-    def __init__(self):
-        Structure.__init__(self)
-        self.clear()
-
-    def clear(self):
-        self.GUIDLen = 0
-        self.GUID = ''
-        self.PlayerID = 0
-        self.AwardTime = 0
-        self.MineID = 0
-        self.WorkerCount = 0
-        self.AreaPlayerID = 0
-
-    def readData(self, buf, pos = 0, length = 0):
-        if not pos <= length:
-            msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
-            mylog.error(msg)
-            return -1
-        if len(buf) < pos + self.getLength():
-            msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
-            mylog.error(msg)
-        self.clear()
-        self.GUIDLen, pos = CommFunc.ReadBYTE(buf, pos)
-        tmp, pos = CommFunc.ReadString(buf, pos, self.GUIDLen)
-        self.GUID = ctypes.c_char_p(tmp)
-        self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
-        self.AwardTime, pos = CommFunc.ReadDWORD(buf, pos)
-        self.MineID, pos = CommFunc.ReadWORD(buf, pos)
-        self.WorkerCount, pos = CommFunc.ReadBYTE(buf, pos)
-        self.AreaPlayerID, pos = CommFunc.ReadDWORD(buf, pos)
-        return self.getLength()
-
-    def getBuffer(self):
-        buf = ''
-        buf = CommFunc.WriteBYTE(buf, self.GUIDLen)
-        buf = CommFunc.WriteString(buf, self.GUIDLen, self.GUID)
-        buf = CommFunc.WriteDWORD(buf, self.PlayerID)
-        buf = CommFunc.WriteDWORD(buf, self.AwardTime)
-        buf = CommFunc.WriteWORD(buf, self.MineID)
-        buf = CommFunc.WriteBYTE(buf, self.WorkerCount)
-        buf = CommFunc.WriteDWORD(buf, self.AreaPlayerID)
-        return buf
-
-    def getLength(self):
-        length = 0
-        length += sizeof(ctypes.c_ubyte)
-        length += self.GUIDLen
-        length += sizeof(ctypes.c_ulong)
-        length += sizeof(ctypes.c_ulong)
-        length += sizeof(ctypes.c_ushort)
-        length += sizeof(ctypes.c_ubyte)
-        length += sizeof(ctypes.c_ulong)
-        return length
-
-    def getRecord(self):
-        '''组织存储记录'''
-        rec = {}
-        rec[u'GUIDLen'] = self.GUIDLen
-        rec[u'GUID'] = fix_incomingText(self.GUID)
-        rec[u'PlayerID'] = self.PlayerID
-        rec[u'AwardTime'] = self.AwardTime
-        rec[u'MineID'] = self.MineID
-        rec[u'WorkerCount'] = self.WorkerCount
-        rec[u'AreaPlayerID'] = self.AreaPlayerID
-        return rec
-
-    def readRecord(self, rec):
-        '''由于MongoDB读出来是unicode,所有字符串需要进行转换'''
-        self.GUIDLen = rec.get(u'GUIDLen', 0)
-        self.GUID = fix_outgoingText(rec.get(u'GUID', u''))
-        self.PlayerID = rec.get(u'PlayerID', 0)
-        self.AwardTime = rec.get(u'AwardTime', 0)
-        self.MineID = rec.get(u'MineID', 0)
-        self.WorkerCount = rec.get(u'WorkerCount', 0)
-        self.AreaPlayerID = rec.get(u'AreaPlayerID', 0)
-
-#Can not implement adoLoadStr method:No key defined!
-#Can not implement adoInsertStr method:No key defined!
-#Can not implement adoUpdateStr method:No key defined!
-#Can not implement adoUpdateStr method:No key defined!
-#Can not implement adoCheckUpdateStr method:No key defined!
-#Can not implement adoCheckUpdateExStr method:No key defined!
-
-    def getAdoRecords(self, resultCollection):
-        '''查询结果打包成二进制流'''
-        result = ''
-        result = CommFunc.WriteDWORD(result, resultCollection.count())
-        for rec in resultCollection:
-            self.readRecord(rec)
-            result += self.getBuffer()
-        return result
-
-#Can not implement adoQueryIndexStr method:No key defined!
-
-    def adoQueryCustom(self, collection, queryDict):
-        '''自定义查询'''
-        resultCollection = collection.find(queryDict)
-
-        return self.getAdoRecords(resultCollection)
-
-
-    def adoQueryAll(self, collection):
-        '''查询所有''' 
-        resultCollection = collection.find()
-         
-        return self.getAdoRecords(resultCollection)
-
-#Can not implement adoDeleteByIndexStr method:No key defined!
-    def outputString(self):
-        output = '''// 福地结算奖励表 #tagDBPyMineAreaAward:
-            GUIDLen = %s,
-            GUID = %s,
-            PlayerID = %s,
-            AwardTime = %s,
-            MineID = %s,
-            WorkerCount = %s,
-            AreaPlayerID = %s,
-            ADOResult = %s,
-            '''%(
-                self.GUIDLen,
-                self.GUID,
-                self.PlayerID,
-                self.AwardTime,
-                self.MineID,
-                self.WorkerCount,
-                self.AreaPlayerID,
-                self.ADOResult,
-            )
-        return output
-
-    def dumpString(self):
-        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
-                self.GUIDLen,
-                self.GUID,
-                self.PlayerID,
-                self.AwardTime,
-                self.MineID,
-                self.WorkerCount,
-                self.AreaPlayerID,
-            )
-        return output
-
 
 # 玩家记录表 #tagDBPlayerRecData
 class tagDBPlayerRecData(Structure):
@@ -26406,6 +25884,7 @@
         ('RealmLV', ctypes.c_ubyte),
         ('Face', ctypes.c_int),
         ('FacePic', ctypes.c_int),
+        ('ModelMark', ctypes.c_ulong),
         ('FamilyID', ctypes.c_ulong),
         ('FamilyName', ctypes.c_char * 33),
         ('FamilyEmblemID', ctypes.c_ushort),
@@ -26432,6 +25911,7 @@
         self.RealmLV = 0
         self.Face = 0
         self.FacePic = 0
+        self.ModelMark = 0
         self.FamilyID = 0
         self.FamilyName = ''
         self.FamilyEmblemID = 0
@@ -26460,6 +25940,7 @@
         self.RealmLV, pos = CommFunc.ReadBYTE(buf, pos)
         self.Face, pos = CommFunc.ReadDWORD(buf, pos)
         self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
+        self.ModelMark, pos = CommFunc.ReadDWORD(buf, pos)
         self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
         self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
         self.FamilyEmblemID, pos = CommFunc.ReadWORD(buf, pos)
@@ -26483,6 +25964,7 @@
         buf = CommFunc.WriteBYTE(buf, self.RealmLV)
         buf = CommFunc.WriteDWORD(buf, self.Face)
         buf = CommFunc.WriteDWORD(buf, self.FacePic)
+        buf = CommFunc.WriteDWORD(buf, self.ModelMark)
         buf = CommFunc.WriteDWORD(buf, self.FamilyID)
         buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.FamilyName)
         buf = CommFunc.WriteWORD(buf, self.FamilyEmblemID)
@@ -26506,6 +25988,7 @@
         length += sizeof(ctypes.c_int)
         length += sizeof(ctypes.c_int)
         length += sizeof(ctypes.c_ulong)
+        length += sizeof(ctypes.c_ulong)
         length += sizeof(ctypes.c_char) * 33
         length += sizeof(ctypes.c_ushort)
         length += sizeof(ctypes.c_ulong)
@@ -26528,6 +26011,7 @@
         rec[u'RealmLV'] = self.RealmLV
         rec[u'Face'] = self.Face
         rec[u'FacePic'] = self.FacePic
+        rec[u'ModelMark'] = self.ModelMark
         rec[u'FamilyID'] = self.FamilyID
         rec[u'FamilyName'] = fix_incomingText(self.FamilyName)
         rec[u'FamilyEmblemID'] = self.FamilyEmblemID
@@ -26550,6 +26034,7 @@
         self.RealmLV = rec.get(u'RealmLV', 0)
         self.Face = rec.get(u'Face', 0)
         self.FacePic = rec.get(u'FacePic', 0)
+        self.ModelMark = rec.get(u'ModelMark', 0)
         self.FamilyID = rec.get(u'FamilyID', 0)
         self.FamilyName = fix_outgoingText(rec.get(u'FamilyName', u''))
         self.FamilyEmblemID = rec.get(u'FamilyEmblemID', 0)
@@ -26671,6 +26156,7 @@
             RealmLV = %s,
             Face = %s,
             FacePic = %s,
+            ModelMark = %s,
             FamilyID = %s,
             FamilyName = %s,
             FamilyEmblemID = %s,
@@ -26691,6 +26177,7 @@
                 self.RealmLV,
                 self.Face,
                 self.FacePic,
+                self.ModelMark,
                 self.FamilyID,
                 self.FamilyName,
                 self.FamilyEmblemID,
@@ -26706,7 +26193,7 @@
         return output
 
     def dumpString(self):
-        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
+        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
                 self.PlayerID,
                 self.AccID,
                 self.PlayerName,
@@ -26715,6 +26202,7 @@
                 self.RealmLV,
                 self.Face,
                 self.FacePic,
+                self.ModelMark,
                 self.FamilyID,
                 self.FamilyName,
                 self.FamilyEmblemID,
@@ -28697,3 +28185,426 @@
             self.Name = Str[:33]
             
 
+
+# 功能队伍表 #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:
+            msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
+            mylog.error(msg)
+            return -1
+        if len(buf) < pos + self.getLength():
+            msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
+            mylog.error(msg)
+        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 getRecord(self):
+        '''组织存储记录'''
+        rec = {}
+        rec[u'TeamID'] = self.TeamID
+        rec[u'TeamName'] = fix_incomingText(self.TeamName)
+        rec[u'ZoneID'] = self.ZoneID
+        rec[u'FuncMapID'] = self.FuncMapID
+        rec[u'FuncMapEx'] = self.FuncMapEx
+        rec[u'CreateTime'] = self.CreateTime
+        rec[u'CaptainID'] = self.CaptainID
+        rec[u'MinLV'] = self.MinLV
+        rec[u'MinFightPower'] = self.MinFightPower
+        rec[u'MinFightPowerEx'] = self.MinFightPowerEx
+        rec[u'ServerOnly'] = self.ServerOnly
+        rec[u'NeedCheck'] = self.NeedCheck
+        rec[u'ApplyIDLen'] = self.ApplyIDLen
+        rec[u'ApplyIDList'] = fix_incomingText(self.ApplyIDList)
+        rec[u'Value1'] = self.Value1
+        rec[u'Value2'] = self.Value2
+        rec[u'Value3'] = self.Value3
+        rec[u'Value4'] = self.Value4
+        rec[u'Value5'] = self.Value5
+        return rec
+
+    def readRecord(self, rec):
+        '''由于MongoDB读出来是unicode,所有字符串需要进行转换'''
+        self.TeamID = rec.get(u'TeamID', 0)
+        self.TeamName = fix_outgoingText(rec.get(u'TeamName', u''))
+        self.ZoneID = rec.get(u'ZoneID', 0)
+        self.FuncMapID = rec.get(u'FuncMapID', 0)
+        self.FuncMapEx = rec.get(u'FuncMapEx', 0)
+        self.CreateTime = rec.get(u'CreateTime', 0)
+        self.CaptainID = rec.get(u'CaptainID', 0)
+        self.MinLV = rec.get(u'MinLV', 0)
+        self.MinFightPower = rec.get(u'MinFightPower', 0)
+        self.MinFightPowerEx = rec.get(u'MinFightPowerEx', 0)
+        self.ServerOnly = rec.get(u'ServerOnly', 0)
+        self.NeedCheck = rec.get(u'NeedCheck', 0)
+        self.ApplyIDLen = rec.get(u'ApplyIDLen', 0)
+        self.ApplyIDList = fix_outgoingText(rec.get(u'ApplyIDList', u''))
+        self.Value1 = rec.get(u'Value1', 0)
+        self.Value2 = rec.get(u'Value2', 0)
+        self.Value3 = rec.get(u'Value3', 0)
+        self.Value4 = rec.get(u'Value4', 0)
+        self.Value5 = rec.get(u'Value5', 0)
+
+#Can not implement adoLoadStr method:No key defined!
+#Can not implement adoInsertStr method:No key defined!
+#Can not implement adoUpdateStr method:No key defined!
+#Can not implement adoUpdateStr method:No key defined!
+#Can not implement adoCheckUpdateStr method:No key defined!
+#Can not implement adoCheckUpdateExStr method:No key defined!
+
+    def getAdoRecords(self, resultCollection):
+        '''查询结果打包成二进制流'''
+        result = ''
+        result = CommFunc.WriteDWORD(result, resultCollection.count())
+        for rec in resultCollection:
+            self.readRecord(rec)
+            result += self.getBuffer()
+        return result
+
+#Can not implement adoQueryIndexStr method:No key defined!
+
+    def adoQueryCustom(self, collection, queryDict):
+        '''自定义查询'''
+        resultCollection = collection.find(queryDict)
+
+        return self.getAdoRecords(resultCollection)
+
+
+    def adoQueryAll(self, collection):
+        '''查询所有''' 
+        resultCollection = collection.find()
+         
+        return self.getAdoRecords(resultCollection)
+
+#Can not implement adoDeleteByIndexStr method:No key defined!
+    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
+
+    def dumpString(self):
+        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
+                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,
+            )
+        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:
+            msg = error.formatMsg('error', error.ERROR_NO_148, '(pos = %s) > (length = %s)'%(pos, length))
+            mylog.error(msg)
+            return -1
+        if len(buf) < pos + self.getLength():
+            msg = error.formatMsg('error', error.ERROR_NO_149, 'len = %s while %s expected!'%(len(buf) - pos, self.getLength()))
+            mylog.error(msg)
+        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 getRecord(self):
+        '''组织存储记录'''
+        rec = {}
+        rec[u'TeamID'] = self.TeamID
+        rec[u'PlayerID'] = self.PlayerID
+        rec[u'Value1'] = self.Value1
+        rec[u'Value2'] = self.Value2
+        rec[u'Value3'] = self.Value3
+        rec[u'Value4'] = self.Value4
+        rec[u'Value5'] = self.Value5
+        return rec
+
+    def readRecord(self, rec):
+        '''由于MongoDB读出来是unicode,所有字符串需要进行转换'''
+        self.TeamID = rec.get(u'TeamID', 0)
+        self.PlayerID = rec.get(u'PlayerID', 0)
+        self.Value1 = rec.get(u'Value1', 0)
+        self.Value2 = rec.get(u'Value2', 0)
+        self.Value3 = rec.get(u'Value3', 0)
+        self.Value4 = rec.get(u'Value4', 0)
+        self.Value5 = rec.get(u'Value5', 0)
+
+#Can not implement adoLoadStr method:No key defined!
+#Can not implement adoInsertStr method:No key defined!
+#Can not implement adoUpdateStr method:No key defined!
+#Can not implement adoUpdateStr method:No key defined!
+#Can not implement adoCheckUpdateStr method:No key defined!
+#Can not implement adoCheckUpdateExStr method:No key defined!
+
+    def getAdoRecords(self, resultCollection):
+        '''查询结果打包成二进制流'''
+        result = ''
+        result = CommFunc.WriteDWORD(result, resultCollection.count())
+        for rec in resultCollection:
+            self.readRecord(rec)
+            result += self.getBuffer()
+        return result
+
+#Can not implement adoQueryIndexStr method:No key defined!
+
+    def adoQueryCustom(self, collection, queryDict):
+        '''自定义查询'''
+        resultCollection = collection.find(queryDict)
+
+        return self.getAdoRecords(resultCollection)
+
+
+    def adoQueryAll(self, collection):
+        '''查询所有''' 
+        resultCollection = collection.find()
+         
+        return self.getAdoRecords(resultCollection)
+
+#Can not implement adoDeleteByIndexStr method:No key defined!
+    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
+
+    def dumpString(self):
+        output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
+                self.TeamID,
+                self.PlayerID,
+                self.Value1,
+                self.Value2,
+                self.Value3,
+                self.Value4,
+                self.Value5,
+            )
+        return output
+
+

--
Gitblit v1.8.0