From 8ae000433e6306d93d94160c1fb5bec42f768222 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 22 七月 2024 17:53:12 +0800 Subject: [PATCH] 10223 【越南】【砍树】【主干】【港台】秘境寻宝(秘境榜单数据备份优化;优化本服跨服榜备份数据规则,后台查询本服跨服历史榜统一逻辑;) --- ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py | 83 +++++++++++++++-------------------------- 1 files changed, 31 insertions(+), 52 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py index 0d2dc6a..9e36539 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py @@ -233,13 +233,6 @@ SendEventPack("GameMapOnLinePlayerCnt", dataDict) return -## 每天记录排行榜数据 -# @param billboardType: 排行榜类型 -# @return: None -def DR_BillboardDataByDay(billboardType): - DR_BillboardData(billboardType, "BillboardDataByDay") - return - ## 记录排行榜数据 # @param billboardType: 排行榜类型 # @return: None @@ -248,42 +241,42 @@ if not billBoard: #找不到排行榜 return + dataCount = billBoard.GetCount() + if not dataCount: + return - for index in range(0, billBoard.GetCount()): + serverTime = GameWorld.GetServerTime() + timeStr = "%02d%02d%02d%s" % (serverTime.hour, serverTime.minute, serverTime.second, str(serverTime.microsecond)[:3]) + eventTypeStr = "Billboard_%s_%s_%s" % (billboardType, eventName, timeStr) + + dataDict = {"BillboardType":billboardType, "DataCount":dataCount, "addDataDict":addDataDict} + SendEventPack(eventTypeStr, dataDict) + + for index in range(0, dataCount): billBoardData = billBoard.At(index) if not billBoardData: continue - - objID = billBoardData.GetID() - objID2 = billBoardData.GetID2() - name1 = billBoardData.GetName1() - name2 = billBoardData.GetName2() - type2 = billBoardData.GetType2() - value1 = billBoardData.GetValue1() - value2 = billBoardData.GetValue2() - value3 = billBoardData.GetValue3() - value4 = billBoardData.GetValue4() - value5 = billBoardData.GetValue5() - value6 = billBoardData.GetValue6() - value7 = billBoardData.GetValue7() - value8 = billBoardData.GetValue8() - cmpValue = billBoardData.GetCmpValue() - cmpValue2 = billBoardData.GetCmpValue2() - cmpValue3 = billBoardData.GetCmpValue3() - userData = billBoardData.GetUserData() - - dataDict = {"BillboardType":billboardType, - "Place":index, "ObjID":objID, "ObjID2":objID2, "Name1":name1, - "Name2":name2, "Type2":type2, "Value1":value1, "Value2":value2, - "CmpValue":cmpValue, "CmpValue2":cmpValue2, "CmpValue3":cmpValue3, - "Value3":value3, "Value4":value4, "Value5":value5, "Value6":value6, - "Value7":value7, "Value8":value8, "UserData":userData + rank = index + 1 + dataDict = {"Rank":rank, + "ID":billBoardData.GetID(), + "ID2":billBoardData.GetID2(), + "Name1":billBoardData.GetName1(), + "Name2":billBoardData.GetName2(), + "Type2":billBoardData.GetType2(), + "Value1":billBoardData.GetValue1(), + "Value2":billBoardData.GetValue2(), + "Value3":billBoardData.GetValue3(), + "Value4":billBoardData.GetValue4(), + "Value5":billBoardData.GetValue5(), + "Value6":billBoardData.GetValue6(), + "Value7":billBoardData.GetValue7(), + "Value8":billBoardData.GetValue8(), + "CmpValue":billBoardData.GetCmpValue(), + "CmpValue2":billBoardData.GetCmpValue2(), + "CmpValue3":billBoardData.GetCmpValue3(), + "UserData":billBoardData.GetUserData(), } - - dataDict.update(addDataDict) - - #发送封包 - SendEventPack("%s_%s" % (eventName, billboardType), dataDict) + SendEventPack(eventTypeStr, dataDict) return ## GM执行命令操作 @@ -393,20 +386,6 @@ #发送封包 SendEventPack("ResetGameDataRecord", dataDict) return - - -## 复制的排行榜记录 -# @param Place: 名次 -# @param playerID: 玩家ID -# @param playerName: 玩家名字 -# @param playerLV: 玩家等级 -# @param playerJob: 玩家职业 -# @param totalPoint: 积分 -# @return: None -def DR_BillboardCopy(billboardType): - DR_BillboardData(billboardType, "BillboardCopy") - return - ## 弹劾玩家家族职位变更 # @param familyID: 家族ID -- Gitblit v1.8.0