feat(inventory): tag remaining BeginAsync call sites for acquire history
Add GrantSource.CardCraft (16) for card crafting via red ether, and tag CardInventoryRepository.Create accordingly. LoadController backfill and ArenaTwoPickService.Entry are debit/infrastructure-only — left as Unknown. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -136,7 +136,7 @@ public class CardInventoryRepository : ICardInventoryRepository
|
||||
|
||||
// Mutation phase via InventoryService transaction — freeplay-aware RedEther debit,
|
||||
// card grants with cosmetic cascade.
|
||||
await using var tx = await _inv.BeginAsync(viewerId);
|
||||
await using var tx = await _inv.BeginAsync(viewerId, configure: cfg => cfg.Source = GrantSource.CardCraft);
|
||||
|
||||
var spendResult = await tx.TrySpendAsync(SpendCurrency.RedEther, (long)totalCost);
|
||||
if (!spendResult.Success)
|
||||
|
||||
@@ -28,7 +28,8 @@ public enum GrantSource
|
||||
AchievementReward = 13,
|
||||
SerialCodeRedeem = 14,
|
||||
CardCosmeticCascade = 15,
|
||||
// Reserved high to stay visually distinct from gameplay sources; 16–98 are intentionally unused.
|
||||
CardCraft = 16,
|
||||
// Reserved high to stay visually distinct from gameplay sources; 17–98 are intentionally unused.
|
||||
AdminGrant = 99,
|
||||
}
|
||||
|
||||
@@ -57,6 +58,7 @@ public static class GrantSourceMessages
|
||||
GrantSource.AchievementReward => "From achievement reward",
|
||||
GrantSource.SerialCodeRedeem => "From serial code",
|
||||
GrantSource.CardCosmeticCascade => "Card cosmetic",
|
||||
GrantSource.CardCraft => "From card crafting",
|
||||
GrantSource.AdminGrant => "From admin grant",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(source), source, "Unhandled GrantSource"),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user