View Single Post
10/27/16, 02:43 PM   #10
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Rawl'kha woodworking station is definitive special somehow. It happens really fast there.
I was at other stations for 30min without any issue and there it sometimes happens in a few seconds serveral times. Very crowded, vendor nearby.

It is caused by HandleInventoryChanged() line 23 in sharedcraftinginventory.lua due to an EVENT_INVENTORY_SINGLE_SLOT_UPDATE with reason INVENTORY_UPDATE_REASON_ITEM_CHARGE.

You may have to add a filter to INVENTORY_UPDATE_REASON_DEFAULT.

Code:
ZO_SmithingTopLevelDeconstructionPanelInventory:AddFilterForEvent(EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_INVENTORY_UPDATE_REASON, INVENTORY_UPDATE_REASON_DEFAULT)
ZO_SmithingTopLevelImprovementPanelInventory:AddFilterForEvent(EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_INVENTORY_UPDATE_REASON, INVENTORY_UPDATE_REASON_DEFAULT)
/edit: Of course this is done better in the init-code directly:
Code:
function ZO_SharedCraftingInventory:Initialize(control, slotType, connectInfoFn, connectInfoControl)
...

    local function HandleInventoryChanged()
        self:HandleDirtyEvent()
    end

    control:RegisterForEvent(EVENT_INVENTORY_FULL_UPDATE, HandleInventoryChanged)
    control:RegisterForEvent(EVENT_INVENTORY_SINGLE_SLOT_UPDATE, HandleInventoryChanged)
    control:AddFilterForEvent(EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_INVENTORY_UPDATE_REASON, INVENTORY_UPDATE_REASON_DEFAULT)

...

end
Now the question is: Where do we have more EVENT_INVENTORY_SINGLE_SLOT_UPDATE handlers, which would benefit from a filter?

Last edited by votan : 10/28/16 at 05:45 AM.
  Reply With Quote