diff --git a/lua/app/common/event_manager.lua b/lua/app/common/event_manager.lua index 72b52f12..f06ada03 100644 --- a/lua/app/common/event_manager.lua +++ b/lua/app/common/event_manager.lua @@ -34,6 +34,7 @@ EventManager.CUSTOM_EVENT = { CLOSE_BOX_OPEN_UI = "CLOSE_BOX_OPEN_UI", BIND_ACCOUNT_SUCCESS = "BIND_ACCOUNT_SUCCESS", CDKEY_FINISH = "CDKEY_FINISH", -- CDKEY + DUNGEON_DAY_CHANGE = "DUNGEON_DAY_CHANGE",-- 副本跨天更新 DUNGEON_CHALLENGE = "DUNGEON_CHALLENGE",-- 副本开始挑战 DUNGEON_SWEEP = "DUNGEON_SWEEP",-- 副本开始扫荡 PLAYER_INFO_CLICK_AVATAR = "PLAYER_INFO_CLICK_AVATAR",-- 个人信息选择头像 diff --git a/lua/app/ui/dungeon/dungeon_difficulty_ui.lua b/lua/app/ui/dungeon/dungeon_difficulty_ui.lua index 4a9d900c..b6eac838 100644 --- a/lua/app/ui/dungeon/dungeon_difficulty_ui.lua +++ b/lua/app/ui/dungeon/dungeon_difficulty_ui.lua @@ -107,6 +107,9 @@ function DungeonDifficultyUI:onLoadRootComplete() self:refreshDifficulty() end) + self:addEventListener(EventManager.CUSTOM_EVENT.DUNGEON_DAY_CHANGE, function() + self:closeUI() + end) self:addEventListener(EventManager.CUSTOM_EVENT.DUNGEON_CHALLENGE, function() self:closeUI() end) diff --git a/lua/app/userdata/dungeon/dungeon_data.lua b/lua/app/userdata/dungeon/dungeon_data.lua index 88959aac..eb74d808 100644 --- a/lua/app/userdata/dungeon/dungeon_data.lua +++ b/lua/app/userdata/dungeon/dungeon_data.lua @@ -73,6 +73,7 @@ function DungeonData:onDayChange() self:initDungeonGold(self.data.gold) self:initDungeonShards(self.data.shards) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.DUNGEON_DAY_CHANGE) end -- 客户端处理副本次数+1的情况