From b23a62c196f9ccd6833f02ff780f7fffd07e2ae1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 25 六月 2024 15:27:04 +0800
Subject: [PATCH] 10185 【越南】【港台】【主干】BOSS凭证修改(优化凭证榜单奖励结算;优化榜单备份;)

---
 ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py |   19 ++++++++++++-------
 1 files changed, 12 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..8c6485e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboard.py
@@ -38,7 +38,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 +54,22 @@
     if not billBoard:
         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_TypeNumErr)
         return False
-
-    billBoardInfo = []
     
-    for index in range(0, billBoard.GetCount()):
-        
-        if index >= topNum:
+    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 = index + 1
         billBoardDict = {
+                        "Rank":rank,
                         "ID":billBoardData.GetID(),
                         "ID2":billBoardData.GetID2(),
                         "Name1":billBoardData.GetName1(),
@@ -91,7 +96,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