Reprioritize arrow target player when leaving combat

This commit is contained in:
Lucwousin
2020-06-27 16:01:05 +02:00
parent 81542d02a6
commit 4363e79bb1

View File

@@ -1208,6 +1208,20 @@ public abstract class RSClientMixin implements RSClient
}
}
@FieldHook("combatTargetPlayerIndex")
@Inject
public static void combatPlayerTargetChanged(int ignored)
{
if (client.getLocalInteractingIndex() == -1)
{
final Player p = client.getHintArrowPlayer();
if (p != null)
{
client.setLocalInteractingIndex(p.getPlayerId() & 2047);
}
}
}
@Inject
@Override
public boolean hasHintArrow()