[限时抽卡活动] 抽卡优化,奖励展示修改

dev_chengFeng
wangzhenxing 2021-05-29 18:27:03 +08:00
parent 07582f1918
commit a7de414589
4 changed files with 16 additions and 15 deletions

View File

@ -175,7 +175,6 @@ function QianKunBoxBuyTenPanel:OnOpen(...)
end) end)
this.views = {} this.views = {}
this.itemDataList = itemDataList this.itemDataList = itemDataList
LogError("item len=="..#itemDataList)
local dataNum = #itemDataList > 10 and 10 or #itemDataList local dataNum = #itemDataList > 10 and 10 or #itemDataList
for i = dataNum, 1, -1 do for i = dataNum, 1, -1 do
Util.ClearChild(this.contentList[i].transform) Util.ClearChild(this.contentList[i].transform)

View File

@ -274,7 +274,6 @@ function TimeLimitUpHero:Recruit(actId,type,itemId)
--记录妖晶抽卡 --记录妖晶抽卡
if itemId==16 then if itemId==16 then
LogError("记录妖晶次数")
PrivilegeManager.RefreshPrivilegeUsedTimes(self.yaojingMaxTimeId,recrutType)--记录妖晶抽卡次数 PrivilegeManager.RefreshPrivilegeUsedTimes(self.yaojingMaxTimeId,recrutType)--记录妖晶抽卡次数
end end
if type == 1 then if type == 1 then
@ -394,7 +393,7 @@ function TimeLimitUpHero:RefreshNextLevelReward()
Util.GetGameObject(self.slider.gameObject,"Text"):GetComponent("Text").text="300/300" Util.GetGameObject(self.slider.gameObject,"Text"):GetComponent("Text").text="300/300"
self.sliderText.text="奖励已全部领取" self.sliderText.text="奖励已全部领取"
Util.AddOnceClick(self.getBtn,function() 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) end)
else else
self.slider.gameObject:SetActive(true) self.slider.gameObject:SetActive(true)

View File

@ -45,21 +45,20 @@ function this:OnShow(_parent,...)
-- local maxtimesId = lotterySetting[singleRecruit.Id].MaxTimes -- local maxtimesId = lotterySetting[singleRecruit.Id].MaxTimes
curtimes = OperatingManager.TimeLimitedTimes curtimes = OperatingManager.TimeLimitedTimes
local wishConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId)
if not wishConfig then
LogError("")
return
end
local reward=nil 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) data = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", curActivityId)
--替换奖励数据 local wishConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId)
for i = 1, #data do 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] data[i].Reward[1][1]=reward[i]
end
end end
this:RefreshRewarid() this:RefreshRewarid()
this.curtimes.text = "当前已招募次数:" .. curtimes this.curtimes.text = "当前已招募次数:" .. curtimes

View File

@ -153,6 +153,10 @@ function SingleRecruitPanel:BindEvent()
end) end)
--确定按钮 --确定按钮
Util.AddClick(self.goBtn,function() Util.AddClick(self.goBtn,function()
if recruitType and recruitType[1]==RecruitType.PrayerSingle then
self:ClosePanel()
return
end
if state==1 then if state==1 then
this.goBtn:SetActive(false) this.goBtn:SetActive(false)
this.againBtn:SetActive(true) this.againBtn:SetActive(true)