From bdb554e9a1bf42cdb18fc1fdb3edb13f7cb2b678 Mon Sep 17 00:00:00 2001 From: Lotto Date: Thu, 19 Mar 2020 00:14:31 +0100 Subject: [PATCH] player-indicators: highlight the 'Walk here' menu entry too --- .../playerindicators/PlayerIndicatorsPlugin.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java index f3ff69d7b0..ffbccb4710 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java @@ -108,8 +108,8 @@ public class PlayerIndicatorsPlugin extends Plugin type -= MENU_ACTION_DEPRIORITIZE_OFFSET; } - int identifier = entry.getIdentifier(); - if (type == SPELL_CAST_ON_PLAYER.getId() + if (type == WALK.getId() + || type == SPELL_CAST_ON_PLAYER.getId() || type == ITEM_USE_ON_PLAYER.getId() || type == PLAYER_FIRST_OPTION.getId() || type == PLAYER_SECOND_OPTION.getId() @@ -124,6 +124,15 @@ public class PlayerIndicatorsPlugin extends Plugin Player[] players = client.getCachedPlayers(); Player player = null; + int identifier = entry.getIdentifier(); + + // 'Walk here' identifiers are offset by 1 because the default + // identifier for this option is 0, which is also a player index. + if (type == WALK.getId()) + { + identifier--; + } + if (identifier >= 0 && identifier < players.length) { player = players[identifier];