Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Request Npc clear cache

Joined
Jun 20, 2015
Messages
183
At least for dungeoneering the aspect is that some NPC's change actions / id's without going null.

Example: Monolith. Bot is set to click if actions has Activate, works fine for first implementation, though actions changed and does not contain "Activate", but it still caches.

cachednpcs.png
Portion of the code.
Code:
LocatableEntityQueryResults<Npc> monoq = Npcs.newQuery().names("Monolith").actions("Activate").within(bounds).results();
        Npc monolith = monoq.isEmpty()? null: monoq.nearest();
        if(monolith != null){
            System.out.println("Not null: Actions"+monolith.getDefinition().getActions());
            interactWithPerson(monolith, "Activate");
        }

@Vaped
 
Joined
Jun 20, 2015
Messages
183
I'll be sure to do that to help debug the issue for your guys end as Npc monolith = monoq.isEmpty()? null: monoq.nearest(); should be null since the query should be returning empty instead of the old NPC. Just need to get one of the many NPC occurrences that this applies to in dungeoneering.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
This should have been reported as a bug, I'll disable npc id caching for a while.
 
Top