Skip to content

Commit

Permalink
Merge pull request #3678 from planetarium/bugfix/seasonpass-ui-bugfix
Browse files Browse the repository at this point in the history
seasonpass ui bug fix
  • Loading branch information
jonny-jeahyunchoi authored Nov 25, 2023
2 parents d8ad012 + f8dc12e commit 934c0c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ public void SetData(SeasonPassServiceClient.ItemInfoSchema itemInfo, SeasonPassS
return;
AudioController.PlayClick();

if(Game.Game.instance.SeasonPassServiceManager.AvatarInfo.Value.IsPremium ||
Game.Game.instance.SeasonPassServiceManager.AvatarInfo.Value.IsPremiumPlus)
{
var tooltip = ItemTooltip.Find(itemBaseForToolTip.ItemType);
tooltip.Show(itemBaseForToolTip, string.Empty, false, null);
return;
}

if (ItemView.LevelLimitObject.activeSelf && isNotPremium)
{
OneLineSystem.Push(MailType.System,
Expand Down
7 changes: 4 additions & 3 deletions nekoyume/Assets/_Scripts/UI/Widget/SeasonPass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class SeasonPass : Widget
private bool isLastCellShow;
private bool isPageEffectComplete;
public const int SeasonPassMaxLevel = 30;
private int popupViewDelay = 1200;

private const string SeasonPassCouragePopupViewd = "SeasonPassCouragePopupViewd";
protected override void Awake()
Expand Down Expand Up @@ -157,13 +158,13 @@ public override void Show(bool ignoreShowAnimation = false)
if(!ignoreShowAnimation)
PageEffect();

if (!PlayerPrefs.HasKey(SeasonPassCouragePopupViewd))
if (!PlayerPrefs.HasKey(SeasonPassCouragePopupViewd + Game.Game.instance.States.CurrentAvatarState.address.ToHex()))
{
async UniTaskVoid ShowCellEffect()
{
await UniTask.Delay(miniumDurationCount);
await UniTask.Delay(popupViewDelay);
Find<SeasonPassCouragePopup>().Show();
PlayerPrefs.SetInt(SeasonPassCouragePopupViewd, 1);
PlayerPrefs.SetInt(SeasonPassCouragePopupViewd + Game.Game.instance.States.CurrentAvatarState.address.ToHex(), 1);
}
ShowCellEffect().Forget();
}
Expand Down

0 comments on commit 934c0c2

Please sign in to comment.