再来一次界面修改提交
parent
7bfec03778
commit
1ef09a42f5
|
|
@ -10,6 +10,10 @@ local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||||
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
local itemNum=0 --抽卡小号道具数量
|
local itemNum=0 --抽卡小号道具数量
|
||||||
local isFree=false
|
local isFree=false
|
||||||
|
local itemid = 0
|
||||||
|
local itemnum = 0
|
||||||
|
local RecruitMaxtimesId = 0
|
||||||
|
local freeTimesId = 0
|
||||||
--活动抽卡类型(动态的数据)
|
--活动抽卡类型(动态的数据)
|
||||||
local drawtType={
|
local drawtType={
|
||||||
FindFairySingle=0,
|
FindFairySingle=0,
|
||||||
|
|
@ -50,20 +54,32 @@ function PokemonSummonOneResultPanel:BindEvent()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.openOneAgainButton, function ()
|
Util.AddClick(this.openOneAgainButton, function ()
|
||||||
local maxtimesId=lotterySetting[this.recruitType].MaxTimes
|
--是否超过每日最大上限
|
||||||
local freeTimesId=lotterySetting[this.recruitType].FreeTimes
|
if PrivilegeManager.GetPrivilegeUsedTimes(RecruitMaxtimesId) + 1 > privilegeConfig[RecruitMaxtimesId].Condition[1][2] then
|
||||||
if(isFree or BagManager.GetItemCountById(1204)>=1 or BagManager.GetItemCountById(16)>=itemNum) then
|
PopupTipPanel.ShowTip(Language[11760])
|
||||||
self:ClosePanel()
|
return
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
|
||||||
UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel,msg.drop,this.recruitType)
|
|
||||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
|
||||||
end,freeTimesId)
|
|
||||||
else
|
|
||||||
--UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶
|
|
||||||
PopupTipPanel.ShowTip(Language[11139])
|
|
||||||
self:ClosePanel()
|
|
||||||
end
|
end
|
||||||
|
--是否妖晶,是否超过每日妖晶最大上限
|
||||||
|
if itemid == 16 then
|
||||||
|
if PrivilegeManager.GetPrivilegeUsedTimes(2006) + 1 > privilegeConfig[2006].Condition[1][2] then
|
||||||
|
PopupTipPanel.ShowTip("今日妖晶召唤次数不足!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not isFree then
|
||||||
|
if BagManager.GetItemCountById(itemid) < itemNum then
|
||||||
|
PopupTipPanel.ShowTip(ItemConfig[itemid].Name..Language[10492])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
|
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,1)--记录抽卡次数
|
||||||
|
if itemid == 16 then
|
||||||
|
PrivilegeManager.RefreshPrivilegeUsedTimes(2006,1)--记录妖晶抽卡次数
|
||||||
|
end
|
||||||
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop)
|
||||||
|
--CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
|
end,freeTimesId,itemid,itemNum)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -96,18 +112,21 @@ function PokemonSummonOneResultPanel:OnOpen(...)
|
||||||
this.content3:SetActive(true)
|
this.content3:SetActive(true)
|
||||||
local itemId=0
|
local itemId=0
|
||||||
local d
|
local d
|
||||||
|
|
||||||
d = RecruitManager.GetExpendData(this.recruitType)
|
d = RecruitManager.GetExpendData(this.recruitType)
|
||||||
itemId=d[1]
|
itemId=d[1]
|
||||||
itemNum=d[2]
|
itemNum=d[2]
|
||||||
this.itemIcon3.sprite=Util.LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
|
this.itemIcon3.sprite=Util.LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
|
||||||
--是否激活特权
|
--是否激活特权
|
||||||
local isActive = PrivilegeManager.GetPrivilegeOpenStatusById(3004)
|
local isActive = PrivilegeManager.GetPrivilegeOpenStatusById(3004)
|
||||||
if itemNum>10 and isActive then
|
if itemId == 16 and isActive then
|
||||||
itemNum=itemNum*(1+currPrivilege.Condition[1][2]/10000)
|
itemNum=itemNum*(1+currPrivilege.Condition[1][2]/10000)
|
||||||
end
|
end
|
||||||
|
|
||||||
--获取免费次数
|
--获取免费次数
|
||||||
local currLottery= ConfigManager.GetConfigData(ConfigName.LotterySetting,42)
|
local currLottery= ConfigManager.GetConfigData(ConfigName.LotterySetting,42)
|
||||||
local freeTimesId=currLottery.FreeTimes
|
freeTimesId=currLottery.FreeTimes
|
||||||
|
RecruitMaxtimesId = currLottery.MaxTimes
|
||||||
local freeTime=0
|
local freeTime=0
|
||||||
if freeTimesId>0 then
|
if freeTimesId>0 then
|
||||||
freeTime= PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
|
freeTime= PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
|
||||||
|
|
@ -128,9 +147,9 @@ function PokemonSummonOneResultPanel:OnOpen(...)
|
||||||
this.itemDataList={}
|
this.itemDataList={}
|
||||||
this.itemDataList=BagManager.GetTableByBackDropData(this.drop)
|
this.itemDataList=BagManager.GetTableByBackDropData(this.drop)
|
||||||
--抽奖赠送物品
|
--抽奖赠送物品
|
||||||
local tenConfig=lotterySetting[42]
|
local tenConfig=lotterySetting[RecruitType.LingShowSingle]
|
||||||
local id=0
|
itemid=0
|
||||||
local num=0
|
itemnum=0
|
||||||
local ishave=false
|
local ishave=false
|
||||||
if tenConfig then
|
if tenConfig then
|
||||||
id=tenConfig.TenTimesMustGetItem[1][1]
|
id=tenConfig.TenTimesMustGetItem[1][1]
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@ function PokemonSummonPanel:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,fr
|
||||||
else
|
else
|
||||||
num = 10
|
num = 10
|
||||||
end
|
end
|
||||||
|
|
||||||
--是否超过每日最大上限
|
--是否超过每日最大上限
|
||||||
if PrivilegeManager.GetPrivilegeUsedTimes(RecruitMaxtimesId) + num > privilegeConfig[RecruitMaxtimesId].Condition[1][2] then
|
if PrivilegeManager.GetPrivilegeUsedTimes(RecruitMaxtimesId) + num > privilegeConfig[RecruitMaxtimesId].Condition[1][2] then
|
||||||
PopupTipPanel.ShowTip(Language[11760])
|
PopupTipPanel.ShowTip(Language[11760])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue