【限时升星】锁定提示文字修改,选择神将保存到本地
parent
9fbc2df41f
commit
81b3d254f4
|
@ -74,6 +74,7 @@ function UpStarGift:BindEvent()
|
|||
-- 打开选择界面
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ChooseUpHero, heroList, choose, function(chooseId)
|
||||
self.tempChoose = chooseId
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."_UpStarGift_TempChoose", chooseId)
|
||||
-- 刷新界面限显示
|
||||
self:RefreshData(true,true,true)
|
||||
end, "选择神将")
|
||||
|
@ -95,7 +96,7 @@ function UpStarGift:BindEvent()
|
|||
-- 打开选择界面
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ChooseUpHero, heroList, choose, function(chooseId)
|
||||
self.tempChoose = chooseId
|
||||
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."_UpStarGift_TempChoose", chooseId)
|
||||
-- 刷新界面限显示
|
||||
self:RefreshData(true,true,true)
|
||||
end, "选择神将")
|
||||
|
@ -117,7 +118,7 @@ function UpStarGift:BindEvent()
|
|||
LogError("未找到神将:"..tostring(choose))
|
||||
return
|
||||
end
|
||||
local msg = string.format("%s\n将锁定为本次活动的指定神将\n\n锁定后无法修改", con.ReadingName)
|
||||
local msg = string.format("<color=#da9648>%s</color>将锁定为本次活动的指定神将,锁定后无法修改。", con.ReadingName)
|
||||
MsgPanel.ShowTwo(msg, nil, function()
|
||||
NetManager.UpStarActivitySelectRequest(self.actId, choose, function()
|
||||
PopupTipPanel.ShowTip("锁定成功")
|
||||
|
@ -132,6 +133,8 @@ function UpStarGift:OnOpen(_activityConfig,_index,parent)
|
|||
self.pageIndex = _index
|
||||
self.parent = parent
|
||||
self.gameObject.name = "CommonActPage"..self.actConfig.Id
|
||||
|
||||
self.tempChoose = PlayerPrefs.GetInt(PlayerManager.uid.."_UpStarGift_TempChoose", 0)
|
||||
end
|
||||
|
||||
function UpStarGift:OnSortingOrderChange()
|
||||
|
@ -256,6 +259,12 @@ function UpStarGift:GetCurChooseHero()
|
|||
isTemp = false
|
||||
end
|
||||
if choose == 0 and self.tempChoose and self.tempChoose ~= 0 then
|
||||
-- 检测一遍临时选择的正确性,选择的人物保存到本地,这里是为了防止两期活动数据冲突
|
||||
local heroList = self:GetHeroList()
|
||||
if table.indexof(heroList, self.tempChoose) then
|
||||
self.tempChoose = 0
|
||||
end
|
||||
--
|
||||
choose = self.tempChoose
|
||||
isTemp = true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue