From 8998ec5daea710f0465f56740aafbd0c2f0d2ee7 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 24 二月 2025 11:51:53 +0800
Subject: [PATCH] 10337 【越南】【英语】【BT】【GM】【砍树】爬塔通关类的支持一键过关(战力不足时提示TaskFeedback4)
---
ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py | 1357 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 1,346 insertions(+), 11 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py b/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
index a04b1fa..809da18 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
@@ -15,6 +15,654 @@
from ctypes import (Structure, memset, memmove, sizeof, addressof, create_string_buffer, string_at)
import CommFunc
+#玩家详细信息#tagDBPlayer
+class tagDBPlayer(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ('PlayerID', ctypes.c_ulong),
+ ('AccID', ctypes.c_char * 65),
+ ('PlayerName', ctypes.c_char * 33),
+ ('AccState', ctypes.c_ubyte),
+ ('IsDeleted', ctypes.c_ubyte),
+ ('GMLevel', ctypes.c_ubyte),
+ ('Sex', ctypes.c_int),
+ ('Hair', ctypes.c_int),
+ ('HairColor', ctypes.c_int),
+ ('Face', ctypes.c_int),
+ ('FacePic', ctypes.c_int),
+ ('Job', ctypes.c_int),
+ ('RoleType', ctypes.c_ulong),
+ ('ReincarnationLv', ctypes.c_ushort),
+ ('LV', ctypes.c_int),
+ ('TotalExp', ctypes.c_ulong),
+ ('FamilyID', ctypes.c_ulong),
+ ('FamilyName', ctypes.c_char * 33),
+ ('Country', ctypes.c_int),
+ ('TeamHornor', ctypes.c_ulong),
+ ('FamilyHornor', ctypes.c_ulong),
+ ('FamilyActiveValue', ctypes.c_ulong),
+ ('LastWeekFamilyActiveValue', ctypes.c_ulong),
+ ('CountryHornor', ctypes.c_ulong),
+ ('CountryLastWeekHornor', ctypes.c_ulong),
+ ('Mate', ctypes.c_ulong),
+ ('Gold', ctypes.c_ulong),
+ ('GoldPaper', ctypes.c_ulong),
+ ('Silver', ctypes.c_ulong),
+ ('SilverPaper', ctypes.c_ulong),
+ ('FightPoint', ctypes.c_ulong),
+ ('HappyPoint', ctypes.c_ulong),
+ ('MapID', ctypes.c_ulong),
+ ('DataMapID', ctypes.c_ulong),
+ ('CopyMapID', ctypes.c_ulong),
+ ('PosX', ctypes.c_ushort),
+ ('PosY', ctypes.c_ushort),
+ ('FromMapID', ctypes.c_ulong),
+ ('FromCopyMapID', ctypes.c_ulong),
+ ('FromPosX', ctypes.c_ushort),
+ ('FromPosY', ctypes.c_ushort),
+ ('State', ctypes.c_int),
+ ('HP', ctypes.c_ulong),
+ ('MP', ctypes.c_ulong),
+ ('XP', ctypes.c_ulong),
+ ('HPRestoreSetting', ctypes.c_ushort),
+ ('MPRestoreSetting', ctypes.c_ushort),
+ ('FreePoint', ctypes.c_ulong),
+ ('FreeSkillPoint', ctypes.c_ulong),
+ ('STR', ctypes.c_int),
+ ('PNE', ctypes.c_int),
+ ('PHY', ctypes.c_int),
+ ('CON', ctypes.c_int),
+ ('TotalSTR', ctypes.c_int),
+ ('TotalPNE', ctypes.c_int),
+ ('TotalPHY', ctypes.c_int),
+ ('TotalCON', ctypes.c_int),
+ ('Setting', ctypes.c_char * 100),
+ ('PKValue', ctypes.c_ushort),
+ ('FightPower', ctypes.c_ulong),
+ ('ActiveValue', ctypes.c_ushort),
+ ('PlayerType', ctypes.c_ubyte),
+ ('BackpackLV', ctypes.c_ubyte),
+ ('WarehouseLV', ctypes.c_ubyte),
+ ('HaveWarehousePsw', ctypes.c_ubyte),
+ ('WarehousePsw', ctypes.c_char * 15),
+ ('WarehouseLocked', ctypes.c_ubyte),
+ ('WarehouseGold', ctypes.c_ulong),
+ ('WarehouseSilver', ctypes.c_ulong),
+ ('TeamID', ctypes.c_ulong),
+ ('UseGoldType', ctypes.c_ubyte),
+ ('UseSilverType', ctypes.c_ubyte),
+ ('AttackMode', ctypes.c_ubyte),
+ ('RebornMapID', ctypes.c_ushort),
+ ('RebornPosX', ctypes.c_ushort),
+ ('RebornPosY', ctypes.c_ushort),
+ ('WeekOnlineTime', ctypes.c_ulong),
+ ('LastWeekOnlineTime', ctypes.c_ulong),
+ ('LogoffTime', ctypes.c_char * 30),
+ ('IsHideMask', ctypes.c_ubyte),
+ ('DayProcessGameEventCount', ctypes.c_ulong),
+ ('LoginIP', ctypes.c_char * 20),
+ ('LoginTime', ctypes.c_char * 30),
+ ('OnlineTime', ctypes.c_ulong),
+ ('FriendFavor', ctypes.c_ulong),
+ ('TeamPrivity', ctypes.c_ulong),
+ ('OfflineMinutes', ctypes.c_ulong),
+ ('Energy', ctypes.c_ulong),
+ ('ReceivedSalary', ctypes.c_ulong),
+ ('EquipShowSwitch', ctypes.c_ulong),
+ ('LuckValue', ctypes.c_ushort),
+ ('ExAttr1', ctypes.c_ulong),
+ ('ExAttr2', ctypes.c_ulong),
+ ('ExAttr3', ctypes.c_ulong),
+ ('ExAttr4', ctypes.c_ulong),
+ ('ExAttr5', ctypes.c_ulong),
+ ('Faction', ctypes.c_int),
+ ('InfamyValue', ctypes.c_ulong),
+ ('OfficialRank', ctypes.c_ubyte),
+ ('IsFindByLabel', ctypes.c_ubyte),
+ ('IsCloseFriendLabel', ctypes.c_ubyte),
+ ('ChangeCoinPointTotal', ctypes.c_ulong),
+ ('VIPLv', ctypes.c_ubyte),
+ ('VIPLvForPhone', ctypes.c_ubyte),
+ ('PhoneVIPStartTime', ctypes.c_double),
+ ('PhoneVIPEndTime', ctypes.c_double),
+ ('VsRoomId', ctypes.c_ulong),
+ ('ExAttr6', ctypes.c_ulong),
+ ('ExAttr7', ctypes.c_ulong),
+ ('ExAttr8', ctypes.c_ulong),
+ ('ExAttr9', ctypes.c_ulong),
+ ('ExAttr10', ctypes.c_ulong),
+ ('ModelMark', ctypes.c_ulong),
+ ('FromDataMapID', ctypes.c_ulong),
+ ('LastOrderId', ctypes.c_char * 40),
+ ('PrizeCoin', ctypes.c_ulong),
+ ('ExAttr11', ctypes.c_ulong),
+ ('ExAttr12', ctypes.c_ulong),
+ ('ExAttr13', ctypes.c_ulong),
+ ('ExAttr14', ctypes.c_ulong),
+ ('CreateRoleTime', ctypes.c_char * 30),
+ ('LVEx', ctypes.c_ushort),
+ ('LV2', ctypes.c_ushort),
+ ('ExpPoint', ctypes.c_ulong),
+ ('OperateInfo', ctypes.c_ulong),
+ ('Operate', ctypes.c_char * 15),
+ ('ServerID', ctypes.c_ulong),
+ ('ExAttr15', ctypes.c_ulong),
+ ('ExAttr16', ctypes.c_ulong),
+ ('ExAttr17', ctypes.c_ulong),
+ ('ExAttr18', ctypes.c_ulong),
+ ('ExAttr19', ctypes.c_ulong),
+ ('ExAttr20', ctypes.c_ulong),
+ ('HPEx', ctypes.c_ulong),
+ ('FightPowerEx', 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.PlayerID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.AccID, pos = CommFunc.ReadString(buf, pos, 65)
+ self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33)
+ self.AccState, pos = CommFunc.ReadBYTE(buf, pos)
+ self.IsDeleted, pos = CommFunc.ReadBYTE(buf, pos)
+ self.GMLevel, pos = CommFunc.ReadBYTE(buf, pos)
+ self.Sex, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Hair, pos = CommFunc.ReadDWORD(buf, pos)
+ self.HairColor, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Face, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Job, pos = CommFunc.ReadDWORD(buf, pos)
+ self.RoleType, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ReincarnationLv, pos = CommFunc.ReadWORD(buf, pos)
+ self.LV, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TotalExp, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
+ self.Country, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TeamHornor, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FamilyHornor, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FamilyActiveValue, pos = CommFunc.ReadDWORD(buf, pos)
+ self.LastWeekFamilyActiveValue, pos = CommFunc.ReadDWORD(buf, pos)
+ self.CountryHornor, pos = CommFunc.ReadDWORD(buf, pos)
+ self.CountryLastWeekHornor, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Mate, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Gold, pos = CommFunc.ReadDWORD(buf, pos)
+ self.GoldPaper, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Silver, pos = CommFunc.ReadDWORD(buf, pos)
+ self.SilverPaper, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FightPoint, pos = CommFunc.ReadDWORD(buf, pos)
+ self.HappyPoint, pos = CommFunc.ReadDWORD(buf, pos)
+ self.MapID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.DataMapID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.CopyMapID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.PosX, pos = CommFunc.ReadWORD(buf, pos)
+ self.PosY, pos = CommFunc.ReadWORD(buf, pos)
+ self.FromMapID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FromCopyMapID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FromPosX, pos = CommFunc.ReadWORD(buf, pos)
+ self.FromPosY, pos = CommFunc.ReadWORD(buf, pos)
+ self.State, pos = CommFunc.ReadDWORD(buf, pos)
+ self.HP, pos = CommFunc.ReadDWORD(buf, pos)
+ self.MP, pos = CommFunc.ReadDWORD(buf, pos)
+ self.XP, pos = CommFunc.ReadDWORD(buf, pos)
+ self.HPRestoreSetting, pos = CommFunc.ReadWORD(buf, pos)
+ self.MPRestoreSetting, pos = CommFunc.ReadWORD(buf, pos)
+ self.FreePoint, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FreeSkillPoint, pos = CommFunc.ReadDWORD(buf, pos)
+ self.STR, pos = CommFunc.ReadDWORD(buf, pos)
+ self.PNE, pos = CommFunc.ReadDWORD(buf, pos)
+ self.PHY, pos = CommFunc.ReadDWORD(buf, pos)
+ self.CON, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TotalSTR, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TotalPNE, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TotalPHY, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TotalCON, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Setting, pos = CommFunc.ReadString(buf, pos, 100)
+ self.PKValue, pos = CommFunc.ReadWORD(buf, pos)
+ self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ActiveValue, pos = CommFunc.ReadWORD(buf, pos)
+ self.PlayerType, pos = CommFunc.ReadBYTE(buf, pos)
+ self.BackpackLV, pos = CommFunc.ReadBYTE(buf, pos)
+ self.WarehouseLV, pos = CommFunc.ReadBYTE(buf, pos)
+ self.HaveWarehousePsw, pos = CommFunc.ReadBYTE(buf, pos)
+ self.WarehousePsw, pos = CommFunc.ReadString(buf, pos, 15)
+ self.WarehouseLocked, pos = CommFunc.ReadBYTE(buf, pos)
+ self.WarehouseGold, pos = CommFunc.ReadDWORD(buf, pos)
+ self.WarehouseSilver, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TeamID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.UseGoldType, pos = CommFunc.ReadBYTE(buf, pos)
+ self.UseSilverType, pos = CommFunc.ReadBYTE(buf, pos)
+ self.AttackMode, pos = CommFunc.ReadBYTE(buf, pos)
+ self.RebornMapID, pos = CommFunc.ReadWORD(buf, pos)
+ self.RebornPosX, pos = CommFunc.ReadWORD(buf, pos)
+ self.RebornPosY, pos = CommFunc.ReadWORD(buf, pos)
+ self.WeekOnlineTime, pos = CommFunc.ReadDWORD(buf, pos)
+ self.LastWeekOnlineTime, pos = CommFunc.ReadDWORD(buf, pos)
+ self.LogoffTime, pos = CommFunc.ReadString(buf, pos, 30)
+ self.IsHideMask, pos = CommFunc.ReadBYTE(buf, pos)
+ self.DayProcessGameEventCount, pos = CommFunc.ReadDWORD(buf, pos)
+ self.LoginIP, pos = CommFunc.ReadString(buf, pos, 20)
+ self.LoginTime, pos = CommFunc.ReadString(buf, pos, 30)
+ self.OnlineTime, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FriendFavor, pos = CommFunc.ReadDWORD(buf, pos)
+ self.TeamPrivity, pos = CommFunc.ReadDWORD(buf, pos)
+ self.OfflineMinutes, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Energy, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ReceivedSalary, pos = CommFunc.ReadDWORD(buf, pos)
+ self.EquipShowSwitch, pos = CommFunc.ReadDWORD(buf, pos)
+ self.LuckValue, pos = CommFunc.ReadWORD(buf, pos)
+ self.ExAttr1, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr2, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr3, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr4, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr5, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Faction, pos = CommFunc.ReadDWORD(buf, pos)
+ self.InfamyValue, pos = CommFunc.ReadDWORD(buf, pos)
+ self.OfficialRank, pos = CommFunc.ReadBYTE(buf, pos)
+ self.IsFindByLabel, pos = CommFunc.ReadBYTE(buf, pos)
+ self.IsCloseFriendLabel, pos = CommFunc.ReadBYTE(buf, pos)
+ self.ChangeCoinPointTotal, pos = CommFunc.ReadDWORD(buf, pos)
+ self.VIPLv, pos = CommFunc.ReadBYTE(buf, pos)
+ self.VIPLvForPhone, pos = CommFunc.ReadBYTE(buf, pos)
+ self.PhoneVIPStartTime, pos = CommFunc.ReadDouble(buf, pos)
+ self.PhoneVIPEndTime, pos = CommFunc.ReadDouble(buf, pos)
+ self.VsRoomId, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr6, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr7, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr8, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr9, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr10, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ModelMark, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FromDataMapID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.LastOrderId, pos = CommFunc.ReadString(buf, pos, 40)
+ self.PrizeCoin, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr11, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr12, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr13, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr14, pos = CommFunc.ReadDWORD(buf, pos)
+ self.CreateRoleTime, pos = CommFunc.ReadString(buf, pos, 30)
+ self.LVEx, pos = CommFunc.ReadWORD(buf, pos)
+ self.LV2, pos = CommFunc.ReadWORD(buf, pos)
+ self.ExpPoint, pos = CommFunc.ReadDWORD(buf, pos)
+ self.OperateInfo, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Operate, pos = CommFunc.ReadString(buf, pos, 15)
+ self.ServerID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr15, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr16, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr17, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr18, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr19, pos = CommFunc.ReadDWORD(buf, pos)
+ self.ExAttr20, pos = CommFunc.ReadDWORD(buf, pos)
+ self.HPEx, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FightPowerEx, 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(tagDBPlayer)
+
+ def outputString(self):
+ output = '''//玩家详细信息#tagDBPlayer:
+ PlayerID = %s,
+ AccID = %s,
+ PlayerName = %s,
+ AccState = %s,
+ IsDeleted = %s,
+ GMLevel = %s,
+ Sex = %s,
+ Hair = %s,
+ HairColor = %s,
+ Face = %s,
+ FacePic = %s,
+ Job = %s,
+ RoleType = %s,
+ ReincarnationLv = %s,
+ LV = %s,
+ TotalExp = %s,
+ FamilyID = %s,
+ FamilyName = %s,
+ Country = %s,
+ TeamHornor = %s,
+ FamilyHornor = %s,
+ FamilyActiveValue = %s,
+ LastWeekFamilyActiveValue = %s,
+ CountryHornor = %s,
+ CountryLastWeekHornor = %s,
+ Mate = %s,
+ Gold = %s,
+ GoldPaper = %s,
+ Silver = %s,
+ SilverPaper = %s,
+ FightPoint = %s,
+ HappyPoint = %s,
+ MapID = %s,
+ DataMapID = %s,
+ CopyMapID = %s,
+ PosX = %s,
+ PosY = %s,
+ FromMapID = %s,
+ FromCopyMapID = %s,
+ FromPosX = %s,
+ FromPosY = %s,
+ State = %s,
+ HP = %s,
+ MP = %s,
+ XP = %s,
+ HPRestoreSetting = %s,
+ MPRestoreSetting = %s,
+ FreePoint = %s,
+ FreeSkillPoint = %s,
+ STR = %s,
+ PNE = %s,
+ PHY = %s,
+ CON = %s,
+ TotalSTR = %s,
+ TotalPNE = %s,
+ TotalPHY = %s,
+ TotalCON = %s,
+ Setting = %s,
+ PKValue = %s,
+ FightPower = %s,
+ ActiveValue = %s,
+ PlayerType = %s,
+ BackpackLV = %s,
+ WarehouseLV = %s,
+ HaveWarehousePsw = %s,
+ WarehousePsw = %s,
+ WarehouseLocked = %s,
+ WarehouseGold = %s,
+ WarehouseSilver = %s,
+ TeamID = %s,
+ UseGoldType = %s,
+ UseSilverType = %s,
+ AttackMode = %s,
+ RebornMapID = %s,
+ RebornPosX = %s,
+ RebornPosY = %s,
+ WeekOnlineTime = %s,
+ LastWeekOnlineTime = %s,
+ LogoffTime = %s,
+ IsHideMask = %s,
+ DayProcessGameEventCount = %s,
+ LoginIP = %s,
+ LoginTime = %s,
+ OnlineTime = %s,
+ FriendFavor = %s,
+ TeamPrivity = %s,
+ OfflineMinutes = %s,
+ Energy = %s,
+ ReceivedSalary = %s,
+ EquipShowSwitch = %s,
+ LuckValue = %s,
+ ExAttr1 = %s,
+ ExAttr2 = %s,
+ ExAttr3 = %s,
+ ExAttr4 = %s,
+ ExAttr5 = %s,
+ Faction = %s,
+ InfamyValue = %s,
+ OfficialRank = %s,
+ IsFindByLabel = %s,
+ IsCloseFriendLabel = %s,
+ ChangeCoinPointTotal = %s,
+ VIPLv = %s,
+ VIPLvForPhone = %s,
+ PhoneVIPStartTime = %s,
+ PhoneVIPEndTime = %s,
+ VsRoomId = %s,
+ ExAttr6 = %s,
+ ExAttr7 = %s,
+ ExAttr8 = %s,
+ ExAttr9 = %s,
+ ExAttr10 = %s,
+ ModelMark = %s,
+ FromDataMapID = %s,
+ LastOrderId = %s,
+ PrizeCoin = %s,
+ ExAttr11 = %s,
+ ExAttr12 = %s,
+ ExAttr13 = %s,
+ ExAttr14 = %s,
+ CreateRoleTime = %s,
+ LVEx = %s,
+ LV2 = %s,
+ ExpPoint = %s,
+ OperateInfo = %s,
+ Operate = %s,
+ ServerID = %s,
+ ExAttr15 = %s,
+ ExAttr16 = %s,
+ ExAttr17 = %s,
+ ExAttr18 = %s,
+ ExAttr19 = %s,
+ ExAttr20 = %s,
+ HPEx = %s,
+ FightPowerEx = %s,
+ ADOResult = %s,
+ '''%(
+ self.PlayerID,
+ self.AccID,
+ self.PlayerName,
+ self.AccState,
+ self.IsDeleted,
+ self.GMLevel,
+ self.Sex,
+ self.Hair,
+ self.HairColor,
+ self.Face,
+ self.FacePic,
+ self.Job,
+ self.RoleType,
+ self.ReincarnationLv,
+ self.LV,
+ self.TotalExp,
+ self.FamilyID,
+ self.FamilyName,
+ self.Country,
+ self.TeamHornor,
+ self.FamilyHornor,
+ self.FamilyActiveValue,
+ self.LastWeekFamilyActiveValue,
+ self.CountryHornor,
+ self.CountryLastWeekHornor,
+ self.Mate,
+ self.Gold,
+ self.GoldPaper,
+ self.Silver,
+ self.SilverPaper,
+ self.FightPoint,
+ self.HappyPoint,
+ self.MapID,
+ self.DataMapID,
+ self.CopyMapID,
+ self.PosX,
+ self.PosY,
+ self.FromMapID,
+ self.FromCopyMapID,
+ self.FromPosX,
+ self.FromPosY,
+ self.State,
+ self.HP,
+ self.MP,
+ self.XP,
+ self.HPRestoreSetting,
+ self.MPRestoreSetting,
+ self.FreePoint,
+ self.FreeSkillPoint,
+ self.STR,
+ self.PNE,
+ self.PHY,
+ self.CON,
+ self.TotalSTR,
+ self.TotalPNE,
+ self.TotalPHY,
+ self.TotalCON,
+ self.Setting,
+ self.PKValue,
+ self.FightPower,
+ self.ActiveValue,
+ self.PlayerType,
+ self.BackpackLV,
+ self.WarehouseLV,
+ self.HaveWarehousePsw,
+ self.WarehousePsw,
+ self.WarehouseLocked,
+ self.WarehouseGold,
+ self.WarehouseSilver,
+ self.TeamID,
+ self.UseGoldType,
+ self.UseSilverType,
+ self.AttackMode,
+ self.RebornMapID,
+ self.RebornPosX,
+ self.RebornPosY,
+ self.WeekOnlineTime,
+ self.LastWeekOnlineTime,
+ self.LogoffTime,
+ self.IsHideMask,
+ self.DayProcessGameEventCount,
+ self.LoginIP,
+ self.LoginTime,
+ self.OnlineTime,
+ self.FriendFavor,
+ self.TeamPrivity,
+ self.OfflineMinutes,
+ self.Energy,
+ self.ReceivedSalary,
+ self.EquipShowSwitch,
+ self.LuckValue,
+ self.ExAttr1,
+ self.ExAttr2,
+ self.ExAttr3,
+ self.ExAttr4,
+ self.ExAttr5,
+ self.Faction,
+ self.InfamyValue,
+ self.OfficialRank,
+ self.IsFindByLabel,
+ self.IsCloseFriendLabel,
+ self.ChangeCoinPointTotal,
+ self.VIPLv,
+ self.VIPLvForPhone,
+ self.PhoneVIPStartTime,
+ self.PhoneVIPEndTime,
+ self.VsRoomId,
+ self.ExAttr6,
+ self.ExAttr7,
+ self.ExAttr8,
+ self.ExAttr9,
+ self.ExAttr10,
+ self.ModelMark,
+ self.FromDataMapID,
+ self.LastOrderId,
+ self.PrizeCoin,
+ self.ExAttr11,
+ self.ExAttr12,
+ self.ExAttr13,
+ self.ExAttr14,
+ self.CreateRoleTime,
+ self.LVEx,
+ self.LV2,
+ self.ExpPoint,
+ self.OperateInfo,
+ self.Operate,
+ self.ServerID,
+ self.ExAttr15,
+ self.ExAttr16,
+ self.ExAttr17,
+ self.ExAttr18,
+ self.ExAttr19,
+ self.ExAttr20,
+ self.HPEx,
+ self.FightPowerEx,
+ self.ADOResult,
+ )
+ return output
+
+ #Char数组类型Set接口,使用该接口对此类型数据赋值,防止赋值的数据过长报错
+ def SetAccID(self,Str):
+ if len(Str)<=65:
+ self.AccID = Str
+ else:
+ self.AccID = Str[:65]
+
+ def SetPlayerName(self,Str):
+ if len(Str)<=33:
+ self.PlayerName = Str
+ else:
+ self.PlayerName = Str[:33]
+
+ def SetFamilyName(self,Str):
+ if len(Str)<=33:
+ self.FamilyName = Str
+ else:
+ self.FamilyName = Str[:33]
+
+ def SetSetting(self,Str):
+ if len(Str)<=100:
+ self.Setting = Str
+ else:
+ self.Setting = Str[:100]
+
+ def SetWarehousePsw(self,Str):
+ if len(Str)<=15:
+ self.WarehousePsw = Str
+ else:
+ self.WarehousePsw = Str[:15]
+
+ def SetLogoffTime(self,Str):
+ if len(Str)<=30:
+ self.LogoffTime = Str
+ else:
+ self.LogoffTime = Str[:30]
+
+ def SetLoginIP(self,Str):
+ if len(Str)<=20:
+ self.LoginIP = Str
+ else:
+ self.LoginIP = Str[:20]
+
+ def SetLoginTime(self,Str):
+ if len(Str)<=30:
+ self.LoginTime = Str
+ else:
+ self.LoginTime = Str[:30]
+
+ def SetLastOrderId(self,Str):
+ if len(Str)<=40:
+ self.LastOrderId = Str
+ else:
+ self.LastOrderId = Str[:40]
+
+ def SetCreateRoleTime(self,Str):
+ if len(Str)<=30:
+ self.CreateRoleTime = Str
+ else:
+ self.CreateRoleTime = Str[:30]
+
+ def SetOperate(self,Str):
+ if len(Str)<=15:
+ self.Operate = Str
+ else:
+ self.Operate = Str[:15]
+
+
# 跨服补偿个人领取表 #tagDBCrossPersonalCompensation
class tagDBCrossPersonalCompensation(Structure):
_pack_ = 1
@@ -160,6 +808,7 @@
self.LimitTime = Str[:30]
+#------------------------------------------------------
# 跨服排行榜 #tagDBCrossBillboard
class tagDBCrossBillboard(Structure):
_pack_ = 1
@@ -170,13 +819,21 @@
('ID', ctypes.c_ulong),
('ID2', ctypes.c_ulong),
('Name1', ctypes.c_char * 33),
- ('Name2', ctypes.c_char * 33),
+ ('Name2', ctypes.c_char * 65),
('Type2', ctypes.c_ubyte),
('Value1', ctypes.c_ulong),
('Value2', ctypes.c_ulong),
+ ('Value3', ctypes.c_ulong),
+ ('Value4', ctypes.c_ulong),
+ ('Value5', ctypes.c_ulong),
+ ('Value6', ctypes.c_ulong),
+ ('Value7', ctypes.c_ulong),
+ ('Value8', ctypes.c_ulong),
('CmpValue', ctypes.c_ulong),
('CmpValue2', ctypes.c_ulong),
('CmpValue3', ctypes.c_ulong),
+ ('DataLen', ctypes.c_ushort),
+ ('UserData', ctypes.c_char_p),
('ADOResult', ctypes.c_ulong),
]
@@ -184,9 +841,28 @@
Structure.__init__(self)
self.clear()
-
def clear(self):
- memset(addressof(self), 0, self.getLength())
+ self.GroupValue1 = 0
+ self.GroupValue2 = 0
+ self.BillboardType = 0
+ self.ID = 0
+ self.ID2 = 0
+ self.Name1 = ''
+ self.Name2 = ''
+ self.Type2 = 0
+ self.Value1 = 0
+ self.Value2 = 0
+ self.Value3 = 0
+ self.Value4 = 0
+ self.Value5 = 0
+ self.Value6 = 0
+ self.Value7 = 0
+ self.Value8 = 0
+ self.CmpValue = 0
+ self.CmpValue2 = 0
+ self.CmpValue3 = 0
+ self.DataLen = 0
+ self.UserData = ''
def readData(self, buf, pos = 0, length = 0):
if not pos <= length:
@@ -200,23 +876,73 @@
self.ID, pos = CommFunc.ReadDWORD(buf, pos)
self.ID2, pos = CommFunc.ReadDWORD(buf, pos)
self.Name1, pos = CommFunc.ReadString(buf, pos, 33)
- self.Name2, pos = CommFunc.ReadString(buf, pos, 33)
+ self.Name2, pos = CommFunc.ReadString(buf, pos, 65)
self.Type2, pos = CommFunc.ReadBYTE(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)
+ self.Value6, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Value7, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Value8, pos = CommFunc.ReadDWORD(buf, pos)
self.CmpValue, pos = CommFunc.ReadDWORD(buf, pos)
self.CmpValue2, pos = CommFunc.ReadDWORD(buf, pos)
self.CmpValue3, pos = CommFunc.ReadDWORD(buf, pos)
+ self.DataLen, pos = CommFunc.ReadWORD(buf, pos)
+ tmp, pos = CommFunc.ReadString(buf, pos, self.DataLen)
+ self.UserData = ctypes.c_char_p(tmp)
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())
+ buf = ''
+ buf = CommFunc.WriteBYTE(buf, self.GroupValue1)
+ buf = CommFunc.WriteBYTE(buf, self.GroupValue2)
+ buf = CommFunc.WriteBYTE(buf, self.BillboardType)
+ buf = CommFunc.WriteDWORD(buf, self.ID)
+ buf = CommFunc.WriteDWORD(buf, self.ID2)
+ buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.Name1)
+ buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 65, self.Name2)
+ buf = CommFunc.WriteBYTE(buf, self.Type2)
+ 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)
+ buf = CommFunc.WriteDWORD(buf, self.Value6)
+ buf = CommFunc.WriteDWORD(buf, self.Value7)
+ buf = CommFunc.WriteDWORD(buf, self.Value8)
+ buf = CommFunc.WriteDWORD(buf, self.CmpValue)
+ buf = CommFunc.WriteDWORD(buf, self.CmpValue2)
+ buf = CommFunc.WriteDWORD(buf, self.CmpValue3)
+ buf = CommFunc.WriteWORD(buf, self.DataLen)
+ buf = CommFunc.WriteString(buf, self.DataLen, self.UserData)
+ return buf
def getLength(self):
- return sizeof(tagDBCrossBillboard)
+ length = 0
+ length += sizeof(ctypes.c_ubyte)
+ length += sizeof(ctypes.c_ubyte)
+ length += sizeof(ctypes.c_ubyte)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_char) * 33
+ length += sizeof(ctypes.c_char) * 65
+ 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_ulong)
+ 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)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ushort)
+ length += self.DataLen
+ return length
def outputString(self):
output = '''// 跨服排行榜 #tagDBCrossBillboard:
@@ -230,9 +956,17 @@
Type2 = %s,
Value1 = %s,
Value2 = %s,
+ Value3 = %s,
+ Value4 = %s,
+ Value5 = %s,
+ Value6 = %s,
+ Value7 = %s,
+ Value8 = %s,
CmpValue = %s,
CmpValue2 = %s,
CmpValue3 = %s,
+ DataLen = %s,
+ UserData = %s,
ADOResult = %s,
'''%(
self.GroupValue1,
@@ -245,9 +979,17 @@
self.Type2,
self.Value1,
self.Value2,
+ self.Value3,
+ self.Value4,
+ self.Value5,
+ self.Value6,
+ self.Value7,
+ self.Value8,
self.CmpValue,
self.CmpValue2,
self.CmpValue3,
+ self.DataLen,
+ self.UserData,
self.ADOResult,
)
return output
@@ -260,11 +1002,13 @@
self.Name1 = Str[:33]
def SetName2(self,Str):
- if len(Str)<=33:
+ if len(Str)<=65:
self.Name2 = Str
else:
- self.Name2 = Str[:33]
+ self.Name2 = Str[:65]
+
+
# 协助感谢表 #tagDBAssistThanks
class tagDBAssistThanks(Structure):
@@ -1576,6 +2320,8 @@
('PKScore', ctypes.c_ulong),
('DanLV', ctypes.c_ubyte),
('Time', ctypes.c_ulong),
+ ('Face', ctypes.c_ulong),
+ ('FacePic', ctypes.c_ulong),
('ADOResult', ctypes.c_ulong),
]
@@ -1603,6 +2349,8 @@
self.PKScore, pos = CommFunc.ReadDWORD(buf, pos)
self.DanLV, pos = CommFunc.ReadBYTE(buf, pos)
self.Time, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Face, pos = CommFunc.ReadDWORD(buf, pos)
+ self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
return self.getLength()
@@ -1626,6 +2374,8 @@
PKScore = %s,
DanLV = %s,
Time = %s,
+ Face = %s,
+ FacePic = %s,
ADOResult = %s,
'''%(
self.ZoneID,
@@ -1638,6 +2388,8 @@
self.PKScore,
self.DanLV,
self.Time,
+ self.Face,
+ self.FacePic,
self.ADOResult,
)
return output
@@ -2303,6 +3055,8 @@
('RealmLV', ctypes.c_ushort),
('OnlineType', ctypes.c_ubyte),
('RefCount', ctypes.c_ulong),
+ ('Face', ctypes.c_ulong),
+ ('FacePic', ctypes.c_ulong),
('ADOResult', ctypes.c_ulong),
]
@@ -2327,6 +3081,8 @@
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)
+ self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
return self.getLength()
@@ -2347,6 +3103,8 @@
RealmLV = %s,
OnlineType = %s,
RefCount = %s,
+ Face = %s,
+ FacePic = %s,
ADOResult = %s,
'''%(
self.PlayerID,
@@ -2356,6 +3114,8 @@
self.RealmLV,
self.OnlineType,
self.RefCount,
+ self.Face,
+ self.FacePic,
self.ADOResult,
)
return output
@@ -2918,3 +3678,578 @@
)
return output
+
+# 玩家记录表 #tagDBPlayerRecData
+class tagDBPlayerRecData(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ('PlayerID', ctypes.c_ulong),
+ ('RecType', ctypes.c_ushort),
+ ('Time', ctypes.c_double),
+ ('Value1', ctypes.c_ulong),
+ ('Value2', ctypes.c_ulong),
+ ('Value3', ctypes.c_ulong),
+ ('Value4', ctypes.c_ulong),
+ ('Value5', ctypes.c_ulong),
+ ('Value6', ctypes.c_ulong),
+ ('Value7', ctypes.c_ulong),
+ ('Value8', ctypes.c_ulong),
+ ('UserDataLen', ctypes.c_ushort),
+ ('UserData', ctypes.c_char_p),
+ ('ADOResult', ctypes.c_ulong),
+ ]
+
+ def __init__(self):
+ Structure.__init__(self)
+ self.clear()
+
+ def clear(self):
+ self.PlayerID = 0
+ self.RecType = 0
+ self.Time = 0.0
+ self.Value1 = 0
+ self.Value2 = 0
+ self.Value3 = 0
+ self.Value4 = 0
+ self.Value5 = 0
+ self.Value6 = 0
+ self.Value7 = 0
+ self.Value8 = 0
+ self.UserDataLen = 0
+ self.UserData = ''
+
+ 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.RecType, pos = CommFunc.ReadWORD(buf, pos)
+ self.Time, pos = CommFunc.ReadDouble(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)
+ self.Value6, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Value7, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Value8, pos = CommFunc.ReadDWORD(buf, pos)
+ self.UserDataLen, pos = CommFunc.ReadWORD(buf, pos)
+ tmp, pos = CommFunc.ReadString(buf, pos, self.UserDataLen)
+ self.UserData = ctypes.c_char_p(tmp)
+ return self.getLength()
+
+ def getBuffer(self):
+ buf = ''
+ buf = CommFunc.WriteDWORD(buf, self.PlayerID)
+ buf = CommFunc.WriteWORD(buf, self.RecType)
+ buf = CommFunc.WriteDouble(buf, self.Time)
+ 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)
+ buf = CommFunc.WriteDWORD(buf, self.Value6)
+ buf = CommFunc.WriteDWORD(buf, self.Value7)
+ buf = CommFunc.WriteDWORD(buf, self.Value8)
+ buf = CommFunc.WriteWORD(buf, self.UserDataLen)
+ buf = CommFunc.WriteString(buf, self.UserDataLen, self.UserData)
+ return buf
+
+ def getLength(self):
+ length = 0
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ushort)
+ length += sizeof(ctypes.c_double)
+ 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)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ushort)
+ length += self.UserDataLen
+ return length
+
+ def outputString(self):
+ output = '''// 玩家记录表 #tagDBPlayerRecData:
+ PlayerID = %s,
+ RecType = %s,
+ Time = %s,
+ Value1 = %s,
+ Value2 = %s,
+ Value3 = %s,
+ Value4 = %s,
+ Value5 = %s,
+ Value6 = %s,
+ Value7 = %s,
+ Value8 = %s,
+ UserDataLen = %s,
+ UserData = %s,
+ ADOResult = %s,
+ '''%(
+ self.PlayerID,
+ self.RecType,
+ self.Time,
+ self.Value1,
+ self.Value2,
+ self.Value3,
+ self.Value4,
+ self.Value5,
+ self.Value6,
+ self.Value7,
+ self.Value8,
+ self.UserDataLen,
+ self.UserData,
+ self.ADOResult,
+ )
+ return output
+
+
+# 功能队伍成员表 #tagDBPyFuncTeamMem
+class tagDBPyFuncTeamMem(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(tagDBPyFuncTeamMem)
+
+ def outputString(self):
+ output = '''// 功能队伍成员表 #tagDBPyFuncTeamMem:
+ 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
+
+
+# 功能队伍表 #tagDBPyFuncTeam
+class tagDBPyFuncTeam(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 = '''// 功能队伍表 #tagDBPyFuncTeam:
+ 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]
+
+
+# 通用记录表新 #tagDBGameRec
+class tagDBGameRec(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ('RecType', ctypes.c_ushort),
+ ('RecID', ctypes.c_ulong),
+ ('Time', ctypes.c_double),
+ ('Value1', ctypes.c_ulong),
+ ('Value2', ctypes.c_ulong),
+ ('Value3', ctypes.c_ulong),
+ ('Value4', ctypes.c_ulong),
+ ('Value5', ctypes.c_ulong),
+ ('Value6', ctypes.c_ulong),
+ ('Value7', ctypes.c_ulong),
+ ('Value8', ctypes.c_ulong),
+ ('UserDataLen', ctypes.c_ushort),
+ ('UserData', ctypes.c_char_p),
+ ('ADOResult', ctypes.c_ulong),
+ ]
+
+ def __init__(self):
+ Structure.__init__(self)
+ self.clear()
+
+ def clear(self):
+ self.RecType = 0
+ self.RecID = 0
+ self.Time = 0.0
+ self.Value1 = 0
+ self.Value2 = 0
+ self.Value3 = 0
+ self.Value4 = 0
+ self.Value5 = 0
+ self.Value6 = 0
+ self.Value7 = 0
+ self.Value8 = 0
+ self.UserDataLen = 0
+ self.UserData = ''
+
+ 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.RecType, pos = CommFunc.ReadWORD(buf, pos)
+ self.RecID, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Time, pos = CommFunc.ReadDouble(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)
+ self.Value6, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Value7, pos = CommFunc.ReadDWORD(buf, pos)
+ self.Value8, pos = CommFunc.ReadDWORD(buf, pos)
+ self.UserDataLen, pos = CommFunc.ReadWORD(buf, pos)
+ tmp, pos = CommFunc.ReadString(buf, pos, self.UserDataLen)
+ self.UserData = ctypes.c_char_p(tmp)
+ return self.getLength()
+
+ def getBuffer(self):
+ buf = ''
+ buf = CommFunc.WriteWORD(buf, self.RecType)
+ buf = CommFunc.WriteDWORD(buf, self.RecID)
+ buf = CommFunc.WriteDouble(buf, self.Time)
+ 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)
+ buf = CommFunc.WriteDWORD(buf, self.Value6)
+ buf = CommFunc.WriteDWORD(buf, self.Value7)
+ buf = CommFunc.WriteDWORD(buf, self.Value8)
+ buf = CommFunc.WriteWORD(buf, self.UserDataLen)
+ buf = CommFunc.WriteString(buf, self.UserDataLen, self.UserData)
+ return buf
+
+ def getLength(self):
+ length = 0
+ length += sizeof(ctypes.c_ushort)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_double)
+ 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)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ushort)
+ length += self.UserDataLen
+ return length
+
+ def outputString(self):
+ output = '''// 通用记录表新 #tagDBGameRec:
+ RecType = %s,
+ RecID = %s,
+ Time = %s,
+ Value1 = %s,
+ Value2 = %s,
+ Value3 = %s,
+ Value4 = %s,
+ Value5 = %s,
+ Value6 = %s,
+ Value7 = %s,
+ Value8 = %s,
+ UserDataLen = %s,
+ UserData = %s,
+ ADOResult = %s,
+ '''%(
+ self.RecType,
+ self.RecID,
+ self.Time,
+ self.Value1,
+ self.Value2,
+ self.Value3,
+ self.Value4,
+ self.Value5,
+ self.Value6,
+ self.Value7,
+ self.Value8,
+ self.UserDataLen,
+ self.UserData,
+ self.ADOResult,
+ )
+ return output
+
+
+# 玩家数据打包表 #tagDBPlayerPackData
+class tagDBPlayerPackData(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ('PlayerID', ctypes.c_ulong),
+ ('UpdTime', ctypes.c_ulong),
+ ('PackDataSize', ctypes.c_ulong),
+ ('PackData', ctypes.c_char_p),
+ ('ADOResult', ctypes.c_ulong),
+ ]
+
+ def __init__(self):
+ Structure.__init__(self)
+ self.clear()
+
+ def clear(self):
+ self.PlayerID = 0
+ self.UpdTime = 0
+ self.PackDataSize = 0
+ self.PackData = ''
+
+ 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.UpdTime, pos = CommFunc.ReadDWORD(buf, pos)
+ self.PackDataSize, pos = CommFunc.ReadDWORD(buf, pos)
+ tmp, pos = CommFunc.ReadString(buf, pos, self.PackDataSize)
+ self.PackData = ctypes.c_char_p(tmp)
+ return self.getLength()
+
+ def getBuffer(self):
+ buf = ''
+ buf = CommFunc.WriteDWORD(buf, self.PlayerID)
+ buf = CommFunc.WriteDWORD(buf, self.UpdTime)
+ buf = CommFunc.WriteDWORD(buf, self.PackDataSize)
+ buf = CommFunc.WriteString(buf, self.PackDataSize, self.PackData)
+ return buf
+
+ def getLength(self):
+ length = 0
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += sizeof(ctypes.c_ulong)
+ length += self.PackDataSize
+ return length
+
+ def outputString(self):
+ output = '''// 玩家数据打包表 #tagDBPlayerPackData:
+ PlayerID = %s,
+ UpdTime = %s,
+ PackDataSize = %s,
+ PackData = %s,
+ ADOResult = %s,
+ '''%(
+ self.PlayerID,
+ self.UpdTime,
+ self.PackDataSize,
+ self.PackData,
+ self.ADOResult,
+ )
+ return output
+
--
Gitblit v1.8.0