hxp
2025-12-04 9c5f7ba286ee8fa87f9e348624fee2127b3fe85a
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Billboard.py
@@ -26,7 +26,7 @@
        GameWorld.DebugAnswer(curPlayer, errInfo)
    GameWorld.DebugAnswer(curPlayer, "新增榜单假数据: Billboard 类型 分组值1 分组值2 条数 比较值1可选参数(比较值2 常规值1~5)")
    GameWorld.DebugAnswer(curPlayer, "删除榜单假数据: Billboard 类型 分组值1 分组值2")
    GameWorld.DebugAnswer(curPlayer, "输出排行榜数据: Billboard p 类型 分组值1 分组值2")
    GameWorld.DebugAnswer(curPlayer, "输出排行榜数据: Billboard p 类型 [分组值1 值2 从x名 到x名]")
    GameWorld.DebugAnswer(curPlayer, "注:如果没有特殊说明,本服榜单分组值均为0,跨服榜单分组值1为分区ID,分组2为0")
    
    nameTypeList = ShareDefine.BillboardNameDict.keys()
@@ -137,7 +137,7 @@
    return
def __GetBillTypeSign(billboardType, groupValue1, groupValue2):
    billTypeSign = "Type:%s" % billboardType
    billTypeSign = "%s" % billboardType
    if groupValue1:
        billTypeSign = "%s-%s" % (billTypeSign, groupValue1)
    if groupValue2:
@@ -145,7 +145,7 @@
    return billTypeSign
def __logFackData(curPlayer, gmList):
    ## 输出排行榜数据: Billboard p 类型 分组值1 分组值2
    ## 输出排行榜数据: Billboard p 类型 分组值1 分组值2 名次A 到B
    if len(gmList) <= 1:
        GameWorld.DebugAnswer(curPlayer, "榜单数据条数总览")
        billboardMgr = DBDataMgr.GetBillboardMgr()
@@ -164,6 +164,8 @@
    billboardType = gmList[1]
    groupValue1 = gmList[2] if len(gmList) > 2 else 0
    groupValue2 = gmList[3] if len(gmList) > 3 else 0
    fromRank = gmList[4] if len(gmList) > 4 else 0
    toRank = gmList[5] if len(gmList) > 5 else 0
    billboardMgr = DBDataMgr.GetBillboardMgr()
    billboardObj = billboardMgr.GetBillboard(billboardType, groupValue1, groupValue2)
    billboardObj.SortDelayDo()
@@ -171,16 +173,24 @@
    maxDataCount = billboardObj.GetMaxCount()
    idOrderDict = billboardObj.GetIDOrderDict()
    
    printDebugCnt = 0
    billTypeSign = __GetBillTypeSign(billboardType, groupValue1, groupValue2)
    GameWorld.DebugAnswer(curPlayer, "榜单数据(%s)条数: %s/%s 详见日志" % (billTypeSign, curDataCount, maxDataCount))
    bName = ShareDefine.BillboardNameDict[billboardType]
    GameWorld.DebugAnswer(curPlayer, "%s(%s)条数: %s/%s 详见日志" % (bName, billTypeSign, curDataCount, maxDataCount))
    for index in range(curDataCount):
        bbData = billboardObj.At(index)
        dataID = bbData.GetID()
        rank = idOrderDict.get(dataID, 0)
        if (fromRank and rank < fromRank) or (toRank and rank > toRank):
            continue
        
        cmpValues = [bbData.GetCmpValue(), bbData.GetCmpValue2(), bbData.GetCmpValue3()]
        valueList = [getattr(bbData, "GetValue%s" % num)() for num in range(1, 9)]
        GameWorld.DebugLog("%s,rank=%s,ID=%s,CmpValue=%s,CmpValue2=%s,Value=%s"
                           % (index, rank, dataID, bbData.GetCmpValue(), bbData.GetCmpValue2(), valueList), curPlayer.GetPlayerID())
        if printDebugCnt < 20:
            printDebugCnt += 1
            GameWorld.DebugAnswer(curPlayer, "%s,ID:%s,榜值:%s" % (rank, dataID, cmpValues))
        GameWorld.DebugLog("%s,rank=%s,ID=%s,CmpValues=%s,Value=%s"
                           % (index, rank, dataID, cmpValues, valueList), curPlayer.GetPlayerID())
        
    return