Repository: runelite/runelite
Pull request #17892 (2024-05-28 14:57:03)

Fix typo in varbits and world hopper plugin


Patch:
diff --git a/runelite-api/src/main/java/net/runelite/api/Varbits.java b/runelite-api/src/main/java/net/runelite/api/Varbits.java
index 0a7e48228..e7edfea95 100644
--- a/runelite-api/src/main/java/net/runelite/api/Varbits.java
+++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java
@@ -611,8 +611,8 @@ public final class Varbits
 	public static final int BANK_REARRANGE_MODE = 3959;
 	public static final int CURRENT_BANK_TAB = 4150;
 
-	public static final int WORLDHOPPER_FAVROITE_1 = 4597;
-	public static final int WORLDHOPPER_FAVROITE_2 = 4598;
+	public static final int WORLDHOPPER_FAVORITE_1 = 4597;
+	public static final int WORLDHOPPER_FAVORITE_2 = 4598;
 
 	/**
 	 * Spell activeness
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java b/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java
index 5f923b162..2b81c9df9 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerType.java
@@ -33,11 +33,11 @@ import net.runelite.api.SpriteID;
 @Getter
 enum PrayerType
 {
-	THICK_SKIN("Thick Skin", Prayer.THICK_SKIN, "+5% Defence", SpriteID.PRAYER_THICK_SKIN, false, 3),
-	BURST_OF_STRENGTH("Burst of Strength", Prayer.BURST_OF_STRENGTH, "+5% Strength", SpriteID.PRAYER_BURST_OF_STRENGTH, false, 3),
-	CLARITY_OF_THOUGHT("Clarity of Thought", Prayer.CLARITY_OF_THOUGHT, "+5% Attack", SpriteID.PRAYER_CLARITY_OF_THOUGHT, false, 3),
-	SHARP_EYE("Sharp Eye", Prayer.SHARP_EYE, "+5% Ranged", SpriteID.PRAYER_SHARP_EYE, false, 3),
-	MYSTIC_WILL("Mystic Will", Prayer.MYSTIC_WILL, "+5% Magical attack and defence", SpriteID.PRAYER_MYSTIC_WILL, false, 3),
+	THICK_SKIN("Thick Skin", Prayer.THICK_SKIN, "+5% Defence", SpriteID.PRAYER_THICK_SKIN, false, 1),
+	BURST_OF_STRENGTH("Burst of Strength", Prayer.BURST_OF_STRENGTH, "+5% Strength", SpriteID.PRAYER_BURST_OF_STRENGTH, false, 1),
+	CLARITY_OF_THOUGHT("Clarity of Thought", Prayer.CLARITY_OF_THOUGHT, "+5% Attack", SpriteID.PRAYER_CLARITY_OF_THOUGHT, false, 1),
+	SHARP_EYE("Sharp Eye", Prayer.SHARP_EYE, "+5% Ranged", SpriteID.PRAYER_SHARP_EYE, false, 1),
+	MYSTIC_WILL("Mystic Will", Prayer.MYSTIC_WILL, "+5% Magical attack and defence", SpriteID.PRAYER_MYSTIC_WILL, false, 1),
 	ROCK_SKIN("Rock Skin", Prayer.ROCK_SKIN, "+10% Defence", SpriteID.PRAYER_ROCK_SKIN, false, 6),
 	SUPERHUMAN_STRENGTH("Superhuman Strength", Prayer.SUPERHUMAN_STRENGTH, "+10% Strength", SpriteID.PRAYER_SUPERHUMAN_STRENGTH, false, 6),
 	IMPROVED_REFLEXES("Improved Reflexes", Prayer.IMPROVED_REFLEXES, "+10% Attack", SpriteID.PRAYER_IMPROVED_REFLEXES, false, 6),
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialCounterConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialCounterConfig.java
index 8af77dd7c..ab62b3e51 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialCounterConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialCounterConfig.java
@@ -89,6 +89,17 @@ public interface SpecialCounterConfig extends Config
 		return 0;
 	}
 
+	@ConfigItem(
+		position = 15,
+		keyName = "elderMaulThreshold",
+		name = "Elder Maul",
+		description = "Threshold for Elder Maul (0 to disable)"
+	)
+	default int elderMaulThreshold()
+	{
+		return 0;
+	}
+
 	@ConfigItem(
 		position = 20,
 		keyName = "arclightThreshold",
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialWeapon.java b/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialWeapon.java
index 2628358bd..18b8288cb 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialWeapon.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/specialcounter/SpecialWeapon.java
@@ -59,7 +59,13 @@ public enum SpecialWeapon
 		new int[]{ItemID.TONALZTICS_OF_RALOS},
 		false,
 		(distance) -> 50, //The hitsplat is always applied 2t after spec regardless of distance
-		(c) -> 0);
+		(c) -> 0
+	),
+	ELDER_MAUL("Elder Maul",
+		new int[]{ItemID.ELDER_MAUL, ItemID.ELDER_MAUL_OR},
+		false,
+		(distance) -> 50, //The hitsplat is applied 2t after spec unlike most melee weapons
+		SpecialCounterConfig::elderMaulThreshold);
 
 	private final String name;
 	private final int[] itemID;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java
index b39543a0b..3cd0dfc34 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java
@@ -369,11 +369,11 @@ public class WorldHopperPlugin extends Plugin
 	@Subscribe
 	public void onVarbitChanged(VarbitChanged varbitChanged)
 	{
-		if (varbitChanged.getVarbitId() == Varbits.WORLDHOPPER_FAVROITE_1
-			|| varbitChanged.getVarbitId() == Varbits.WORLDHOPPER_FAVROITE_2)
+		if (varbitChanged.getVarbitId() == Varbits.WORLDHOPPER_FAVORITE_1
+			|| varbitChanged.getVarbitId() == Varbits.WORLDHOPPER_FAVORITE_2)
 		{
-			favoriteWorld1 = client.getVarbitValue(Varbits.WORLDHOPPER_FAVROITE_1);
-			favoriteWorld2 = client.getVarbitValue(Varbits.WORLDHOPPER_FAVROITE_2);
+			favoriteWorld1 = client.getVarbitValue(Varbits.WORLDHOPPER_FAVORITE_1);
+			favoriteWorld2 = client.getVarbitValue(Varbits.WORLDHOPPER_FAVORITE_2);
 			SwingUtilities.invokeLater(panel::updateList);
 		}
 	}
diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java
index 984dc2480..c3055cde0 100644
--- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/WidgetOverlay.java
@@ -66,7 +66,7 @@ public class WidgetOverlay extends Overlay
 			new WidgetOverlay(client, ComponentID.ZEAH_MESS_HALL_COOKING_DISPLAY, "ZEAH_MESS_HALL_COOKING_DISPLAY", OverlayPosition.TOP_LEFT),
 			new PvpKDRWidgetOverlay(client, ComponentID.PVP_KILLDEATH_RATIO, "PVP_KILLDEATH_COUNTER", OverlayPosition.TOP_LEFT),
 			new WidgetOverlay(client, ComponentID.SKOTIZO_CONTAINER, "SKOTIZO_CONTAINER", OverlayPosition.TOP_LEFT),
-			new WidgetOverlay(client, ComponentID.PYRAMID_PLUNDER_DATA, "PYRAMID_PLUNDER_DATA", OverlayPosition.TOP_CENTER),
+			new WidgetOverlay(client, ComponentID.PYRAMID_PLUNDER_DATA, "PYRAMID_PLUNDER_DATA", OverlayPosition.ABOVE_CHATBOX_RIGHT),
 			new WidgetOverlay(client, ComponentID.LMS_INFO, "LMS_INFO", OverlayPosition.TOP_RIGHT),
 			new WidgetOverlay(client, ComponentID.LMS_INGAME_INFO, "LMS_KDA", OverlayPosition.TOP_RIGHT),
 			new WidgetOverlay(client, ComponentID.GAUNTLET_TIMER_CONTAINER, "GAUNTLET_TIMER_CONTAINER", OverlayPosition.TOP_LEFT),


Test patch:
diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/prayer/PrayerPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/prayer/PrayerPluginTest.java
index bd0bf91e4..81499a18f 100644
--- a/runelite-client/src/test/java/net/runelite/client/plugins/prayer/PrayerPluginTest.java
+++ b/runelite-client/src/test/java/net/runelite/client/plugins/prayer/PrayerPluginTest.java
@@ -164,11 +164,11 @@ public class PrayerPluginTest
 	{
 		prayerPlugin.setPrayerBonus(42);
 
-		assertTime(PrayerType.THICK_SKIN, "47:31");
-		assertTime(PrayerType.BURST_OF_STRENGTH, "47:31");
-		assertTime(PrayerType.CLARITY_OF_THOUGHT, "47:31");
-		assertTime(PrayerType.SHARP_EYE, "47:31");
-		assertTime(PrayerType.MYSTIC_WILL, "47:31");
+		assertTime(PrayerType.THICK_SKIN, "2:22:33");
+		assertTime(PrayerType.BURST_OF_STRENGTH, "2:22:33");
+		assertTime(PrayerType.CLARITY_OF_THOUGHT, "2:22:33");
+		assertTime(PrayerType.SHARP_EYE, "2:22:33");
+		assertTime(PrayerType.MYSTIC_WILL, "2:22:33");
 		assertTime(PrayerType.ROCK_SKIN, "23:45");
 		assertTime(PrayerType.SUPERHUMAN_STRENGTH, "23:45");
 		assertTime(PrayerType.IMPROVED_REFLEXES, "23:45");
diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/specialcounter/SpecialWeaponTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/specialcounter/SpecialWeaponTest.java
index ee9f24218..b89c1d3f6 100644
--- a/runelite-client/src/test/java/net/runelite/client/plugins/specialcounter/SpecialWeaponTest.java
+++ b/runelite-client/src/test/java/net/runelite/client/plugins/specialcounter/SpecialWeaponTest.java
@@ -40,6 +40,7 @@ public class SpecialWeaponTest
 		assertRangeDelayEquals(1, BARRELCHEST_ANCHOR, 1);
 		assertRangeDelayEquals(1, BONE_DAGGER, 1);
 		assertRangeDelayEquals(1, BULWARK, 1);
+		assertRangeDelayEquals(2, ELDER_MAUL, 1);
 	}
 
 	@Test