锦标赛添加开启限制
This commit is contained in:
parent
5437d506a6
commit
1f42a4e967
@ -100,6 +100,9 @@ function TournArenaData:isOpen()
|
||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then
|
||||
return false
|
||||
end
|
||||
if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@ -144,6 +147,15 @@ function TournArenaData:getActDay()
|
||||
return days + 1
|
||||
end
|
||||
|
||||
function TournArenaData:getConditionDay()
|
||||
if not self.conditionDay then
|
||||
self.conditionDay = GFunc.getConstIntValue('activity_recurring_day')
|
||||
self.conditionDay = (self.conditionDay - 1) * 86400
|
||||
end
|
||||
|
||||
return self.conditionDay
|
||||
end
|
||||
|
||||
-- 是否有入口红点
|
||||
function TournArenaData:hasEntryRedPoint()
|
||||
return self:hasBountyRedPoint() or self:hasRankRedPoint() or self:hasGiftRedPoint()
|
||||
|
||||
@ -116,6 +116,9 @@ function TournWaveData:isOpen()
|
||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then
|
||||
return false
|
||||
end
|
||||
if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@ -160,6 +163,15 @@ function TournWaveData:getActDay()
|
||||
return days + 1
|
||||
end
|
||||
|
||||
function TournWaveData:getConditionDay()
|
||||
if not self.conditionDay then
|
||||
self.conditionDay = GFunc.getConstIntValue('activity_recurring_day')
|
||||
self.conditionDay = (self.conditionDay - 1) * 86400
|
||||
end
|
||||
|
||||
return self.conditionDay
|
||||
end
|
||||
|
||||
-- 是否有入口红点
|
||||
function TournWaveData:hasEntryRedPoint()
|
||||
return self:hasBountyRedPoint() or self:hasRankRedPoint() or self:hasGiftRedPoint()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user