• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [HB][Request] Don't sell items in the saved equips

    Discussion in 'Honorbuddy Forum' started by jim87, May 18, 2013.

    1. jim87

      jim87 New Member

      Joined:
      Aug 26, 2011
      Messages:
      445
      Likes Received:
      7
      Trophy Points:
      0
      Hello!

      Levelling an alt with dual spec has some drawbacks: one of it is that the bot will sell greens from time to time to free the bags. While I know there is a whitelist XML file, it would be awesome if you could add an auto-whitelist feature to avoid selling items part of the saved sets (third tab of the character's right column, after the titles).

      Could it be implemented ASAP? If not, how can I access to those sets in the HB APIs? And how can I overwrite the sell behavior? Thanks :)
       
    2. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi, Jim87,

      HBcore follows a 'minimialist' philosophy. This means solutions to specialized problems--such as the one you describe--are left to plugins or other extensions to provide. There is almost zero chance the HBcore would consider adding this feature intrinsically.

      This actually makes a lot of sense. As a lot of extra baggage to upgrade on 'patch days' represents a lot more updating, debugging, and testing to be done before an HB can be released. Adding this extra time is unacceptable to most of the Community.

      ------
      Solving the problem would probably best be done in the form of a Plugin that checks periodically (say 1 min), and adds new items.

      To get setup with the HB APIs, follow the same procedure as if you are going to write a Combat Routine. CodenameG has an excellent guide that will help you get this set up:

      Its not too complicated to prevent the selling of your beloved gear. Once you have the gear pieces identified, you would use ProtectedItemsManager.Add(gearItemId) to prevent Honorbuddy from selling it. Of course, you'd want to check that the item was not already on the list, so you don't try to add it multiple times.

      Alternatively, you may be able to modify (or talk CodenameG) into modifying Mr.ItemRemover2 to achieve this goal.

      cheers and good luck,
      chinajade
       
      Last edited: May 18, 2013
    3. jim87

      jim87 New Member

      Joined:
      Aug 26, 2011
      Messages:
      445
      Likes Received:
      7
      Trophy Points:
      0
      Hello chinajade! Does ProtectedItemsManager write the "Protected Items.xml" file? In case, not having subsections, it could be a problem because there is no way to distinguish "permanent" items, like the ones already listed, and the "temporary" ones (the green items).

      Also, I don't seem to have found any API related to equips (or at least with similar name), I suppose I'd run Lua and return the IDs, right?
       
    4. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      Hi again, Jim87,

      The Protected Items.xml file is used in a read-only capacity by Honorbuddy. It is used to populate the in-memory ProtectedItemsManager contents. You can think of the Protected Items.xml file contents of 'permanent', and anything your plugin adds as 'transient' (it won't last between Honorbuddy sessions).

      To access your equipment, you look at StyxWoW.Me.CarriedItems to get access to all the items in your bag, and equipped. If you need to know whether the item is equipped, the Inventorymanager.GetInventorySlotsByEquipSlot() will get you that information.

      From this information, you'll have to figure out your inventory management decisions. :D

      cheers,
      chinajade
       
      Last edited: May 19, 2013
    5. jim87

      jim87 New Member

      Joined:
      Aug 26, 2011
      Messages:
      445
      Likes Received:
      7
      Trophy Points:
      0
    6. chinajade

      chinajade Well-Known Member Moderator Buddy Core Dev

      Joined:
      Jul 20, 2010
      Messages:
      17,540
      Likes Received:
      172
      Trophy Points:
      63
      You must parse the information yourself.

      cheers,
      chinajade
       

    Share This Page