首充英雄十级属性天赋修改提交

dev_chengFeng
jiaoyangna 2020-07-17 11:14:07 +08:00
parent 1838823c37
commit 3ae13a9762
1 changed files with 35 additions and 15 deletions

View File

@ -136,6 +136,15 @@ function RoleGetInfoPopup:OnShow()
local heroSData=ConfigManager.GetConfigData(ConfigName.HeroConfig, heroSId) local heroSData=ConfigManager.GetConfigData(ConfigName.HeroConfig, heroSId)
if isGet then if isGet then
this.GetShowPanelData() this.GetShowPanelData()
--天赋
this.talentBtn:SetActive(heroSData.OpenPassiveSkillRules ~= nil)
if heroSData.OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroSData,0,0)
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#heroSData.OpenPassiveSkillRules - compoundNum
end
Util.AddOnceClick(this.talentBtn,function()
UIManager.OpenPanel(UIName.RoleTalentPopup,heroSData,0,0)
end)
else else
this.NoGetShowPanelData() this.NoGetShowPanelData()
end end
@ -189,16 +198,6 @@ function RoleGetInfoPopup:OnShow()
end) end)
end end
end end
--天赋
this.talentBtn:SetActive(heroSData.OpenPassiveSkillRules ~= nil)
if heroSData.OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroSData,0,0)
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#heroSData.OpenPassiveSkillRules - compoundNum
end
Util.AddOnceClick(this.talentBtn,function()
UIManager.OpenPanel(UIName.RoleTalentPopup,heroSData,0,0)
end)
--法宝 --法宝
self.talismanBtn.gameObject:SetActive(heroSData.EquipTalismana~=nil) self.talismanBtn.gameObject:SetActive(heroSData.EquipTalismana~=nil)
if heroSData.EquipTalismana~=nil then if heroSData.EquipTalismana~=nil then
@ -314,14 +313,33 @@ function this.CalculateHeroAllProValList(heroConFigData,_starNum,isCalculateStar
for i, v in ConfigPairs(propertyConfig) do for i, v in ConfigPairs(propertyConfig) do
allAddProVal[i] = 0 allAddProVal[i] = 0
end end
local heroRankupConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.HeroRankupConfig, "Star", heroConFigData.Star, "OpenStar", _starNum) -- local heroRankupConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.HeroRankupConfig, "Star", heroConFigData.Star, "OpenStar", _starNum)
local curLvNum = 1 -- local curLvNum = 1
-- local breakId = 0
-- local upStarId = 0
-- if isCalculateStarVal then
-- curLvNum = heroLevelConfig[heroRankupConfig.OpenLevel].CharacterLevelPara
-- for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.HeroRankupConfig)) do
-- if v.Star == heroConFigData.Star then
-- if v.Type == 1 then
-- breakId = v.Id
-- end
-- if v.Type == 2 then
-- upStarId = v.Id
-- end
-- end
-- end
-- end
local heroRankupConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.HeroRankupConfig, "Star", heroConFigData.Star, "LimitStar", _starNum)
local curLvNum=1
local breakId = 0 local breakId = 0
local upStarId = 0 local upStarId = 0
if isCalculateStarVal then if isCalculateStarVal then
curLvNum = heroLevelConfig[heroRankupConfig.OpenLevel].CharacterLevelPara --等级
curLvNum = heroRankupConfig.OpenLevel
--解锁天赋
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.HeroRankupConfig)) do for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.HeroRankupConfig)) do
if v.Star == heroConFigData.Star then if v.OpenStar == _starNum and v.Star==heroConFigData.Star then
if v.Type == 1 then if v.Type == 1 then
breakId = v.Id breakId = v.Id
end end
@ -330,6 +348,9 @@ function this.CalculateHeroAllProValList(heroConFigData,_starNum,isCalculateStar
end end
end end
end end
if breakId==0 then
breakId=6
end
end end
allAddProVal[HeroProType.Attack]=HeroManager.CalculateProVal(heroConFigData.Attack, curLvNum, breakId,upStarId,HeroProType.Attack) allAddProVal[HeroProType.Attack]=HeroManager.CalculateProVal(heroConFigData.Attack, curLvNum, breakId,upStarId,HeroProType.Attack)
allAddProVal[HeroProType.Hp]=HeroManager.CalculateProVal(heroConFigData.Hp, curLvNum, breakId,upStarId,HeroProType.Hp) allAddProVal[HeroProType.Hp]=HeroManager.CalculateProVal(heroConFigData.Hp, curLvNum, breakId,upStarId,HeroProType.Hp)
@ -344,7 +365,6 @@ function this.CalculateHeroAllProValList(heroConFigData,_starNum,isCalculateStar
-- allAddProVal[heroConFigData.SecondaryFactor[i][1]] = heroConFigData.SecondaryFactor[i][2] -- allAddProVal[heroConFigData.SecondaryFactor[i][1]] = heroConFigData.SecondaryFactor[i][2]
-- end -- end
-- end -- end
Util.AddOnceClick(this.talentBtn,function() Util.AddOnceClick(this.talentBtn,function()
UIManager.OpenPanel(UIName.RoleTalentPopup,heroConFigData,breakId,upStarId) UIManager.OpenPanel(UIName.RoleTalentPopup,heroConFigData,breakId,upStarId)
end) end)