【日常副本优化】首次挑战副本不再消耗次数
parent
6baba16701
commit
f4ca18ff74
|
@ -238,8 +238,8 @@ function this.SetData(root, data, ldata)
|
||||||
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
||||||
and PlayerManager.maxForce >= _power -- 战斗力
|
and PlayerManager.maxForce >= _power -- 战斗力
|
||||||
--显示挑战或扫荡道具消耗
|
--显示挑战或扫荡道具消耗
|
||||||
goIcon:SetActive(isOpen and freeTime<=0)
|
goIcon:SetActive(false)
|
||||||
goIconNum:SetActive( isOpen and freeTime<=0)
|
goIconNum:SetActive( false)
|
||||||
|
|
||||||
if freeTime<=0 then
|
if freeTime<=0 then
|
||||||
goIconNumText.text=storeData.Cost[2][4]
|
goIconNumText.text=storeData.Cost[2][4]
|
||||||
|
@ -254,6 +254,8 @@ function this.SetData(root, data, ldata)
|
||||||
power.transform.parent.gameObject:SetActive(true)
|
power.transform.parent.gameObject:SetActive(true)
|
||||||
tip.gameObject:SetActive(false)
|
tip.gameObject:SetActive(false)
|
||||||
if CarbonManager.IsDailyCarbonPass(data.Id) then
|
if CarbonManager.IsDailyCarbonPass(data.Id) then
|
||||||
|
goIcon:SetActive(isOpen and freeTime<=0)
|
||||||
|
goIconNum:SetActive( isOpen and freeTime<=0)
|
||||||
type=2
|
type=2
|
||||||
goBtnText.text=Language[10289]
|
goBtnText.text=Language[10289]
|
||||||
goBtnImage.sprite=Util.LoadSprite("s_slbz_1anniuhuise")
|
goBtnImage.sprite=Util.LoadSprite("s_slbz_1anniuhuise")
|
||||||
|
@ -306,8 +308,8 @@ function this.SetData(root, data, ldata)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--当免费次数不足 不管是挑战还是扫荡 购买次数
|
--当免费次数不足 是扫荡 购买次数
|
||||||
if freeTime<=0 then
|
if freeTime<=0 and type==2 then
|
||||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function() end)
|
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function() end)
|
||||||
end
|
end
|
||||||
NetManager.DailyChallengeRequest(data.Id,type,function(msg)
|
NetManager.DailyChallengeRequest(data.Id,type,function(msg)
|
||||||
|
@ -317,7 +319,7 @@ function this.SetData(root, data, ldata)
|
||||||
if result.result ==0 then
|
if result.result ==0 then
|
||||||
elseif result.result==1 then
|
elseif result.result==1 then
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],1)
|
-- PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],1)
|
||||||
CarbonManager.AddDailyChallengeInfo(data.Id)
|
CarbonManager.AddDailyChallengeInfo(data.Id)
|
||||||
this.RefreshShow(carbonIndex,false,false)
|
this.RefreshShow(carbonIndex,false,false)
|
||||||
end)
|
end)
|
||||||
|
@ -340,6 +342,7 @@ function this.SetTimeTip()
|
||||||
local freeTimeId=curData[1].PrivilegeId[2]
|
local freeTimeId=curData[1].PrivilegeId[2]
|
||||||
buyTime= ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP,storeData.Id) --购买次数
|
buyTime= ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP,storeData.Id) --购买次数
|
||||||
freeTime=PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数
|
freeTime=PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数
|
||||||
|
LogGreen("buyTime "..buyTime.." freeTime "..freeTime)
|
||||||
local str=""
|
local str=""
|
||||||
if freeTime>0 then
|
if freeTime>0 then
|
||||||
str=string.format("今日剩余免费次数:%s",tostring(freeTime))
|
str=string.format("今日剩余免费次数:%s",tostring(freeTime))
|
||||||
|
|
Loading…
Reference in New Issue