再来十次修改提交
parent
e6aad73af4
commit
a21d28fb83
|
|
@ -5,6 +5,8 @@ local this=PokemonSummonTenResultPanel
|
|||
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local gameSetting=ConfigManager.GetConfig(ConfigName.GameSetting)
|
||||
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||
local itemId=0
|
||||
local itemNum=0 --抽卡小号道具数量
|
||||
--活动抽卡类型(动态的数据)
|
||||
local drawtType={
|
||||
|
|
@ -55,20 +57,32 @@ function PokemonSummonTenResultPanel:BindEvent()
|
|||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(this.openTenAgainButton, function ()
|
||||
local maxtimesId=lotterySetting[this.recruitType].MaxTimes
|
||||
local freeTimesId=lotterySetting[this.recruitType].FreeTimes
|
||||
if(BagManager.GetItemCountById(1204)>=10 or BagManager.GetItemCountById(16)>=itemNum) then
|
||||
self:ClosePanel()
|
||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
||||
UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel,msg.drop,this.recruitType)
|
||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
||||
end,freeTimesId)
|
||||
else
|
||||
--UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶
|
||||
PopupTipPanel.ShowTip(Language[11139])
|
||||
self:ClosePanel()
|
||||
local maxTimesId = lotterySetting[this.recruitType].maxTimesId
|
||||
local freeTimesId = lotterySetting[this.recruitType].FreeTimesId
|
||||
--是否超过每日最大上限
|
||||
if PrivilegeManager.GetPrivilegeUsedTimes(maxTimesId) + 10 > privilegeConfig[maxTimesId].Condition[1][2] then
|
||||
PopupTipPanel.ShowTip(Language[11760])
|
||||
return
|
||||
end
|
||||
--是否妖晶,是否超过每日妖晶最大上限
|
||||
if itemId == 16 then
|
||||
if PrivilegeManager.GetPrivilegeUsedTimes(2006) + 10 > privilegeConfig[2006].Condition[1][2] then
|
||||
PopupTipPanel.ShowTip("今日妖晶召唤次数不足!")
|
||||
return
|
||||
end
|
||||
end
|
||||
if BagManager.GetItemCountById(itemId) < itemNum then
|
||||
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
|
||||
return
|
||||
end
|
||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
||||
if itemId == 16 then
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(2006,10)--记录妖晶抽卡次数
|
||||
end
|
||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop)
|
||||
--CheckRedPointStatus(RedPointType.QianKunBox)
|
||||
end,freeTimesId,itemId,itemNum)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -107,8 +121,6 @@ function PokemonSummonTenResultPanel:OnOpen(...)
|
|||
this.content2:SetActive(false)
|
||||
this.content3:SetActive(true)
|
||||
|
||||
|
||||
local itemId=0
|
||||
local d
|
||||
d=RecruitManager.GetExpendData(this.recruitType)
|
||||
itemId=d[1]
|
||||
|
|
|
|||
Loading…
Reference in New Issue