Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroppoi committed Jul 15, 2023
1 parent 08d354e commit 639a487
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/entralinked/model/player/PlayerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ private void migrateLegacyData() {
String name = file.getName();

try {
// Skip if game save data file has an invalid name
if(!name.matches("^SAV-[A-HJ-NP-Z2-9]{10}.bin$")) {
logger.warn("Game save data {} will not be migrated because the file name is invalid", name);
file.delete();
Expand All @@ -85,6 +86,7 @@ private void migrateLegacyData() {
String gameSyncId = name.split("-")[1].replace(".bin", "");
File outputDirectory = new File(dataDirectory, gameSyncId);

// Skip if game save data does not belong to any existing Game Sync data
if(!outputDirectory.isDirectory()) {
logger.warn("Game save data {} will not be migrated because no Game Sync data exists for it", name);
file.delete();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/entralinked/network/http/pgl/PglHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private void handleDownloadSaveData(PglRequest request, Context ctx) throws IOEx
user.setDlcOverride("ZUKAN", new Dlc(player.getDexSkinFile().getAbsolutePath(),
"custom", "IRAO", "ZUKAN", dexSkinIndex, 25090, 0, true));
} else {
dexSkinIndex = dlcList.getDlcIndex("IRAO", "ZUKAN", player.getDexSkin());
dexSkinIndex = dlcList.getDlcIndex("IRAO", "ZUKAN", dexSkin);
user.removeDlcOverride("ZUKAN");
}

Expand Down

0 comments on commit 639a487

Please sign in to comment.