【神魂】=====技能描述修改

dev_chengFeng
wangzhenxing 2021-11-05 17:21:18 +08:00
parent e35ded2b5d
commit a92a76e3ab
4 changed files with 33 additions and 7 deletions

View File

@ -1707,6 +1707,32 @@ function GetSkillConfigDesc(cfg)
return GetLanguageStrById(cfg.Desc)
end
--获取技能描述
function GetCurrSkillConfigDesc(cfg,soulLv)
if cfg.DescColor then
local ss = {}
local skillValue=cfg.DescValue
if cfg.SpiritsValue and soulLv and soulLv>0 then
skillValue=cfg.SpiritsValue[soulLv]
end
for i=1, #cfg.DescColor do
local str
if cfg.DescColor[i] == 1 then
str=string.format("<color=#4c805eFF>%s</color>", GetLanguageStrById(skillValue[i]))
elseif cfg.DescColor[i] == 2 then
str=string.format("<color=#b4595eFF>%s</color>", GetLanguageStrById(skillValue[i]))
else
str=skillValue[i]
end
ss[i] = str
end
return string.format(GetLanguageStrById(cfg.Desc), unpack(ss))
end
return GetLanguageStrById(cfg.Desc)
end
-- 设置排名所需要的数字框
function SetRankNumFrame(spLoader, rankNum)
local rankNumRes = {

View File

@ -125,9 +125,9 @@ function RoleInfoPopup:BindEvent()
end
this:SetSkillSelectImage(this.skill1.transform, true)
local star,starType = curHeroData.GetStar(1)
local maxLv = HeroManager.GetHeroSkillMaxLevel(curHeroData.heroConfig.Id, allSkillDatas[1].skillConfig.Type)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup, allSkillDatas[1], 4, 10, maxLv, 1)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup, allSkillDatas[1], 4, 10, maxLv, 1,nil,star)
--this.skillGrid:GetComponent("Canvas").overrideSorting=true
--this.skillGrid:GetComponent("Canvas").sortingOrder = panel.sortingOrder + 1
triggerCallBack = function(panelType, p)
@ -150,9 +150,9 @@ function RoleInfoPopup:BindEvent()
Log("===============22222 "..allSkillDatas[2].skillConfig.Type)
local star,starType = curHeroData.GetStar(1)
local maxLv = HeroManager.GetHeroSkillMaxLevel(curHeroData.heroConfig.Id, allSkillDatas[2].skillConfig.Type)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup, allSkillDatas[2], 4, 10, maxLv, 2)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup, allSkillDatas[2], 4, 10, maxLv, 2,nil,star)
--this.skillGrid:GetComponent("Canvas").overrideSorting=true
--this.skillGrid:GetComponent("Canvas").sortingOrder = panel.sortingOrder + 1
triggerCallBack = function(panelType, p)

View File

@ -50,6 +50,7 @@ function this:OnOpen(...)
local dividend = args[3] and args[3] or 10
local maxLv=1--args[4]
local skilltype =args[5]
local soulLv=args[7]
if openType == 1 then
this.content.anchoredPosition = Vector2.New(0, 0)
elseif openType == 2 then
@ -75,8 +76,7 @@ function this:OnOpen(...)
this.skillTypeImage.sprite=this.spLoader:LoadSprite(SkillIconType[SkillType.Bei])--被动技
end
this.cureffect.transform:DOAnchorPosY(0,0,true)
this.cureffect.text = GetSkillConfigDesc(curSkillData.skillConfig)
this.cureffect.text = GetCurrSkillConfigDesc(curSkillData.skillConfig,soulLv)
local nextCfg
if curSkillData.skillConfig.Type==SkillType.Pu then
nextCfg = ConfigManager.TryGetConfigData(ConfigName.SkillConfig, curSkillData.skillConfig.Id+1)

View File

@ -364,7 +364,7 @@ function this.UpdateHeroUpStarProUpSkillShow(skillGridGO,skillTabs,passiveSkills
local maxLv= HeroManager.GetHeroSkillMaxLevel(curHeroData.heroConfig.Id,curSkillData.skillConfig.Type)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup,curSkillData,1,10,maxLv,i)
local panel = UIManager.OpenPanel(UIName.SkillInfoPopup,curSkillData,1,10,maxLv,i,nil,GodSoulManager.GetGodSoulLv(curHeroData.dynamicId))
skillGridGO:GetComponent("Canvas").sortingOrder = panel.sortingOrder + 1
triggerCallBack = function (panelType, p)
if panelType == UIName.SkillInfoPopup and panel == p then --监听到SkillInfoPopup关闭把层级设回去