Maybe this will deal with the broken calculation?

This commit is contained in:
barelyprofessional
2026-01-05 20:20:54 -06:00
parent e581cab142
commit b7f570beef

View File

@@ -516,7 +516,11 @@ public static class Money
Time = DateTimeOffset.UtcNow,
Payout = payout,
}, ct);
gambler.NextVipLevelWagerRequirement = nextVipLevel.WagerRequirement;
var nextNextLevel = GetNextVipLevel(nextVipLevel.WagerRequirement + 1);
if (nextNextLevel != null)
{
gambler.NextVipLevelWagerRequirement = nextNextLevel.WagerRequirement;
}
await db.SaveChangesAsync(ct);
await ModifyBalanceAsync(gamblerId, payout, TransactionSourceEventType.Bonus,
$"VIP Level '{nextVipLevel.VipLevel.Icon} {nextVipLevel.VipLevel.Name}' Tier {nextVipLevel.Tier} level up bonus", ct: ct);