碎片tips显示错误

This commit is contained in:
chenxi 2023-05-30 15:58:00 +08:00
parent fe8d9aede1
commit 88aa6a6cf3
2 changed files with 10 additions and 1 deletions

View File

@ -23,7 +23,7 @@ function HeroFragmentTips:onLoadRootComplete()
end
self.heroList = {}
for _, v in ipairs(drop) do
if DataManager.HeroData:getHeroIsActive(v.id) then
if DataManager.HeroData:getHeroIsUnlock(v.id) then
table.insert(self.heroList, v.id)
end
end

View File

@ -84,6 +84,15 @@ function HeroData:getHeroIsActive(id)
return entity:isActived()
end
function HeroData:getHeroIsUnlock(id)
local entity = self.heroes[id]
if entity == nil then
return false
end
return entity:isUnlock()
end
function HeroData:getUnlockHeroCount()
local count = 0
for id, entity in pairs(self.heroes) do