【抽卡提示】六个抽卡分别加上妖晶提示
parent
5137e588dc
commit
73aeaf3d89
|
@ -1943,16 +1943,25 @@ RecruitType = {
|
||||||
Ten = 11, --钻石招募十连(神将召唤)
|
Ten = 11, --钻石招募十连(神将召唤)
|
||||||
Single = 12, --钻石招募单抽(神将召唤)
|
Single = 12, --钻石招募单抽(神将召唤)
|
||||||
|
|
||||||
TimeLimitTen=14, --限时招募十连
|
|
||||||
QianKunBoxTen=16, --乾坤宝囊十连
|
QianKunBoxTen=16, --乾坤宝囊十连
|
||||||
|
QianKunBoxSingle=17, --乾坤宝盒单抽
|
||||||
FriendTen=23, --友情招募 多次
|
FriendTen=23, --友情招募 多次
|
||||||
FriendSingle=24, --友情招募 单次
|
FriendSingle=24, --友情招募 单次
|
||||||
NormalTen=25, --普通招募 多次
|
NormalTen=25, --普通招募 多次
|
||||||
NormalSingle=26, --普通招募 单次
|
NormalSingle=26, --普通招募 单次
|
||||||
RecruitBox=27,--仙缘招募
|
RecruitBox=27,--仙缘招募
|
||||||
|
|
||||||
LingShowSingle = 42, --零售单抽
|
LingShowSingle = 42, --灵兽单抽
|
||||||
LingShowTen = 43, --零售十连
|
LingShowTen = 43, --灵兽十连
|
||||||
|
|
||||||
|
TimeLimitSingle = 44, --限时召唤单抽
|
||||||
|
TimeLimitTen = 45, --限时召唤十连
|
||||||
|
|
||||||
|
BaoGeSingle = 46, --灵兽宝阁单抽
|
||||||
|
BaoGeTen = 47, --灵兽宝阁十连
|
||||||
|
|
||||||
|
XiangYaoSingle = 48, --降妖夺宝单抽
|
||||||
|
XiangYaoTen = 49, --降妖夺宝十连
|
||||||
}
|
}
|
||||||
ItemBaseType = {
|
ItemBaseType = {
|
||||||
Special = 1, --特殊
|
Special = 1, --特殊
|
||||||
|
|
|
@ -216,22 +216,22 @@ function LingShouBaoGe:refreshBtnShow()
|
||||||
end
|
end
|
||||||
|
|
||||||
Util.AddOnceClick(btn,function()
|
Util.AddOnceClick(btn,function()
|
||||||
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen)
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.BaoGeTen)
|
||||||
if n == bType.Btn1 then
|
if n == bType.Btn1 then
|
||||||
if isFree then
|
if isFree then
|
||||||
self:Recruit(type,maxtimesId,0,0,state,freeTimesId)
|
self:Recruit(type,maxtimesId,0,0,state,freeTimesId,{RecruitType.BaoGeSingle,RecruitType.LingShowTen})
|
||||||
else
|
else
|
||||||
self:Recruit(type,maxtimesId,itemId,itemNum,state,freeTimesId)
|
self:Recruit(type,maxtimesId,itemId,itemNum,state,freeTimesId,{RecruitType.BaoGeSingle,RecruitType.LingShowTen})
|
||||||
end
|
end
|
||||||
elseif n==bType.Btn10 then
|
elseif n==bType.Btn10 then
|
||||||
self:Recruit(type,maxtimesId,itemId,itemNum,state,freeTimesId)
|
self:Recruit(type,maxtimesId,itemId,itemNum,state,freeTimesId,{RecruitType.BaoGeTen,RecruitType.BaoGeTen})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function LingShouBaoGe:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTimesId)
|
function LingShouBaoGe:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTimesId,recruitType)
|
||||||
local generalType = id%2 == 0 and RecruitType.LingShowSingle or RecruitType.LingShowTen
|
local generalType = id%2 == 0 and RecruitType.BaoGeSingle or RecruitType.BaoGeTen
|
||||||
local num = id%2 == 0 and 1 or 10
|
local num = id%2 == 0 and 1 or 10
|
||||||
--是否超过每日最大上限
|
--是否超过每日最大上限
|
||||||
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < num then
|
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < num then
|
||||||
|
@ -249,7 +249,7 @@ function LingShouBaoGe:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTim
|
||||||
function()
|
function()
|
||||||
RecruitManager.RecruitRequest(id,function(msg)
|
RecruitManager.RecruitRequest(id,function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,num)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,num)
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,activityId,function ()
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,activityId,recruitType,function ()
|
||||||
this:Refresh()
|
this:Refresh()
|
||||||
end)
|
end)
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
|
@ -257,7 +257,7 @@ function LingShouBaoGe:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTim
|
||||||
else
|
else
|
||||||
RecruitManager.RecruitRequest(id, function(msg)
|
RecruitManager.RecruitRequest(id, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,num)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,num)
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,activityId,function ()
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,activityId,recruitType,function ()
|
||||||
this:Refresh()
|
this:Refresh()
|
||||||
end)
|
end)
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
|
|
|
@ -13,6 +13,7 @@ local freeTimesId = 0
|
||||||
local activityId = nil
|
local activityId = nil
|
||||||
local singleRecruit = nil
|
local singleRecruit = nil
|
||||||
local tenRecruit = nil
|
local tenRecruit = nil
|
||||||
|
local recType={}
|
||||||
--活动抽卡类型(动态的数据)
|
--活动抽卡类型(动态的数据)
|
||||||
local drawtType={
|
local drawtType={
|
||||||
FindFairySingle=0,
|
FindFairySingle=0,
|
||||||
|
@ -46,6 +47,7 @@ function LingShouBaoGeOneResultPanel:BindEvent()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.openOneAgainButton, function ()
|
Util.AddClick(this.openOneAgainButton, function ()
|
||||||
--是否超过每日最大上限
|
--是否超过每日最大上限
|
||||||
|
local d=RecruitManager.GetExpendData(this.recruitType)
|
||||||
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < 1 then
|
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < 1 then
|
||||||
PopupTipPanel.ShowTip(Language[11760])
|
PopupTipPanel.ShowTip(Language[11760])
|
||||||
return
|
return
|
||||||
|
@ -56,10 +58,18 @@ function LingShouBaoGeOneResultPanel:BindEvent()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local recruitOne = function()
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,1)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,1)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,activityId)
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,activityId,recType)
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
|
end
|
||||||
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recType[2])
|
||||||
|
if state==0 and d[1] == 16 then
|
||||||
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,this.recruitType,recruitOne)
|
||||||
|
else
|
||||||
|
recruitOne()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -87,6 +97,7 @@ function LingShouBaoGeOneResultPanel:OnOpen(...)
|
||||||
this.drop=args[1]
|
this.drop=args[1]
|
||||||
this.recruitType = args[2]
|
this.recruitType = args[2]
|
||||||
activityId = args[3]
|
activityId = args[3]
|
||||||
|
recType = args[4]
|
||||||
this.detailImage:SetActive(false)
|
this.detailImage:SetActive(false)
|
||||||
this.content3:SetActive(true)
|
this.content3:SetActive(true)
|
||||||
--获取免费次数
|
--获取免费次数
|
||||||
|
|
|
@ -8,6 +8,7 @@ local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||||
local itemId=0
|
local itemId=0
|
||||||
local itemNum=0 --抽卡小号道具数量
|
local itemNum=0 --抽卡小号道具数量
|
||||||
|
local recType={}
|
||||||
|
|
||||||
local activityId = nil
|
local activityId = nil
|
||||||
local singleRecruit = nil
|
local singleRecruit = nil
|
||||||
|
@ -55,6 +56,7 @@ function LingShouBaoGeTenResultPanel:BindEvent()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.openTenAgainButton, function ()
|
Util.AddClick(this.openTenAgainButton, function ()
|
||||||
|
local d=RecruitManager.GetExpendData(this.recruitType)
|
||||||
local maxTimesId = lotterySetting[singleRecruit.Id].MaxTimes
|
local maxTimesId = lotterySetting[singleRecruit.Id].MaxTimes
|
||||||
local freeTimesId = lotterySetting[singleRecruit.Id].FreeTimes
|
local freeTimesId = lotterySetting[singleRecruit.Id].FreeTimes
|
||||||
--是否超过每日最大上限
|
--是否超过每日最大上限
|
||||||
|
@ -67,10 +69,18 @@ function LingShouBaoGeTenResultPanel:BindEvent()
|
||||||
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
|
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local recruitTen = function()
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,activityId)
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,activityId,recType)
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
|
end
|
||||||
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recType[2])
|
||||||
|
if state==0 and d[1] == 16 then
|
||||||
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,this.recruitType,recruitTen)
|
||||||
|
else
|
||||||
|
recruitTen()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -105,6 +115,7 @@ function LingShouBaoGeTenResultPanel:OnOpen(...)
|
||||||
this.drop=args[1]
|
this.drop=args[1]
|
||||||
this.recruitType = args[2]
|
this.recruitType = args[2]
|
||||||
activityId = args[3]
|
activityId = args[3]
|
||||||
|
recType = args[4]
|
||||||
this.detailImage:SetActive(false)
|
this.detailImage:SetActive(false)
|
||||||
this.content1:SetActive(false)
|
this.content1:SetActive(false)
|
||||||
this.content2:SetActive(false)
|
this.content2:SetActive(false)
|
||||||
|
|
|
@ -179,7 +179,7 @@ function QianKunBox:refreshBtnShow()
|
||||||
local recruitOne = function()
|
local recruitOne = function()
|
||||||
RecruitManager.RecruitRequest(singleRecruit.Id, function(msg)
|
RecruitManager.RecruitRequest(singleRecruit.Id, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel, msg.drop,singleRecruit.Id)
|
UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel, msg.drop,singleRecruit.Id,{RecruitType.QianKunBoxSingle,RecruitType.QianKunBoxTen})
|
||||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
end
|
end
|
||||||
|
@ -196,7 +196,7 @@ function QianKunBox:refreshBtnShow()
|
||||||
local recruitTen = function()
|
local recruitTen = function()
|
||||||
RecruitManager.RecruitRequest(tenRecruit.Id, function(msg)
|
RecruitManager.RecruitRequest(tenRecruit.Id, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel, msg.drop,tenRecruit.Id)
|
UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel, msg.drop,tenRecruit.Id,{RecruitType.QianKunBoxTen,RecruitType.QianKunBoxTen})
|
||||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ local iconsData = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotteryRewardC
|
||||||
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||||
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
|
local recType = {}
|
||||||
|
|
||||||
--活动抽卡类型(动态的数据)
|
--活动抽卡类型(动态的数据)
|
||||||
local drawtType={
|
local drawtType={
|
||||||
|
@ -54,15 +55,24 @@ function QianKunBoxBuyOnePanel:BindEvent()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.openOneAgainButton, function ()
|
Util.AddClick(this.openOneAgainButton, function ()
|
||||||
|
local d=RecruitManager.GetExpendData(this.recruitType)
|
||||||
local maxtimesId=lotterySetting[this.recruitType].MaxTimes
|
local maxtimesId=lotterySetting[this.recruitType].MaxTimes
|
||||||
local freeTimesId=lotterySetting[this.recruitType].FreeTimes
|
local freeTimesId=lotterySetting[this.recruitType].FreeTimes
|
||||||
if(BagManager.GetItemCountById(1002)>=1 or BagManager.GetItemCountById(16)>=200) then
|
if(BagManager.GetItemCountById(1002)>=1 or BagManager.GetItemCountById(16)>=200) then
|
||||||
|
local recruitOne = function()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel,msg.drop,this.recruitType)
|
UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel,msg.drop,this.recruitType,recType)
|
||||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
|
end
|
||||||
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recType[2])
|
||||||
|
if state==0 and d[1] == 16 then
|
||||||
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,this.recruitType,recruitOne)
|
||||||
|
else
|
||||||
|
recruitOne()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
--UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶
|
--UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶
|
||||||
PopupTipPanel.ShowTip(Language[11139])
|
PopupTipPanel.ShowTip(Language[11139])
|
||||||
|
@ -95,6 +105,7 @@ function QianKunBoxBuyOnePanel:OnOpen(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
this.drop=args[1]
|
this.drop=args[1]
|
||||||
this.recruitType = args[2]
|
this.recruitType = args[2]
|
||||||
|
recType = args[3]
|
||||||
this.detailImage:SetActive(true)
|
this.detailImage:SetActive(true)
|
||||||
this.content1:SetActive(false)
|
this.content1:SetActive(false)
|
||||||
this.content2:SetActive(false)
|
this.content2:SetActive(false)
|
||||||
|
|
|
@ -6,6 +6,7 @@ local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
local gameSetting=ConfigManager.GetConfig(ConfigName.GameSetting)
|
local gameSetting=ConfigManager.GetConfig(ConfigName.GameSetting)
|
||||||
local lotterySetting = ConfigManager.GetConfig(ConfigName.LotterySetting)
|
local lotterySetting = ConfigManager.GetConfig(ConfigName.LotterySetting)
|
||||||
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
|
local recType = {}
|
||||||
|
|
||||||
--活动抽卡类型(动态的数据)
|
--活动抽卡类型(动态的数据)
|
||||||
local drawtType={
|
local drawtType={
|
||||||
|
@ -64,15 +65,24 @@ function QianKunBoxBuyTenPanel:BindEvent()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.openTenAgainButton, function ()
|
Util.AddClick(this.openTenAgainButton, function ()
|
||||||
|
local d=RecruitManager.GetExpendData(this.recruitType)
|
||||||
local maxtimesId=lotterySetting[this.recruitType].MaxTimes
|
local maxtimesId=lotterySetting[this.recruitType].MaxTimes
|
||||||
local freeTimesId=lotterySetting[this.recruitType].FreeTimes
|
local freeTimesId=lotterySetting[this.recruitType].FreeTimes
|
||||||
if(BagManager.GetItemCountById(1003)>=10 or BagManager.GetItemCountById(16>=2000)) then
|
if(BagManager.GetItemCountById(1003)>=10 or BagManager.GetItemCountById(16>=2000)) then
|
||||||
|
local recruitTen = function()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel,msg.drop,this.recruitType)
|
UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel,msg.drop,this.recruitType,recType)
|
||||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
|
end
|
||||||
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recType[2])
|
||||||
|
if state==0 and d[1] == 16 then
|
||||||
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,this.recruitType,recruitTen)
|
||||||
|
else
|
||||||
|
recruitTen()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
--UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶
|
--UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.DemonCrystal })--应跳到充值界面,现在是用之前的货币换取妖晶
|
||||||
PopupTipPanel.ShowTip(Language[11139])
|
PopupTipPanel.ShowTip(Language[11139])
|
||||||
|
@ -111,6 +121,7 @@ function QianKunBoxBuyTenPanel:OnOpen(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
this.drop=args[1]
|
this.drop=args[1]
|
||||||
this.recruitType = args[2]
|
this.recruitType = args[2]
|
||||||
|
recType = args[3]
|
||||||
|
|
||||||
this.detailImage:SetActive(true)
|
this.detailImage:SetActive(true)
|
||||||
this.content1:SetActive(false)
|
this.content1:SetActive(false)
|
||||||
|
|
|
@ -467,7 +467,7 @@ function TimeLimitedCall:RefreshGetHeroTimes()
|
||||||
local recruitOne = function()
|
local recruitOne = function()
|
||||||
RecruitManager.RecruitRequest(singleRecruit.Id, function(msg)
|
RecruitManager.RecruitRequest(singleRecruit.Id, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],singleRecruit.Id,bType.Btn1)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],singleRecruit.Id,bType.Btn1,{RecruitType.TimeLimitSingle,RecruitType.TimeLimitTen})
|
||||||
CheckRedPointStatus(RedPointType.TimeLimited)
|
CheckRedPointStatus(RedPointType.TimeLimited)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
end
|
end
|
||||||
|
@ -485,7 +485,7 @@ function TimeLimitedCall:RefreshGetHeroTimes()
|
||||||
local recruitTen = function()
|
local recruitTen = function()
|
||||||
RecruitManager.RecruitRequest(tenRecruit.Id, function(msg)
|
RecruitManager.RecruitRequest(tenRecruit.Id, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, tenRecruit.Id,bType.Btn10)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, tenRecruit.Id,bType.Btn10,{RecruitType.TimeLimitTen,RecruitType.TimeLimitTen})
|
||||||
CheckRedPointStatus(RedPointType.TimeLimited)
|
CheckRedPointStatus(RedPointType.TimeLimited)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
end
|
end
|
||||||
|
|
|
@ -201,7 +201,7 @@ function XiangYaoDuoBao:refreshBtnShow()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten)
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.XiangYaoTen)
|
||||||
if n==bType.Btn1 then
|
if n==bType.Btn1 then
|
||||||
if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+1>privilegeConfig[maxtimesId].Condition[1][2] then
|
if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+1>privilegeConfig[maxtimesId].Condition[1][2] then
|
||||||
PopupTipPanel.ShowTip(Language[11760])
|
PopupTipPanel.ShowTip(Language[11760])
|
||||||
|
@ -222,13 +222,13 @@ function XiangYaoDuoBao:refreshBtnShow()
|
||||||
if not isFree and d[1] == 16 then
|
if not isFree and d[1] == 16 then
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(singleRecruit.MoneyTimes,1)--记录妖晶抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(singleRecruit.MoneyTimes,1)--记录妖晶抽卡次数
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],singleRecruit.Id,bType.Btn1)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],singleRecruit.Id,bType.Btn1,{RecruitType.XiangYaoSingle,RecruitType.XiangYaoTen})
|
||||||
CheckRedPointStatus(RedPointType.XiangYaoDuoBao)
|
CheckRedPointStatus(RedPointType.XiangYaoDuoBao)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
end,1.2):Start()
|
end,1.2):Start()
|
||||||
end
|
end
|
||||||
if state==0 and d[1] == 16 and not isFree then
|
if state==0 and d[1] == 16 and not isFree then
|
||||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Single,recruitOne)
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.XiangYaoSingle,recruitOne)
|
||||||
else
|
else
|
||||||
recruitOne()
|
recruitOne()
|
||||||
end
|
end
|
||||||
|
@ -253,13 +253,13 @@ function XiangYaoDuoBao:refreshBtnShow()
|
||||||
if d[1] == 16 then
|
if d[1] == 16 then
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(singleRecruit.MoneyTimes,10)--记录妖晶抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(singleRecruit.MoneyTimes,10)--记录妖晶抽卡次数
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero,tenRecruit.Id,bType.Btn10)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero,tenRecruit.Id,bType.Btn10,{RecruitType.XiangYaoTen,RecruitType.XiangYaoTen})
|
||||||
CheckRedPointStatus(RedPointType.XiangYaoDuoBao)
|
CheckRedPointStatus(RedPointType.XiangYaoDuoBao)
|
||||||
end,freeTimesId)
|
end,freeTimesId)
|
||||||
end,1.2):Start()
|
end,1.2):Start()
|
||||||
end
|
end
|
||||||
if state==0 and d[1] ==16 and not isFree then
|
if state==0 and d[1] ==16 and not isFree then
|
||||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Ten,recruitTen)
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.XiangYaoTen,recruitTen)
|
||||||
else
|
else
|
||||||
recruitTen()
|
recruitTen()
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,6 +15,7 @@ local timeNum3--第三个特效等待播放的时间
|
||||||
local type --抽卡类型
|
local type --抽卡类型
|
||||||
local index=0 --十连抽索引
|
local index=0 --十连抽索引
|
||||||
local activityId--活动id
|
local activityId--活动id
|
||||||
|
local recType = {}
|
||||||
|
|
||||||
local orginLayer
|
local orginLayer
|
||||||
local heroStaticData
|
local heroStaticData
|
||||||
|
@ -77,6 +78,7 @@ function PokemonSingleResultPanel:OnOpen(...)
|
||||||
type = args[1]
|
type = args[1]
|
||||||
drop = args[2]
|
drop = args[2]
|
||||||
activityId = args[3]
|
activityId = args[3]
|
||||||
|
recType = args[4]
|
||||||
_heroTable = drop.pokemon
|
_heroTable = drop.pokemon
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -142,16 +144,16 @@ function PokemonSingleResultPanel:OnClose()
|
||||||
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
|
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
|
||||||
singleRecruit = array[1]
|
singleRecruit = array[1]
|
||||||
if type == singleRecruit.Id then
|
if type == singleRecruit.Id then
|
||||||
UIManager.OpenPanel(UIName.LingShouBaoGeOneResultPanel, drop,type,activityId)
|
UIManager.OpenPanel(UIName.LingShouBaoGeOneResultPanel, drop,type,activityId,recType)
|
||||||
else
|
else
|
||||||
UIManager.OpenPanel(UIName.LingShouBaoGeTenResultPanel, drop,type,activityId)
|
UIManager.OpenPanel(UIName.LingShouBaoGeTenResultPanel, drop,type,activityId,recType)
|
||||||
end
|
end
|
||||||
|
|
||||||
else--灵兽山抽卡
|
else--灵兽山抽卡
|
||||||
if type == RecruitType.LingShowSingle then
|
if type == RecruitType.LingShowSingle then
|
||||||
UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel, drop,type)
|
UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel, drop,type,recType)
|
||||||
else
|
else
|
||||||
UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel, drop,type)
|
UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel, drop,type,recType)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ local isFree=false
|
||||||
local itemId = 0
|
local itemId = 0
|
||||||
local RecruitMaxtimesId = 0
|
local RecruitMaxtimesId = 0
|
||||||
local freeTimesId = 0
|
local freeTimesId = 0
|
||||||
|
local recType = {}
|
||||||
--活动抽卡类型(动态的数据)
|
--活动抽卡类型(动态的数据)
|
||||||
local drawtType={
|
local drawtType={
|
||||||
FindFairySingle=0,
|
FindFairySingle=0,
|
||||||
|
@ -45,6 +46,7 @@ function PokemonSummonOneResultPanel:BindEvent()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.openOneAgainButton, function ()
|
Util.AddClick(this.openOneAgainButton, function ()
|
||||||
--是否超过每日最大上限
|
--是否超过每日最大上限
|
||||||
|
local d=RecruitManager.GetExpendData(this.recruitType)
|
||||||
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < 1 then
|
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < 1 then
|
||||||
PopupTipPanel.ShowTip(Language[11760])
|
PopupTipPanel.ShowTip(Language[11760])
|
||||||
return
|
return
|
||||||
|
@ -62,14 +64,23 @@ function PokemonSummonOneResultPanel:BindEvent()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local recruitOne = function()
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,1)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,1)--记录抽卡次数
|
||||||
if itemId == 16 and not isFree then
|
if itemId == 16 and not isFree then
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,1)--记录妖晶抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,1)--记录妖晶抽卡次数
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop)
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,nil,recType)
|
||||||
--CheckRedPointStatus(RedPointType.QianKunBox)
|
--CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
|
end
|
||||||
|
|
||||||
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recType[2])
|
||||||
|
if state==0 and d[1] == 16 and not isFree then
|
||||||
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,this.recruitType,recruitOne,itemNum)
|
||||||
|
else
|
||||||
|
recruitOne()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -96,6 +107,7 @@ function PokemonSummonOneResultPanel:OnOpen(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
this.drop=args[1]
|
this.drop=args[1]
|
||||||
this.recruitType = args[2]
|
this.recruitType = args[2]
|
||||||
|
recType = args[3]
|
||||||
this.detailImage:SetActive(true)
|
this.detailImage:SetActive(true)
|
||||||
this.content3:SetActive(true)
|
this.content3:SetActive(true)
|
||||||
--获取免费次数
|
--获取免费次数
|
||||||
|
|
|
@ -150,18 +150,18 @@ function PokemonSummonPanel:refreshBtnShow()
|
||||||
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen)
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen)
|
||||||
if n == bType.Btn1 then
|
if n == bType.Btn1 then
|
||||||
if isFree then
|
if isFree then
|
||||||
self:Recruit(RecruitType.LingShowSingle,maxtimesId,0,0,state,freeTimesId)
|
self:Recruit(RecruitType.LingShowSingle,maxtimesId,0,0,state,freeTimesId,{RecruitType.LingShowSingle,RecruitType.LingShowTen})
|
||||||
else
|
else
|
||||||
self:Recruit(RecruitType.LingShowSingle,maxtimesId,itemId,itemNum,state,freeTimesId)
|
self:Recruit(RecruitType.LingShowSingle,maxtimesId,itemId,itemNum,state,freeTimesId,{RecruitType.LingShowSingle,RecruitType.LingShowTen})
|
||||||
end
|
end
|
||||||
elseif n==bType.Btn10 then
|
elseif n==bType.Btn10 then
|
||||||
self:Recruit(RecruitType.LingShowTen,maxtimesId,itemId,itemNum,state,freeTimesId)
|
self:Recruit(RecruitType.LingShowTen,maxtimesId,itemId,itemNum,state,freeTimesId,{RecruitType.LingShowTen,RecruitType.LingShowTen})
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function PokemonSummonPanel:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTimesId)
|
function PokemonSummonPanel:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTimesId,recruitType)
|
||||||
local num = 0
|
local num = 0
|
||||||
if id == RecruitType.LingShowSingle then
|
if id == RecruitType.LingShowSingle then
|
||||||
num = 1
|
num = 1
|
||||||
|
@ -201,8 +201,7 @@ function PokemonSummonPanel:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,fr
|
||||||
self.changZhuEffect:SetActive(true)
|
self.changZhuEffect:SetActive(true)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,num)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,num)--记录抽卡次数
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,num)--记录妖晶抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,num)--记录妖晶抽卡次数
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop)
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,nil,recruitType)
|
||||||
--CheckRedPointStatus(RedPointType.QianKunBox)
|
|
||||||
end,1.2):Start()
|
end,1.2):Start()
|
||||||
end,
|
end,
|
||||||
freeTimesId,itemId,itemNum)
|
freeTimesId,itemId,itemNum)
|
||||||
|
@ -221,9 +220,8 @@ function PokemonSummonPanel:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,fr
|
||||||
if itemId == 16 then
|
if itemId == 16 then
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,num)--记录妖晶抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,num)--记录妖晶抽卡次数
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop)
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,nil,recruitType)
|
||||||
end,1.2):Start()
|
end,1.2):Start()
|
||||||
--CheckRedPointStatus(RedPointType.QianKunBox)
|
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||||
local itemId=0
|
local itemId=0
|
||||||
local itemNum=0 --抽卡小号道具数量
|
local itemNum=0 --抽卡小号道具数量
|
||||||
|
local recType = {}
|
||||||
--活动抽卡类型(动态的数据)
|
--活动抽卡类型(动态的数据)
|
||||||
-- local drawtType={
|
-- local drawtType={
|
||||||
-- FindFairySingle=0,
|
-- FindFairySingle=0,
|
||||||
|
@ -64,6 +65,7 @@ function PokemonSummonTenResultPanel:BindEvent()
|
||||||
local maxTimesId = lotterySetting[RecruitType.LingShowSingle].MaxTimes
|
local maxTimesId = lotterySetting[RecruitType.LingShowSingle].MaxTimes
|
||||||
local freeTimesId = lotterySetting[RecruitType.LingShowSingle].FreeTimes
|
local freeTimesId = lotterySetting[RecruitType.LingShowSingle].FreeTimes
|
||||||
--是否超过每日最大上限
|
--是否超过每日最大上限
|
||||||
|
local d=RecruitManager.GetExpendData(this.recruitType)
|
||||||
if PrivilegeManager.GetPrivilegeRemainValue(maxTimesId) < 10 then
|
if PrivilegeManager.GetPrivilegeRemainValue(maxTimesId) < 10 then
|
||||||
LogGreen("maxTimesId:"..maxTimesId.." times:"..PrivilegeManager.GetPrivilegeRemainValue(maxTimesId))
|
LogGreen("maxTimesId:"..maxTimesId.." times:"..PrivilegeManager.GetPrivilegeRemainValue(maxTimesId))
|
||||||
PopupTipPanel.ShowTip(Language[11760])
|
PopupTipPanel.ShowTip(Language[11760])
|
||||||
|
@ -81,14 +83,22 @@ function PokemonSummonTenResultPanel:BindEvent()
|
||||||
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
|
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local recruitTen = function()
|
||||||
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
RecruitManager.RecruitRequest(this.recruitType, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
||||||
if itemId == 16 then
|
if itemId == 16 then
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,10)--记录妖晶抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(YaojingCallPrivilegeId,10)--记录妖晶抽卡次数
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop)
|
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,nil,recType)
|
||||||
--CheckRedPointStatus(RedPointType.QianKunBox)
|
--CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
end,freeTimesId,itemId,itemNum)
|
end,freeTimesId,itemId,itemNum)
|
||||||
|
end
|
||||||
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recType[2])
|
||||||
|
if state==0 and d[1] == 16 then
|
||||||
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,this.recruitType,recruitTen,itemNum)
|
||||||
|
else
|
||||||
|
recruitTen()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -123,6 +133,7 @@ function PokemonSummonTenResultPanel:OnOpen(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
this.drop=args[1]
|
this.drop=args[1]
|
||||||
this.recruitType = args[2]
|
this.recruitType = args[2]
|
||||||
|
recType = args[3]
|
||||||
this.detailImage:SetActive(true)
|
this.detailImage:SetActive(true)
|
||||||
this.content1:SetActive(false)
|
this.content1:SetActive(false)
|
||||||
this.content2:SetActive(false)
|
this.content2:SetActive(false)
|
||||||
|
|
|
@ -44,6 +44,7 @@ function this:OnShow(_parent,...)
|
||||||
this.titleText.text=Language[11351]
|
this.titleText.text=Language[11351]
|
||||||
local go=Util.GetGameObject(this.btn,"Go")
|
local go=Util.GetGameObject(this.btn,"Go")
|
||||||
local var
|
local var
|
||||||
|
--点将台抽卡
|
||||||
if _args[1] == RecruitType.Single then
|
if _args[1] == RecruitType.Single then
|
||||||
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten
|
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten
|
||||||
local d=RecruitManager.GetExpendData(RecruitType.Single)
|
local d=RecruitManager.GetExpendData(RecruitType.Single)
|
||||||
|
@ -52,17 +53,17 @@ function this:OnShow(_parent,...)
|
||||||
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten
|
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten
|
||||||
local d=RecruitManager.GetExpendData(RecruitType.Ten)
|
local d=RecruitManager.GetExpendData(RecruitType.Ten)
|
||||||
this.rootText.text = string.format(Language[12376],d[2])
|
this.rootText.text = string.format(Language[12376],d[2])
|
||||||
|
--灵兽抽卡
|
||||||
elseif _args[1] == RecruitType.LingShowSingle then
|
elseif _args[1] == RecruitType.LingShowSingle then
|
||||||
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen
|
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen
|
||||||
this.rootText.text = string.format("确认花费%s妖晶进行1次灵兽召唤?",_args[3])
|
this.rootText.text = string.format("确认花费%s妖晶进行1次灵兽召唤?",_args[3])
|
||||||
elseif _args[1] == RecruitType.LingShowTen then
|
elseif _args[1] == RecruitType.LingShowTen then
|
||||||
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen
|
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen
|
||||||
this.rootText.text = string.format("确认花费%s妖晶进行10次灵兽召唤?",_args[3])
|
this.rootText.text = string.format("确认花费%s妖晶进行10次灵兽召唤?",_args[3])
|
||||||
else
|
else--在主题活动里面的抽卡
|
||||||
local data = ConfigManager.GetConfigData(ConfigName.LotterySetting,_args[1])
|
local data = ConfigManager.GetConfigData(ConfigName.LotterySetting,_args[1])
|
||||||
local activityData
|
local activityData = ConfigManager.GetConfigData(ConfigName.GlobalActivity,data.ActivityId)
|
||||||
if data.LotteryType == 3 then
|
if data.LotteryType == 3 then--限时招募
|
||||||
activityData = ConfigManager.GetConfigData(ConfigName.GlobalActivity,data.ActivityId)
|
|
||||||
if activityData.Type == ActivityTypeDef.FindFairy then
|
if activityData.Type == ActivityTypeDef.FindFairy then
|
||||||
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.TimeLimitTen
|
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.TimeLimitTen
|
||||||
local d = RecruitManager.GetExpendData(data.Id)
|
local d = RecruitManager.GetExpendData(data.Id)
|
||||||
|
@ -71,7 +72,7 @@ function this:OnShow(_parent,...)
|
||||||
else
|
else
|
||||||
this.rootText.text = string.format(Language[12378],d[2])
|
this.rootText.text = string.format(Language[12378],d[2])
|
||||||
end
|
end
|
||||||
elseif activityData.Type == ActivityTypeDef.QianKunBox then
|
elseif activityData.Type == ActivityTypeDef.QianKunBox then--乾坤宝盒
|
||||||
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen
|
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen
|
||||||
local d=RecruitManager.GetExpendData(data.Id)
|
local d=RecruitManager.GetExpendData(data.Id)
|
||||||
if data.PerCount == 1 then
|
if data.PerCount == 1 then
|
||||||
|
@ -80,6 +81,26 @@ function this:OnShow(_parent,...)
|
||||||
this.rootText.text = string.format(Language[12377],d[2])
|
this.rootText.text = string.format(Language[12377],d[2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif data.LotteryType == 10 then--灵兽宝阁
|
||||||
|
if activityData.Type == ActivityTypeDef.LingShouBaoGe then
|
||||||
|
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.BaoGeTen
|
||||||
|
local d = RecruitManager.GetExpendData(data.Id)
|
||||||
|
if data.PerCount == 1 then
|
||||||
|
this.rootText.text = string.format("确认花费%s妖晶进行1次灵兽召唤?",d[2])
|
||||||
|
else
|
||||||
|
this.rootText.text = string.format("确认花费%s妖晶进行10次灵兽召唤?",d[2])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif data.LotteryType == 11 then--降妖夺宝
|
||||||
|
if activityData.Type == ActivityTypeDef.XiangYaoDuoBao then
|
||||||
|
var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.XiangYaoTen
|
||||||
|
local d = RecruitManager.GetExpendData(data.Id)
|
||||||
|
if data.PerCount == 1 then
|
||||||
|
this.rootText.text = string.format("确认花费%s妖晶进行1次降妖夺宝?",d[2])
|
||||||
|
else
|
||||||
|
this.rootText.text = string.format("确认花费%s妖晶进行10次降妖夺宝?",d[2])
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ function this.UpdatePanelData()
|
||||||
local recruitOne = function()
|
local recruitOne = function()
|
||||||
RecruitManager.RecruitRequest(m.type, function(msg)
|
RecruitManager.RecruitRequest(m.type, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,1)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,1)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],m.type,bType.Btn1)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],m.type,bType.Btn1,{RecruitType.Single,RecruitType.Ten})
|
||||||
end,v.privilegeId)
|
end,v.privilegeId)
|
||||||
end
|
end
|
||||||
if state==0 and d[1] ==16 and not isFree then
|
if state==0 and d[1] ==16 and not isFree then
|
||||||
|
@ -223,7 +223,7 @@ function this.UpdatePanelData()
|
||||||
local recruitTen = function()
|
local recruitTen = function()
|
||||||
RecruitManager.RecruitRequest(m.type, function(msg)
|
RecruitManager.RecruitRequest(m.type, function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, m.type,bType.Btn10)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, m.type,bType.Btn10,{RecruitType.Ten,RecruitType.Ten})
|
||||||
if m.type == 11 then
|
if m.type == 11 then
|
||||||
RecruitManager.isTenRecruit = 1
|
RecruitManager.isTenRecruit = 1
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,6 +15,7 @@ local timeNum2--第二个特效等待播放的时间
|
||||||
local timeNum3--第三个特效等待播放的时间
|
local timeNum3--第三个特效等待播放的时间
|
||||||
local heroData--展示界面需要的单个英雄数据
|
local heroData--展示界面需要的单个英雄数据
|
||||||
local type--抽卡类型
|
local type--抽卡类型
|
||||||
|
local recruitType={}--前端显示用 抽卡类型
|
||||||
local state --1单抽 2多抽
|
local state --1单抽 2多抽
|
||||||
local index=0 --十连抽索引
|
local index=0 --十连抽索引
|
||||||
local orginLayer
|
local orginLayer
|
||||||
|
@ -94,9 +95,9 @@ function SingleRecruitPanel:BindEvent()
|
||||||
end
|
end
|
||||||
end,maxTimesId)
|
end,maxTimesId)
|
||||||
end
|
end
|
||||||
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten)
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recruitType[2])
|
||||||
if state==0 and d[1] == 16 then
|
if state==0 and d[1] == 16 then
|
||||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Single,recruitOne)
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,type,recruitOne)
|
||||||
else
|
else
|
||||||
recruitOne()
|
recruitOne()
|
||||||
end
|
end
|
||||||
|
@ -111,7 +112,7 @@ function SingleRecruitPanel:BindEvent()
|
||||||
Util.AddClick(self.jumpBtn, function()
|
Util.AddClick(self.jumpBtn, function()
|
||||||
isFirst=true
|
isFirst=true
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type)
|
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType)
|
||||||
end)
|
end)
|
||||||
--确定按钮
|
--确定按钮
|
||||||
Util.AddClick(self.goBtn,function()
|
Util.AddClick(self.goBtn,function()
|
||||||
|
@ -124,7 +125,7 @@ function SingleRecruitPanel:BindEvent()
|
||||||
if index>=LengthOfTable(_heroTable) then
|
if index>=LengthOfTable(_heroTable) then
|
||||||
isFirst=true
|
isFirst=true
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type)
|
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType)
|
||||||
else
|
else
|
||||||
self:TenOpenPanel(heroData)
|
self:TenOpenPanel(heroData)
|
||||||
end
|
end
|
||||||
|
@ -161,6 +162,7 @@ function SingleRecruitPanel:OnOpen(...)
|
||||||
heroData=data[1]
|
heroData=data[1]
|
||||||
type=data[2]
|
type=data[2]
|
||||||
state=data[3]
|
state=data[3]
|
||||||
|
recruitType=data[4]
|
||||||
end
|
end
|
||||||
function SingleRecruitPanel:OnShow()
|
function SingleRecruitPanel:OnShow()
|
||||||
maxTimesId=lotterySetting[type].MaxTimes --特权上限ID
|
maxTimesId=lotterySetting[type].MaxTimes --特权上限ID
|
||||||
|
|
|
@ -9,6 +9,7 @@ local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||||
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||||
local type --抽卡类型
|
local type --抽卡类型
|
||||||
|
local recruitType={}--前端显示用 抽卡类型
|
||||||
local maxTimesId--特权id上限(今日召唤上限)
|
local maxTimesId--特权id上限(今日召唤上限)
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function TenRecruitPanel:InitComponent()
|
function TenRecruitPanel:InitComponent()
|
||||||
|
@ -58,13 +59,13 @@ function TenRecruitPanel:BindEvent()
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(lotterySetting[type].MoneyTimes,10)--记录妖晶限购抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(lotterySetting[type].MoneyTimes,10)--记录妖晶限购抽卡次数
|
||||||
end
|
end
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
|
||||||
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, type,2)
|
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, type,2,recruitType)
|
||||||
end,maxTimesId)
|
end,maxTimesId)
|
||||||
end
|
end
|
||||||
|
|
||||||
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten)
|
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..recruitType[2])
|
||||||
if state==0 and d[1] == 16 then
|
if state==0 and d[1] == 16 then
|
||||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Ten,recruitTen)
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,type,recruitTen)
|
||||||
else
|
else
|
||||||
recruitTen()
|
recruitTen()
|
||||||
end
|
end
|
||||||
|
@ -97,6 +98,7 @@ function TenRecruitPanel:OnOpen(...)
|
||||||
local data = { ... }
|
local data = { ... }
|
||||||
local _roleDatas = data[1]
|
local _roleDatas = data[1]
|
||||||
type=data[2]
|
type=data[2]
|
||||||
|
recruitType=data[3]
|
||||||
for i = 1, #_roleDatas do
|
for i = 1, #_roleDatas do
|
||||||
cardList[i]:OnOpen(_roleDatas[i].id,false,false,-1,self.sortingOrder)
|
cardList[i]:OnOpen(_roleDatas[i].id,false,false,-1,self.sortingOrder)
|
||||||
local heorConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig,_roleDatas[i].heroId)
|
local heorConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig,_roleDatas[i].heroId)
|
||||||
|
|
Loading…
Reference in New Issue