This commit is contained in:
puxuan 2025-10-30 10:37:15 +08:00
parent 3b9280f8b9
commit fc7b9a734b
6 changed files with 36 additions and 20 deletions

View File

@ -647,7 +647,7 @@ function GFunc.addRewards(rewards, itemGetType)
if v.type == GConst.REWARD_TYPE.ITEM then if v.type == GConst.REWARD_TYPE.ITEM then
DataManager.BagData.ItemData:addItem(v.item, itemGetType) DataManager.BagData.ItemData:addItem(v.item, itemGetType)
elseif v.type == GConst.REWARD_TYPE.EQUIP then 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
end end
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GETED_REWARD_SUCCESS, newRewards) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GETED_REWARD_SUCCESS, newRewards)

View File

@ -52,6 +52,17 @@ function HeroCell:refresh(heroEntity, isGray)
else else
self.lvUpArrow:setActive(false) self.lvUpArrow:setActive(false)
end 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() local star = heroEntity:getStar()
self.starComp:refresh(star) self.starComp:refresh(star)
if heroEntity:isUnlock() then if heroEntity:isUnlock() then

View File

@ -343,17 +343,17 @@ function HeroDetailUI:refreshSkillInfo(checkUp)
end end
end end
-- local needPop, isUnlock, skillIdx = self.heroEntity:checkSkillUnlock() local needPop, isUnlock, skillIdx = self.heroEntity:checkSkillUnlock()
-- if needPop then if needPop then
-- self.baseObject:performWithDelayGlobal(function() self.root:performWithDelayGlobal(function()
-- local skillInfo = skillList[skillIdx] local skillInfo = skillList[skillIdx]
-- if skillInfo then if skillInfo then
-- local skillId = skillInfo[2] local skillId = skillInfo[2]
-- local cfg = ConfigManager:getConfig("skill_rogue")[skillId] local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
-- ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, skillIdx, cfg.buff_id, isUnlock, needPop) ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, skillIdx, cfg.buff_id, isUnlock, needPop)
-- end end
-- end, 0.5) end, 0.5)
-- end end
end end
function HeroDetailUI:refreshPageInfo() function HeroDetailUI:refreshPageInfo()

View File

@ -18,7 +18,7 @@ MainCityUI.CLICK_BTN_TYPE = {
[1] = "HOME", [1] = "HOME",
[2] = "HERO", [2] = "HERO",
[3] = "SHOP", [3] = "SHOP",
[4] = "DUNGEON", [4] = "COMPANY",
[5] = "DUNGEON", [5] = "DUNGEON",
} }

View File

@ -186,9 +186,14 @@ function HeroData:getRp()
end end
end end
-- if DataManager.CollectionData:hasRedPoint() then for _, heroId in pairs(formationMap) do
-- return true if heroId > 0 then
-- end local cfg = HeroCfg[heroId]
if DataManager.EquipData:hasEquipRedPoint(cfg.position) then
return true
end
end
end
return false return false
end end

View File

@ -337,7 +337,6 @@ function HeroEntity:setLv(lv, onlyChangeLv)
return return
end end
self.isNew = lv == 1 self.isNew = lv == 1
self.oldLv = self.data.lv
self.data.lv = lv self.data.lv = lv
self:_updateAllBaseAttr() self:_updateAllBaseAttr()
self:setDirty() self:setDirty()
@ -614,7 +613,7 @@ function HeroEntity:getUnlockRogueId()
end end
function HeroEntity:checkSkillUnlock() function HeroEntity:checkSkillUnlock()
if not self.oldLv then if not self.oldStar then
return false return false
end end
local needPop = false local needPop = false
@ -624,7 +623,7 @@ function HeroEntity:checkSkillUnlock()
local ids = self.config["rouge_skill_" .. i] local ids = self.config["rouge_skill_" .. i]
if ids then if ids then
for ii = #ids, 1, -1 do 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 skillIdx = i
needPop = true needPop = true
isUnlock = ii == 1 isUnlock = ii == 1
@ -638,7 +637,7 @@ function HeroEntity:checkSkillUnlock()
break break
end end
end end
self.oldLv = nil self.oldStar = nil
return needPop, isUnlock, skillIdx return needPop, isUnlock, skillIdx
end end
@ -802,6 +801,7 @@ function HeroEntity:canStarUp(showToast)
end end
function HeroEntity:onHeroStarUp() function HeroEntity:onHeroStarUp()
self.oldStar = self.data.star
self.data.star = self.data.star + 1 self.data.star = self.data.star + 1
self:setBaseAttrDirty() self:setBaseAttrDirty()
self:setDirty() self:setDirty()