Request Npc clear cache

Discussion in 'Client & Site Suggestions' started by Zasz, May 30, 2016.

  1. Zasz

    Joined:
    Jun 20, 2015
    Messages:
    181
    Likes Received:
    52
    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 (Text):
    1.  
    2. LocatableEntityQueryResults<Npc> monoq = Npcs.newQuery().names("Monolith").actions("Activate").within(bounds).results();
    3.         Npc monolith = monoq.isEmpty()? null: monoq.nearest();
    4.         if(monolith != null){
    5.             System.out.println("Not null: Actions"+monolith.getDefinition().getActions());
    6.             interactWithPerson(monolith, "Activate");
    7.         }
    8.  
    @Vaped
     
  2. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,950
    Likes Received:
    861
    Check the local state as well
     
  3. Zasz

    Joined:
    Jun 20, 2015
    Messages:
    181
    Likes Received:
    52
    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.
     
  4. Cloud

    Cloud Just another one...

    Joined:
    Jul 28, 2013
    Messages:
    2,412
    Likes Received:
    795
    This should have been reported as a bug, I'll disable npc id caching for a while.
     

Share This Page

Loading...