Puzzles
This commit is contained in:
@@ -198,6 +198,16 @@ public class AdminController : SVSimController
|
||||
.ToList();
|
||||
var cards = await _dbContext.Cards.Where(c => allCardIds.Contains(c.Id)).ToDictionaryAsync(c => c.Id);
|
||||
|
||||
// Seeded MyRotation placeholder decks need a real rotation_id, otherwise the client's
|
||||
// DeckData.GetMyRotationClassName NREs on `info.LastPackText` when the user clicks one
|
||||
// (info is null because Data.MyRotationAllInfo.Get(null) returns null). Pick the highest
|
||||
// rotation id available — it includes the most recent pack and therefore covers every
|
||||
// class (including class_id=8 Nemesis, which requires last_pack >= 10007).
|
||||
var latestMyRotationId = (await _dbContext.MyRotationSettings.AsNoTracking()
|
||||
.Select(s => (int?)s.Id)
|
||||
.OrderByDescending(id => id)
|
||||
.FirstOrDefaultAsync())?.ToString();
|
||||
|
||||
foreach (var format in SeededDeckFormats)
|
||||
{
|
||||
int slot = 1;
|
||||
@@ -224,6 +234,7 @@ public class AdminController : SVSimController
|
||||
LeaderSkin = leaderSkin,
|
||||
RandomLeaderSkin = false,
|
||||
Cards = deckCards,
|
||||
MyRotationId = format == Format.MyRotation ? latestMyRotationId : null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user