Added a new state type for the 2025 end of year great reset

This commit is contained in:
barelyprofessional
2025-12-31 20:50:05 -06:00
parent 9a416eab1c
commit 77dad18e92
2 changed files with 9 additions and 2 deletions

View File

@@ -313,5 +313,12 @@ public enum GamblerState
/// Entity was permanently banned. This will prevent future gambler entities being created for this user /// Entity was permanently banned. This will prevent future gambler entities being created for this user
/// and will effectively lock them out of the game entirely /// and will effectively lock them out of the game entirely
/// </summary> /// </summary>
PermanentlyBanned PermanentlyBanned,
/// <summary>
/// Gambler rendered inactive by the End of Year 2025 Great Reset
/// This is treated no different to abandonment, state exists for
/// the purposes of tracking statistics later to see how much KKK
/// was erased by this event
/// </summary>
EndOfYear2025Liquidated
} }

View File

@@ -228,7 +228,7 @@ public static class Money
await db.Gamblers.AsNoTracking().OrderBy(x => x.Id).Include(x => x.User).LastOrDefaultAsync(g => g.User.Id == user.Id && g.State != GamblerState.PermanentlyBanned, await db.Gamblers.AsNoTracking().OrderBy(x => x.Id).Include(x => x.User).LastOrDefaultAsync(g => g.User.Id == user.Id && g.State != GamblerState.PermanentlyBanned,
cancellationToken: ct); cancellationToken: ct);
_logger.Info($"Retrieved entity for {user.KfUsername}. Is Gambler Entity Null? => {gambler == null}"); _logger.Info($"Retrieved entity for {user.KfUsername}. Is Gambler Entity Null? => {gambler == null}");
if (gambler != null && gambler.State != GamblerState.Abandoned) if (gambler != null && gambler.State != GamblerState.Abandoned && gambler.State != GamblerState.EndOfYear2025Liquidated)
{ {
_logger.Info($"Gambler entity details: {gambler.Id}, Created: {gambler.Created:o}"); _logger.Info($"Gambler entity details: {gambler.Id}, Created: {gambler.Created:o}");
return gambler; return gambler;