神将详情显示错误修改

dev_chengFeng
jiaoyangna 2021-10-12 14:54:12 +08:00
parent e7cfacdccd
commit e70329e605
2 changed files with 17 additions and 21 deletions

View File

@ -129,35 +129,31 @@ function RoleProInfoPopup:OnOpen(_allAddProVal,_configData,_isShowGuild,_guildSk
-- 跳转按钮如果设置的公会技能等级,说明是别人,就不显示跳转
this.jumpBtn:SetActive(_guildSkill == nil)
end
local lv = LikabilityManager.GetTotalHeroLikeLv(_configData.Id)
local pro = LikabilityManager.GetProData(2,-1,lv)
if not this.specialPro then
this.specialPro = {}
end
for k,v in pairs(this.specialPro) do
v.go.gameObject:SetActive(false)
end
if pro and LengthOfTable(pro) > 0 then
this.thirdlyGridP:SetActive(true)
for k,v in pairs(pro) do
if not this.specialPro[k] then
this.specialPro[k] = {}
this.specialPro[k].go = newObjToParent(this.proPre2,this.thirdlyGrid)
this.specialPro[k].jumpBtn = Util.GetGameObject(this.specialPro[k].go, "jumpBtn")
this.specialPro[k].guildProName = Util.GetGameObject(this.specialPro[k].go, "proName"):GetComponent("Text")
this.specialPro[k].guildProValue = Util.GetGameObject(this.specialPro[k].go, "proVale"):GetComponent("Text")
end
this.specialPro[k].go.gameObject:SetActive(true)
this.specialPro[k].guildProName.text = "好感度-"..propertyConfig[k].Info
this.specialPro[k].guildProValue.text = v
-- 跳转按钮如果设置的公会技能等级,说明是别人,就不显示跳转
this.specialPro[k].jumpBtn:SetActive(_guildSkill == nil)
Util.AddOnceClick(this.specialPro[k].jumpBtn, function()
JumpManager.GoJump(40033)
end)
local index = 1
local lv = LikabilityManager.GetTotalHeroLikeLv(_configData.Id)
if lv > 0 then
if not this.specialPro[index] then
this.specialPro[index] = {}
this.specialPro[index].go = newObjToParent(this.proPre2,this.thirdlyGrid)
this.specialPro[index].jumpBtn = Util.GetGameObject(this.specialPro[index].go, "jumpBtn")
this.specialPro[index].guildProName = Util.GetGameObject(this.specialPro[index].go, "proName"):GetComponent("Text")
this.specialPro[index].guildProValue = Util.GetGameObject(this.specialPro[index].go, "proVale"):GetComponent("Text")
end
this.specialPro[index].go.gameObject:SetActive(true)
this.specialPro[index].guildProName.text = string.format("好感度-%s级",lv)
this.specialPro[index].guildProValue.text = ""
Util.AddOnceClick(this.specialPro[index].jumpBtn, function()
JumpManager.GoJump(40033)
end)
end
index = index + 1
end
--界面关闭时调用(用于子类重写)
function RoleProInfoPopup:OnClose()