use of net.runelite.rs.api.RSNPC in project runelite by runelite.
the class RSClientMixin method cachedNPCsChanged.
@FieldHook("cachedNPCs")
@Inject
public static void cachedNPCsChanged(int idx) {
RSNPC[] cachedNPCs = client.getCachedNPCs();
if (idx < 0 || idx >= cachedNPCs.length) {
return;
}
RSNPC npc = cachedNPCs[idx];
if (npc != null) {
npc.setIndex(idx);
}
}