From 61ab3e940c40963e09fa7d1e68d5ca7e711ed270 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 09 四月 2025 15:47:24 +0800
Subject: [PATCH] 10367 【越南】【英语】【BT】【砍树】仙盟攻城战-服务端(跨服仙盟支持;后台查询区服仙盟支持;活动时间流程支持;攻城战主活动功能完整流程:公示、分组、战备、战斗、榜单、竞猜、领奖等;)
---
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py
index 6c24b99..00c1eb6 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py
@@ -21,6 +21,7 @@
#导入
+import PlayerBillboard
import ShareDefine
import GMCommon
import GameWorld
@@ -38,7 +39,9 @@
if billType != None:
billBoardType = billType
- topNum = GameWorld.ToIntDef(gmCmdDict.get('topNum', ''), 10)
+ queryCount = GameWorld.ToIntDef(gmCmdDict.get('queryCount', ''), 10)
+ startRank = GameWorld.ToIntDef(gmCmdDict.get('startRank', ''), 1)
+ startRank = max(1, startRank)
if billBoardType == None:
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_TypeNumErr)
@@ -52,19 +55,27 @@
if not billBoard:
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_TypeNumErr)
return False
-
- billBoardInfo = []
- for index in range(0, billBoard.GetCount()):
-
- if index >= topNum:
+ billboardMgr = PlayerBillboard.GetBillboardMgr()
+ billboardObj = billboardMgr.GetBillboardObj(billBoardType)
+ idOrderDict = billboardObj.GetIDOrderDict()
+
+ dataTotal = billBoard.GetCount()
+ fromIndex = startRank - 1
+ toIndex = fromIndex + queryCount
+ billBoardInfo = []
+ for index in xrange(fromIndex, toIndex):
+ if index >= dataTotal:
break
billBoardData = billBoard.At(index)
if not billBoardData:
continue
+ rank = idOrderDict.get(billBoardData.GetID(), index + 1)
billBoardDict = {
+ "Index":index,
+ "Rank":rank,
"ID":billBoardData.GetID(),
"ID2":billBoardData.GetID2(),
"Name1":billBoardData.GetName1(),
@@ -91,7 +102,7 @@
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_MaxLimit)
return
- backMsg = {"BillBoardType":billBoardType, "BillBoardInfo":billBoardInfo}
+ backMsg = {"BillBoardType":billBoardType, "BillBoardInfo":billBoardInfo, "dataTotal":dataTotal}
#执行成功
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, backMsg)
return
--
Gitblit v1.8.0