diff options
author | syeyoung <cyougn06@naver.com> | 2021-12-23 14:38:38 +0900 |
---|---|---|
committer | syeyoung <cyougn06@naver.com> | 2021-12-23 14:38:38 +0900 |
commit | f8cbd17a222a8b8c4b5669baadad45571d907bff (patch) | |
tree | ba2c14efc82c74940d59fda6bfdab49381177417 | |
parent | 675907ba9fe38e84bddf2b71413e951e18313a4e (diff) | |
download | Skyblock-Dungeons-Guide-f8cbd17a222a8b8c4b5669baadad45571d907bff.tar.gz Skyblock-Dungeons-Guide-f8cbd17a222a8b8c4b5669baadad45571d907bff.tar.bz2 Skyblock-Dungeons-Guide-f8cbd17a222a8b8c4b5669baadad45571d907bff.zip |
- Collect room complete percentage and if player is in bossroom
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java | 2 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java index c037ec78..be0f7837 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java @@ -127,7 +127,7 @@ public class DungeonContext { } - private final Rectangle roomBoundary = new Rectangle(0,0,128,128); + private final Rectangle roomBoundary = new Rectangle(-10,-10,138,138); public void tick() { mapProcessor.tick(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java index 1f97b888..ab5e2950 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java @@ -401,19 +401,18 @@ public class MapProcessor { int time = MapUtils.readNumber(mapData, 51, 73, 9); int bonus = MapUtils.readNumber(mapData, 51, 92, 9); DungeonsGuide.sendDebugChat(new ChatComponentText(("skill: " + skill + " / exp: " + exp + " / time: " + time + " / bonus : " + bonus))); - DungeonsGuide.sendDebugChat(new ChatComponentText(new JSONObject().put("timeSB", FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed()) + JSONObject payload = new JSONObject().put("timeSB", FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed()) .put("timeR", FeatureRegistry.DUNGEON_REALTIME.getTimeElapsed()) .put("timeScore", time) - .put("floor", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()).toString())); + .put("completed", context.getBossRoomEnterSeconds() != -1) + .put("percentage", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getPercentage() / 100.0) + .put("floor", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); + DungeonsGuide.sendDebugChat(new ChatComponentText(payload.toString())); try { String target = StaticResourceCache.INSTANCE.getResource(StaticResourceCache.DATA_COLLECTION).get().getValue(); - if (FeatureRegistry.ETC_COLLECT_SCORE.isEnabled() && !target.contains("false")) { - - DungeonsGuide.getDungeonsGuide().getStompConnection().send(new StompPayload().payload(new JSONObject().put("timeSB", FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed()) - .put("timeR", FeatureRegistry.DUNGEON_REALTIME.getTimeElapsed()) - .put("timeScore", time) - .put("floor", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()).toString()).header("destination", target.trim())); + if (FeatureRegistry.ETC_COLLECT_SCORE.isEnabled() && !target.contains("falsefalse")) { + DungeonsGuide.getDungeonsGuide().getStompConnection().send(new StompPayload().payload(payload.toString().replace("false", "")).header("destination", target.trim())); } } catch (Throwable e) { e.printStackTrace(); |