bug修改

This commit is contained in:
xiekaidong 2023-04-18 20:37:00 +08:00
parent 22b46a5129
commit bbc04cf46a
5 changed files with 30 additions and 9 deletions

View File

@ -55,7 +55,7 @@ end
function HeroManager:getSkillIcon(skillId) function HeroManager:getSkillIcon(skillId)
local cfg = ConfigManager:getConfig("skill")[skillId] local cfg = ConfigManager:getConfig("skill")[skillId]
return cfg and tostring(cfg.icon) return cfg and tostring(cfg.battle_icon)
end end
function HeroManager:getSkillRogueDesc(skillId) function HeroManager:getSkillRogueDesc(skillId)
@ -68,6 +68,16 @@ function HeroManager:getSkillRogueIcon(skillId)
return cfg and tostring(cfg.icon) return cfg and tostring(cfg.icon)
end end
function HeroManager:getSkillRogueBattleBg(skillId)
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
return cfg and "battle_board_" .. cfg.qlt
end
function HeroManager:getSkillRogueBg(skillId)
local cfg = ConfigManager:getConfig("skill_rogue")[skillId]
return cfg and "frame_" .. cfg.qlt
end
function HeroManager:getActiveRogueLvs() function HeroManager:getActiveRogueLvs()
if not self.activeRogueLvs then if not self.activeRogueLvs then
self.activeRogueLvs = {} self.activeRogueLvs = {}

View File

@ -16,6 +16,7 @@ function BattleSelectSkillCell:refresh(skillId, func)
self.selectSkillCell = CellManager:addCellComp(uiMap["skill_select_cell.skill_select_cell"], SELECT_SKILL_CELL) self.selectSkillCell = CellManager:addCellComp(uiMap["skill_select_cell.skill_select_cell"], SELECT_SKILL_CELL)
end end
self.selectSkillCell:refresh(skillId) self.selectSkillCell:refresh(skillId)
uiMap["skill_select_cell.img"]:setSprite(GConst.ATLAS_PATH.BATTLE, ModuleManager.HeroManager:getSkillRogueBattleBg(skillId))
end end
return BattleSelectSkillCell return BattleSelectSkillCell

View File

@ -5,6 +5,7 @@ function SelectSkillCell:refresh(skillId, count)
uiMap["skill_select_cell.icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueIcon(skillId)) uiMap["skill_select_cell.icon"]:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
-- uiMap["skill_select_cell.value"]:setText() -- uiMap["skill_select_cell.value"]:setText()
uiMap["skill_select_cell.count"]:setText(count or GConst.EMPTY_STRING) uiMap["skill_select_cell.count"]:setText(count or GConst.EMPTY_STRING)
self.baseObject:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueBg(skillId))
end end
function SelectSkillCell:addClickListener(func) function SelectSkillCell:addClickListener(func)

View File

@ -2,6 +2,12 @@ local HeroDetailUI = class("HeroDetailUI", BaseUI)
local DEFAULT_FACTOR = GConst.BattleConst.DEFAULT_FACTOR local DEFAULT_FACTOR = GConst.BattleConst.DEFAULT_FACTOR
local SKILL_BUFF_BG = {
[2] = "frame_1",
[3] = "frame_2",
[4] = "frame_3",
}
function HeroDetailUI:isFullScreen() function HeroDetailUI:isFullScreen()
return false return false
end end
@ -46,15 +52,16 @@ function HeroDetailUI:_display()
for i = 1, 3 do for i = 1, 3 do
local skillId = skillList[i] local skillId = skillList[i]
if skillId then if skillId then
local skillIcon = uiMap["hero_detail_ui.bg.skill_up_" .. i] local skillIcon = uiMap["hero_detail_ui.bg.skill_up_" .. i .. ".icon"]
local skillBg = uiMap["hero_detail_ui.bg.skill_up_" .. i]
local skillLv = uiMap["hero_detail_ui.bg.skill_up_" .. i .. ".desc"] local skillLv = uiMap["hero_detail_ui.bg.skill_up_" .. i .. ".desc"]
skillIcon:addClickListener(function() skillBg:addClickListener(function()
ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId), skillIcon) ModuleManager.TipsManager:showDescTips(ModuleManager.HeroManager:getSkillRogueDesc(skillId), skillIcon)
end) end)
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueBg(skillId))
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueIcon(skillId)) skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_BUFF, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
skillIcon:setImageGray(i > activeCount) skillBg:setImageGray(i > activeCount)
skillIcon:setTouchEnable(true) skillBg:setTouchEnable(true)
if i > activeCount then if i > activeCount then
skillLv:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, skillLvs[i] or 0)) skillLv:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, skillLvs[i] or 0))
else else

View File

@ -146,9 +146,11 @@ function BattleUnitEntity:changeActiveSkillId(originSkillId, tartgetSkillId)
for _, skillEntity in ipairs(self.activeSkills) do for _, skillEntity in ipairs(self.activeSkills) do
if skillEntity:getSkillid() == originSkillId then if skillEntity:getSkillid() == originSkillId then
skillEntity:changeSkillId(tartgetSkillId) skillEntity:changeSkillId(tartgetSkillId)
local extraCount = self.skillExtraUseTimes[originSkillId] if self.skillExtraUseTimes then
if extraCount then local extraCount = self.skillExtraUseTimes[originSkillId]
self.skillExtraUseTimes[tartgetSkillId] = extraCount if extraCount then
self.skillExtraUseTimes[tartgetSkillId] = extraCount
end
end end
break break
end end