Skip to content

Commit

Permalink
Merge pull request #5351 from planetarium/fix/adventureboss-season-ra…
Browse files Browse the repository at this point in the history
…ffle-user-popup-not-show

fix popup update timing
  • Loading branch information
jonny-jeahyunchoi committed Jul 5, 2024
2 parents fe1e91a + a977110 commit 3451b70
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
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

0 comments on commit 3451b70

Please sign in to comment.