好感度等级修改

dev_chengFeng
jiaoyangna 2021-09-26 14:21:22 +08:00
parent e59f160387
commit 330b36b55a
3 changed files with 23 additions and 22 deletions

View File

@ -305,10 +305,10 @@ function HeroLikeAbilityPanel:SetHeroLiveData()
lastindex = curindex - 1 lastindex = curindex - 1
end end
leftHeroData = herosDatas[lastindex] leftHeroData = herosDatas[lastindex]
if nextindex >= #herosDatas then if curindex >= #herosDatas then
nextindex = #herosDatas nextindex = 1
else else
nextindex = nextindex + 1 nextindex = curindex + 1
end end
rightHeroData = herosDatas[nextindex] rightHeroData = herosDatas[nextindex]
--加载当前英雄的立绘 --加载当前英雄的立绘
@ -359,10 +359,10 @@ function HeroLikeAbilityPanel:RightBtnOnClick()
leftHeroData = herosDatas[lastindex] leftHeroData = herosDatas[lastindex]
curindex = nextindex curindex = nextindex
curHeroData = herosDatas[curindex] curHeroData = herosDatas[curindex]
if nextindex >= #herosDatas then if curindex >= #herosDatas then
nextindex = #herosDatas nextindex = 1
else else
nextindex = nextindex + 1 nextindex = curindex + 1
end end
rightHeroData = herosDatas[nextindex] rightHeroData = herosDatas[nextindex]
@ -401,10 +401,10 @@ function HeroLikeAbilityPanel:LeftBtnOnClick()
rightHeroData = herosDatas[nextindex] rightHeroData = herosDatas[nextindex]
curindex = lastindex curindex = lastindex
curHeroData = herosDatas[curindex] curHeroData = herosDatas[curindex]
if lastindex <= 1 then if curindex <= 1 then
lastindex = #herosDatas lastindex = #herosDatas
else else
lastindex = lastindex - 1 lastindex = curindex - 1
end end
leftHeroData = herosDatas[lastindex] leftHeroData = herosDatas[lastindex]

View File

@ -21,7 +21,6 @@ function this.InitializeTableData()
data.Type = v.Type data.Type = v.Type
data.lv = v.Level data.lv = v.Level
data.value = this.GetTotalValue(data.lv,v.Type) data.value = this.GetTotalValue(data.lv,v.Type)
LogGreen("data.value:"..data.value)
data.Property = v.Property data.Property = v.Property
data.priPro = v.PrivilegeProperty data.priPro = v.PrivilegeProperty
if v.Type == 1 then if v.Type == 1 then
@ -177,7 +176,7 @@ function this.GetProData(indexType,index,lv)
local allPro = {} local allPro = {}
if index >= 0 then if index >= 0 then
for _,n in ipairs(list) do for _,n in ipairs(list) do
if indexType == n.Type and index == n.lv then if indexType == n.Type and lv == n.lv then
if n.Property and #n.Property > 0 then if n.Property and #n.Property > 0 then
for i = 1,#n.Property do for i = 1,#n.Property do
if not allPro[n.Property[i][1]] then if not allPro[n.Property[i][1]] then
@ -332,18 +331,20 @@ function this.GetViewProData(indexType,add,lv,title1,title2,subtitle1,subtitle2,
local num,lv,totalNum = LikabilityManager.GetTotalHeroLikeLv(indexType) local num,lv,totalNum = LikabilityManager.GetTotalHeroLikeLv(indexType)
if all then if all then
for i = 1,#list do for i = 1,#list do
local color = "" if list[i].lv ~= 0 then
if lv >= list[i].lv then local color = ""
color = "5dc446" if lv >= list[i].lv then
else color = "5dc446"
color = "fdf5e5" else
color = "fdf5e5"
end
if title2 and title2 ~= "" then
table.insert(data.prolist,string.format(title2,color,list[i].lv,num,list[i].value))
end
local str1,str2 = this.GetViewProDatas(indexType,add,list[i].lv,subtitle1,subtitle2,nextLv,color)
table.insert(data.prolist,str1)
table.insert(data.prolist,str2)
end end
if title2 and title2 ~= "" then
table.insert(data.prolist,string.format(title2,color,list[i].lv,num,list[i].value))
end
local str1,str2 = this.GetViewProDatas(indexType,add,lv,subtitle1,subtitle2,nextLv,color)
table.insert(data.prolist,str1)
table.insert(data.prolist,str2)
end end
else else
local color = "5dc446" local color = "5dc446"

View File

@ -71,7 +71,7 @@ function RoleLikeabilityPopup:UpDataProList(lv)
for i = 1,#self.proList do for i = 1,#self.proList do
self.proList[i].go.gameObject:SetActive(false) self.proList[i].go.gameObject:SetActive(false)
end end
self:UpDataProSingleList(pro2,2) self:UpDataProSingleList(pro2,1)
end end
function RoleLikeabilityPopup:UpDataProSingleList(data,index) function RoleLikeabilityPopup:UpDataProSingleList(data,index)