Consolidation
This commit is contained in:
@@ -3,16 +3,16 @@ namespace SVSim.EmulatedEntrypoint.Services;
|
||||
public interface ICardAcquisitionService
|
||||
{
|
||||
/// <summary>
|
||||
/// Grant cards + associated cosmetics in one transaction.
|
||||
///
|
||||
/// • <paramref name="newCardIds"/> non-null → increments OwnedCardEntry for each via
|
||||
/// the existing IPackRepository.GrantCardsToViewer primitive, then grants any
|
||||
/// cosmetics associated with those cards that the viewer doesn't yet own.
|
||||
/// • <paramref name="newCardIds"/> null → backfill mode: skips card mutation,
|
||||
/// scans viewer.Cards, grants missing cosmetics.
|
||||
///
|
||||
/// Returns wire-shape RewardList in both modes. Backfill callers typically discard.
|
||||
/// All ownership writes happen in a single SaveChangesAsync.
|
||||
/// Grant N cards + their CardCosmeticReward cascades in a single transaction.
|
||||
/// Used by /pack/open and any future endpoint that grants new cards in bulk.
|
||||
/// Returns wire-shape reward_list entries (post-state counts for cards, single-grant
|
||||
/// entries for any newly-added cosmetics).
|
||||
/// </summary>
|
||||
Task<CardGrantResult> GrantAsync(long viewerId, IEnumerable<long>? newCardIds = null);
|
||||
Task<CardGrantResult> GrantManyAsync(long viewerId, IEnumerable<long> newCardIds);
|
||||
|
||||
/// <summary>
|
||||
/// Scan all owned cards for missing CardCosmeticReward cosmetics; grant any not yet owned.
|
||||
/// Used by /load/index for retroactive cosmetic reconciliation. Card counts are NOT mutated.
|
||||
/// </summary>
|
||||
Task<CardGrantResult> BackfillCosmeticsAsync(long viewerId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user