From fd080e2b2dfeb6f35d1e703615d236143e31904b Mon Sep 17 00:00:00 2001 From: pkcs21 Date: Mon, 24 Feb 2025 14:56:19 -0800 Subject: [PATCH] Fix getAttackableNpcs() to work in multi different .filter() conditions --- .../net/runelite/client/plugins/microbot/util/npc/Rs2Npc.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/npc/Rs2Npc.java b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/npc/Rs2Npc.java index 7829479b1b..d98b8e3638 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/npc/Rs2Npc.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/npc/Rs2Npc.java @@ -296,7 +296,7 @@ public static Stream getNpcs(int id) { */ public static Stream getAttackableNpcs() { return getNpcs(npc -> npc.getCombatLevel() > 0 && !npc.isDead()) - .filter(npc -> !Rs2Player.isInMulti() && !npc.isInteracting()) + .filter(npc -> Rs2Player.isInMulti() || !npc.isInteracting()) .sorted(Comparator.comparingInt(value -> value.getLocalLocation().distanceTo( Microbot.getClient().getLocalPlayer().getLocalLocation()))); @@ -1161,4 +1161,4 @@ public static boolean walkToNearestMonster(String name, int minClustering) { public static boolean walkToNearestMonster(String name) { return walkToNearestMonster(name, 1, false); } -} \ No newline at end of file +}