hch
2024-05-21 bfd426a6856200eefdfc86b9ec04e40a4f637923
ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
@@ -636,6 +636,16 @@
        ('ItemData14', ctypes.c_char_p),
        ('ItemDataSize15', ctypes.c_ushort),
        ('ItemData15', ctypes.c_char_p),
        ('ItemDataSize16', ctypes.c_ushort),
        ('ItemData16', ctypes.c_char_p),
        ('ItemDataSize17', ctypes.c_ushort),
        ('ItemData17', ctypes.c_char_p),
        ('ItemDataSize18', ctypes.c_ushort),
        ('ItemData18', ctypes.c_char_p),
        ('ItemDataSize19', ctypes.c_ushort),
        ('ItemData19', ctypes.c_char_p),
        ('ItemDataSize20', ctypes.c_ushort),
        ('ItemData20', ctypes.c_char_p),
        ('ADOResult', ctypes.c_ulong),
    ]
@@ -683,6 +693,16 @@
        self.ItemData14 = ''
        self.ItemDataSize15 = 0
        self.ItemData15 = ''
        self.ItemDataSize16 = 0
        self.ItemData16 = ''
        self.ItemDataSize17 = 0
        self.ItemData17 = ''
        self.ItemDataSize18 = 0
        self.ItemData18 = ''
        self.ItemDataSize19 = 0
        self.ItemData19 = ''
        self.ItemDataSize20 = 0
        self.ItemData20 = ''
    def readData(self, buf, pos = 0, length = 0):
        if not pos <= length:
@@ -747,6 +767,21 @@
        self.ItemDataSize15, pos = CommFunc.ReadWORD(buf, pos)
        tmp, pos = CommFunc.ReadString(buf, pos, self.ItemDataSize15)
        self.ItemData15 = ctypes.c_char_p(tmp)
        self.ItemDataSize16, pos = CommFunc.ReadWORD(buf, pos)
        tmp, pos = CommFunc.ReadString(buf, pos, self.ItemDataSize16)
        self.ItemData16 = ctypes.c_char_p(tmp)
        self.ItemDataSize17, pos = CommFunc.ReadWORD(buf, pos)
        tmp, pos = CommFunc.ReadString(buf, pos, self.ItemDataSize17)
        self.ItemData17 = ctypes.c_char_p(tmp)
        self.ItemDataSize18, pos = CommFunc.ReadWORD(buf, pos)
        tmp, pos = CommFunc.ReadString(buf, pos, self.ItemDataSize18)
        self.ItemData18 = ctypes.c_char_p(tmp)
        self.ItemDataSize19, pos = CommFunc.ReadWORD(buf, pos)
        tmp, pos = CommFunc.ReadString(buf, pos, self.ItemDataSize19)
        self.ItemData19 = ctypes.c_char_p(tmp)
        self.ItemDataSize20, pos = CommFunc.ReadWORD(buf, pos)
        tmp, pos = CommFunc.ReadString(buf, pos, self.ItemDataSize20)
        self.ItemData20 = ctypes.c_char_p(tmp)
        return self.getLength()
    def getBuffer(self):
@@ -790,6 +825,16 @@
        buf = CommFunc.WriteString(buf, self.ItemDataSize14, self.ItemData14)
        buf = CommFunc.WriteWORD(buf, self.ItemDataSize15)
        buf = CommFunc.WriteString(buf, self.ItemDataSize15, self.ItemData15)
        buf = CommFunc.WriteWORD(buf, self.ItemDataSize16)
        buf = CommFunc.WriteString(buf, self.ItemDataSize16, self.ItemData16)
        buf = CommFunc.WriteWORD(buf, self.ItemDataSize17)
        buf = CommFunc.WriteString(buf, self.ItemDataSize17, self.ItemData17)
        buf = CommFunc.WriteWORD(buf, self.ItemDataSize18)
        buf = CommFunc.WriteString(buf, self.ItemDataSize18, self.ItemData18)
        buf = CommFunc.WriteWORD(buf, self.ItemDataSize19)
        buf = CommFunc.WriteString(buf, self.ItemDataSize19, self.ItemData19)
        buf = CommFunc.WriteWORD(buf, self.ItemDataSize20)
        buf = CommFunc.WriteString(buf, self.ItemDataSize20, self.ItemData20)
        return buf
    def getLength(self):
@@ -833,6 +878,16 @@
        length += self.ItemDataSize14
        length += sizeof(ctypes.c_ushort)
        length += self.ItemDataSize15
        length += sizeof(ctypes.c_ushort)
        length += self.ItemDataSize16
        length += sizeof(ctypes.c_ushort)
        length += self.ItemDataSize17
        length += sizeof(ctypes.c_ushort)
        length += self.ItemDataSize18
        length += sizeof(ctypes.c_ushort)
        length += self.ItemDataSize19
        length += sizeof(ctypes.c_ushort)
        length += self.ItemDataSize20
        return length
    def outputString(self):
@@ -876,6 +931,16 @@
            ItemData14 = %s,
            ItemDataSize15 = %s,
            ItemData15 = %s,
            ItemDataSize16 = %s,
            ItemData16 = %s,
            ItemDataSize17 = %s,
            ItemData17 = %s,
            ItemDataSize18 = %s,
            ItemData18 = %s,
            ItemDataSize19 = %s,
            ItemData19 = %s,
            ItemDataSize20 = %s,
            ItemData20 = %s,
            ADOResult = %s,
            '''%(
                self.PlayerID,
@@ -917,6 +982,16 @@
                self.ItemData14,
                self.ItemDataSize15,
                self.ItemData15,
                self.ItemDataSize16,
                self.ItemData16,
                self.ItemDataSize17,
                self.ItemData17,
                self.ItemDataSize18,
                self.ItemData18,
                self.ItemDataSize19,
                self.ItemData19,
                self.ItemDataSize20,
                self.ItemData20,
                self.ADOResult,
            )
        return output
@@ -2228,6 +2303,7 @@
        ('RealmLV', ctypes.c_ushort),
        ('OnlineType', ctypes.c_ubyte),
        ('RefCount', ctypes.c_ulong),
        ('Face', ctypes.c_ulong),
        ('ADOResult', ctypes.c_ulong),
    ]
@@ -2252,6 +2328,7 @@
        self.RealmLV, pos = CommFunc.ReadWORD(buf, pos)
        self.OnlineType, pos = CommFunc.ReadBYTE(buf, pos)
        self.RefCount, pos = CommFunc.ReadDWORD(buf, pos)
        self.Face, pos = CommFunc.ReadDWORD(buf, pos)
        return self.getLength()
@@ -2272,6 +2349,7 @@
            RealmLV = %s,
            OnlineType = %s,
            RefCount = %s,
            Face = %s,
            ADOResult = %s,
            '''%(
                self.PlayerID,
@@ -2281,6 +2359,7 @@
                self.RealmLV,
                self.OnlineType,
                self.RefCount,
                self.Face,
                self.ADOResult,
            )
        return output
@@ -2543,4 +2622,303 @@
                self.ADOResult,
            )
        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:
            return -1
        if len(buf) < pos + self.getLength():
            return -1
        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 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
# 福地记录表 #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:
            return -1
        if len(buf) < pos + self.getLength():
            return -1
        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 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
# 福地结算奖励表 #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:
            return -1
        if len(buf) < pos + self.getLength():
            return -1
        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 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