• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Development] Loot Information Plugin

    Discussion in 'Archives' started by Smarter, Jun 2, 2011.

    1. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      I am writing a Loot Info plugin as requested by a member, and have been going about methods of how to best go about this. Currently my idea is to hook LOOT_OPENED. Upon fire:
      Code:
      //On Loot_Opened:
                  /* Get Styx.Logic.Inventory.Frames.LootFrame.LootFrame.LootItems -- (# of Items In Loot Window)
                   * Grab Info with Styx.Logic.Inventory.Frames.LootFrame.LootFrame.LootInfo(int)
                   * which returns >
                   *  Styx.Logic.Inventory.Frames.LootFrame.LootSlotInfo
                   *      - Name, Quantity, Rarity, 
                   * Grab ItemID (Styx.Logic.Inventory.Frames.LootFrame.LootFrame.GetItemId(int)) for all not marked as Locked)
                   * Record Styx.Logic.Inventory.Frames.LootFrame.LootFrame.LootingObjectGuid -- Object GUID
                   */
      However, I see some flaws with this method. One being that this will record all available loot in the Loot window, not what the user actually picks up. I have yet to come up with a method to confirm that other than keeping a cached record of the In Bag Loot to compare with when LOOT_OPEN is called. Does anyone have an opinion or something that I have not seen in the API? Thank you.
       
    2. Bengan12

      Bengan12 Well-Known Member

      Joined:
      Feb 24, 2011
      Messages:
      1,967
      Likes Received:
      31
      Trophy Points:
      48
      Would be great if it recored pickpocketed items as well, as i was after the numbers of junkboxes i got :D and howe many i needed to get meh epics on my rogue :D
       
    3. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      Bumpet.
       
    4. shakazara

      shakazara New Member

      Joined:
      Jan 15, 2010
      Messages:
      212
      Likes Received:
      10
      Trophy Points:
      0
      Well there is multiple ways you could come around that. Here is 2 that i thought of:
      1. Hook up to CHAT_MSG_LOOT, where the first arg is the message (e.g. "You recieve loot: [Chunk of Boar Meat]")
      or
      2. on looting a new item BAG_UPDATE is fired, simply get all items before start (with count) and each time BAG_UPDATE is fired, get the new items in your inventory
       
    5. Smarter

      Smarter Member

      Joined:
      Jan 15, 2010
      Messages:
      763
      Likes Received:
      9
      Trophy Points:
      18
      BAG_UPDATE seems to be the method of choice, a simple Bag Monitor I suppose would be the best solution for this.
       
    6. jim87

      jim87 New Member

      Joined:
      Aug 26, 2011
      Messages:
      445
      Likes Received:
      7
      Trophy Points:
      0
      Look at my plugin source...
       

    Share This Page