Fixing foil versions of aliased cards not being usable in limited formats. Fixed sealed collection double-counting.
This commit is contained in:
@@ -488,13 +488,14 @@ public class DefaultLotroFormat implements LotroFormat {
|
||||
public String applyErrata(String original) {
|
||||
var base = _library.getBaseBlueprintId(original);
|
||||
var errata = _errataCardMap.getOrDefault(base, base);
|
||||
if (original.endsWith("*") && !errata.endsWith("*")) {
|
||||
errata += "*";
|
||||
}
|
||||
|
||||
if(errata.equals(base))
|
||||
return original;
|
||||
|
||||
if (original.endsWith("*") && !errata.endsWith("*")) {
|
||||
errata += "*";
|
||||
}
|
||||
|
||||
return errata;
|
||||
}
|
||||
|
||||
|
||||
@@ -704,8 +704,15 @@ public class HallServer extends AbstractServer {
|
||||
Map<String, Integer> deckCardCounts = CollectionUtils.getTotalCardCountForDeck(lotroDeck);
|
||||
|
||||
for (Map.Entry<String, Integer> cardCount : deckCardCounts.entrySet()) {
|
||||
int collectionCount = collection.getItemCount(cardCount.getKey()) +
|
||||
collection.getItemCount(format.applyErrata(cardCount.getKey()));
|
||||
String overtID = cardCount.getKey();
|
||||
String errataID = format.applyErrata(cardCount.getKey());
|
||||
var baseIDs = format.findBaseCards(cardCount.getKey());
|
||||
|
||||
int collectionCount = collection.getItemCount(cardCount.getKey());
|
||||
|
||||
if(!errataID.equals(overtID)) {
|
||||
collection.getItemCount(errataID);
|
||||
}
|
||||
|
||||
var alts = _library.getAllAlternates(cardCount.getKey());
|
||||
if(alts != null) {
|
||||
@@ -714,10 +721,6 @@ public class HallServer extends AbstractServer {
|
||||
}
|
||||
}
|
||||
|
||||
// for(String id : format.findBaseCards(cardCount.getKey())) {
|
||||
// collectionCount += collection.getItemCount(id);
|
||||
// }
|
||||
|
||||
if (collectionCount < cardCount.getValue()) {
|
||||
String cardName = null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user