aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/kr/syeyoung
diff options
context:
space:
mode:
Diffstat (limited to 'mod/src/main/java/kr/syeyoung')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/ApiFetcher.java15
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfile.java2
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfileParser.java2
3 files changed, 6 insertions, 13 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/ApiFetcher.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/ApiFetcher.java
index 1c234f59..cbc8be12 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/ApiFetcher.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/ApiFetcher.java
@@ -323,23 +323,16 @@ public class ApiFetcher {
System.out.println("finished getting secrets from achievement");
- System.out.println("Getting last save");
- JsonElement last_save = semiProfile.get("last_save");
- if(last_save != null){
- float lastSave2 = last_save.getAsLong();
- if (lastSave2 > lastSave) {
- latest = e;
- lastSave = lastSave2;
- }
+ System.out.println("Getting selected profile");
+ if (e.isSelected()) {
+ latest = e;
}
- System.out.println("Finished getting last save");
-
playerProfiles.add(e);
}
System.out.println("THE AMOUNT OF PLAYER PROFILES: " + playerProfiles.size());
PlayerProfile[] p = new PlayerProfile[playerProfiles.size()];
- pp.setLatestProfileArrayIndex(getArrayIndex(p, latest));
pp.setPlayerProfiles(playerProfiles.toArray(p));
+ pp.setLatestProfileArrayIndex(getArrayIndex(p, latest));
return Optional.of(pp);
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfile.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfile.java
index b8de1836..4ec35d04 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfile.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfile.java
@@ -33,7 +33,7 @@ public class PlayerProfile {
private String memberUID;
private String profileName;
- private long lastSave;
+ private boolean selected;
private int fairySouls;
private int fairyExchanges;
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfileParser.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfileParser.java
index 6f53994c..775fb474 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfileParser.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfileParser.java
@@ -100,7 +100,7 @@ public class PlayerProfileParser {
playerProfile.setProfileName(getOrDefault(profile, "cute_name", ""));
JsonObject playerData = profile.getAsJsonObject("members").getAsJsonObject(dashTrimmed);
- playerProfile.setLastSave(getOrDefault(playerData, "last_save", 0L));
+ playerProfile.setSelected(profile.has("selected") && profile.get("selected").getAsBoolean());
playerProfile.setFairySouls(getOrDefault(playerData, "fairy_souls_collected", 0));
playerProfile.setFairyExchanges(getOrDefault(playerData, "fairy_exchanges", 0));