From a977110849731f60ee4d28e492557e71a142b027 Mon Sep 17 00:00:00 2001 From: jonny Date: Fri, 5 Jul 2024 15:27:10 +0900 Subject: [PATCH] fix popup update timing --- .../_Scripts/Blockchain/ActionRenderHandler.cs | 12 ++++++++---- .../Popup/AdventureBossNcgRandomRewardPopup.cs | 9 ++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/nekoyume/Assets/_Scripts/Blockchain/ActionRenderHandler.cs b/nekoyume/Assets/_Scripts/Blockchain/ActionRenderHandler.cs index b8aaadb208..d7b0bb2c1f 100644 --- a/nekoyume/Assets/_Scripts/Blockchain/ActionRenderHandler.cs +++ b/nekoyume/Assets/_Scripts/Blockchain/ActionRenderHandler.cs @@ -3721,18 +3721,22 @@ private void ResponseClaimAdventureBossReward(ActionEvaluation + }).ToObservable().ObserveOnMainThread().Subscribe(async _ => { if (Game.Game.instance.AdventureBossData.EndedExploreBoards.TryGetValue(lastSeason, out var exploreBoard)) { if (exploreBoard.RaffleWinner == null) { + //이름을 가져오기 위해 바로 갱신함. + await Game.Game.instance.AdventureBossData.RefreshEndedSeasons(eval.OutputState, eval.BlockIndex); //최초 Widget.Find().Show(lastSeason); } - - //기존정보 업데이트 보상수령 정보를 갱신하기위함. - Game.Game.instance.AdventureBossData.RefreshEndedSeasons(eval.OutputState, eval.BlockIndex).Forget(); + else + { + //기존정보 업데이트 보상수령 정보를 갱신하기위함. + Game.Game.instance.AdventureBossData.RefreshEndedSeasons(eval.OutputState, eval.BlockIndex).Forget(); + } } }); } diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/AdventureBossNcgRandomRewardPopup.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/AdventureBossNcgRandomRewardPopup.cs index 09d7daa1d8..27d80ef660 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/AdventureBossNcgRandomRewardPopup.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/AdventureBossNcgRandomRewardPopup.cs @@ -1,4 +1,3 @@ -using Cysharp.Threading.Tasks; using Nekoyume.UI.Module; using TMPro; using UnityEngine; @@ -24,13 +23,13 @@ public void Show(long seasonId, bool ignoreShowAnimation = false) { return; } - ShowWinner(seasonId).Forget(); + ShowWinner(seasonId); } - public async UniTaskVoid ShowWinner(long seasonId) + public void ShowWinner(long seasonId) { - var explorerBoard = await Game.Game.instance.Agent.GetExploreBoardAsync(seasonId); - if(string.IsNullOrEmpty(explorerBoard?.RaffleWinnerName)) + Game.Game.instance.AdventureBossData.EndedExploreBoards.TryGetValue(seasonId, out var explorerBoard); + if (explorerBoard == null || string.IsNullOrEmpty(explorerBoard?.RaffleWinnerName)) { //실제로 아무도 참여하지않은 시즌의경우 당첨자가 없을 수 있음. NcDebug.LogWarning("RaffleWinnerName is empty");