Extracts the foil-twin lookup from ICardPoolProvider into a dedicated ICardFoilLookup service. PackOpenService takes the lookup as a parameter; the legacy DbCardPoolProvider stays registered until T12 removes it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
14 lines
396 B
C#
14 lines
396 B
C#
using SVSim.Database;
|
|
using SVSim.Database.Models;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Services;
|
|
|
|
public class DbCardFoilLookup : ICardFoilLookup
|
|
{
|
|
private readonly SVSimDbContext _db;
|
|
public DbCardFoilLookup(SVSimDbContext db) { _db = db; }
|
|
|
|
public ShadowverseCardEntry? TryGetFoilTwin(long baseCardId) =>
|
|
_db.Cards.FirstOrDefault(c => c.Id == baseCardId + 1 && c.IsFoil);
|
|
}
|