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