From 8134335f8b41422949b0b4616608a2289ae57532 Mon Sep 17 00:00:00 2001 From: PhallenCassidy Date: Wed, 12 Sep 2018 11:26:35 -0400 Subject: [PATCH] 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. --- .../gempukku/lotro/league/SoloDraftLeagueData.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SoloDraftLeagueData.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SoloDraftLeagueData.java index 52fbb4a2f..e4f8029f1 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SoloDraftLeagueData.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/league/SoloDraftLeagueData.java @@ -86,10 +86,20 @@ public class SoloDraftLeagueData implements LeagueData { @Override public int process(CollectionsManager collectionsManager, List leagueStandings, int oldStatus, int currentTime) { int status = oldStatus; - + + if (status == 0) { + Map map = collectionsManager.getPlayersCollection(_collectionType.getCode()); + for (Map.Entry 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);