ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   SHARED_INVENTORY_SLOT_RESULT_REMOVED not fired on research (https://www.esoui.com/forums/showthread.php?t=5283)

@AlphaLemming 11/14/15 12:37 PM

SHARED_INVENTORY_SLOT_RESULT_REMOVED not fired on research
 
Lua Code:
  1. function ZO_SharedInventoryManager:HandleSlotCreationOrUpdate(bagCache, bagId, slotIndex, isNewItem)
  2.     local existingSlotData = bagCache[slotIndex]
  3.     local slotData, result = self:CreateOrUpdateSlotData(existingSlotData, bagId, slotIndex, isNewItem)
  4.     bagCache[slotIndex] = slotData
  5.     if result == SHARED_INVENTORY_SLOT_RESULT_REMOVED then
  6.         self:FireCallbacks("SlotRemoved", bagId, slotIndex, existingSlotData)
  7. ...

This callback is not fired, if a item is consumed by researching its trait, why? The item is removed...

merlight 11/14/15 01:13 PM

Maybe research causes a full inventory update? Not that I think it would make sense, I too would expect single slot update.

@AlphaLemming 11/16/15 04:02 AM

It is not hooked on Full- or Single-Update. This is called for both events and i'am don't using the events, i use a callback-function on 'SlotAdded' and 'SlotRemoved'.

merlight 11/16/15 08:34 AM

Tried starting research on the PTS. "SlotRemoved" was only fired when I used an item from backpack. When I used an item from bank it wasn't fired. I checked SHARED_INVENTORY.bagCache[2] and the item was still there. "SlotRemoved" for that item was eventually fired when I went to the bank and opened it.

edit: I guess your best bet would be hooking ResearchSmithingTrait, it's not even marked as protected in the doc.


All times are GMT -6. The time now is 10:08 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI