Junk events
Hello,
It looks like I am flooding the Lua/XML forum here :rolleyes: I searched in the wiki for junk related stuff and found 2 meaty globals : ["SI_ITEM_ACTION_MARK_AS_JUNK"] = 1787 ["SI_ITEM_ACTION_UNMARK_AS_JUNK"] = 1788 These look like exactly what I need for my addon but now, I need to find the Event(s) that make use of these. Did anyone find the junk related events ? It seems from these 2 globals that there should be an ITEM_ACTION event or something. The event I am using right now is EVENT_INVENTORY_SINGLE_SLOT_UPDATE -> eventCode, bagId, slotId, isNewItem, itemSoundCategory, updateReason but updateReason only accounts for ["INVENTORY_UPDATE_REASON_DURABILITY_CHANGE"] = 1 and ["INVENTORY_UPDATE_REASON_DEFAULT"] = 0 so no luck here. Any info rly appreciated. |
Those constants are string IDs to get the text for the dropdown to mark and unmark as junk.
|
Is there any MARK_AS_JUNK event or only the EVENT_INVENTORY_SINGLE_SLOT_UPDATE ?
|
Install Zgoo if you don't have it installed.
Type /zgoo events Mark an item as junk See what it displays :) |
Right !
Will check that thx. |
Quote:
|
In my add-on, here is how I handle junk (don't mind the if checks in front of the event registers):
Registering event & marking junk: Code:
if QB_vars.trashTreatmentSelection >= 2 then EVENT_MANAGER:RegisterForEvent( "QB", EVENT_INVENTORY_SINGLE_SLOT_UPDATE, QB_HandlerSingleSlotUpdate ) end Code:
if QB_vars.trashTreatmentSelection == 3 then EVENT_MANAGER:RegisterForEvent( "QB", EVENT_OPEN_STORE, QB_HandlerStoreOpened ) end |
What I'm trying to use in my Dustman (testing right now)
Lua Code:
|
Quote:
Here is how I am handling the garbage :D (note I had issues with items gained thru deconstruction or bank retrievals) Lua Code:
Might not be perfect but working so far. The GetGameTimeMilliseconds() - RJ.bankEvent < RJ.trackDelay checks if a bank pull happened in the last 50 milliseconds. The not RJ.craftEvent check if we are 'inside' a craft event (after craft started and before craft completed). Had to do this because items would sometimes (go figure) get removed from my addon junk list while deconstructing or pulling bank items. |
Quote:
|
Quote:
They are not anymore listed in thier original category, but instead in their junk category. Junk items can be quickly sold (with value preview) at any trader by hitting X. Especially vendor trash and white gear without a trait lands in my junkyard. Same with too low potions (when I get enough of higher level), already known recipes, and the like. Mark as junk is really just there to give you better overview and allow you to sell trash fast. |
All times are GMT -6. The time now is 05:03 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI