【专属升星】选择神将界面打不开
parent
76295739f3
commit
155dabe7c7
|
@ -1,6 +1,7 @@
|
|||
local UpStarGift = {}
|
||||
local rechargeNum = 0
|
||||
local GlobalActConfig = ConfigManager.GetConfig(ConfigName.GlobalActivity)
|
||||
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
function UpStarGift:New(gameObject)
|
||||
local b = {}
|
||||
b.gameObject = gameObject
|
||||
|
@ -245,7 +246,7 @@ function UpStarGift:GetHeroList()
|
|||
end
|
||||
local heros = {}
|
||||
for heroId, _ in pairs(heroList) do
|
||||
table.insert(heros, heroId)
|
||||
table.insert(heros, {heroId, heroConfig[heroId].PropertyName})
|
||||
end
|
||||
return heros
|
||||
end
|
||||
|
@ -261,7 +262,13 @@ function UpStarGift:GetCurChooseHero()
|
|||
if choose == 0 and self.tempChoose and self.tempChoose ~= 0 then
|
||||
-- 检测一遍临时选择的正确性,选择的人物保存到本地,这里是为了防止两期活动数据冲突
|
||||
local heroList = self:GetHeroList()
|
||||
if not table.indexof(heroList, self.tempChoose) then
|
||||
local isHave = false
|
||||
for _, h in ipairs(heroList) do
|
||||
if h[1] == self.tempChoose then
|
||||
isHave = true
|
||||
end
|
||||
end
|
||||
if not isHave then
|
||||
self.tempChoose = 0
|
||||
end
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue