From 0e71c88b4d47d7fb2dcc8a862e0b31830887877a Mon Sep 17 00:00:00 2001 From: Sean Patiag Date: Sun, 20 Sep 2020 07:24:41 -0700 Subject: [PATCH 1/3] timers: Fix NMZ Overload timer not disappearing Unlike with the CoX Overloads, the plugin did not check if the player was still in the area for the Nightmare Zone Overloads, causing the timer to not disappear after leaving. The plugin now removes the timer if the player has left NMZ and has drunk an Overload potion. --- .../runelite/client/plugins/timers/TimersPlugin.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java index 57b782f5e7..3cbf489c59 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java @@ -121,6 +121,7 @@ public class TimersPlugin extends Plugin static final int FIGHT_CAVES_REGION_ID = 9551; static final int INFERNO_REGION_ID = 9043; + private static final int NMZ_MAP_REGION_ID = 9033; private static final Pattern TZHAAR_WAVE_MESSAGE = Pattern.compile("Wave: (\\d+)"); private static final String TZHAAR_DEFEATED_MESSAGE = "You have been defeated!"; private static final Pattern TZHAAR_COMPLETE_MESSAGE = Pattern.compile("Your (TzTok-Jad|TzKal-Zuk) kill count is:"); @@ -718,6 +719,11 @@ public class TimersPlugin extends Plugin return client.getMapRegions() != null && ArrayUtils.contains(client.getMapRegions(), INFERNO_REGION_ID); } + private boolean isInNightmareZone() + { + return client.getLocalPlayer() != null && client.getLocalPlayer().getWorldLocation().getPlane() > 0 && ArrayUtils.contains(client.getMapRegions(), NMZ_MAP_REGION_ID); + } + private void createTzhaarTimer() { removeTzhaarTimer(); @@ -783,6 +789,11 @@ public class TimersPlugin extends Plugin switch (gameStateChanged.getGameState()) { case LOADING: + if (!isInNightmareZone()) + { + removeGameTimer(OVERLOAD); + } + if (tzhaarTimer != null && !isInFightCaves() && !isInInferno()) { removeTzhaarTimer(); From 5e2946024b4fdd831a3e70ed98f583941eeaefae Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Sat, 24 Oct 2020 17:45:28 -0700 Subject: [PATCH 2/3] nightmarezone: Set absorption notification var on startup --- .../client/plugins/nightmarezone/NightmareZonePlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java index a471f5b241..7a3952b903 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java @@ -89,6 +89,7 @@ public class NightmareZonePlugin extends Plugin overlayManager.add(overlay); overlay.removeAbsorptionCounter(); + absorptionNotificationSend = true; overloadNotificationSend = false; } From 5c9ceb9d175ad1e0db8567517904835eaa9c8658 Mon Sep 17 00:00:00 2001 From: Sean Patiag Date: Sun, 20 Sep 2020 07:31:11 -0700 Subject: [PATCH 3/3] nightmarezone: Clear pending overload notifications outside NMZ --- .../client/plugins/nightmarezone/NightmareZonePlugin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java index 7a3952b903..ccd2a775c0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/nightmarezone/NightmareZonePlugin.java @@ -136,6 +136,8 @@ public class NightmareZonePlugin extends Plugin resetPointsPerHour(); } + overloadNotificationSend = false; + return; }