[功能]=====车迟斗法开服7日后开启

dev_chengFeng
wangzhenxing 2022-03-28 15:29:10 +08:00
parent c593cdf2d6
commit 91ace072a2
2 changed files with 28 additions and 1 deletions

View File

@ -3,6 +3,7 @@
CarbonManager = {};
local this = CarbonManager
local DifficultyData = ConfigManager.GetConfig(ConfigName.ChallengeConfig)
local chechiConfig = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,FUNCTION_OPEN_TYPE.CARDELAY)
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
this.gameSetting = ConfigManager.GetConfig(ConfigName.GameSetting)
-- 副本难度数据管理
@ -851,6 +852,14 @@ function this. CarbonRedCheck(redType)
if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.CARDELAY) and PlayerManager.familyId ~= 0
and (GuildCarDelayManager.RefreshRedPoint(GuildCarDelayProType.Challenge)
or GuildCarDelayManager.RefreshRedPoint(GuildCarDelayProType.Loot)) then
if chechiConfig and chechiConfig.IfOpen and chechiConfig.IfOpen[1]==2 then
local day=chechiConfig.IfOpen[2]
if PlayerManager.GetServerOpenTime() + day*24*60*60>GetTimeStamp() then
-- LogError("day=="..day)
return false
end
end
return true
end
return false

View File

@ -1,5 +1,5 @@
require("Base/BasePanel")
local limitTime=PlayerManager.GetServerOpenTime() + 7*24*60*60
local _GuildBuildConfig = {
[GUILD_MAP_BUILD_TYPE.HOUSE] = {
isOpen = true,
@ -58,6 +58,10 @@ local _GuildBuildConfig = {
rpType = RedPointType.LegendExplore,
btnName = "btnCarDelay",
btnFunc = function()
if limitTime>GetTimeStamp() then
return
end
if ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.CARDELAY) then
if PlayerManager.familyId == 0 then
PopupTipPanel.ShowTip(Language[10278])
@ -257,6 +261,7 @@ end
--界面打开时调用(用于子类重写)
function GuildMainCityPanel:OnOpen(...)
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
@ -412,6 +417,19 @@ local _BGMFlag = nil
function this._TimeUpdate()
--车迟斗法倒计时显示
local timeDown = -1
if limitTime>GetTimeStamp() then
--LogError("timeStamp=="..limitTime-GetTimeStamp())
local cha =limitTime-GetTimeStamp()
if cha>86400 then
this.timeText.text = string.format("%s后开启",TimeToD(limitTime-GetTimeStamp()))
elseif cha>3600 then
this.timeText.text = string.format("%s后开启",TimeToH(limitTime-GetTimeStamp()))
else
this.timeText.text = string.format("%s后开启",TimeToMorS(limitTime-GetTimeStamp()))
end
return
end
if GuildCarDelayManager.progress == GuildCarDelayProType.Challenge then
if PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_CHALLENGE) > 0 then
timeDown = GuildCarDelayManager.ChallengeCdTime