[限时抽卡活动] 抽卡优化,奖励展示修改
parent
07582f1918
commit
a7de414589
|
@ -175,7 +175,6 @@ function QianKunBoxBuyTenPanel:OnOpen(...)
|
|||
end)
|
||||
this.views = {}
|
||||
this.itemDataList = itemDataList
|
||||
LogError("item len=="..#itemDataList)
|
||||
local dataNum = #itemDataList > 10 and 10 or #itemDataList
|
||||
for i = dataNum, 1, -1 do
|
||||
Util.ClearChild(this.contentList[i].transform)
|
||||
|
|
|
@ -274,7 +274,6 @@ function TimeLimitUpHero:Recruit(actId,type,itemId)
|
|||
|
||||
--记录妖晶抽卡
|
||||
if itemId==16 then
|
||||
LogError("记录妖晶次数")
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(self.yaojingMaxTimeId,recrutType)--记录妖晶抽卡次数
|
||||
end
|
||||
if type == 1 then
|
||||
|
@ -394,7 +393,7 @@ function TimeLimitUpHero:RefreshNextLevelReward()
|
|||
Util.GetGameObject(self.slider.gameObject,"Text"):GetComponent("Text").text="300/300"
|
||||
self.sliderText.text="奖励已全部领取"
|
||||
Util.AddOnceClick(self.getBtn,function()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecrutReward,self.actType,self.actId)
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecrutReward,self.actType,self.actId,curHeroId)
|
||||
end)
|
||||
else
|
||||
self.slider.gameObject:SetActive(true)
|
||||
|
|
|
@ -45,21 +45,20 @@ function this:OnShow(_parent,...)
|
|||
|
||||
-- local maxtimesId = lotterySetting[singleRecruit.Id].MaxTimes
|
||||
curtimes = OperatingManager.TimeLimitedTimes
|
||||
local wishConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId)
|
||||
if not wishConfig then
|
||||
LogError("")
|
||||
return
|
||||
end
|
||||
local reward=nil
|
||||
for i = 1,#wishConfig.UpList do
|
||||
if wishConfig.UpList[i][1]==heroId then
|
||||
reward=wishConfig.RewardList[i]
|
||||
end
|
||||
end
|
||||
data = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", curActivityId)
|
||||
--替换奖励数据
|
||||
for i = 1, #data do
|
||||
local wishConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId)
|
||||
if wishConfig then
|
||||
LogError("curActivityId=="..curActivityId.." heroId=="..heroId)
|
||||
for i = 1,#wishConfig.UpList do
|
||||
if wishConfig.UpList[i][1]==heroId then
|
||||
reward=wishConfig.RewardList[i]
|
||||
end
|
||||
end
|
||||
--替换奖励数据
|
||||
for i = 1, #data do
|
||||
data[i].Reward[1][1]=reward[i]
|
||||
end
|
||||
end
|
||||
this:RefreshRewarid()
|
||||
this.curtimes.text = "当前已招募次数:" .. curtimes
|
||||
|
|
|
@ -153,6 +153,10 @@ function SingleRecruitPanel:BindEvent()
|
|||
end)
|
||||
--确定按钮
|
||||
Util.AddClick(self.goBtn,function()
|
||||
if recruitType and recruitType[1]==RecruitType.PrayerSingle then
|
||||
self:ClosePanel()
|
||||
return
|
||||
end
|
||||
if state==1 then
|
||||
this.goBtn:SetActive(false)
|
||||
this.againBtn:SetActive(true)
|
||||
|
|
Loading…
Reference in New Issue