From 0d24ae9f78e7a6314fe79e285566e6ad82dd1622 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 04 九月 2024 11:38:23 +0800
Subject: [PATCH] 10258 【越南】【砍树】新增古宝特殊效果(增加法器每X阶+xx属性)

---
 ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py
index 83a35a7..72b72d8 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_QueryBillboardCross.py
@@ -45,21 +45,39 @@
     
     groupValue1 = GameWorld.ToIntDef(gmCmdDict.get('groupValue1', ''), None)
     groupValue2 = GameWorld.ToIntDef(gmCmdDict.get('groupValue2', ''), None)
+    queryCount = GameWorld.ToIntDef(gmCmdDict.get('queryCount', ''), 10)
+    startRank = GameWorld.ToIntDef(gmCmdDict.get('startRank', ''), 1)
+    startRank = max(1, startRank)
     
     billboardMgr = PyDataManager.GetCrossBillboardManager()
     groupList = billboardMgr.GetBillboardGroupList(billboardType)
-    
-    backMsg = {"billboardType":billboardType, "groupList":groupList}
+    dataTotalDict = {}
+    for bType, gValue1, gValue2 in groupList:
+        billboardObj = billboardMgr.GetCrossBillboard(bType, gValue1, gValue2)
+        dataTotalDict["%s-%s-%s" % (bType, gValue1, gValue2)] = billboardObj.GetCount()
+        
+    backMsg = {"billboardType":billboardType, "groupList":groupList, "dataTotalDict":dataTotalDict, 
+               "groupValue1":groupValue1, "groupValue2":groupValue2, "queryCount":queryCount, "startRank":startRank}
     
     if groupValue1 != None and groupValue2 != None:
         billboardObj = billboardMgr.GetCrossBillboard(billboardType, groupValue1, groupValue2)
+        billboardObj.DoDelaySort()
+        idOrderDict = billboardObj.GetIDOrderDict()
         
+        dataTotal = billboardObj.GetCount()
+        fromIndex = startRank - 1
+        toIndex = fromIndex + queryCount
         billboardInfo = []
-        for i in xrange(billboardObj.GetCount()):
+        for i in xrange(startRank - 1, toIndex):
+            if i >= dataTotal:
+                break
             billboardData = billboardObj.At(i)
             if not billboardData:
                 continue
+            rank = idOrderDict.get(billboardData.ID, i + 1)
             billboardDict = {
+                             "Index":i,
+                             "Rank":rank,
                              "ID":billboardData.ID,
                              "ID2":billboardData.ID2,
                              "Name1":billboardData.Name1,
@@ -67,9 +85,16 @@
                              "Type2":billboardData.Type2,
                              "Value1":billboardData.Value1,
                              "Value2":billboardData.Value2,
+                             "Value3":billboardData.Value3,
+                             "Value4":billboardData.Value4,
+                             "Value5":billboardData.Value5,
+                             "Value6":billboardData.Value6,
+                             "Value7":billboardData.Value7,
+                             "Value8":billboardData.Value8,
                              "CmpValue":billboardData.CmpValue,
                              "CmpValue2":billboardData.CmpValue2,
                              "CmpValue3":billboardData.CmpValue3,
+                             "UserData":billboardData.UserData,
                              }
             
             # 20210120 后台没做区分不同版本,暂时用游戏版本代码做返回值区分;(BT版存的是元,主干港台版存的是分,美元支持到分)
@@ -82,7 +107,7 @@
                     
             billboardInfo.append(billboardDict)
             
-        backMsg.update({"billboardInfo":billboardInfo, "groupValue1":groupValue1, "groupValue2":groupValue2})
+        backMsg.update({"billboardInfo":billboardInfo, "groupValue1":groupValue1, "groupValue2":groupValue2, "dataTotal":dataTotal})
         
     #执行成功
     GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, backMsg)

--
Gitblit v1.8.0