From 1c27ca0e7586c27de7ddd51723b5bf7b0ab50230 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Mon, 30 Jan 2023 17:07:32 -0600 Subject: Stop notification on private island --- src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/kotlin/dulkirmod/features') diff --git a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt index adb8edc..668751c 100644 --- a/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt +++ b/src/main/kotlin/dulkirmod/features/BrokenHypeNotif.kt @@ -12,7 +12,7 @@ var oldChampionXp = -1.0 var oldID = "" fun brokenHypeNotif() { - if (!Config.notifyHype) return; + if (!Config.notifyHype) return var kill = -1 var championXp = -1.0 @@ -41,23 +41,23 @@ fun brokenHypeNotif() { // check if same item as previous run if (id == "") { - return; + return } else if (id != oldID) { // Check if this is a valid item for testing whether bestiary is broken. // That is, to be specific, check that it has champion and book of stats. // If it doesn't, don't reset because it can't be used anyway. if (kill == -1 || championXp == -1.0) { - return; + return } // If we get here this is a new item that is legitimate for testing bugged xp, in theory. oldID = id oldKill = kill oldChampionXp = championXp - return; + return } // If this section of the code is reached, then we have the same item, and we can check for updated stats - if (oldKill != kill && oldChampionXp == championXp) { + if (oldKill != kill && oldChampionXp == championXp && Utils.area != "Private Island") { mc.thePlayer.playSound("random.anvil_land", 1f * Config.bestiaryNotifVol, 0f) val color = Utils.getColorString(Config.bestiaryNotifColor) DulkirMod.titleUtils.drawStringForTime("${color}Hype Broken", 5000) -- cgit