Resolved Inventory interaction no longer opens inventory

Discussion in 'Client & Site Support' started by SlashnHax, Oct 10, 2015.

  1. Before, if you tried to interact with an item in your inventory and it wasn't open, it would open the backpack, but recently this doesn't seem to happen.

    Is this intended or did something change?
     
  2. Something likely broke.
     
  3. Is it just the inventory or does this also happen for equiped items and such?
     
  4. I've only tested it with the inventory, I'll try equipped items in a sec.
     
  5. Did you end up fixing the inventory opening that i told you about a while back? It wouldn't hover the ribbon to get to the inventory component, but if you hover it yourself it opens the inventory fine
     
  6. No, it's likely the same issue.
    --- Double Post Merged, Oct 19, 2015, Original Post Date: Oct 14, 2015 ---
    Bump guys? @SlashnHax
     
  7. @Cloud Please find this and fix this as it is the only bug in Alpha Fighter.
    THE ONLY BUG.

    Trying to alch something with the equipment tab open for 9 hours is not good.
     
  8. My bad, yeah, it's the same issue for equipped items (tested with Ring of Duelling).

    I tried hovering over the ribbon, like @Aidden said, and then it seemed to be able to open the equipment tab by itself.
    I've added explicit inventory opening for next update due to this bug xD
     
  9. You the man
     
  10. For anyone who want.

    Code (Text):
    1. /**
    2. * Interacts with a SpriteItem. Only works if item is in inventory or
    3. * equipped.
    4. *
    5. * @param item   The item to interact with
    6. * @param action The action to interact
    7. * @return Returns true if interaction was successful
    8. */
    9. public static boolean item(SpriteItem item, String action) {
    10.     if (item != null && item.isValid()) {
    11.         Openable tab;
    12.         SpriteItem.Origin origin = item.getOrigin();
    13.         if (origin.equals(SpriteItem.Origin.INVENTORY)) {
    14.             tab = InterfaceWindows.getInventory();
    15.         } else if (origin.equals(SpriteItem.Origin.EQUIPMENT)) {
    16.             tab = InterfaceWindows.getEquipment();
    17.         } else {
    18.             return false;
    19.         }
    20.         if (tab.isOpen()) {
    21.             return item.interact(action);
    22.         } else {
    23.             if (tab.open()) {
    24.                 final Openable t = tab;
    25.                 Execution.delayUntil(t::isOpen, Random.nextInt(1500, 3000));
    26.             }
    27.         }
    28.     }
    29.     return false;
    30. }
     
  11. Under what conditions is the ribbon visible? Can someone loan me an account that has that?
     
  12. The ribbons always visible afaik. But it doesn't know to hover the icon on the ribbon that then gives you access to the inventory button
     
  13. I borrowed an account and it wasn't there, hence why I was asking.
     
  14. DM me on slack and i'll show you
     
  15. That name though, wouldn't interact have been a better choice? xD
     
    Aidden likes this.
  16. The class name is Interact...
     
  17. Strange, normally you'd name the class a noun, not a verb... Like Interaction or something :p Just nitpicking, but I thought conventions was one of your pet peeves too?
     
  18. Are we really going to talk about this?
     
  19. I'm assuming he's done this because then he can have different interact methods for different types of object in one class, rather than creating an Item class, and Npc class etc with separate interact methods (hence the method being called item). It's a bit backwards, but saves making multiple classes just to have one method in them.
     

Share This Page

Loading...