From 1fcefcd652fa02249ad07f44214eeb4e7c7c07c6 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 19 八月 2024 10:44:26 +0800 Subject: [PATCH] 10202 【越南】【香港】【主干】【砍树】寻宝广播格子优化,仅广播幸运物品加配置的需要广播格子; --- ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py | 74 +++++++++++++++--------------------- 1 files changed, 31 insertions(+), 43 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py b/ServerPython/CoreServerGroup/GameServer/Script/DataRecordPack.py index 57cfda4..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,33 +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() - cmpValue = billBoardData.GetCmpValue() - cmpValue2 = billBoardData.GetCmpValue2() - cmpValue3 = billBoardData.GetCmpValue3() - - 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, + 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(eventName, dataDict) + SendEventPack(eventTypeStr, dataDict) return ## GM执行命令操作 @@ -384,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