【bt】=====送10万真充红点修改
parent
5c49a471da
commit
cf593a743a
|
@ -679,11 +679,10 @@ function this.GetSong10WanRedPoint()
|
||||||
if miss.state==1 then
|
if miss.state==1 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if lastState>0 and miss.state==0 then
|
if lastState>0 and miss.state==0 and miss.progress>=0 then
|
||||||
local zhenConfig=ConfigManager.GetConfigData(ConfigName.SuperZhenChong,miss.missionId)
|
local zhenConfig=ConfigManager.GetConfigData(ConfigName.SuperZhenChong,miss.missionId)
|
||||||
if zhenConfig then
|
if zhenConfig then
|
||||||
if GetTimeStamp()-this.loginTime+miss.progress>=zhenConfig.Time then
|
if GetTimeStamp()-this.loginTime+miss.progress>=zhenConfig.Time then
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,6 +41,7 @@ function GMSong10WanPanel:BindEvent()
|
||||||
NetManager.GetActivityRewardRequest(0,11201,function(msg)
|
NetManager.GetActivityRewardRequest(0,11201,function(msg)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg, 1,function ()
|
UIManager.OpenPanel(UIName.RewardItemPopup, msg, 1,function ()
|
||||||
isCanGet=false
|
isCanGet=false
|
||||||
|
this.getRed:SetActive(false)
|
||||||
self:OnShow()
|
self:OnShow()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
@ -99,7 +100,7 @@ function GMSong10WanPanel:OnShow()
|
||||||
local state=activityData.mission[i].state
|
local state=activityData.mission[i].state
|
||||||
dayList[aaa.day].reward.state=state
|
dayList[aaa.day].reward.state=state
|
||||||
local progress=activityData.mission[i].progress
|
local progress=activityData.mission[i].progress
|
||||||
if lastState~=0 then
|
if lastState~=0 and progress>=0 then
|
||||||
lineTime=progress
|
lineTime=progress
|
||||||
if state==0 and rewardTime==0 then
|
if state==0 and rewardTime==0 then
|
||||||
rewardTime=aaa.Time
|
rewardTime=aaa.Time
|
||||||
|
@ -117,31 +118,32 @@ function GMSong10WanPanel:OnShow()
|
||||||
this.timer:Stop()
|
this.timer:Stop()
|
||||||
this.timer = nil
|
this.timer = nil
|
||||||
end
|
end
|
||||||
local cha=GetTimeStamp()-ActivityGiftManager.loginTime
|
local cha= tonumber(GetTimeStamp()-ActivityGiftManager.loginTime)
|
||||||
local needTime=rewardTime- (lineTime+cha)
|
local needTime=rewardTime- (lineTime+cha)
|
||||||
|
LogError("needTime=="..needTime)
|
||||||
this.getRed:SetActive(false)
|
this.getRed:SetActive(false)
|
||||||
if needTime>0 then
|
if needTime>=0 then
|
||||||
this.timeTxt.gameObject:SetActive(true)
|
this.timeTxt.gameObject:SetActive(true)
|
||||||
this.timer = Timer.New(function ()
|
this.timer = Timer.New(function ()
|
||||||
|
--LogError("needTime=="..needTime)
|
||||||
needTime=needTime-1
|
needTime=needTime-1
|
||||||
if needTime==0 then
|
if needTime<=0 then
|
||||||
isCanGet=true
|
isCanGet=true
|
||||||
this.timeTxt.text = "有可领取奖励"
|
this.timeTxt.text = "有可领取奖励"
|
||||||
|
this.getRed:SetActive(true)
|
||||||
|
this.timer:Stop()
|
||||||
|
this.timer = nil
|
||||||
else
|
else
|
||||||
this.timeTxt.text = string.format("领取倒计时:".."%s",TimeToFelaxible(needTime))
|
this.timeTxt.text = string.format("领取倒计时:".."%s",TimeToFelaxible(needTime))
|
||||||
end
|
end
|
||||||
--if state==1 then
|
|
||||||
|
|
||||||
-- elseif state==2 then
|
|
||||||
-- this.leftTimeTxt.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
|
||||||
-- elseif state==3 then
|
|
||||||
-- this.leftTimeTxt.text = "活动已结束"
|
|
||||||
--end
|
|
||||||
|
|
||||||
end,1,-1,true)
|
end,1,-1,true)
|
||||||
this.timer:Start()
|
this.timer:Start()
|
||||||
else
|
else
|
||||||
isCanGet=true
|
if rewardTime~=0 then
|
||||||
|
isCanGet=true
|
||||||
|
|
||||||
|
end
|
||||||
this.timeTxt.gameObject:SetActive(false)
|
this.timeTxt.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
this.scrollView:SetData(dayList,function(index, rewardItem)
|
this.scrollView:SetData(dayList,function(index, rewardItem)
|
||||||
|
@ -195,6 +197,7 @@ end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function GMSong10WanPanel:OnClose()
|
function GMSong10WanPanel:OnClose()
|
||||||
allValue=0
|
allValue=0
|
||||||
|
rewardTime=0
|
||||||
CheckRedPointStatus(RedPointType.song10Wan)
|
CheckRedPointStatus(RedPointType.song10Wan)
|
||||||
end
|
end
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
|
|
Loading…
Reference in New Issue