Server-authoritative economy: wire client to server; entry + rewards on hub
Server: - daily (/api/daily, /api/daily/claim) + shop (/api/shop/buy) + ChargeEntry - GameRoom (via IServiceScopeFactory) deducts ranked entry at match start and applies match rewards at match-over, broadcasting profile + reward over the hub - tested: daily, shop (owned-guard), ranked entry deduction pushed over hub Client: - SignalrService routes profile/coins/plan/daily/shop/match to the server (Bearer); onProfile/onReward hub events; guest/offline fall back to local - session-store syncs profile from hub; game-store serverReward; GameScreen shows live ranked reward from hub (no double submit), submits client-run games - single source of truth in live mode (no economy divergence) Postgres-ready via config (Provider=postgres); EnsureCreated for now. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,10 @@ public class ProfileDto
|
||||
public Dictionary<string, int> Achievements { get; set; } = new();
|
||||
public List<string> Unlocked { get; set; } = new();
|
||||
public long CreatedAt { get; set; }
|
||||
|
||||
// daily reward streak
|
||||
public int DailyDay { get; set; } = 1;
|
||||
public string? DailyLastClaimed { get; set; } // yyyy-MM-dd
|
||||
}
|
||||
|
||||
public class MatchSummaryDto
|
||||
|
||||
Reference in New Issue
Block a user