From fc63c540a0ab1e1b7467112a3500f8b7e6d3d877 Mon Sep 17 00:00:00 2001 From: Chris Hranj Date: Tue, 2 Oct 2018 01:32:52 -0400 Subject: [PATCH] Update stamina potion timer to include shared stamina potions (#5750) Fixes #5176. This PR updates the stamina potion timer functionality so that the timer also shows up when the player gets a stamina boost from another player (via Boost Potion Share spell) --- .../java/net/runelite/client/plugins/timers/TimersPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 1cd8865fa3..083013fe90 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 @@ -100,6 +100,7 @@ public class TimersPlugin extends Plugin private static final String STAFF_OF_THE_DEAD_SPEC_EXPIRED_MESSAGE = "Your protection fades away"; private static final String STAFF_OF_THE_DEAD_SPEC_MESSAGE = "Spirits of deceased evildoers offer you their protection"; private static final String STAMINA_DRINK_MESSAGE = "You drink some of your stamina potion."; + private static final String STAMINA_SHARED_DRINK_MESSAGE = "You have received a shared dose of stamina potion."; private static final String STAMINA_EXPIRED_MESSAGE = "Your stamina potion has expired."; private static final String SUPER_ANTIFIRE_DRINK_MESSAGE = "You drink some of your super antifire potion"; private static final String SUPER_ANTIFIRE_EXPIRED_MESSAGE = "Your super antifire potion has expired."; @@ -383,7 +384,7 @@ public class TimersPlugin extends Plugin return; } - if (config.showStamina() && event.getMessage().equals(STAMINA_DRINK_MESSAGE)) + if (config.showStamina() && (event.getMessage().equals(STAMINA_DRINK_MESSAGE) || event.getMessage().equals(STAMINA_SHARED_DRINK_MESSAGE))) { createGameTimer(STAMINA); }