花费妖晶抽卡提示优化

dev_chengFeng
ZhangBiao 2020-07-28 15:24:11 +08:00
parent 146197b320
commit 52c34aa2a3
9 changed files with 1206 additions and 31 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1756,6 +1756,7 @@ GENERAL_POPUP_TYPE={
EquipBatchSell=16,--装备批量出售
EquipSingleSell=17,--装备单种出售 拉条
TrialBomb=18,--次元炸弹
RecruitConfirm=19,----神将召唤、限时召唤、乾坤宝盒 二次确认界面
}
--抽卡类型

View File

@ -159,6 +159,10 @@ function this.RefreshUpdateIndication(buffer)
CheckRedPointStatus(RedPointType.Guild_AidMy)
LuckyTurnTableManager.SetTimes(msg.hadLuckTime,msg.hadAdvanceLuckyTime)
--三个抽奖勾选重置
PlayerPrefs.SetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten,0)
PlayerPrefs.SetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.TimeLimitTen,0)
PlayerPrefs.SetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen,0)
end
--服务器推送红点信息

View File

@ -155,26 +155,41 @@ function QianKunBox:refreshBtnShow()
return
end
end
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen)
if n==bType.Btn1 then
if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+1>privilegeConfig[maxtimesId].Condition[1][2] then
PopupTipPanel.ShowTip(Language[11760])
return
end
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel,msg.drop)
CheckRedPointStatus(RedPointType.QianKunBox)
end,freeTimesId)
local recruitOne = function()
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel, msg.drop)
CheckRedPointStatus(RedPointType.QianKunBox)
end,freeTimesId)
end
if state==0 and d[1] ==16 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.QianKunBoxSingle,recruitOne)
else
recruitOne()
end
elseif n==bType.Btn10 then
if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+10>privilegeConfig[maxtimesId].Condition[1][2] then
PopupTipPanel.ShowTip(Language[11760])
return
end
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel,msg.drop)
CheckRedPointStatus(RedPointType.QianKunBox)
end,freeTimesId)
local recruitTen = function()
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel, msg.drop)
CheckRedPointStatus(RedPointType.QianKunBox)
end,freeTimesId)
end
if state==0 and d[1] ==16 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.QianKunBoxTen,recruitTen)
else
recruitTen()
end
end
end)
end

View File

@ -279,26 +279,42 @@ function TimeLimitedCall:RefreshGetHeroTimes()
return
end
end
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.TimeLimitTen)
if n==bType.Btn1 then
if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+1>privilegeConfig[maxtimesId].Condition[1][2] then
PopupTipPanel.ShowTip(Language[11760])
return
end
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],m.type,bType.Btn1)
CheckRedPointStatus(RedPointType.TimeLimited)
end,freeTimesId)
local recruitOne = function()
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],m.type,bType.Btn1)
CheckRedPointStatus(RedPointType.TimeLimited)
end,freeTimesId)
end
if state==0 and d[1] ==16 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.TimeLimitSingle,recruitOne)
else
recruitOne()
end
elseif n==bType.Btn10 then
if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+10>privilegeConfig[maxtimesId].Condition[1][2] then
PopupTipPanel.ShowTip(Language[11760])
return
end
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, m.type,bType.Btn10)
CheckRedPointStatus(RedPointType.TimeLimited)
end,freeTimesId)
local recruitTen = function()
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, m.type,bType.Btn10)
CheckRedPointStatus(RedPointType.TimeLimited)
end,freeTimesId)
end
if state==0 and d[1] ==16 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.TimeLimitTen,recruitTen)
else
recruitTen()
end
end
end)
end

View File

@ -41,6 +41,8 @@ local contentScripts = {
[17] = {view = require("Modules/Popup/View/GeneralPopup_EquipSingleSell"), panelName = "GeneralPopup_EquipSingleSell",type=GENERAL_POPUP_TYPE.EquipSingleSell},
--森罗次元炸弹
[18] = {view = require("Modules/Popup/View/GeneralPopup_TrialBomb"), panelName = "GeneralPopup_TrialBomb",type=GENERAL_POPUP_TYPE.TrialBomb},
--神将召唤、限时召唤、乾坤宝盒 二次确认界面
[19] = {view = require("Modules/Popup/View/GeneralPopup_RecruitConfirm"), panelName = "GeneralPopup_RecruitConfirm",type=GENERAL_POPUP_TYPE.RecruitConfirm},
}
--子模块预设
local contentPrefabs={}

