Pack logic cleanup
This commit is contained in:
@@ -84,6 +84,8 @@ public class CardImporter
|
||||
DustReward = ParseInt(c.GetRedEther, 0)
|
||||
};
|
||||
|
||||
bool isFoil = c.IsFoil == "1";
|
||||
|
||||
if (existingCards.TryGetValue(id, out var card))
|
||||
{
|
||||
card.Rarity = (Rarity)rarity;
|
||||
@@ -92,6 +94,7 @@ public class CardImporter
|
||||
card.Defense = ParseNullableInt(c.Life);
|
||||
card.Class = classEntry;
|
||||
card.CollectionInfo = collection;
|
||||
card.IsFoil = isFoil;
|
||||
updated++;
|
||||
}
|
||||
else
|
||||
@@ -105,7 +108,8 @@ public class CardImporter
|
||||
Attack = ParseNullableInt(c.Atk),
|
||||
Defense = ParseNullableInt(c.Life),
|
||||
Class = classEntry,
|
||||
CollectionInfo = collection
|
||||
CollectionInfo = collection,
|
||||
IsFoil = isFoil
|
||||
};
|
||||
set.Cards.Add(card);
|
||||
existingCards[id] = card;
|
||||
@@ -145,4 +149,5 @@ public class CardInput
|
||||
public string? Rarity { get; set; }
|
||||
public string? GetRedEther { get; set; }
|
||||
public string? UseRedEther { get; set; }
|
||||
public string? IsFoil { get; set; } // cards.json `is_foil` = "0" or "1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user