What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Development] Loot Information Plugin

Smarter

Member
Joined
Jan 15, 2010
Messages
763
Reaction score
9
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.
 
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
 
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
 
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

BAG_UPDATE seems to be the method of choice, a simple Bag Monitor I suppose would be the best solution for this.
 
Back
Top