From 27b47cf6b4ab46c5daeae9676b01a292daaf642f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 26 十二月 2018 11:28:44 +0800
Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(删除旧跨服封包)
---
ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py b/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
index 8be9ddc..aa2cd6e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py
@@ -15,6 +15,86 @@
from ctypes import (Structure, memset, memmove, sizeof, addressof, create_string_buffer, string_at)
import CommFunc
+# 跨服竞技场PK排行榜 #tagDBCrossPKBillboard
+class tagDBCrossPKBillboard(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ('ZoneID', ctypes.c_ubyte),
+ ('SeasonID', ctypes.c_ubyte),
+ ('PlayerID', ctypes.c_ulong),
+ ('PlayerName', ctypes.c_char * 33),
+ ('Job', ctypes.c_ubyte),
+ ('FightPower', ctypes.c_ulong),
+ ('RealmLV', ctypes.c_ushort),
+ ('PKScore', ctypes.c_ulong),
+ ('DanLV', ctypes.c_ubyte),
+ ('Time', 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()
+ memmove(addressof(self), buf[pos:], self.getLength())
+ 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(tagDBCrossPKBillboard)
+
+ def outputString(self):
+ output = '''// 跨服竞技场PK排行榜 #tagDBCrossPKBillboard:
+ ZoneID = %s,
+ SeasonID = %s,
+ PlayerID = %s,
+ PlayerName = %s,
+ Job = %s,
+ FightPower = %s,
+ RealmLV = %s,
+ PKScore = %s,
+ DanLV = %s,
+ Time = %s,
+ ADOResult = %s,
+ '''%(
+ self.ZoneID,
+ self.SeasonID,
+ self.PlayerID,
+ self.PlayerName,
+ self.Job,
+ self.FightPower,
+ self.RealmLV,
+ self.PKScore,
+ self.DanLV,
+ self.Time,
+ self.ADOResult,
+ )
+ return output
+
+ #Char数组类型Set接口,使用该接口对此类型数据赋值,防止赋值的数据过长报错
+ def SetPlayerName(self,Str):
+ if len(Str)<=33:
+ self.PlayerName = Str
+ else:
+ self.PlayerName = Str[:33]
+
+
#仙魔之争记录表#tagDBPyXMZZ
class tagDBPyXMZZ(Structure):
_pack_ = 1
--
Gitblit v1.8.0