[角色天赋]======角色天赋显示修改

dev_chengFeng
wangzhenxing 2022-02-10 17:52:40 +08:00
parent 0cf058dbb5
commit 01506ba48c
8 changed files with 26 additions and 0 deletions

View File

@ -556,6 +556,24 @@ function SetHeroFormationFlyEffect(par,spLoader,effect,_star,_layer)
end
end
function GetPassiveByMaxStar(heroConfig,list)
--local OpenPassiveSkillRules = list
local heroRankUp=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.HeroRankupConfig,"Type",2,"OpenStar",heroConfig.MaxRank)
if not heroRankUp then
list=heroConfig.OpenPassiveSkillRules
end
local aaa={}
if list then
for i = 1,#list do
if list[i][2]<=heroRankUp.Id then
table.insert(aaa,list[i])
end
end
end
return aaa
end
--把英雄星级父对象和星级传过来 type 1 第6-11个预设 type 2 第12-17个预设 type 3 第18-24个预设
function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rotation)

View File

@ -305,6 +305,7 @@ function this:UpdateHeroInfoData()
local talentBtnImage = heroStar == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh"
self.talentBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(talentBtnImage)
local OpenPassiveSkillRules = heroStar >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(heroConFigData,OpenPassiveSkillRules)
if OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
self.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum

View File

@ -152,6 +152,7 @@ function HandBookRoleInfoLayout:OnShowHeroData(_starType,star,_lv)
Util.GetGameObject(passObj,"SkillTypeImage"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SkillIconType[aaa])
Util.GetGameObject(passObj,"SkillTypeImage"):GetComponent("Image"):SetNativeSize()
local OpenPassiveSkillRules = star >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(heroConFigData,OpenPassiveSkillRules)
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
if star==11 then
Util.GetGameObject(passObj,"Text"):GetComponent("Text").text = #openlists - compoundOpenNum .."/"..10

View File

@ -2912,6 +2912,7 @@ function this.GetAllPassiveSkillIds(heroConfig, breakId, upStarId)
local compoundNum = 0
local compoundOPenNum = 0
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar >= this.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(heroConfig,OpenPassiveSkillRules)
if OpenPassiveSkillRules then
for i = 1, #OpenPassiveSkillRules do
if OpenPassiveSkillRules[i][1] == 1 then --突破

View File

@ -294,6 +294,7 @@ function this.RoleInfo0()
--local talentBtnImage = curHeroData.star == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh"
this.talentBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(talentBtnImage)
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(curHeroData.heroConfig,OpenPassiveSkillRules)
if OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum

View File

@ -112,6 +112,7 @@ function RoleAwakeLayout:UpdateHeroUpStarData()
this.curLvEnd.text= HeroManager.GetCurHeroStarLvEnd(1,curHeroData)
this.nextLvEnd.text= HeroManager.GetCurHeroStarLvEnd(2,curHeroData,curHeroData.breakId,upStarRankUpConfig.Id)
local OpenPassiveSkillRules = curHeroData.star == HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(curHeroData.heroConfig,OpenPassiveSkillRules)
local openlists,compoundOpenNum,compoundNum,allUpStarOpenData = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
this.talent1Progress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
this.talent2Progress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum

View File

@ -430,8 +430,10 @@ function this.GetSkillsData()
heroSkill.Skilltips = nil
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(curHeroData.heroConfig,OpenPassiveSkillRules)
if OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum,allUpStarOpenData = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
LogError("#OpenPassiveSkillRules=="..#OpenPassiveSkillRules.." compoundNum=="..compoundNum)
heroSkill.Name = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
heroSkill.state = 1
if curHeroData.star == 12 then

View File

@ -58,6 +58,7 @@ function RoleTalentPopup:GetTalentDataShow()
LogError("upstarid =="..upStarId)
local openNum=0
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar >= HeroManager.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
OpenPassiveSkillRules=GetPassiveByMaxStar(heroConfig,OpenPassiveSkillRules)
if OpenPassiveSkillRules then
for i = 1, #OpenPassiveSkillRules do
if OpenPassiveSkillRules[i][1] == 1 then--突破