View File

@ -0,0 +1,88 @@
----- 招募二次确认弹窗 -----
local this = {}
--传入父脚本模块
local parent
--传入特效层级
local sortingOrder=0
local i
local func
function this:InitComponent(gameObject)
this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
this.root = Util.GetGameObject(gameObject, "Root")
this.confirm = Util.GetGameObject(gameObject, "ConfirmBtn")
this.cancel = Util.GetGameObject(gameObject, "CancelBtn")
this.btn=Util.GetGameObject(this.root,"Btn1")
this.rootText=Util.GetGameObject(this.root,"Text"):GetComponent("Text")
end
function this:BindEvent()
Util.AddClick(this.confirm,function()
parent:ClosePanel()
if func then
func()
end
end)
Util.AddClick(this.cancel,function()
parent:ClosePanel()
end)
end
function this:AddListener()
end
function this:RemoveListener()
end
function this:OnShow(_parent,...)
parent=_parent
sortingOrder = _parent.sortingOrder
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
local _args = {...}
func = _args[2]
this.titleText.text=Language[11351]
local go=Util.GetGameObject(this.btn,"Go")
local var
if _args[1] == RecruitType.Single then
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten
this.rootText.text = "确认花费200妖晶进行1次神将召唤"
elseif _args[1] == RecruitType.QianKunBoxSingle then
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen
this.rootText.text = "确认花费200妖晶抽取1次乾坤宝盒"
elseif _args[1] == RecruitType.TimeLimitSingle then
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.TimeLimitTen
this.rootText.text = "确认花费200妖晶进行1次限时召唤 "
elseif _args[1] == RecruitType.Ten then
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten
this.rootText.text = "确认花费2000妖晶进行10次神将召唤"
elseif _args[1] == RecruitType.QianKunBoxTen then
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen
this.rootText.text = "确认花费2000妖晶抽取10次乾坤宝盒"
elseif _args[1] == RecruitType.TimeLimitTen then
var=PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.TimeLimitTen
this.rootText.text = "确认花费2000妖晶进行10次限时召唤"
end
Util.AddOnceClick(this.btn,function()
this.btnClick=(this.btnClick and this.btnClick==1) and 0 or 1
LogPink(this.btnClick)
PlayerPrefs.SetInt(var,this.btnClick)
go:SetActive(PlayerPrefs.GetInt(var)==1)
end)
if PlayerPrefs.HasKey(var) then
go:SetActive(PlayerPrefs.GetInt(var)==1)
else
go:SetActive(false)
end
end
function this:OnClose()
end
function this:OnDestroy()
this.btn={}
end
return this

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1d3cd0fe4ce84524c9de9034cb67d2bf
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -195,27 +195,46 @@ function this.UpdatePanelData()
return
end
end
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.Ten)
if n==bType.Btn1 then
if PrivilegeManager.GetPrivilegeUsedTimes(maxTimesId)+1>privilegeConfig[maxTimesId].Condition[1][2] then
PopupTipPanel.ShowTip(Language[11760])
return
end
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],m.type,bType.Btn1)
end,v.privilegeId)
--抽卡
local recruitOne = function()
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],m.type,bType.Btn1)
end,v.privilegeId)
end
if state==0 and d[1] ==16 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Single,recruitOne)
else
recruitOne()
end
elseif n==bType.Btn10 then
if PrivilegeManager.GetPrivilegeUsedTimes(maxTimesId)+10>privilegeConfig[maxTimesId].Condition[1][2] then
PopupTipPanel.ShowTip(Language[11760])
return
end
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, m.type,bType.Btn10)
if m.type == 11 then
RecruitManager.isTenRecruit = 1
end
end,v.privilegeId)
--抽卡
local recruitTen = function()
RecruitManager.RecruitRequest(m.type, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero, m.type,bType.Btn10)
if m.type == 11 then
RecruitManager.isTenRecruit = 1
end
end,v.privilegeId)
end
if state==0 and d[1] ==16 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,RecruitType.Ten,recruitTen)
else
recruitTen()
end
end
end)
end