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