Explorar o código

临时屏蔽战力榜第一玩家上线功能

gitxsm hai 1 mes
pai
achega
40e141f7f6

+ 2 - 2
script/common/CommonDB.lua

@@ -45,7 +45,7 @@ KEY_BAN_DATA = "banData"								-- 封禁数据
 KEY_DESKTOP_DATA = "desktopData"					-- 桌面添加数据(账号级)
 KEY_REBATE_DATA = "rebateData"							-- 渠道返利数据
 KEY_ANOTHERWORLDBATTLE_START_TI = "anotherWorldBattleStart" -- 最近一轮异界之战开启时间
-KEY_BIGRPLAYER_SHOW_DATA = "bigRPlayerShowData"				-- 大R玩家实力展示相关数据
+-- KEY_BIGRPLAYER_SHOW_DATA = "bigRPlayerShowData"				-- 大R玩家实力展示相关数据
 
 db = db or {
 	serverStartTime = nil,								-- 开服时间
@@ -74,7 +74,7 @@ db = db or {
 	commerceActInfo = {},								-- 跨服商业活动信息
 	jjcNewladderInfo = {},								-- 天梯赛信息
 	commerceMiddleActInfo = {},							-- 中心服跨服商业活动信息
-	bigRPlayerShowData = {},
+	-- bigRPlayerShowData = {},
 }
 
 

+ 2 - 2
script/core/ObjHuman.lua

@@ -106,7 +106,7 @@ local AnotherWorldBattleNS = require("anotherWorldBattle.AnotherWorldBattleNS")
 local RoleStorageBox = require("roleSystem.RoleStorageBox")
 local BreakThroughTheme = require("battle.BreakThroughTheme")
 local BattleGift = require("battle.BattleGift")
-local BigRPlayerShow = require("broadcast.BigRPlayerShow")
+-- local BigRPlayerShow = require("broadcast.BigRPlayerShow")
 
 
 local Json = require("common.Json")
@@ -855,7 +855,7 @@ function onLogin(human, isNew)
 		Msg.send(msgRet,human.fd)
 	end
 
-	BigRPlayerShow.onLogin(human)
+	-- BigRPlayerShow.onLogin(human)
 	
 	-- 注意 这个函数写在doLogin的最后
 	MiddleLogic.onLogin(human)

+ 85 - 85
script/module/broadcast/BigRPlayerShow.lua

@@ -1,101 +1,101 @@
--- 大R玩家实力显示
-
-local Msg = require("core.Msg")
-local ObjHuman = require("core.ObjHuman")
-local BillboardLogic = require("billboard.BillboardLogic")
-local BillboardDefine = require("billboard.BillboardDefine")
-local Util = require("common.Util")
--- local CommonDB = require("common.CommonDB")
-
--- local pRank1lastBroadcastTime
-
-
--- local function getBigRPlayerData()
---     return CommonDB.getValueByKey(CommonDB.KEY_BIGRPLAYER_SHOW_DATA)
+-- -- 大R玩家实力显示
+
+-- local Msg = require("core.Msg")
+-- local ObjHuman = require("core.ObjHuman")
+-- local BillboardLogic = require("billboard.BillboardLogic")
+-- local BillboardDefine = require("billboard.BillboardDefine")
+-- local Util = require("common.Util")
+-- -- local CommonDB = require("common.CommonDB")
+
+-- -- local pRank1lastBroadcastTime
+
+
+-- -- local function getBigRPlayerData()
+-- --     return CommonDB.getValueByKey(CommonDB.KEY_BIGRPLAYER_SHOW_DATA)
+-- -- end
+
+-- -- local function updateBigRPlayerData(newData)
+-- --     CommonDB.updateValue(CommonDB.KEY_BIGRPLAYER_SHOW_DATA, newData)
+-- -- end
+
+-- -- local function getpRank1LastBroadcastTime()
+-- --     local data = getBigRPlayerData()
+-- --     return data and data.pRank1lastBroadcastTime
+-- -- end
+
+-- -- local function updatepRank1LastBroadcastTime()
+-- --     local data = getBigRPlayerData()
+-- --     data = data or {}
+-- --     local now  = os.time()
+-- --     data.pRank1lastBroadcastTime = now
+-- --     updateBigRPlayerData(data)
+
+-- --     -- 更新缓存
+-- --     pRank1lastBroadcastTime = now
+-- -- end
+
+-- local function isShowTips(human)
+--     local bl = true
+--     if not human.db.showTipsData then
+--         return bl
+--     end
+
+--     if human.db.lv < 10 then
+--         return bl
+--     end
+
+--     local showTipsData = human.db.showTipsData
+--     local pRank1LoginShowTime = showTipsData.pRank1LoginShowTime
+--     if not pRank1LoginShowTime then
+--         return bl
+--     end
+
+--     if Util.isSameDay(pRank1LoginShowTime) then
+--         bl = false
+--     end
+
+--     return bl
 -- end
 
--- local function updateBigRPlayerData(newData)
---     CommonDB.updateValue(CommonDB.KEY_BIGRPLAYER_SHOW_DATA, newData)
--- end
-
--- local function getpRank1LastBroadcastTime()
---     local data = getBigRPlayerData()
---     return data and data.pRank1lastBroadcastTime
--- end
-
--- local function updatepRank1LastBroadcastTime()
---     local data = getBigRPlayerData()
---     data = data or {}
---     local now  = os.time()
---     data.pRank1lastBroadcastTime = now
---     updateBigRPlayerData(data)
-
---     -- 更新缓存
---     pRank1lastBroadcastTime = now
+-- local function updateShowTipsData(human)
+--     human.db.showTipsData = human.db.showTipsData or {}
+--     human.db.showTipsData.pRank1LoginShowTime = os.time()
 -- end
 
-local function isShowTips(human)
-    local bl = true
-    if not human.db.showTipsData then
-        return bl
-    end
 
-    if human.db.lv < 10 then
-        return bl
-    end
 
-    local showTipsData = human.db.showTipsData
-    local pRank1LoginShowTime = showTipsData.pRank1LoginShowTime
-    if not pRank1LoginShowTime then
-        return bl
-    end
+-- -- 战力排行榜排名第一的玩家上线的处理
+-- local function powerRankTopOneLogin(human)
+--     -- if not pRank1lastBroadcastTime then
+--     --     pRank1lastBroadcastTime = getpRank1LastBroadcastTime()
+--     -- end
 
-    if Util.isSameDay(pRank1LoginShowTime) then
-        bl = false
-    end
+--     -- if pRank1lastBroadcastTime and Util.isSameDay(pRank1lastBroadcastTime) then
+--     --     return
+--     -- end
 
-    return bl
-end
+--     local rankList = BillboardLogic.GetRankList(BillboardDefine.TYPE_ZHANDOULI)
+--     if not rankList or not rankList[1] or rankList[1].uuid ~= human.db._id then
+--         return
+--     end
 
-local function updateShowTipsData(human)
-    human.db.showTipsData = human.db.showTipsData or {}
-    human.db.showTipsData.pRank1LoginShowTime = os.time()
-end
+--     local msg = Msg.gc.GC_POWERRANK_TOPONE_LOGIN
+--     msg.playerName = human.db.name
 
+--     for uuid, h in pairs(ObjHuman.onlineUuid) do
+--         if uuid ~= human.db._id and isShowTips(h) then
+--             Msg.send(msg, h.fd)
 
+--             updateShowTipsData(h)
+--         end
+--     end
 
--- 战力排行榜排名第一的玩家上线的处理
-local function powerRankTopOneLogin(human)
-    -- if not pRank1lastBroadcastTime then
-    --     pRank1lastBroadcastTime = getpRank1LastBroadcastTime()
-    -- end
-
-    -- if pRank1lastBroadcastTime and Util.isSameDay(pRank1lastBroadcastTime) then
-    --     return
-    -- end
-
-    local rankList = BillboardLogic.GetRankList(BillboardDefine.TYPE_ZHANDOULI)
-    if not rankList or not rankList[1] or rankList[1].uuid ~= human.db._id then
-        return
-    end
-
-    local msg = Msg.gc.GC_POWERRANK_TOPONE_LOGIN
-    msg.playerName = human.db.name
-
-    for uuid, h in pairs(ObjHuman.onlineUuid) do
-        if uuid ~= human.db._id and isShowTips(h) then
-            Msg.send(msg, h.fd)
-
-            updateShowTipsData(h)
-        end
-    end
-
-    -- updatepRank1LastBroadcastTime()
-end
+--     -- updatepRank1LastBroadcastTime()
+-- end
 
 
 
 
-function onLogin(human)
-    powerRankTopOneLogin(human)
-end
+-- function onLogin(human)
+--     powerRankTopOneLogin(human)
+-- end