Semi-Fix for The Hobbit League

Right now, cards from The Hobbit Draft League (and only that league) disappear the next server day. I have no idea why only The Hobbit was affected. Adding this code back in allows the collection to stay until the next server reset, FotR and TTT still persist through resets. Should at least allow the league to be playable.
This commit is contained in:
PhallenCassidy
2018-09-12 11:26:35 -04:00
committed by GitHub
parent ef755dabc1
commit 8134335f8b

View File

@@ -86,10 +86,20 @@ public class SoloDraftLeagueData implements LeagueData {
@Override
public int process(CollectionsManager collectionsManager, List<PlayerStanding> leagueStandings, int oldStatus, int currentTime) {
int status = oldStatus;
if (status == 0) {
Map<Player, CardCollection> map = collectionsManager.getPlayersCollection(_collectionType.getCode());
for (Map.Entry<Player, CardCollection> playerCardCollectionEntry : map.entrySet()) {
Player player = playerCardCollectionEntry.getKey();
CardCollection leagueProduct = _draft.initializeNewCollection(getSeed(player));
collectionsManager.addItemsToPlayerCollection(false, "New sealed league product", player, _collectionType, leagueProduct.getAll().values());
}
status = 1;
}
int maxGamesTotal = _serie.getMaxMatches();
if (status == 0) {
if (status == 1) {
if (currentTime > DateUtils.offsetDate(_serie.getEnd(), 1)) {
for (PlayerStanding leagueStanding : leagueStandings) {
CardCollection leaguePrize = _leaguePrizes.getPrizeForLeague(leagueStanding.getStanding(), leagueStandings.size(), leagueStanding.getGamesPlayed(), maxGamesTotal, _collectionType);