diff --git a/lua/app/config/hero.lua b/lua/app/config/hero.lua index f6a9f775..eb872f0e 100644 --- a/lua/app/config/hero.lua +++ b/lua/app/config/hero.lua @@ -44,8 +44,8 @@ local hero = { 2300000, 2400000 }, - ["model_id"]="p0001", - ["icon"]="1", + ["model_id"]="p0005", + ["icon"]="5", ["item_id"]=12001, ["unlock_chapter"]=1 }, @@ -144,8 +144,8 @@ local hero = { 2300000, 2400000 }, - ["model_id"]="p0006", - ["icon"]="6", + ["model_id"]="p0007", + ["icon"]="7", ["item_id"]=23001, ["unlock_chapter"]=7 }, @@ -194,8 +194,8 @@ local hero = { 2300000, 2400000 }, - ["model_id"]="p0003", - ["icon"]="3", + ["model_id"]="p0001", + ["icon"]="1", ["item_id"]=32001, ["unlock_chapter"]=0 }, @@ -244,8 +244,8 @@ local hero = { 2300000, 2400000 }, - ["model_id"]="p0007", - ["icon"]="7", + ["model_id"]="p0006", + ["icon"]="6", ["item_id"]=33001, ["unlock_chapter"]=9 }, @@ -294,8 +294,8 @@ local hero = { 2300000, 2400000 }, - ["model_id"]="p0004", - ["icon"]="4", + ["model_id"]="p0003", + ["icon"]="3", ["item_id"]=42001, ["unlock_chapter"]=0 }, @@ -394,8 +394,8 @@ local hero = { 2300000, 2400000 }, - ["model_id"]="p0005", - ["icon"]="5", + ["model_id"]="p0004", + ["icon"]="4", ["item_id"]=52001, ["unlock_chapter"]=3 } diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 712a5fb3..4cff0b0e 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -11,6 +11,8 @@ function HeroCell:init() self.progressTx = uiMap["hero_cell.hero_bg.progress_tx"] self.lvTx = uiMap["hero_cell.hero_bg.lv_tx"] self.unlockTx = uiMap["hero_cell.hero_bg.unlock_tx"] + self.lvUpArrow = uiMap["hero_cell.hero_bg.progress_bg.arrow"] + self.fragmenImg = uiMap["hero_cell.hero_bg.progress_bg.fragment_img"] self.isGray = false self.baseObject:addClickListener(function() if self.clickCallback then @@ -23,6 +25,9 @@ function HeroCell:refresh(heroEntity, isGray) local heroInfo = heroEntity:getConfig() self:_refresh(heroInfo, isGray) + local canLvUp = heroEntity:canLvUp() + self.lvUpArrow:setVisible(canLvUp) + self.fragmenImg:setVisible(not canLvUp) local materials = heroEntity:getLvUpMaterials() or {} local fragmentCount = DataManager.BagData.ItemData:getItemNumById(heroEntity:getFramentId()) local needFragmentCount = materials[1] or 1 @@ -56,6 +61,8 @@ function HeroCell:refreshWithCfgId(id, isGray) self.lvTx:setVisible(true) self.progressBg:setVisible(true) self.unlockTx:setVisible(false) + self.lvUpArrow:setVisible(false) + self.fragmenImg:setVisible(true) end function HeroCell:_refresh(heroInfo, isGray) diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index 4c948c43..bff654ce 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -72,6 +72,10 @@ function HeroDetailUI:_display() uiMap["hero_detail_ui.bg.fragment_bg"]:setVisible(not self.heroEntity:isMaxLv()) + local canLvUp = self.heroEntity:canLvUp() + uiMap["hero_detail_ui.bg.fragment_bg.arrow"]:setVisible(canLvUp) + uiMap["hero_detail_ui.bg.fragment_icon"]:setVisible(not canLvUp) + local lv = self.heroEntity:getLv() local str local hpStr