diff options
author | syeyoung <cyougn06@naver.com> | 2022-01-12 22:17:44 +0900 |
---|---|---|
committer | syeyoung <cyougn06@naver.com> | 2022-01-12 22:17:44 +0900 |
commit | 0e4e0e84296ad9dd4e992a03ca40588a6f6bcb84 (patch) | |
tree | 516eafd345a6f94b2ec9867d0363849a5dd3de6a /src | |
parent | 945eb217de8e304168a0a35b8c5e1011f1f7799a (diff) | |
download | Skyblock-Dungeons-Guide-0e4e0e84296ad9dd4e992a03ca40588a6f6bcb84.tar.gz Skyblock-Dungeons-Guide-0e4e0e84296ad9dd4e992a03ca40588a6f6bcb84.tar.bz2 Skyblock-Dungeons-Guide-0e4e0e84296ad9dd4e992a03ca40588a6f6bcb84.zip |
- Fix value "false" getting removed in data collection
- Collect "killed boss" / "died at boss" / "died before boss"
Diffstat (limited to 'src')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java | 4 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java index be0f7837..bd04d7a9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java @@ -172,6 +172,8 @@ public class DungeonContext { @Getter private boolean ended = false; + @Getter + private boolean defeated = false; public void onChat(ClientChatReceivedEvent event) { IChatComponent component = event.message; String formatted = component.getFormattedText(); @@ -197,6 +199,8 @@ public class DungeonContext { } else if (formatted.contains("§6> §e§lEXTRA STATS §6<")) { createEvent(new DungeonNodataEvent("DUNGEON_END")); ended = true; + } else if (formatted.contains("§r§c☠ §r§eDefeated ")) { + defeated = true; } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java index bb727971..ac8bfb1e 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java @@ -404,7 +404,8 @@ public class MapProcessor { JSONObject payload = new JSONObject().put("timeSB", FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed()) .put("timeR", FeatureRegistry.DUNGEON_REALTIME.getTimeElapsed()) .put("timeScore", time) - .put("completed", context.getBossRoomEnterSeconds() != -1) + .put("completionStage", context.getBossRoomEnterSeconds() == -1 ? 0 : + context.isDefeated() ? 2 : 1) .put("percentage", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getPercentage() / 100.0) .put("floor", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); DungeonsGuide.sendDebugChat(new ChatComponentText(payload.toString())); |