refactor(pack): type PackChildGachaEntry.TypeDetail as CardPackType enum

This commit is contained in:
gamer147
2026-06-09 08:48:16 -04:00
parent 833bd85d36
commit 7118b92522
10 changed files with 84 additions and 58 deletions

View File

@@ -48,7 +48,7 @@ public class FreeplayInvariantTests
}
/// <summary>
/// Seeds a crystal pack (parent gacha 10001, child gacha_id 100002, TypeDetail=2, cost=100)
/// Seeds a crystal pack (parent gacha 10001, child gacha_id 100002, TypeDetail = CardPackType.CrystalMulti, cost=100)
/// with the viewer broke (0 crystals). Mirrors the pack shape from
/// PackControllerOpenTests.Open_with_crystals_deducts_crystals — the only difference is
/// Crystals=0 instead of 250, so without freeplay this open would be refused.
@@ -63,7 +63,7 @@ public class FreeplayInvariantTests
Id = 10001, BasePackId = baseId, PackCategory = PackCategory.None,
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
GachaType = 1, GachaDetail = "test",
ChildGachas = { new PackChildGachaEntry { GachaId = 100002, TypeDetail = 2, Cost = 100, CardCount = 8 } },
ChildGachas = { new PackChildGachaEntry { GachaId = 100002, TypeDetail = CardPackType.CrystalMulti, Cost = 100, CardCount = 8 } },
});
var v = await db.Viewers.FirstAsync(x => x.Id == viewerId);
v.Currency.Crystals = 0;