diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index b1632fb1..85c851ef 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -469,13 +469,13 @@ GConst.HERO_FRAME_GRAY_QLT = { } GConst.HERO_DEC_QLT = { - [1] = "hero_frame_1_1", - [2] = "hero_frame_2_2", - [3] = "hero_frame_1_1", - [4] = "hero_frame_1_1", - [5] = "hero_frame_1_1", - [6] = "hero_frame_1_1", - [7] = "hero_frame_1_1", + [1] = "frame_dec_1", + [2] = "frame_dec_2", + [3] = "frame_dec_3", + [4] = "frame_dec_4", + [5] = "frame_dec_5", + [6] = "frame_dec_6", + [7] = "frame_dec_7", } GConst.HERO_FRAME_QLT = { diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index af0e66b4..585e3778 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -92,11 +92,11 @@ end -- 刷新英雄icon function HeroCell:refreshHeroIcon(iconName) - if self.heroEntity ~= nil then - self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO_2, DataManager.SkinData:getIcon(self.heroEntity:getSkinId())) - elseif iconName then + -- if self.heroEntity ~= nil then + -- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO_2, DataManager.SkinData:getIcon(self.heroEntity:getSkinId())) + -- elseif iconName then self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO_2, tostring(iconName)) - end + -- end end -- 刷新红点 @@ -169,8 +169,8 @@ end function HeroCell:_refresh(heroInfo, isGray) self.clickCallback = nil self.maskImg2:setActive(isGray) - self.heroBg:setSprite(GConst.ATLAS_PATH.HERO, GConst.HERO_FRAME_QLT[heroInfo.qlt]) - self.heroDec:setSprite(GConst.ATLAS_PATH.HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) + self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt]) + self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) self.check:setVisible(false) self:refreshHeroIcon(heroInfo.icon) diff --git a/lua/app/ui/common/cell/large_hero_cell.lua b/lua/app/ui/common/cell/large_hero_cell.lua index 0d0b36c5..23b2f835 100644 --- a/lua/app/ui/common/cell/large_hero_cell.lua +++ b/lua/app/ui/common/cell/large_hero_cell.lua @@ -11,7 +11,6 @@ function LargeHeroCell:init() self.matchImg = uiMap["large_hero_cell.hero_bg.match_img"] self.infoBtnDesc = uiMap["large_hero_cell.hero_bg.info_btn.desc"] self.useBtnDesc = uiMap["large_hero_cell.hero_bg.use_btn.desc"] - self.sImg = uiMap["large_hero_cell.hero_bg.s"] self.isGray = false self.useBtnDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_8)) @@ -62,11 +61,10 @@ function LargeHeroCell:_refresh(heroInfo, isGray) -- else -- self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt]) -- end - self.heroBg:setSprite(GConst.ATLAS_PATH.HERO, GConst.FRAME_QLT[heroInfo.qlt]) - self.heroDec:setSprite(GConst.ATLAS_PATH.HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) + self.heroBg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt]) + self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) self.check:setVisible(false) - self.sImg:setVisible(heroInfo.qlt >= 4) self:setGray(isGray) end diff --git a/lua/app/ui/hero/cell/hero_list_cell.lua b/lua/app/ui/hero/cell/hero_list_cell.lua index e2f0b4b2..5e3f2610 100644 --- a/lua/app/ui/hero/cell/hero_list_cell.lua +++ b/lua/app/ui/hero/cell/hero_list_cell.lua @@ -2,7 +2,7 @@ local HeroListCell = class("HeroListCell", BaseCell) local H = { NORMAL = 260, - HAS_TITLE = 380 + HAS_TITLE = 360 } function HeroListCell:init() diff --git a/lua/app/ui/hero/hero_info_comp.lua b/lua/app/ui/hero/hero_info_comp.lua index 38be4420..7312496c 100644 --- a/lua/app/ui/hero/hero_info_comp.lua +++ b/lua/app/ui/hero/hero_info_comp.lua @@ -240,11 +240,15 @@ function HeroInfoComp:refresh(checkLevel) end if canLvUp then + self.btnUp:setTouchEnable(true) + self.btnUp5:setTouchEnable(true) self.btnUp:addRedPoint(70, 30, 0.6) self.btnUp5:addRedPoint(70, 30, 0.6) self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) self.btnUp5:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) else + self.btnUp:setTouchEnable(false) + self.btnUp5:setTouchEnable(false) self.btnUp:removeRedPoint() self.btnUp5:removeRedPoint() self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[3]) diff --git a/lua/app/ui/hero/star_info_comp.lua b/lua/app/ui/hero/star_info_comp.lua index efd52bf4..f111d00e 100644 --- a/lua/app/ui/hero/star_info_comp.lua +++ b/lua/app/ui/hero/star_info_comp.lua @@ -88,7 +88,7 @@ function StarInfoComp:refreshInfo() end function StarInfoComp:refreshStarBtn() - if self.heroEntity:getIsStarMax() then + if not self.heroEntity:isActived() or self.heroEntity:getIsStarMax() then self.upBtn:setActive(false) self.lvBtn:setActive(false) self.descTx:setActive(false) diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index 243cdc53..21d83963 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -314,6 +314,9 @@ end function HeroEntity:getCurrMaxLv() local cfg = ConfigManager:getConfig("hero_level") local lv = self.data.lv + if lv <= 0 then + return 1 + end for i = self.data.lv, #cfg do if cfg[i].star > self.data.star then break