feat(packs): wire PackDrawTableImporter; retire ICardPoolProvider
Bootstrap Program.cs now calls PackDrawTableImporter after PackImporter. Delete DbCardPoolProvider, ICardPoolProvider, and the DbCardPoolProvider tests — the new IPackDrawTableRepository covers what GachaPointService needed (legendary-tier card_ids per pack) and PackOpenService takes the draw table directly. GachaPointService now resolves the legendary catalog from PackDrawTable.CardWeights filtered by Tier==Legendary, instead of ICardPoolProvider.GetPool then a rarity filter. Same end set, no DB pool walk. Test fallout: tests that fabricate custom card sets for gacha-point tests now call factory.SeedPackDrawTableFromSetAsync(packId, setId) to install a matching legendary-tier stub. Full suite: 647/647 green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,7 @@ public class PackControllerGachaPointTests
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
await factory.SeedPackDrawTableFromSetAsync(10008, 10008);
|
||||
|
||||
using var client = factory.CreateAuthenticatedClient(viewerId);
|
||||
var body = JsonBody("""{"odds_gacha_id":10008,"parent_gacha_id":10008,"viewer_id":"0","steam_id":0,"steam_session_ticket":""}""");
|
||||
@@ -95,6 +96,7 @@ public class PackControllerGachaPointTests
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
await factory.SeedPackDrawTableFromSetAsync(10008, 10008);
|
||||
|
||||
using var client = factory.CreateAuthenticatedClient(viewerId);
|
||||
var body = JsonBody("""{"odds_gacha_id":10008,"parent_gacha_id":10008,"viewer_id":"0","steam_id":0,"steam_session_ticket":""}""");
|
||||
@@ -145,6 +147,7 @@ public class PackControllerGachaPointTests
|
||||
viewer.GachaPointBalances.Add(new ViewerGachaPointBalance { PackId = 10008, Points = 500 });
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
await factory.SeedPackDrawTableFromSetAsync(10008, 10008);
|
||||
|
||||
using var client = factory.CreateAuthenticatedClient(viewerId);
|
||||
var body = JsonBody("""{"card_id":108041010,"parent_gacha_id":10008,"odds_gacha_id":10008,"viewer_id":"0","steam_id":0,"steam_session_ticket":""}""");
|
||||
@@ -213,6 +216,7 @@ public class PackControllerGachaPointTests
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
await factory.SeedPackDrawTableFromSetAsync(10008, 10008);
|
||||
|
||||
using var client = factory.CreateAuthenticatedClient(viewerId);
|
||||
var body = JsonBody("""{"card_id":108041010,"parent_gacha_id":10008,"odds_gacha_id":10008,"viewer_id":"0","steam_id":0,"steam_session_ticket":""}""");
|
||||
|
||||
Reference in New Issue
Block a user