[角色天赋]======角色天赋显示修改
parent
0cf058dbb5
commit
01506ba48c
|
@ -556,6 +556,24 @@ function SetHeroFormationFlyEffect(par,spLoader,effect,_star,_layer)
|
||||||
end
|
end
|
||||||
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个预设
|
--把英雄星级父对象和星级传过来 type 1 第6-11个预设 type 2 第12-17个预设 type 3 第18-24个预设
|
||||||
function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rotation)
|
function SetHeroStars(spLoader, starGrid, star, type,_starSize,_scale,_pivot,rotation)
|
||||||
|
|
||||||
|
|
|
@ -305,6 +305,7 @@ function this:UpdateHeroInfoData()
|
||||||
local talentBtnImage = heroStar == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh"
|
local talentBtnImage = heroStar == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh"
|
||||||
self.talentBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(talentBtnImage)
|
self.talentBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(talentBtnImage)
|
||||||
local OpenPassiveSkillRules = heroStar >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
|
local OpenPassiveSkillRules = heroStar >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
|
||||||
|
OpenPassiveSkillRules=GetPassiveByMaxStar(heroConFigData,OpenPassiveSkillRules)
|
||||||
if OpenPassiveSkillRules then
|
if OpenPassiveSkillRules then
|
||||||
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
|
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
|
||||||
self.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
self.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
||||||
|
|
|
@ -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").sprite=this.spLoader:LoadSprite(SkillIconType[aaa])
|
||||||
Util.GetGameObject(passObj,"SkillTypeImage"):GetComponent("Image"):SetNativeSize()
|
Util.GetGameObject(passObj,"SkillTypeImage"):GetComponent("Image"):SetNativeSize()
|
||||||
local OpenPassiveSkillRules = star >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
|
local OpenPassiveSkillRules = star >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
|
||||||
|
OpenPassiveSkillRules=GetPassiveByMaxStar(heroConFigData,OpenPassiveSkillRules)
|
||||||
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
|
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
|
||||||
if star==11 then
|
if star==11 then
|
||||||
Util.GetGameObject(passObj,"Text"):GetComponent("Text").text = #openlists - compoundOpenNum .."/"..10
|
Util.GetGameObject(passObj,"Text"):GetComponent("Text").text = #openlists - compoundOpenNum .."/"..10
|
||||||
|
|
|
@ -2912,6 +2912,7 @@ function this.GetAllPassiveSkillIds(heroConfig, breakId, upStarId)
|
||||||
local compoundNum = 0
|
local compoundNum = 0
|
||||||
local compoundOPenNum = 0
|
local compoundOPenNum = 0
|
||||||
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar >= this.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
|
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
|
if OpenPassiveSkillRules then
|
||||||
for i = 1, #OpenPassiveSkillRules do
|
for i = 1, #OpenPassiveSkillRules do
|
||||||
if OpenPassiveSkillRules[i][1] == 1 then --突破
|
if OpenPassiveSkillRules[i][1] == 1 then --突破
|
||||||
|
|
|
@ -294,6 +294,7 @@ function this.RoleInfo0()
|
||||||
--local talentBtnImage = curHeroData.star == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh"
|
--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)
|
this.talentBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(talentBtnImage)
|
||||||
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
|
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
|
||||||
|
OpenPassiveSkillRules=GetPassiveByMaxStar(curHeroData.heroConfig,OpenPassiveSkillRules)
|
||||||
if OpenPassiveSkillRules then
|
if OpenPassiveSkillRules then
|
||||||
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
|
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
|
||||||
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
||||||
|
|
|
@ -112,6 +112,7 @@ function RoleAwakeLayout:UpdateHeroUpStarData()
|
||||||
this.curLvEnd.text= HeroManager.GetCurHeroStarLvEnd(1,curHeroData)
|
this.curLvEnd.text= HeroManager.GetCurHeroStarLvEnd(1,curHeroData)
|
||||||
this.nextLvEnd.text= HeroManager.GetCurHeroStarLvEnd(2,curHeroData,curHeroData.breakId,upStarRankUpConfig.Id)
|
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
|
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)
|
local openlists,compoundOpenNum,compoundNum,allUpStarOpenData = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
|
||||||
this.talent1Progress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
this.talent1Progress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
||||||
this.talent2Progress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
this.talent2Progress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
||||||
|
|
|
@ -430,8 +430,10 @@ function this.GetSkillsData()
|
||||||
heroSkill.Skilltips = nil
|
heroSkill.Skilltips = nil
|
||||||
|
|
||||||
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
|
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
|
||||||
|
OpenPassiveSkillRules=GetPassiveByMaxStar(curHeroData.heroConfig,OpenPassiveSkillRules)
|
||||||
if OpenPassiveSkillRules then
|
if OpenPassiveSkillRules then
|
||||||
local openlists,compoundOpenNum,compoundNum,allUpStarOpenData = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
|
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.Name = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum
|
||||||
heroSkill.state = 1
|
heroSkill.state = 1
|
||||||
if curHeroData.star == 12 then
|
if curHeroData.star == 12 then
|
||||||
|
|
|
@ -58,6 +58,7 @@ function RoleTalentPopup:GetTalentDataShow()
|
||||||
LogError("upstarid =="..upStarId)
|
LogError("upstarid =="..upStarId)
|
||||||
local openNum=0
|
local openNum=0
|
||||||
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar >= HeroManager.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
|
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
|
if OpenPassiveSkillRules then
|
||||||
for i = 1, #OpenPassiveSkillRules do
|
for i = 1, #OpenPassiveSkillRules do
|
||||||
if OpenPassiveSkillRules[i][1] == 1 then--突破
|
if OpenPassiveSkillRules[i][1] == 1 then--突破
|
||||||
|
|
Loading…
Reference in New Issue