diff options
author | syeyoung <cyougn06@naver.com> | 2021-12-19 15:22:06 +0900 |
---|---|---|
committer | syeyoung <cyougn06@naver.com> | 2021-12-19 15:22:06 +0900 |
commit | f3238060717b001d6721915e696f30875c2ad0c2 (patch) | |
tree | 3ddfb95f9320254e02c81b85aee0248b2113e78c | |
parent | bf5daaf551a1b577066527e5366b455a787971c8 (diff) | |
download | Skyblock-Dungeons-Guide-f3238060717b001d6721915e696f30875c2ad0c2.tar.gz Skyblock-Dungeons-Guide-f3238060717b001d6721915e696f30875c2ad0c2.tar.bz2 Skyblock-Dungeons-Guide-f3238060717b001d6721915e696f30875c2ad0c2.zip |
- Fix Dungeon Realtime resetting time on dungeon end instead of dungeon leave
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java | 4 | ||||
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java index 8c2b0443..1f97b888 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java @@ -401,6 +401,10 @@ 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()) + .put("timeR", FeatureRegistry.DUNGEON_REALTIME.getTimeElapsed()) + .put("timeScore", time) + .put("floor", DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()).toString())); try { String target = StaticResourceCache.INSTANCE.getResource(StaticResourceCache.DATA_COLLECTION).get().getValue(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java index fa69f006..90f6dd01 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRealTime.java @@ -20,6 +20,7 @@ package kr.syeyoung.dungeonsguide.features.impl.dungeon; import kr.syeyoung.dungeonsguide.config.types.AColor; import kr.syeyoung.dungeonsguide.features.listener.DungeonEndListener; +import kr.syeyoung.dungeonsguide.features.listener.DungeonQuitListener; import kr.syeyoung.dungeonsguide.features.listener.DungeonStartListener; import kr.syeyoung.dungeonsguide.features.text.StyledText; import kr.syeyoung.dungeonsguide.features.text.TextHUDFeature; @@ -30,7 +31,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -public class FeatureDungeonRealTime extends TextHUDFeature implements DungeonStartListener, DungeonEndListener { +public class FeatureDungeonRealTime extends TextHUDFeature implements DungeonStartListener, DungeonQuitListener { public FeatureDungeonRealTime() { super("Dungeon.Dungeon Information", "Display Real Time-Dungeon Time", "Display how much real time has passed since dungeon run started", "dungeon.stats.realtime", true, getFontRenderer().getStringWidth("Time(Real): 59m 59s"), getFontRenderer().FONT_HEIGHT); this.setEnabled(false); @@ -80,12 +81,12 @@ public class FeatureDungeonRealTime extends TextHUDFeature implements DungeonSta } @Override - public void onDungeonEnd() { - started = -1; + public void onDungeonStart() { + started= System.currentTimeMillis(); } @Override - public void onDungeonStart() { - started= System.currentTimeMillis(); + public void onDungeonQuit() { + started = -1; } } |