fix bug
This commit is contained in:
parent
10ccba3f7d
commit
91ac8062ba
@ -693,6 +693,7 @@ GConst.ALL_ATTR = {
|
|||||||
ATTR_NORMAL_HURTP_ALL = "attr_normal_hurtp_all",-- 全体普攻增伤(百分比)
|
ATTR_NORMAL_HURTP_ALL = "attr_normal_hurtp_all",-- 全体普攻增伤(百分比)
|
||||||
ATTR_SKILL_HURTP_ALL = "attr_skill_hurtp_all", -- 全体技能增伤(百分比)
|
ATTR_SKILL_HURTP_ALL = "attr_skill_hurtp_all", -- 全体技能增伤(百分比)
|
||||||
ATTR_ATKP_ALL = "attr_atkp_all", -- 全体攻击(百分比)
|
ATTR_ATKP_ALL = "attr_atkp_all", -- 全体攻击(百分比)
|
||||||
|
ATTR_HPP_ALL = "attr_hpp_all", -- 全体英雄生命(百分比)
|
||||||
}
|
}
|
||||||
|
|
||||||
GConst.GAMEOBJECT_LAYER = {
|
GConst.GAMEOBJECT_LAYER = {
|
||||||
|
|||||||
@ -2793,9 +2793,6 @@ function BattleBaseController:findAttention()
|
|||||||
for c = 1, GConst.BattleConst.COLUMN_COUNT do
|
for c = 1, GConst.BattleConst.COLUMN_COUNT do
|
||||||
local posId = ModuleManager.BattleManager:getPosId(r, c)
|
local posId = ModuleManager.BattleManager:getPosId(r, c)
|
||||||
local gridEntity = self.battleData:getGridEntity(posId)
|
local gridEntity = self.battleData:getGridEntity(posId)
|
||||||
if not gridEntity then
|
|
||||||
print("=====")
|
|
||||||
end
|
|
||||||
local mainElementType = gridEntity:getElementType()
|
local mainElementType = gridEntity:getElementType()
|
||||||
if gridEntity:canChangeInfo() then
|
if gridEntity:canChangeInfo() then
|
||||||
self.findAttentionPathList = table.clearOrCreate(self.findAttentionPathList)
|
self.findAttentionPathList = table.clearOrCreate(self.findAttentionPathList)
|
||||||
|
|||||||
@ -20,8 +20,8 @@ function HeroManager:showHeroSkillInfoUI2(heroEntity, buffId)
|
|||||||
UIManager:showUI("app/ui/hero/hero_skill_info_ui_2", {heroEntity = heroEntity, buffId = buffId})
|
UIManager:showUI("app/ui/hero/hero_skill_info_ui_2", {heroEntity = heroEntity, buffId = buffId})
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroManager:showAttrAllUI()
|
function HeroManager:showAttrAllUI(heroEntity)
|
||||||
UIManager:showUI("app/ui/hero/hero_attr_all_ui")
|
UIManager:showUI("app/ui/hero/hero_attr_all_ui", {heroEntity = heroEntity})
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroManager:upgradeHero(heroId, heroEntity, level)
|
function HeroManager:upgradeHero(heroId, heroEntity, level)
|
||||||
@ -208,7 +208,7 @@ function HeroManager:getSkillRogueBg(skillId, onlyQlt)
|
|||||||
-- if cfg.skill_position and not onlyQlt then -- 解锁技能类型
|
-- if cfg.skill_position and not onlyQlt then -- 解锁技能类型
|
||||||
-- return "frame_skill_0"
|
-- return "frame_skill_0"
|
||||||
-- end
|
-- end
|
||||||
return cfg and "base_" .. cfg.qlt
|
return cfg and "base_" .. (cfg.icon_base or 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroManager:getSkillBg(skillId)
|
function HeroManager:getSkillBg(skillId)
|
||||||
|
|||||||
@ -12,7 +12,8 @@ function HeroAttrUI:onPressBackspace()
|
|||||||
self:closeUI()
|
self:closeUI()
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroAttrUI:ctor()
|
function HeroAttrUI:ctor(parmas)
|
||||||
|
self.heroEntity = parmas.heroEntity
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroAttrUI:onLoadRootComplete()
|
function HeroAttrUI:onLoadRootComplete()
|
||||||
@ -29,17 +30,16 @@ function HeroAttrUI:onLoadRootComplete()
|
|||||||
uiMap["hero_attr_all_ui.content.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_26))
|
uiMap["hero_attr_all_ui.content.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_26))
|
||||||
uiMap["hero_attr_all_ui.content.hp_desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_27))
|
uiMap["hero_attr_all_ui.content.hp_desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_27))
|
||||||
uiMap["hero_attr_all_ui.content.atk_desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_28))
|
uiMap["hero_attr_all_ui.content.atk_desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_28))
|
||||||
uiMap["hero_attr_all_ui.content.bar_bg.slider_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_29))
|
uiMap["hero_attr_all_ui.content.desc_tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_29))
|
||||||
|
|
||||||
self.slider = uiMap["hero_attr_all_ui.content.bar_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
|
||||||
self.hpAttrTx = uiMap["hero_attr_all_ui.content.hp_attr_tx"]
|
self.hpAttrTx = uiMap["hero_attr_all_ui.content.hp_attr_tx"]
|
||||||
self.atkAttrTx = uiMap["hero_attr_all_ui.content.atk_attr_tx"]
|
self.atkAttrTx = uiMap["hero_attr_all_ui.content.atk_attr_tx"]
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroAttrUI:onRefresh()
|
function HeroAttrUI:onRefresh()
|
||||||
self.slider.value = 0.76
|
local attr = self.heroEntity:getStarAttr()
|
||||||
self.hpAttrTx:setText("100")
|
self.hpAttrTx:setText(GFunc.getFinalAttrValue(GConst.ALL_ATTR.ATTR_HPP_ALL, attr.attr_hpp_all or 0))
|
||||||
self.atkAttrTx:setText("100")
|
self.atkAttrTx:setText(GFunc.getFinalAttrValue(GConst.ALL_ATTR.ATTR_ATKP_ALL, attr.attr_atkp_all or 0))
|
||||||
end
|
end
|
||||||
|
|
||||||
return HeroAttrUI
|
return HeroAttrUI
|
||||||
@ -10,13 +10,13 @@ local DEFAULT_FACTOR = GConst.BattleConst.DEFAULT_FACTOR
|
|||||||
local BTN_LIGHT = {
|
local BTN_LIGHT = {
|
||||||
"act_common_btn_16_1",
|
"act_common_btn_16_1",
|
||||||
"act_common_btn_17_1",
|
"act_common_btn_17_1",
|
||||||
"act_common_btn_18_1",
|
"act_common_btn_25_1",
|
||||||
}
|
}
|
||||||
|
|
||||||
local BTN_NORMAL = {
|
local BTN_NORMAL = {
|
||||||
"act_common_btn_16_2",
|
"act_common_btn_16_2",
|
||||||
"act_common_btn_17_2",
|
"act_common_btn_17_2",
|
||||||
"act_common_btn_18_2",
|
"act_common_btn_25_2",
|
||||||
}
|
}
|
||||||
|
|
||||||
function HeroDetailUI:getPrefabPath()
|
function HeroDetailUI:getPrefabPath()
|
||||||
@ -175,6 +175,11 @@ function HeroDetailUI:onLoadRootComplete()
|
|||||||
self:addEventListener(EventManager.CUSTOM_EVENT.GO_DUNGEON_UI, function()
|
self:addEventListener(EventManager.CUSTOM_EVENT.GO_DUNGEON_UI, function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
local middle = uiMap["hero_detail_ui.middle"]
|
||||||
|
local rect = self.root:getRectSize()
|
||||||
|
local bgHeight = rect.height * 0.66
|
||||||
|
middle:setSizeDeltaY(bgHeight)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroDetailUI:initList()
|
function HeroDetailUI:initList()
|
||||||
@ -192,13 +197,15 @@ function HeroDetailUI:getIsOpen(page)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroDetailUI:onRefresh(checkLevel)
|
function HeroDetailUI:onRefresh(checkUp)
|
||||||
|
self.checkLvUpState = checkUp
|
||||||
self:updateTop()
|
self:updateTop()
|
||||||
self:updateHero()
|
self:updateHero()
|
||||||
self:updateSide()
|
self:updateSide()
|
||||||
self:refreshPageInfo()
|
self:refreshPageInfo()
|
||||||
self:refreshSkillInfo()
|
self:refreshSkillInfo()
|
||||||
self:checkLvUp(checkLevel)
|
self:checkLvUp(checkUp)
|
||||||
|
self.checkLvUpState = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroDetailUI:changePage(page)
|
function HeroDetailUI:changePage(page)
|
||||||
@ -281,7 +288,6 @@ function HeroDetailUI:refreshSkillInfo()
|
|||||||
-- ModuleManager.TipsManager:showSkillTips(skillIcon, cfg.buff_id, skillId)
|
-- ModuleManager.TipsManager:showSkillTips(skillIcon, cfg.buff_id, skillId)
|
||||||
ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, i, cfg.buff_id)
|
ModuleManager.HeroManager:showHeroSkillInfoUI(self.heroEntity, i, cfg.buff_id)
|
||||||
end)
|
end)
|
||||||
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
|
||||||
skillBg:setTouchEnable(true)
|
skillBg:setTouchEnable(true)
|
||||||
if skillUnlcokStar > star then
|
if skillUnlcokStar > star then
|
||||||
self.skillNeedStarNodes[i]:setActive(true)
|
self.skillNeedStarNodes[i]:setActive(true)
|
||||||
@ -298,7 +304,8 @@ function HeroDetailUI:refreshSkillInfo()
|
|||||||
self.skillNeedStarDescTx2s[i]:setSizeDeltaX(contentWidth)
|
self.skillNeedStarDescTx2s[i]:setSizeDeltaX(contentWidth)
|
||||||
self.skillNeedStarNodes[i]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
|
self.skillNeedStarNodes[i]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
|
||||||
|
|
||||||
skillBg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, "frame_1")
|
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true) .. "_1")
|
||||||
|
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId) .. "_1")
|
||||||
else
|
else
|
||||||
if nextLvUpStar then
|
if nextLvUpStar then
|
||||||
self.skillNeedStarNodes[i]:setActive(true)
|
self.skillNeedStarNodes[i]:setActive(true)
|
||||||
@ -318,6 +325,7 @@ function HeroDetailUI:refreshSkillInfo()
|
|||||||
self.skillNeedStarNodes[i]:setActive(false)
|
self.skillNeedStarNodes[i]:setActive(false)
|
||||||
end
|
end
|
||||||
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true))
|
skillBg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true))
|
||||||
|
skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -387,7 +395,7 @@ function HeroDetailUI:showHeroInfo()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.compHero:setHeroData(self.heroEntity, self.onlyLook)
|
self.compHero:setHeroData(self.heroEntity, self.onlyLook)
|
||||||
self.compHero:refresh()
|
self.compHero:refresh(self.checkLvUpState)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroDetailUI:showStarInfo()
|
function HeroDetailUI:showStarInfo()
|
||||||
@ -405,7 +413,7 @@ function HeroDetailUI:showStarInfo()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.compStar:setHeroData(self.heroEntity, self.onlyLook)
|
self.compStar:setHeroData(self.heroEntity, self.onlyLook)
|
||||||
self.compStar:refresh()
|
self.compStar:refresh(self.checkLvUpState)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroDetailUI:showEquipInfo()
|
function HeroDetailUI:showEquipInfo()
|
||||||
@ -423,7 +431,7 @@ function HeroDetailUI:showEquipInfo()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.compEquip:setHeroData(self.heroEntity)
|
self.compEquip:setHeroData(self.heroEntity)
|
||||||
self.compEquip:refresh()
|
self.compEquip:refresh(self.checkLvUpState)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 是否显示左箭头
|
-- 是否显示左箭头
|
||||||
|
|||||||
@ -59,9 +59,9 @@ function HeroInfoComp:setHeroData(heroEntity, onlyLook)
|
|||||||
self.curLevel = heroEntity:getLv()
|
self.curLevel = heroEntity:getLv()
|
||||||
self.heroEntity = heroEntity
|
self.heroEntity = heroEntity
|
||||||
self.onlyLook = onlyLook
|
self.onlyLook = onlyLook
|
||||||
self:bind(self.heroEntity, "isDirty", function()
|
-- self:bind(self.heroEntity, "isDirty", function()
|
||||||
self:refresh(true)
|
-- self:refresh(true)
|
||||||
end)
|
-- end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroInfoComp:refresh(lvUp)
|
function HeroInfoComp:refresh(lvUp)
|
||||||
@ -74,18 +74,17 @@ function HeroInfoComp:refreshLvInfo()
|
|||||||
local list = self.heroEntity:getLvAttrPointList()
|
local list = self.heroEntity:getLvAttrPointList()
|
||||||
self.scrollRectComp:refillCells(#list)
|
self.scrollRectComp:refillCells(#list)
|
||||||
|
|
||||||
|
self.vfx04:setActive(false)
|
||||||
if self.lvUp then
|
if self.lvUp then
|
||||||
local lv = self.heroEntity:getLv()
|
local lv = self.heroEntity:getLv()
|
||||||
for i, v in ipairs(list) do
|
for i, v in ipairs(list) do
|
||||||
if lv == v then
|
if lv == v then
|
||||||
self.scrollRectComp:moveToIndex(i - 1)
|
self.scrollRectComp:moveToIndex(i - 1)
|
||||||
self.vfx04:setAnchoredPositionY(-33 - (i - 1) * 58)
|
self.vfx04:setAnchoredPositionY(-34 - (i - 1) * 58)
|
||||||
self.vfx04:setActive(true)
|
self.vfx04:setActive(true)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
self.vfx04:setActive(false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -84,9 +84,9 @@ function HeroSkillInfoUI:refreshSkillIcon()
|
|||||||
local skillId = skillInfo[1][2]
|
local skillId = skillInfo[1][2]
|
||||||
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_23, currIdx .. "/" .. #skillInfo))
|
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_23, currIdx .. "/" .. #skillInfo))
|
||||||
|
|
||||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
|
||||||
if skillUnlcokStar > star then
|
if skillUnlcokStar > star then
|
||||||
self.skillIcon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, "frame_1")
|
self.skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true) .. "_1")
|
||||||
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId) .. "_1")
|
||||||
|
|
||||||
self.unlockTx:setText(I18N:getGlobalText(I18N.GlobalConst.STAR_UNLOCK, skillUnlcokStar))
|
self.unlockTx:setText(I18N:getGlobalText(I18N.GlobalConst.STAR_UNLOCK, skillUnlcokStar))
|
||||||
local meshProComp = self.unlockTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO)
|
local meshProComp = self.unlockTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO)
|
||||||
@ -96,6 +96,7 @@ function HeroSkillInfoUI:refreshSkillIcon()
|
|||||||
else
|
else
|
||||||
self.unlockBg:setActive(false)
|
self.unlockBg:setActive(false)
|
||||||
self.skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true))
|
self.skillIcon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true))
|
||||||
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId))
|
||||||
end
|
end
|
||||||
|
|
||||||
self.descTx:setText(ModuleManager.HeroManager:getSkillRogueDesc(skillInfo[1][2]))
|
self.descTx:setText(ModuleManager.HeroManager:getSkillRogueDesc(skillInfo[1][2]))
|
||||||
|
|||||||
@ -30,7 +30,7 @@ function StarInfoComp:init()
|
|||||||
ModuleManager.HeroManager:upgradeHeroStar(self.heroEntity:getCfgId())
|
ModuleManager.HeroManager:upgradeHeroStar(self.heroEntity:getCfgId())
|
||||||
end)
|
end)
|
||||||
self.attrBg:addClickListener(function()
|
self.attrBg:addClickListener(function()
|
||||||
ModuleManager.HeroManager:showAttrAllUI()
|
ModuleManager.HeroManager:showAttrAllUI(self.heroEntity)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.scrollrect = uiMap["star_info.bg.scrollrect"]
|
self.scrollrect = uiMap["star_info.bg.scrollrect"]
|
||||||
@ -54,9 +54,9 @@ end
|
|||||||
function StarInfoComp:setHeroData(heroEntity, onlyLook)
|
function StarInfoComp:setHeroData(heroEntity, onlyLook)
|
||||||
self.heroEntity = heroEntity
|
self.heroEntity = heroEntity
|
||||||
self.onlyLook = onlyLook
|
self.onlyLook = onlyLook
|
||||||
self:bind(self.heroEntity, "isDirty", function()
|
-- self:bind(self.heroEntity, "isDirty", function()
|
||||||
self:refresh(true)
|
-- self:refresh(true)
|
||||||
end)
|
-- end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function StarInfoComp:refresh(starUp)
|
function StarInfoComp:refresh(starUp)
|
||||||
@ -96,19 +96,20 @@ function StarInfoComp:refreshStarInfo()
|
|||||||
local maxStarLv = self.heroEntity:getMaxStar()
|
local maxStarLv = self.heroEntity:getMaxStar()
|
||||||
self.scrollRectComp:refillCells(maxStarLv)
|
self.scrollRectComp:refillCells(maxStarLv)
|
||||||
|
|
||||||
|
self.vfx04:setActive(false)
|
||||||
if self.starUp then
|
if self.starUp then
|
||||||
local star = self.heroEntity:getStar()
|
local star = self.heroEntity:getStar()
|
||||||
self.scrollRectComp:moveToIndex(star - 1)
|
self.scrollRectComp:moveToIndex(star - 1)
|
||||||
self.vfx04:setAnchoredPositionY(-33 - (star - 1) * 56)
|
self.vfx04:setAnchoredPositionY(-34 - (star - 1) * 58)
|
||||||
self.vfx04:setActive(true)
|
self.vfx04:setActive(true)
|
||||||
else
|
self.vfx04:play()
|
||||||
self.vfx04:setActive(false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function StarInfoComp:refreshAttrInfo()
|
function StarInfoComp:refreshAttrInfo()
|
||||||
-- self.attrTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_26))
|
-- self.attrTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_26))
|
||||||
self.attrTx:setText("10%")
|
local attr = self.heroEntity:getStarAttr()
|
||||||
|
self.attrTx:setText(GFunc.getFinalAttrValue(GConst.ALL_ATTR.ATTR_HPP_ALL, attr.attr_hpp_all or 0))
|
||||||
local meshProComp = self.attrTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO)
|
local meshProComp = self.attrTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO)
|
||||||
local contentWidth = meshProComp.preferredWidth
|
local contentWidth = meshProComp.preferredWidth
|
||||||
self.attrTx:setSizeDeltaX(contentWidth)
|
self.attrTx:setSizeDeltaX(contentWidth)
|
||||||
|
|||||||
@ -166,6 +166,7 @@ function HeroEntity:_updateAllBaseAttr()
|
|||||||
attr[GConst.ALL_ATTR.ATTR_NORMAL_HURTP_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_NORMAL_HURTP_ALL]
|
attr[GConst.ALL_ATTR.ATTR_NORMAL_HURTP_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_NORMAL_HURTP_ALL]
|
||||||
attr[GConst.ALL_ATTR.ATTR_SKILL_HURTP_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_SKILL_HURTP_ALL]
|
attr[GConst.ALL_ATTR.ATTR_SKILL_HURTP_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_SKILL_HURTP_ALL]
|
||||||
attr[GConst.ALL_ATTR.ATTR_ATKP_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_ATKP_ALL]
|
attr[GConst.ALL_ATTR.ATTR_ATKP_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_ATKP_ALL]
|
||||||
|
attr[GConst.ALL_ATTR.ATTR_ATK_ALL] = self.allBaseAttr[GConst.ALL_ATTR.ATTR_ATK_ALL]
|
||||||
|
|
||||||
DataManager.HeroData:setHeroAttr(self:getCfgId(), attr)
|
DataManager.HeroData:setHeroAttr(self:getCfgId(), attr)
|
||||||
end
|
end
|
||||||
@ -185,10 +186,12 @@ end
|
|||||||
function HeroEntity:_updateStarAttr()
|
function HeroEntity:_updateStarAttr()
|
||||||
self.starAttr = {}
|
self.starAttr = {}
|
||||||
for i = 1, self.data.star do
|
for i = 1, self.data.star do
|
||||||
local attr = self:getStarAttrCfg()[i]
|
local attrs = self:getStarAttrCfg(i)
|
||||||
|
for _, attr in ipairs(attrs) do
|
||||||
self.starAttr[attr.type] = (self.starAttr[attr.type] or 0) + attr.num
|
self.starAttr[attr.type] = (self.starAttr[attr.type] or 0) + attr.num
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function HeroEntity:getStarAttr()
|
function HeroEntity:getStarAttr()
|
||||||
return self.starAttr
|
return self.starAttr
|
||||||
@ -533,10 +536,8 @@ function HeroEntity:getStarUpCostId()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HeroEntity:getStarAttrCfg(star)
|
function HeroEntity:getStarAttrCfg(star)
|
||||||
if star then
|
local cfg = ConfigManager:getConfig("hero_star")
|
||||||
return self.config.star_attr[star]
|
return cfg[star]["attr_" .. self:getQlt()]
|
||||||
end
|
|
||||||
return self.config.star_attr
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroEntity:getStarAttrTxt()
|
function HeroEntity:getStarAttrTxt()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user