From bc433db8262081f0400bcb9c2c3476000662daf3 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 10 七月 2024 14:24:53 +0800 Subject: [PATCH] 10205 【越南】【主干】【港台】【砍树】自选礼包(支持一次性放入超65535个数叠加物品;邮件同步支持一次性领取超65535个数叠加物品) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py index 2c80efa..0217cf2 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py @@ -375,7 +375,7 @@ # BYTE Type; //类型 TBillboardType # DWORD StartIndex; //查看的起始名次索引, 默认0 # BYTE WatchCnt; //查看条数,默认20,最大不超过100 -# BYTE IsWatchSelf; //是否查看自己名次前后,默认10条数据 +# DWORD WatchID; //查看指定ID名次前后,如玩家ID、家族ID等 #}; def Client_PYWatchBillboard(index, clientData, tick): @@ -386,14 +386,14 @@ packType = clientData.Type startIndex = clientData.StartIndex watchCnt = clientData.WatchCnt - isWatchSelf = clientData.IsWatchSelf - if not __CheckWatchCD(curPlayer, packType, tick): - return + watchID = clientData.WatchID + #if not __CheckWatchCD(curPlayer, packType, tick): + # return - Sync_BillboardEx(curPlayer, packType, isWatchSelf, startIndex, watchCnt) + Sync_BillboardEx(curPlayer, packType, watchID, startIndex, watchCnt) return -def Sync_BillboardEx(curPlayer, bbType, isWatchSelf=False, startIndex=0, watchCnt=20): +def Sync_BillboardEx(curPlayer, bbType, watchID=0, startIndex=0, watchCnt=20): if bbType < 0 or bbType >= ShareDefine.Def_BT_Max: return @@ -402,12 +402,12 @@ GameWorld.ErrLog("找不到排行榜数据!bbType=%s" % (bbType)) return - playerID = curPlayer.GetPlayerID() + #playerID = curPlayer.GetPlayerID() count = billBoard.GetCount() endIndex = 0 # 查看自己前后名次 - if isWatchSelf: - playerIndex = billBoard.IndexOfByID(playerID) + if watchID: + playerIndex = billBoard.IndexOfByID(watchID) if playerIndex != -1: # 前5后4,首尾补足10条记录 endIndex = min(playerIndex + 5, count) @@ -425,7 +425,7 @@ billBoardData = ChPyNetSendPack.tagPYBillboardData() billBoardData.Clear() - billBoardData.IsWatchSelf = isWatchSelf + billBoardData.WatchID = watchID billBoardData.Type = bbType billBoardData.Billboard = [] for index in xrange(startIndex, endIndex): -- Gitblit v1.8.0