refactor(pack): type PackChildGachaEntry.TypeDetail as CardPackType enum
This commit is contained in:
@@ -32,7 +32,7 @@ public class PackControllerOpenTests
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "test", SleeveId = 3000011,
|
||||
ChildGachas = {
|
||||
new PackChildGachaEntry { GachaId = 400002, TypeDetail = 7, Cost = 100, CardCount = 8 },
|
||||
new PackChildGachaEntry { GachaId = 400002, TypeDetail = CardPackType.RupyMulti, Cost = 100, CardCount = 8 },
|
||||
},
|
||||
});
|
||||
var v = await db.Viewers.FirstAsync(x => x.Id == viewerId);
|
||||
@@ -142,7 +142,7 @@ public class PackControllerOpenTests
|
||||
Id = 70001, BasePackId = 70001, PackCategory = PackCategory.LeaderSkinPack,
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "skin pack",
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 700017, TypeDetail = 7, Cost = 100, CardCount = 8 } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 700017, TypeDetail = CardPackType.RupyMulti, Cost = 100, CardCount = 8 } },
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public class PackControllerOpenTests
|
||||
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 = 250;
|
||||
@@ -223,7 +223,7 @@ public class PackControllerOpenTests
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "crystal single",
|
||||
// type_detail=1 (CRYSTAL single-pack) — new path added 2026-05-31.
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100012, TypeDetail = 1, Cost = 120, CardCount = 8 } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100012, TypeDetail = CardPackType.Crystal, Cost = 120, CardCount = 8 } },
|
||||
});
|
||||
var v = await db.Viewers.FirstAsync(x => x.Id == viewerId);
|
||||
v.Currency.Crystals = 200;
|
||||
@@ -254,7 +254,7 @@ public class PackControllerOpenTests
|
||||
Id = 10001, BasePackId = baseId, PackCategory = PackCategory.None,
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "rupy single",
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 600006, TypeDetail = 6, Cost = 100, CardCount = 8 } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 600006, TypeDetail = CardPackType.Rupy, Cost = 100, CardCount = 8 } },
|
||||
});
|
||||
var v = await db.Viewers.FirstAsync(x => x.Id == viewerId);
|
||||
v.Currency.Rupees = 250;
|
||||
@@ -289,7 +289,7 @@ public class PackControllerOpenTests
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "ticket pack",
|
||||
// type_detail=4 (TICKET single) — 1 ticket per pack.
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100014, TypeDetail = 4, Cost = 1, CardCount = 8, ItemId = TicketItemId } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100014, TypeDetail = CardPackType.Ticket, Cost = 1, CardCount = 8, ItemId = TicketItemId } },
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public class PackControllerOpenTests
|
||||
GachaType = 1, GachaDetail = "10-pack ticket",
|
||||
// type_detail=5 (TICKET_MULTI 10-pack) — cost=1 ticket per pack, packNumber=10
|
||||
// => 10 tickets consumed total.
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100015, TypeDetail = 5, Cost = 1, CardCount = 8, ItemId = TicketItemId } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100015, TypeDetail = CardPackType.TicketMulti, Cost = 1, CardCount = 8, ItemId = TicketItemId } },
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
@@ -383,7 +383,7 @@ public class PackControllerOpenTests
|
||||
Id = 10001, BasePackId = baseId, PackCategory = PackCategory.None,
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "ticket pack",
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100014, TypeDetail = 4, Cost = 1, CardCount = 8, ItemId = TicketItemId } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 100014, TypeDetail = CardPackType.Ticket, Cost = 1, CardCount = 8, ItemId = TicketItemId } },
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
@@ -411,7 +411,7 @@ public class PackControllerOpenTests
|
||||
Id = 10001, BasePackId = baseId, PackCategory = PackCategory.None,
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "daily test",
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 200001, TypeDetail = 3, Cost = 0, CardCount = 1, IsDailySingle = true } },
|
||||
ChildGachas = { new PackChildGachaEntry { GachaId = 200001, TypeDetail = CardPackType.Daily, Cost = 0, CardCount = 1, IsDailySingle = true } },
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
@@ -604,7 +604,7 @@ public class PackControllerOpenTests
|
||||
CommenceDate = DateTime.UtcNow.AddDays(-1), CompleteDate = DateTime.UtcNow.AddDays(30),
|
||||
GachaType = 1, GachaDetail = "single-leader test", SleeveId = 3000099,
|
||||
ChildGachas = {
|
||||
new PackChildGachaEntry { GachaId = ParentGachaId * 100 + 2, TypeDetail = 7, Cost = 100, CardCount = 8 },
|
||||
new PackChildGachaEntry { GachaId = ParentGachaId * 100 + 2, TypeDetail = CardPackType.RupyMulti, Cost = 100, CardCount = 8 },
|
||||
},
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
@@ -664,7 +664,7 @@ public class PackControllerOpenTests
|
||||
{
|
||||
new PackChildGachaEntry
|
||||
{
|
||||
GachaId = 100087, TypeDetail = 7, Cost = 100, CardCount = 8,
|
||||
GachaId = 100087, TypeDetail = CardPackType.RupyMulti, Cost = 100, CardCount = 8,
|
||||
OverrideIncreaseGachaPoint = 0,
|
||||
},
|
||||
},
|
||||
@@ -746,7 +746,7 @@ public class PackControllerOpenTests
|
||||
{
|
||||
new PackChildGachaEntry
|
||||
{
|
||||
GachaId = 990475, TypeDetail = 5, Cost = 0, CardCount = 8,
|
||||
GachaId = 990475, TypeDetail = CardPackType.TicketMulti, Cost = 0, CardCount = 8,
|
||||
ItemId = 90001,
|
||||
},
|
||||
},
|
||||
@@ -802,7 +802,7 @@ public class PackControllerOpenTests
|
||||
{
|
||||
new PackChildGachaEntry
|
||||
{
|
||||
GachaId = 780032, TypeDetail = 10, Cost = 1, CardCount = 8,
|
||||
GachaId = 780032, TypeDetail = CardPackType.FreePacks, Cost = 1, CardCount = 8,
|
||||
DailyFreeGachaCount = 1, PurchaseLimitCount = 1,
|
||||
FreeGachaCampaignId = 49, CampaignName = "Season Bonus",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user