好感度等级修改
parent
e59f160387
commit
330b36b55a
|
@ -305,10 +305,10 @@ function HeroLikeAbilityPanel:SetHeroLiveData()
|
|||
lastindex = curindex - 1
|
||||
end
|
||||
leftHeroData = herosDatas[lastindex]
|
||||
if nextindex >= #herosDatas then
|
||||
nextindex = #herosDatas
|
||||
if curindex >= #herosDatas then
|
||||
nextindex = 1
|
||||
else
|
||||
nextindex = nextindex + 1
|
||||
nextindex = curindex + 1
|
||||
end
|
||||
rightHeroData = herosDatas[nextindex]
|
||||
--加载当前英雄的立绘
|
||||
|
@ -359,10 +359,10 @@ function HeroLikeAbilityPanel:RightBtnOnClick()
|
|||
leftHeroData = herosDatas[lastindex]
|
||||
curindex = nextindex
|
||||
curHeroData = herosDatas[curindex]
|
||||
if nextindex >= #herosDatas then
|
||||
nextindex = #herosDatas
|
||||
if curindex >= #herosDatas then
|
||||
nextindex = 1
|
||||
else
|
||||
nextindex = nextindex + 1
|
||||
nextindex = curindex + 1
|
||||
end
|
||||
rightHeroData = herosDatas[nextindex]
|
||||
|
||||
|
@ -401,10 +401,10 @@ function HeroLikeAbilityPanel:LeftBtnOnClick()
|
|||
rightHeroData = herosDatas[nextindex]
|
||||
curindex = lastindex
|
||||
curHeroData = herosDatas[curindex]
|
||||
if lastindex <= 1 then
|
||||
if curindex <= 1 then
|
||||
lastindex = #herosDatas
|
||||
else
|
||||
lastindex = lastindex - 1
|
||||
lastindex = curindex - 1
|
||||
end
|
||||
leftHeroData = herosDatas[lastindex]
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ function this.InitializeTableData()
|
|||
data.Type = v.Type
|
||||
data.lv = v.Level
|
||||
data.value = this.GetTotalValue(data.lv,v.Type)
|
||||
LogGreen("data.value:"..data.value)
|
||||
data.Property = v.Property
|
||||
data.priPro = v.PrivilegeProperty
|
||||
if v.Type == 1 then
|
||||
|
@ -177,7 +176,7 @@ function this.GetProData(indexType,index,lv)
|
|||
local allPro = {}
|
||||
if index >= 0 then
|
||||
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
|
||||
for i = 1,#n.Property do
|
||||
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)
|
||||
if all then
|
||||
for i = 1,#list do
|
||||
local color = ""
|
||||
if lv >= list[i].lv then
|
||||
color = "5dc446"
|
||||
else
|
||||
color = "fdf5e5"
|
||||
if list[i].lv ~= 0 then
|
||||
local color = ""
|
||||
if lv >= list[i].lv then
|
||||
color = "5dc446"
|
||||
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
|
||||
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
|
||||
else
|
||||
local color = "5dc446"
|
||||
|
|
|
@ -71,7 +71,7 @@ function RoleLikeabilityPopup:UpDataProList(lv)
|
|||
for i = 1,#self.proList do
|
||||
self.proList[i].go.gameObject:SetActive(false)
|
||||
end
|
||||
self:UpDataProSingleList(pro2,2)
|
||||
self:UpDataProSingleList(pro2,1)
|
||||
end
|
||||
|
||||
function RoleLikeabilityPopup:UpDataProSingleList(data,index)
|
||||
|
|
Loading…
Reference in New Issue