diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index 696813aa..ec3f43f6 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -1972,8 +1972,10 @@ function GFunc.randomDrop(dropList) end -- 获取属性描述和数值 -function GFunc.getStarImg(starType) - if starType == GConst.HeroConst.STAR_TYPE.LV_1 then +function GFunc.getStarImg(starType, currStar) + if currStar and currStar == 0 then + return GConst.ATLAS_PATH.COMMON, "common_star_0" + elseif starType == GConst.HeroConst.STAR_TYPE.LV_1 then return GConst.ATLAS_PATH.COMMON, "common_star_1" elseif starType == GConst.HeroConst.STAR_TYPE.LV_2 then return GConst.ATLAS_PATH.COMMON, "common_star_2" diff --git a/lua/app/ui/hero/cell/star_cell.lua b/lua/app/ui/hero/cell/star_cell.lua index c387d843..a6c5631c 100644 --- a/lua/app/ui/hero/cell/star_cell.lua +++ b/lua/app/ui/hero/cell/star_cell.lua @@ -12,7 +12,10 @@ function StarCell:refresh(currStar) local starType = math.ceil(currStar / 5) for i, v in ipairs(self.starImgs) do local star = (currStar - 1)%5 + 1 - if currStar > 0 and i <= star then + if currStar == 0 and i == 1 then + v:setActive(true) + v:setSprite(GFunc.getStarImg(starType, currStar)) + elseif currStar > 0 and i <= star then v:setActive(true) v:setSprite(GFunc.getStarImg(starType)) else