This commit is contained in:
Kwoth
2024-06-13 18:54:21 +00:00
parent a6adf73ecf
commit ab93380d7c
80 changed files with 12076 additions and 1694 deletions

View File

@@ -1286,9 +1286,9 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
Image? frame = null;
if (item is null)
{
if (patron.Tier == PatronTier.V)
if (patron?.Tier == PatronTier.V)
frame = Image.Load<Rgba32>(File.OpenRead("data/images/frame_silver.png"));
else if (patron.Tier >= PatronTier.X || _creds.IsOwner(userId))
else if (patron?.Tier >= PatronTier.X || _creds.IsOwner(userId))
frame = Image.Load<Rgba32>(File.OpenRead("data/images/frame_gold.png"));
}
else
@@ -1465,7 +1465,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
{
var patron = await _ps.GetPatronAsync(userId);
if ((int)patron.Tier < (int)req)
if (patron is null || (int)patron.Value.Tier < (int)req)
return BuyResult.InsufficientPatronTier;
}