fix
This commit is contained in:
parent
25bb8df7df
commit
6d3a0748a1
@ -9,9 +9,9 @@ local ARMOR_PART_INDEX = {
|
|||||||
}
|
}
|
||||||
-- 升级
|
-- 升级
|
||||||
local EFFECT_UP_GRADE = {
|
local EFFECT_UP_GRADE = {
|
||||||
"assets/prefabs/effects/ui/vfx_ui_equip_up_b01",
|
"assets/prefabs/effects/ui/vfx_ui_equip_up_b01.prefab",
|
||||||
"assets/prefabs/effects/ui/vfx_ui_equip_up_b02",
|
"assets/prefabs/effects/ui/vfx_ui_equip_up_b02.prefab",
|
||||||
"assets/prefabs/effects/ui/vfx_ui_equip_up_b03",
|
"assets/prefabs/effects/ui/vfx_ui_equip_up_b03.prefab",
|
||||||
}
|
}
|
||||||
|
|
||||||
function ArmorInfoComp:init()
|
function ArmorInfoComp:init()
|
||||||
@ -244,8 +244,11 @@ function ArmorInfoComp:playPartUpgradeEffect(part)
|
|||||||
local map = armorObj:genAllChildren()
|
local map = armorObj:genAllChildren()
|
||||||
local rootEffect = map["root_effect"]
|
local rootEffect = map["root_effect"]
|
||||||
rootEffect:removeAllChildren()
|
rootEffect:removeAllChildren()
|
||||||
EffectManager:loadUIEffectAsync(EFFECT_UP_GRADE, self.uiRoot, rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
local stage = DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), part):getStage() + 1
|
||||||
obj:play()
|
EffectManager:loadUIEffectAsync(EFFECT_UP_GRADE[math.floor(stage / 2) + stage % 2], self.uiRoot, rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
||||||
|
obj:playComplete(function()
|
||||||
|
rootEffect:removeAllChildren()
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -262,8 +265,11 @@ end
|
|||||||
function ArmorInfoComp:playUpgradeEffect(part)
|
function ArmorInfoComp:playUpgradeEffect(part)
|
||||||
self:playPartUpgradeEffect(part)
|
self:playPartUpgradeEffect(part)
|
||||||
self.rootCurEffect:removeAllChildren()
|
self.rootCurEffect:removeAllChildren()
|
||||||
EffectManager:loadUIEffectAsync(EFFECT_UP_GRADE, self.uiRoot, self.rootCurEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
local stage = DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), part):getStage() + 1
|
||||||
obj:play()
|
EffectManager:loadUIEffectAsync(EFFECT_UP_GRADE[math.floor(stage / 2) + stage % 2], self.uiRoot, self.rootCurEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
||||||
|
obj:playComplete(function()
|
||||||
|
self.rootCurEffect:removeAllChildren()
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ function HeroDetailUI:onLoadRootComplete()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
self:addEventListener(EventManager.CUSTOM_EVENT.EQUIP_UPSECTION_SUCCESS, function(part)
|
self:addEventListener(EventManager.CUSTOM_EVENT.EQUIP_UPSECTION_SUCCESS, function(part)
|
||||||
Logger.logHighlight("升段:"..part.."/"..tostring(part == GConst.EquipConst.PART_TYPE.WEAPON))
|
Logger.logHighlight("升段:"..part)
|
||||||
if part == GConst.EquipConst.PART_TYPE.WEAPON then
|
if part == GConst.EquipConst.PART_TYPE.WEAPON then
|
||||||
self.compWeapon:playEffect(true, true)
|
self.compWeapon:playEffect(true, true)
|
||||||
else
|
else
|
||||||
@ -124,7 +124,7 @@ function HeroDetailUI:onLoadRootComplete()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
self:addEventListener(EventManager.CUSTOM_EVENT.EQUIP_UPGRADE_SUCCESS, function(part)
|
self:addEventListener(EventManager.CUSTOM_EVENT.EQUIP_UPGRADE_SUCCESS, function(part)
|
||||||
Logger.logHighlight("升级:"..part.."/"..tostring(part == GConst.EquipConst.PART_TYPE.WEAPON))
|
Logger.logHighlight("升级:"..part)
|
||||||
if part == GConst.EquipConst.PART_TYPE.WEAPON then
|
if part == GConst.EquipConst.PART_TYPE.WEAPON then
|
||||||
self.compWeapon:playEffect(true, false)
|
self.compWeapon:playEffect(true, false)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -391,13 +391,14 @@ end
|
|||||||
|
|
||||||
-- 获取当前基金奖励所属阶段
|
-- 获取当前基金奖励所属阶段
|
||||||
function DungeonArmorEntity:getCurFundStage()
|
function DungeonArmorEntity:getCurFundStage()
|
||||||
for id, data in ipairs(ConfigManager:getConfig("dungeon_armor_fund")) do
|
local cfg = ConfigManager:getConfig("dungeon_armor_fund")
|
||||||
|
for id, data in ipairs(cfg) do
|
||||||
if id ~= FUND_AD_REWARD_ID and not self:isGotFundReward(id) then
|
if id ~= FUND_AD_REWARD_ID and not self:isGotFundReward(id) then
|
||||||
return data.stage
|
return data.stage
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return cfg[#cfg].stage
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 基金是否有红点
|
-- 基金是否有红点
|
||||||
@ -409,6 +410,14 @@ end
|
|||||||
function DungeonArmorEntity:isBoughtFundStage(stage)
|
function DungeonArmorEntity:isBoughtFundStage(stage)
|
||||||
local bought = DataManager.ShopData:getActGiftMapByType(PayManager.PURCHARSE_TYPE.ACT_GIFT)
|
local bought = DataManager.ShopData:getActGiftMapByType(PayManager.PURCHARSE_TYPE.ACT_GIFT)
|
||||||
|
|
||||||
|
if not stage then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self:getFundStageGiftId(stage) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if EDITOR_MODE then
|
if EDITOR_MODE then
|
||||||
Logger.logHighlight("支线基金购买状态/"..self:getFundStageGiftId(stage))
|
Logger.logHighlight("支线基金购买状态/"..self:getFundStageGiftId(stage))
|
||||||
Logger.printTable(bought)
|
Logger.printTable(bought)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user