forked from External/mage
added method for updating expansions database
This commit is contained in:
parent
d541779d66
commit
e4ea8adf94
2 changed files with 17 additions and 3 deletions
|
|
@ -30,6 +30,8 @@ package mage.server;
|
|||
|
||||
import mage.MageException;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.cards.repository.ExpansionInfo;
|
||||
import mage.cards.repository.ExpansionRepository;
|
||||
import mage.game.GameException;
|
||||
import mage.game.match.MatchOptions;
|
||||
import mage.game.tournament.TournamentOptions;
|
||||
|
|
@ -59,9 +61,6 @@ import java.util.Locale;
|
|||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
|
||||
//import mage.interfaces.Server;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com, noxx
|
||||
|
|
@ -914,4 +913,15 @@ public class MageServerImpl implements MageServer {
|
|||
}
|
||||
return action.negativeResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExpansionInfo> getMissingExpansionData(List<String> codes) {
|
||||
List<ExpansionInfo> result = new ArrayList<ExpansionInfo>();
|
||||
for (ExpansionInfo expansionInfo : ExpansionRepository.instance.getAll()) {
|
||||
if (!codes.contains(expansionInfo.getCode())) {
|
||||
result .add(expansionInfo);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue