fix bug
This commit is contained in:
parent
3b9280f8b9
commit
fc7b9a734b
@ -647,7 +647,7 @@ function GFunc.addRewards(rewards, itemGetType)
|
||||
if v.type == GConst.REWARD_TYPE.ITEM then
|
||||
DataManager.BagData.ItemData:addItem(v.item, itemGetType)
|
||||
elseif v.type == GConst.REWARD_TYPE.EQUIP then
|
||||
DataManager.BagData.EquipData:addEquipCountById(v.equip.id, v.equip.count, itemGetType)
|
||||
DataManager.EquipData:addEquipCountById(v.equip.id, v.equip.count, itemGetType)
|
||||
end
|
||||
end
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GETED_REWARD_SUCCESS, newRewards)
|
||||
|
||||
@ -52,6 +52,17 @@ function HeroCell:refresh(heroEntity, isGray)
|
||||
else
|
||||
self.lvUpArrow:setActive(false)
|
||||
end
|
||||
|
||||
if inTeam then
|
||||
if DataManager.EquipData:hasEquipRedPoint(heroEntity:getMatchType()) then
|
||||
self.baseObject:addRedPoint(70, 100, 1)
|
||||
else
|
||||
self.baseObject:removeRedPoint()
|
||||
end
|
||||
else
|
||||
self.baseObject:removeRedPoint()
|
||||
end
|
||||
|
||||
local star = heroEntity:getStar()
|
||||
self.starComp:refresh(star)
|
||||
if heroEntity:isUnlock() then
|
||||
|
||||
@ -343,17 +343,17 @@ function HeroDetailUI:refreshSkillInfo(checkUp)
|
||||
end
|
||||
end
|
||||
|
||||
-- local needPop, isUnlock, skillIdx = self.heroEntity:checkSkillUnlock()
|
||||
-- if needPop then
|
||||
-- self.baseObject:performWithDelayGlobal(function()
|
||||
-- local skillInfo = skillList[skillIdx]
|
||||
-- if skillInfo then
|
||||
-- local skillId = skillInfo[2]
|
||||
-- local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
|
||||
-- ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, skillIdx, cfg.buff_id, isUnlock, needPop)
|
||||
-- end
|
||||
-- end, 0.5)
|
||||
-- end
|
||||
local needPop, isUnlock, skillIdx = self.heroEntity:checkSkillUnlock()
|
||||
if needPop then
|
||||
self.root:performWithDelayGlobal(function()
|
||||
local skillInfo = skillList[skillIdx]
|
||||
if skillInfo then
|
||||
local skillId = skillInfo[2]
|
||||
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
|
||||
ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, skillIdx, cfg.buff_id, isUnlock, needPop)
|
||||
end
|
||||
end, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
function HeroDetailUI:refreshPageInfo()
|
||||
|
||||
@ -18,7 +18,7 @@ MainCityUI.CLICK_BTN_TYPE = {
|
||||
[1] = "HOME",
|
||||
[2] = "HERO",
|
||||
[3] = "SHOP",
|
||||
[4] = "DUNGEON",
|
||||
[4] = "COMPANY",
|
||||
[5] = "DUNGEON",
|
||||
}
|
||||
|
||||
|
||||
@ -186,9 +186,14 @@ function HeroData:getRp()
|
||||
end
|
||||
end
|
||||
|
||||
-- if DataManager.CollectionData:hasRedPoint() then
|
||||
-- return true
|
||||
-- end
|
||||
for _, heroId in pairs(formationMap) do
|
||||
if heroId > 0 then
|
||||
local cfg = HeroCfg[heroId]
|
||||
if DataManager.EquipData:hasEquipRedPoint(cfg.position) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
@ -337,7 +337,6 @@ function HeroEntity:setLv(lv, onlyChangeLv)
|
||||
return
|
||||
end
|
||||
self.isNew = lv == 1
|
||||
self.oldLv = self.data.lv
|
||||
self.data.lv = lv
|
||||
self:_updateAllBaseAttr()
|
||||
self:setDirty()
|
||||
@ -614,7 +613,7 @@ function HeroEntity:getUnlockRogueId()
|
||||
end
|
||||
|
||||
function HeroEntity:checkSkillUnlock()
|
||||
if not self.oldLv then
|
||||
if not self.oldStar then
|
||||
return false
|
||||
end
|
||||
local needPop = false
|
||||
@ -624,7 +623,7 @@ function HeroEntity:checkSkillUnlock()
|
||||
local ids = self.config["rouge_skill_" .. i]
|
||||
if ids then
|
||||
for ii = #ids, 1, -1 do
|
||||
if self.data.lv >= ids[ii][1] and self.oldLv < ids[ii][1] then
|
||||
if self.data.star >= ids[ii][1] and self.oldStar < ids[ii][1] then
|
||||
skillIdx = i
|
||||
needPop = true
|
||||
isUnlock = ii == 1
|
||||
@ -638,7 +637,7 @@ function HeroEntity:checkSkillUnlock()
|
||||
break
|
||||
end
|
||||
end
|
||||
self.oldLv = nil
|
||||
self.oldStar = nil
|
||||
return needPop, isUnlock, skillIdx
|
||||
end
|
||||
|
||||
@ -802,6 +801,7 @@ function HeroEntity:canStarUp(showToast)
|
||||
end
|
||||
|
||||
function HeroEntity:onHeroStarUp()
|
||||
self.oldStar = self.data.star
|
||||
self.data.star = self.data.star + 1
|
||||
self:setBaseAttrDirty()
|
||||
self:setDirty()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user