From c9eecc4f767aacfc03adcb2425bf8ba0a205a04b Mon Sep 17 00:00:00 2001 From: Fang Date: Tue, 19 Sep 2023 17:26:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=A6=E6=96=87=E5=8A=A8=E6=95=88fix?= =?UTF-8?q?=E3=80=81=E7=9A=AE=E8=82=A4=E8=A7=A3=E9=94=81=E5=A4=B4=E5=83=8F?= =?UTF-8?q?fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/runes_info_comp.lua | 10 ++++++---- lua/app/userdata/player/player_data.lua | 12 ++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lua/app/ui/hero/runes_info_comp.lua b/lua/app/ui/hero/runes_info_comp.lua index 45f79375..51a51ed6 100644 --- a/lua/app/ui/hero/runes_info_comp.lua +++ b/lua/app/ui/hero/runes_info_comp.lua @@ -109,13 +109,9 @@ function RunesInfoComp:refresh() self.baseObject:unscheduleGlobal(self.autoSyncSid) self.autoSyncSid = nil end - if ModuleManager.RunesManager:isInAutoQuenching() then self:startAutoQuenching() return - elseif self.isAutoQuenching then - -- 结束自动淬炼 - self:endAutoQuenching() end self.txCost:setText(GFunc.getRewardNum(self.runesEntity:getMaterialCost())) @@ -129,6 +125,11 @@ function RunesInfoComp:refresh() self:refreshLevelExp() self:refreshSuit() self:refreshRunes() + + if self.isAutoQuenching then + -- 结束自动淬炼 + self:endAutoQuenching() + end end -- 自动淬炼刷新 @@ -190,6 +191,7 @@ function RunesInfoComp:refreshRunes() local imgLock = map["img_lock"] local lock = map["lock"] local txLock = map["tx_lock"] + obj:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR).enabled = false if ModuleManager.RunesManager:isInAutoQuenching() and index <= DataManager.RunesData:getLevelConfig()[self.tempLevel].grid or DataManager.RunesData:isUnlock(index) then lock:setActive(false) diff --git a/lua/app/userdata/player/player_data.lua b/lua/app/userdata/player/player_data.lua index b0a1a707..7f7e6e14 100644 --- a/lua/app/userdata/player/player_data.lua +++ b/lua/app/userdata/player/player_data.lua @@ -391,10 +391,14 @@ function PlayerData:getCanUnlockAvatarIds(checkData) if type(checkData) == "table" then -- 判断items解锁 for index, reward in ipairs(checkData) do - if reward.type == GConst.REWARD_TYPE.ITEM and ConfigManager:getConfig("item")[reward.item.id].type == GConst.ItemConst.ITEM_TYPE.AVATAR then - for id, data in pairs(ConfigManager:getConfig("avatar")) do - if not self:isAvatarUnlock(id) and data.item == reward.item.id then - table.insert(ids, id) + if reward.type == GConst.REWARD_TYPE.ITEM then + local itemCfg = ConfigManager:getConfig("item")[reward.item.id] + -- 头像道具、皮肤道具可解锁头像 + if itemCfg.type == GConst.ItemConst.ITEM_TYPE.AVATAR or itemCfg.type == GConst.ItemConst.ITEM_TYPE.SKIN then + for id, data in pairs(ConfigManager:getConfig("avatar")) do + if not self:isAvatarUnlock(id) and data.item == reward.item.id then + table.insert(ids, id) + end end end end