From 1a4b4e9764ac778eabe2a3227c92921f8e85e4ea Mon Sep 17 00:00:00 2001 From: Fang Date: Tue, 12 Sep 2023 15:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B9=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/runes_info_comp.lua | 5 ++++- lua/app/ui/runes/runes_source_ui.lua | 2 ++ lua/app/userdata/runes/runes_entity.lua | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/app/ui/hero/runes_info_comp.lua b/lua/app/ui/hero/runes_info_comp.lua index c83e2f6b..50c0295d 100644 --- a/lua/app/ui/hero/runes_info_comp.lua +++ b/lua/app/ui/hero/runes_info_comp.lua @@ -107,7 +107,10 @@ function RunesInfoComp:refreshRunes() if DataManager.RunesData:isUnlock(index) then lock:setActive(false) imgQlt:setSprite(GConst.ATLAS_PATH.HERO, GConst.RunesConst.QUALITY_ICON[index]) - imgSuit:setSprite(GConst.ATLAS_PATH.HERO, "hero_rune_"..self.runesEntity:getGridSuit(index)) + local suit = self.runesEntity:getGridSuit(index) + if suit then + imgSuit:setSprite(GConst.ATLAS_PATH.HERO, "hero_rune_"..suit) + end imgLock:setSprite(GConst.ATLAS_PATH.COMMON, self.runesEntity:isAttrLock(index) and LOCK_ICON or UNLOCK_ICON) local attr = self.runesEntity:getGridAttr(index) if attr then diff --git a/lua/app/ui/runes/runes_source_ui.lua b/lua/app/ui/runes/runes_source_ui.lua index 280024c7..8f390497 100644 --- a/lua/app/ui/runes/runes_source_ui.lua +++ b/lua/app/ui/runes/runes_source_ui.lua @@ -90,6 +90,8 @@ function RunesSourceUI:onLoadRootComplete() end) self.btnGo:addClickListener(function() ModuleManager.DungeonRuneManager:showMainUI() + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_DUNGEON_UI) + self:closeUI() end) self.btnBuy:addClickListener(function() PayManager:purchasePackage(GConst.RunesConst.GIFT_IDS[self.curGiftIndex], PayManager.PURCHARSE_TYPE.ACT_GIFT) diff --git a/lua/app/userdata/runes/runes_entity.lua b/lua/app/userdata/runes/runes_entity.lua index 9f32f1eb..b424341d 100644 --- a/lua/app/userdata/runes/runes_entity.lua +++ b/lua/app/userdata/runes/runes_entity.lua @@ -89,8 +89,8 @@ function RunesEntity:getGridSuit(index) return self.grids[index].suit end - Logger.logError("英雄".. self.heroId .. "未获取到格子的符文数据:"..tostring(index)) - return 0 + -- Logger.logError("英雄".. self.heroId .. "未获取到格子的符文数据:"..tostring(index)) + return nil end -- 获取套装等级,2件套是lv1,4件套是lv2,没有就是lv0