diff --git a/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua b/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua index c1d52c1f83..be87a5828d 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua @@ -335,24 +335,27 @@ function this.CheckCanUpGodSoul(curHeroData,lv,datas) return isAll,enoughData,enoughDatas end if godData then - for k,v in pairs(godDatas) do - local isChoosed = this.CheckExistBindHeroDataByDid(curHeroData.dynamicId,v.dynamicId) - if isChoosed and isChoosed ~= lv and isChoosed > 0 then + for k,v in pairs(godDatas) do + if curHeroData.dynamicId == v.dynamicId then else - for j = 1,#godData do - if v.star >= godData[j].star then - if godData[j].id > 0 and v.heroConfig.Id == godData[j].id then - enoughData[j] = enoughData[j] + 1 - elseif godData[j].property > 0 and v.property == godData[j].property then - enoughData[j] = enoughData[j] + 1 - elseif godData[j].profession > 0 and v.profession == godData[j].profession then - enoughData[j] = enoughData[j] + 1 - elseif godData[j].property == 0 and godData[j].profession == 0 and godData[j].id == 0 then - enoughData[j] = enoughData[j] + 1 - end - local isAll,enoughData,enoughDatas = s() - if isAll then - return isAll,enoughData,enoughDatas + local isChoosed = this.CheckExistBindHeroDataByDid(curHeroData.dynamicId,v.dynamicId) + if isChoosed and isChoosed ~= lv and isChoosed > 0 then + else + for j = 1,#godData do + if v.star >= godData[j].star then + if godData[j].id > 0 and v.heroConfig.Id == godData[j].id then + enoughData[j] = enoughData[j] + 1 + elseif godData[j].property > 0 and v.property == godData[j].property then + enoughData[j] = enoughData[j] + 1 + elseif godData[j].profession > 0 and v.profession == godData[j].profession then + enoughData[j] = enoughData[j] + 1 + elseif godData[j].property == 0 and godData[j].profession == 0 and godData[j].id == 0 then + enoughData[j] = enoughData[j] + 1 + end + local isAll,enoughData,enoughDatas = s() + if isAll then + return isAll,enoughData,enoughDatas + end end end end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua index d20fd80b6f..82cac29365 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua @@ -147,7 +147,7 @@ function RoleGodSoulLayout:UpdataSingleGod(index) end end end - + self.gridList[index].red.gameObject:SetActive(false) if not self.addShow then self.gridList[index].tip.text = "需要:" --未解锁红色 self.gridList[index].costGrid.gameObject:SetActive(true) @@ -163,7 +163,7 @@ function RoleGodSoulLayout:UpdataSingleGod(index) Util.SetGray(self.gridList[index].godGrid,true) --勾魂图标 未激活时置灰 --Util.SetGray(self.gridList[index].des.gameObject,true) self.gridList[index].des.text = string.format("%s",self.godDatas[index].skill) --神魂效果 绿色 未激活时置灰 - local isShow = GodSoulManager.CheckCanUpGodSoul(self.curHeroData,index) or false + local isShow = GodSoulManager.CheckRedPointGodSoul(self.curHeroData) or false self.gridList[index].red.gameObject:SetActive(isShow) else Util.SetGray(self.gridList[index].godGrid,false)