From 637e783b5caca75b201e1dffd54b89bd7b37bb0c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 26 三月 2019 16:09:53 +0800 Subject: [PATCH] 6250 【后端】【2.0】拍卖行开发单(增加竞价时间通知) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 133 ++------------------------------------------ 1 files changed, 6 insertions(+), 127 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py index 3213a7f..4758ca5 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py @@ -77,50 +77,6 @@ return -def ClearBillboardOnServerInit(): - ##开启服务器重置排行榜处理 - BillBoardClearSetting = ReadChConfig.GetEvalChConfig("BillBoardClearSetting") - - clearSign, clearIndexList = BillBoardClearSetting - - lastSign = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_ClearBillboardSign) - - if clearSign == lastSign: - GameWorld.Log("服务器开启清除排行榜检查:标记相同不用清除clearSign=%s" % (clearSign)) - return - - for billboardIndex in clearIndexList: - - # 合服累充活动判断 - if billboardIndex == ShareDefine.Def_BT_MixCampaign_Recharge: - isMixServer = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer) # 是否合服 - mixServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay) # 合服天数 - - mixType = ShareDefine.Def_MixCampaign_Type_RechargeRank - mixServerCampaignDict = ReadChConfig.GetEvalChConfig("MixServerCampaign") - campaignInfoList = mixServerCampaignDict.get(mixType, []) - dayList = campaignInfoList[0] - if not isMixServer or mixServerDay not in dayList: - GameWorld.Log('非合服充值活动记录数据期间,不清除累充排行榜(%s)! isMixServer=%s,mixServerDay=%s,dayList=%s' - % (billboardIndex, isMixServer, mixServerDay, str(dayList))) - continue - - # 特惠充值判断 - elif billboardIndex == ShareDefine.Def_BT_RechargeTeHui: - actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank - actionNum = PlayerDBGSEvent.GetDBGSTrig_ByKey(actionNumKey) - if not actionNum: - GameWorld.Log('当前没有充值特惠排行活动,不清除排行榜(%s)!' % (billboardIndex)) - continue - - ClearBillboardByIndex(billboardIndex) - - PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_ClearBillboardSign, clearSign) - - GameWorld.Log("服务器开启清除排行榜: lastSign=%s,clearSign=%s,clearIndexList=%s" - % (lastSign, clearSign, str(clearIndexList))) - return - def SortServerBillboard(): ##排序所有排行榜 billboardMgr = GameWorld.GetBillboard() @@ -472,8 +428,9 @@ gameWorld.SetDict(Def_Key_BillboardSortTick % bType, tick) #GameWorld.DebugLog("更新排行榜:bType=%s,autoSort=%s,tick=%s,lastSortTick=%s,d=%s" % (bType, autoSort, tick, lastSortTick, tick - lastSortTick)) - isUpd = UpdatePlayerBillboard(bID, bName, bName2, bType, bType2, value1, value2, cmpValue, autoSort, cmpValue2, cmpValue3) - __UpdateBillboardSortState(gameWorld, bType, autoSort, isUpd) + UpdatePlayerBillboard(bID, bName, bName2, bType, bType2, value1, value2, cmpValue, autoSort, cmpValue2, cmpValue3) + gameWorld.SetDict(Def_Key_BillboardNeedSort % bType, 1) + #__UpdateBillboardSortState(gameWorld, bType, autoSort, isUpd) exInfo = billInfoDict["ExInfo"] # 以下为榜单附加特殊处理 @@ -494,8 +451,9 @@ job = playerJob % 10 if job in ShareDefine.JobFightPowerBillboardDict: jobBType = ShareDefine.JobFightPowerBillboardDict[job] - isUpd = UpdatePlayerBillboard(bID, bName, bName2, jobBType, bType2, value1, value2, cmpValue, autoSort) - __UpdateBillboardSortState(gameWorld, jobBType, autoSort, isUpd) + UpdatePlayerBillboard(bID, bName, bName2, jobBType, bType2, value1, value2, cmpValue, autoSort) + gameWorld.SetDict(Def_Key_BillboardNeedSort % jobBType, 1) + #__UpdateBillboardSortState(gameWorld, jobBType, autoSort, isUpd) return @@ -669,13 +627,6 @@ return [playerBillBoard, playerBillBoardData] -def MapServer_UpdMSRechargeRankBillboard(cmdList): - ##合服活动充值点数排行更新 - playerID, playerName, playerOpInfo, playerJob, fightPower, familyName, totalChangeCoinPoint = cmdList - UpdatePlayerBillboard(playerID, playerName, familyName, ShareDefine.Def_BT_MixCampaign_Recharge, - playerJob, fightPower, totalChangeCoinPoint, totalChangeCoinPoint) - return - def MapServer_UpdateTotalRechargeBillboard(cmdList): ##总充值点数排行更新 playerID, playerName, playerOpInfo, playerJob, playerLV, totalChangeCoinPoint = cmdList @@ -699,78 +650,6 @@ # @param tick: 时间戳 # @return: None def ViewBillboardRangeByObjID(index, clientData, tick): - return - -## 更新充值特惠排行榜 -# @param cmdList -# @return None -def MapServer_UpdateRechargeRankBillboard(cmdList): - playerID, playerName, playerOpInfo, playerJob, playerLV, familyName, actionID, actionNum, updateGold = cmdList - # 排行榜上榜限制 - RechargeRankInfoDict = ReadChConfig.GetEvalChConfig("TeHuiAction_RechargeRank") - gameWorld = GameWorld.GetGameWorld() - actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_RechargeRank - curActionNum = gameWorld.GetDictByKey(actionNumKey) - curActionID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey) - GameWorld.DebugLog("MapServer_UpdateRechargeRankBillboard...") - GameWorld.DebugLog(" actionID=%s,actionNum=%s,updateGold=%s,curActionID=%s,curActionNum=%s," - % (actionID, actionNum, updateGold, curActionID, curActionNum), playerID) - - # 非当前活动,不更新 - if actionNum not in RechargeRankInfoDict or actionNum != curActionNum or actionID != curActionID: - GameWorld.DebugLog(" 非当前充值特惠排行榜活动,不更新...", playerID) - return - - rechargeRankInfoList = RechargeRankInfoDict[actionNum] - if len(rechargeRankInfoList) <= 0: - return - - limitGold = rechargeRankInfoList[0] # 限制上榜充值数 - if updateGold < limitGold: - GameWorld.DebugLog(" 未达到最低上榜充值数=%s,不更新..." % limitGold, playerID) - return - - #排行榜 - cmpValue = updateGold - isOk = UpdatePlayerBillboard(playerID, playerName, familyName, ShareDefine.Def_BT_RechargeTeHui, - playerJob, playerLV, updateGold, cmpValue) - GameWorld.DebugLog(" 更新充值特惠排行榜 isOk=%s" % isOk, playerID) - return - -## 更新消费特惠排行榜 -# @param cmdList -# @return None -def MapServer_UpdateCostRankBillboard(cmdList): - playerID, playerName, playerOpInfo, playerJob, playerLV, familyName, actionID, actionNum, updateGold = cmdList - # 排行榜上榜限制 - costRankInfoDict = ReadChConfig.GetEvalChConfig("TeHuiAction_CostRank") - gameWorld = GameWorld.GetGameWorld() - actionNumKey = ShareDefine.Def_Notify_WorldKey_DayAction_CostRank - curActionNum = gameWorld.GetDictByKey(actionNumKey) - curActionID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_DayAction_ID % actionNumKey) - GameWorld.DebugLog("MapServer_UpdateCostRankBillboard...") - GameWorld.DebugLog(" actionID=%s,actionNum=%s,updateGold=%s,curActionID=%s,curActionNum=%s," - % (actionID, actionNum, updateGold, curActionID, curActionNum), playerID) - - # 非当前活动,不更新 - if actionNum not in costRankInfoDict or actionNum != curActionNum or actionID != curActionID: - GameWorld.DebugLog(" 非当前消费特惠排行榜活动,不更新...", playerID) - return - - costRankInfoList = costRankInfoDict[actionNum] - if len(costRankInfoList) <= 0: - return - - limitGold = costRankInfoList[0] # 限制上榜消费数 - if updateGold < limitGold: - GameWorld.DebugLog(" 未达到最低上榜消费数=%s,不更新..." % limitGold, playerID) - return - - #排行榜 - cmpValue = updateGold - isOk = UpdatePlayerBillboard(playerID, playerName, familyName, ShareDefine.Def_BT_CostTeHui, - playerJob, playerLV, 0, cmpValue) - GameWorld.DebugLog(" 更新消费特惠排行榜 isOk=%s" % isOk, playerID) return ## 排行榜更新是否受等级限制 -- Gitblit v1.8.0