diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java index df6a39cb07..d763eff4d5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java @@ -71,7 +71,7 @@ public enum GameTimer ANTIPOISON("antipoison", "Antipoison", 90, ChronoUnit.SECONDS), SUPERANTIPOISON("superantipoison", "Superantipoison", 346, ChronoUnit.SECONDS), CHARGE("charge", "Charge", 6, ChronoUnit.MINUTES), - STAFF_OF_THE_DEAD("staffofthedead", "Staff of the Dead", GraphicID.STAFF_OF_THE_DEAD, 1, ChronoUnit.MINUTES); + STAFF_OF_THE_DEAD("staffofthedead", "Staff of the Dead", 1, ChronoUnit.MINUTES); @Getter private final String imageResource; 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 0782958a6c..339ca571e6 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 @@ -429,10 +429,20 @@ public class TimersPlugin extends Plugin createGameTimer(CHARGE); } - if (event.getMessage().equals("Your magical charge fades away.")) + if (config.showCharge() && event.getMessage().equals("Your magical charge fades away.")) { removeGameTimer(CHARGE); } + + if (config.showStaffOfTheDead() && event.getMessage().contains("Spirits of deceased evildoers offer you their protection")) + { + createGameTimer(STAFF_OF_THE_DEAD); + } + + if (config.showStaffOfTheDead() && event.getMessage().contains("Your protection fades away")) + { + removeGameTimer(STAFF_OF_THE_DEAD); + } } @Subscribe @@ -474,11 +484,6 @@ public class TimersPlugin extends Plugin createGameTimer(VENGEANCE); } - if (config.showStaffOfTheDead() && actor.getGraphic() == STAFF_OF_THE_DEAD.getGraphicId()) - { - createGameTimer(STAFF_OF_THE_DEAD); - } - if (config.showFreezes()) { if (actor.getGraphic() == BIND.getGraphicId())