Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix popup update timing #5351

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions nekoyume/Assets/_Scripts/Blockchain/ActionRenderHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3721,18 +3721,22 @@ private void ResponseClaimAdventureBossReward(ActionEvaluation<ClaimAdventureBos
UpdateCurrentAvatarRuneStoneBalance(eval);
UpdateCurrentAvatarInventory(eval);
}
}).ToObservable().ObserveOnMainThread().Subscribe(_ =>
}).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<AdventureBossNcgRandomRewardPopup>().Show(lastSeason);
}

//기존정보 업데이트 보상수령 정보를 갱신하기위함.
Game.Game.instance.AdventureBossData.RefreshEndedSeasons(eval.OutputState, eval.BlockIndex).Forget();
else
{
//기존정보 업데이트 보상수령 정보를 갱신하기위함.
Game.Game.instance.AdventureBossData.RefreshEndedSeasons(eval.OutputState, eval.BlockIndex).Forget();
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Cysharp.Threading.Tasks;
using Nekoyume.UI.Module;
using TMPro;
using UnityEngine;
Expand All @@ -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");
Expand Down
Loading