aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java3
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()));