npchighlight: Apply correct highlights to changed NPCs
This commit is contained in:
@@ -57,6 +57,7 @@ import net.runelite.api.events.GameTick;
|
||||
import net.runelite.api.events.GraphicsObjectCreated;
|
||||
import net.runelite.api.events.MenuEntryAdded;
|
||||
import net.runelite.api.events.MenuOptionClicked;
|
||||
import net.runelite.api.events.NpcChanged;
|
||||
import net.runelite.api.events.NpcDespawned;
|
||||
import net.runelite.api.events.NpcSpawned;
|
||||
import net.runelite.client.callback.ClientThread;
|
||||
@@ -409,6 +410,26 @@ public class NpcIndicatorsPlugin extends Plugin
|
||||
highlightedNpcs.remove(npc);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onNpcChanged(NpcChanged event)
|
||||
{
|
||||
final NPC npc = event.getNpc();
|
||||
final String npcName = npc.getName();
|
||||
|
||||
highlightedNpcs.remove(npc);
|
||||
|
||||
if (npcName == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (npcTags.contains(npc.getIndex())
|
||||
|| highlightMatchesNPCName(npcName))
|
||||
{
|
||||
highlightedNpcs.add(npc);
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onGraphicsObjectCreated(GraphicsObjectCreated event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user