From e46cda02012ae3e800b6858c357fe32793dde5f8 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 25 六月 2024 10:59:22 +0800 Subject: [PATCH] 10185 【越南】【港台】【主干】BOSS凭证修改(去除排行榜查询CD;优化排行榜查看指定ID;) --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py index 42fd0af..81b335e 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBillboard.py @@ -328,7 +328,7 @@ # BYTE GroupValue2; // 分组值2,与分组值1组合归为同组榜单数据 # DWORD StartIndex; //查看的起始名次索引, 默认0 # BYTE WatchCnt; //查看条数,默认20,最大不超过100 -# BYTE IsWatchSelf; //是否查看自己名次前后,默认10条数据 +# DWORD WatchID; //查看指定ID名次前后,如玩家ID、家族ID等 #}; def OnViewCrossBillboard(index, clientData, tick): curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) @@ -338,7 +338,7 @@ billboardType, groupValue1, groupValue2 = clientData.Type, clientData.GroupValue1, clientData.GroupValue2 startIndex = clientData.StartIndex watchCnt = clientData.WatchCnt - isWatchSelf = clientData.IsWatchSelf + watchID = clientData.WatchID if billboardType not in ShareDefine.CrossBillboardTypeList: return @@ -349,7 +349,7 @@ # 请求查询跨服服务器 dataMsg = {"BillboardType":billboardType, "GroupValue1":groupValue1, "GroupValue2":groupValue2, - "QueryData":{"EventName":"View", "PlayerID":playerID, "StartIndex":startIndex, "WatchCnt":watchCnt, "IsWatchSelf":isWatchSelf}} + "QueryData":{"EventName":"View", "PlayerID":playerID, "StartIndex":startIndex, "WatchCnt":watchCnt, "WatchID":watchID}} CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_QueryBillboard, dataMsg) return @@ -378,16 +378,16 @@ # 有查询数据时才同步榜单数据列表,否则只同步数据版本号 if queryData: - playerID = queryData.get("PlayerID", 0) + #playerID = queryData.get("PlayerID", 0) startIndex = queryData.get("StartIndex", 0) watchCnt = queryData.get("WatchCnt", 0) - isWatchSelf = queryData.get("IsWatchSelf", 0) + watchID = queryData.get("WatchID", 0) count = billboardObj.GetCount() endIndex = 0 # 查看自己前后名次 - if isWatchSelf: - playerIndex = billboardObj.IndexOfByID(playerID) + if watchID: + playerIndex = billboardObj.IndexOfByID(watchID) if playerIndex != -1: # 前5后4,首尾补足10条记录 endIndex = min(playerIndex + 5, count) @@ -463,8 +463,8 @@ return if eventName == "View": - isWatchSelf = queryData.get("IsWatchSelf", 0) - SyncCrossBillboardToPlayer(queryPlayer, billboardType, groupValue1, groupValue2, syncBillboardList, isWatchSelf) + watchID = queryData.get("WatchID", 0) + SyncCrossBillboardToPlayer(queryPlayer, billboardType, groupValue1, groupValue2, syncBillboardList, watchID) #else: # idOrderDict = billboardObj.GetIDOrderDict() # order = idOrderDict.get(queryPlayerID, 0) @@ -473,13 +473,13 @@ return -def SyncCrossBillboardToPlayer(curPlayer, billboardType, groupValue1, groupValue2, billboardList, isWatchSelf): +def SyncCrossBillboardToPlayer(curPlayer, billboardType, groupValue1, groupValue2, billboardList, watchID): ## 同步给玩家跨服榜单 billboardInfo = ChPyNetSendPack.tagGCCrossBillboardInfo() billboardInfo.Type = billboardType billboardInfo.GroupValue1 = groupValue1 billboardInfo.GroupValue2 = groupValue2 - billboardInfo.IsWatchSelf = isWatchSelf + billboardInfo.WatchID = watchID billboardInfo.CrossBillboardDataList = [] for dataInfo in billboardList: index, ID, ID2, Name1, Name2, Type2, Value1, Value2, CmpValue, CmpValue2, CmpValue3, Value3, Value4, Value5, Value6, Value7, Value8, UserData = dataInfo -- Gitblit v1.8.0