Skip to content

Commit

Permalink
Fix afk reward claims screen
Browse files Browse the repository at this point in the history
  • Loading branch information
lotuuu committed Jun 7, 2024
1 parent 946dea1 commit fd72acf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/Assets/Scripts/AfkRewards/KalineTreeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class KalineTreeManager : MonoBehaviour
[SerializeField] GameObject afkRewardDetailUI;
[SerializeField] GameObject afkRewardsContainer;

private const int MINUTES_IN_DAY = 1440;

void Start()
{
GlobalUserData user = GlobalUserData.Instance;
Expand All @@ -40,7 +42,7 @@ public void ShowRewards()
{
GameObject afkRewardGO = Instantiate(afkRewardDetailUI, afkRewardsContainer.transform);
AfkRewardDetail afkRewardDetail = afkRewardGO.GetComponent<AfkRewardDetail>();
afkRewardDetail.SetData(GlobalUserData.Instance.AvailableCurrencies.Single(currency => currency.name == afkReward.currency).image, $"{afkReward.amount} ({user.User.kalineTreeLevel.afkRewardRates.Single(arr => arr.currency == afkReward.currency).daily_rate * 60}/m)");
afkRewardDetail.SetData(GlobalUserData.Instance.AvailableCurrencies.Single(currency => currency.name == afkReward.currency).image, $"{afkReward.amount} ({user.User.kalineTreeLevel.afkRewardRates.Single(arr => arr.currency == afkReward.currency).daily_rate / (MINUTES_IN_DAY)}/m)");
}
confirmPopUp.SetActive(true);
Expand Down

0 comments on commit fd72acf

Please sign in to comment.