bug修复
This commit is contained in:
parent
c9d73ceaf6
commit
b9dcd70ffe
@ -216,7 +216,11 @@ end
|
||||
function ActPvpManager:rspOverCD(result)
|
||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {reqCDOver = true})
|
||||
DataManager.ActPvpData:setMatchCdEndAt()
|
||||
local isAd = false
|
||||
if result.reqData and result.reqData.ad then
|
||||
isAd = true
|
||||
end
|
||||
DataManager.ActPvpData:setMatchCdEndAt(isAd)
|
||||
self:showMatchUI(true)
|
||||
end
|
||||
end
|
||||
|
||||
@ -61,7 +61,7 @@ function ActPvpMatchResultUI:onClickRefresh()
|
||||
self:closeUI()
|
||||
ModuleManager.ActPvpManager:showMatchUI(true)
|
||||
else
|
||||
if DataManager.ActPvpData:getCanAdFlush() then
|
||||
if DataManager.ActPvpData:getCanAdRefreshHero() then
|
||||
SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.ACT_PVP_AD_REMATCH, function()
|
||||
ModuleManager.ActPvpManager:reqOverCD(true)
|
||||
end)
|
||||
@ -81,7 +81,7 @@ function ActPvpMatchResultUI:refreshTime()
|
||||
adImg:setVisible(false)
|
||||
else
|
||||
str = Time:formatNumTime(remainTime)
|
||||
if DataManager.ActPvpData:getCanAdFlush() then
|
||||
if DataManager.ActPvpData:getCanAdRefreshHero() then
|
||||
adImg:setVisible(true)
|
||||
else
|
||||
adImg:setVisible(false)
|
||||
|
||||
@ -260,14 +260,21 @@ function ActPvpData:getMatchCdEndAt()
|
||||
return self.matchCdEndAt
|
||||
end
|
||||
|
||||
function ActPvpData:setMatchCdEndAt()
|
||||
function ActPvpData:setMatchCdEndAt(isAd)
|
||||
self.matchCdEndAt = Time:getServerTime()
|
||||
if isAd then
|
||||
self.todayAdCount = self.todayAdCount +1
|
||||
end
|
||||
end
|
||||
|
||||
function ActPvpData:getMatchCdEndTime()
|
||||
return self.matchCdEndAt - Time:getServerTime()
|
||||
end
|
||||
|
||||
function ActPvpData:getCanAdRefreshHero()
|
||||
return self.todayAdCount <= 0
|
||||
end
|
||||
|
||||
function ActPvpData:getNeedReMatch()
|
||||
if not self.rivalInfo or not self.rivalInfo.level then
|
||||
return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user