From 01506ba48cafe4a26c749b22d51d6185fd488c44 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 10 Feb 2022 17:52:40 +0800 Subject: [PATCH] =?UTF-8?q?[=E8=A7=92=E8=89=B2=E5=A4=A9=E8=B5=8B]=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=E8=A7=92=E8=89=B2=E5=A4=A9=E8=B5=8B=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Common/functions.lua | 18 ++++++++++++++++++ .../Modules/HandBook/HandBookHeroInfoPanel.lua | 1 + .../HandBook/HandBookRoleInfoLayout.lua | 1 + .../~Lua/Modules/Hero/HeroManager.lua | 1 + .../~Lua/Modules/Popup/RoleInfoPopup.lua | 1 + .../~Lua/Modules/RoleInfo/RoleAwakeLayout.lua | 1 + .../~Lua/Modules/RoleInfo/RoleInfoLayout.lua | 2 ++ .../~Lua/Modules/RoleInfo/RoleTalentPopup.lua | 1 + 8 files changed, 26 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index 9e359a104c..e71d20d7b3 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -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) diff --git a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua index 22e7a31b34..23daf2769a 100644 --- a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookRoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookRoleInfoLayout.lua index 701e9a9be9..1120143420 100644 --- a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookRoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookRoleInfoLayout.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 680d996b2d..6129cb2341 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -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 --突破 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua index f7a37087f9..465676eb06 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleAwakeLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleAwakeLayout.lua index fbf0c617a5..80ec507dce 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleAwakeLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleAwakeLayout.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua index c6aefcba2e..5498a2d52e 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoLayout.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleTalentPopup.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleTalentPopup.lua index 7df1b3c002..83dda77406 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleTalentPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleTalentPopup.lua @@ -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--突破