神魂提交

dev_chengFeng
jiaoyangna 2021-10-27 18:03:09 +08:00
parent eadf4a4f1c
commit 82d0e28baa
2 changed files with 22 additions and 19 deletions

View File

@ -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

View File

@ -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 = "<color=#B5AA95>需要:</color>" --未解锁红色
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("<color=#B5AA95>%s</color>",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)