Event changes to craftbag
Hi there,
Is there an event which is triggerd when changes to the craftbag happen. I couldnt find one. I dont want to use EVENT_MANAGER:RegisterForEvent(Crafty.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, Crafty.InvChange) this will trigger my function all the time... money changes and so on. So far I use: EVENT_MANAGER:RegisterForEvent(Crafty.name, EVENT_BUY_RECEIPT, Crafty.InvChange) EVENT_MANAGER:RegisterForEvent(Crafty.name, EVENT_LOOT_RECEIVED, Crafty.InvChange) EVENT_MANAGER:RegisterForEvent(Crafty.name, EVENT_MAIL_TAKE_ATTACHED_ITEM_SUCCESS , Crafty.InvChange) EVENT_MANAGER:RegisterForEvent(Crafty.name, EVENT_CRAFT_COMPLETED, Crafty.InvChange) But this does not cover stows or transfers from inv to craftbag and vice versa :( THX! |
No there isn't. Use EVENT_INVENTORY_SINGLE_SLOT_UPDATE and register a filter to the bagId = BAG_VIRTUAL if you only want to check craftbag items.
https://wiki.esoui.com/AddFilterForEvent Also add other filtes like fr new items only if you just want to tarck "looted" items (taken from mail attachments/player trade = new as well!) Or use the SHARED_INVENTORY global and it's functions + callbacks (slot changed -> SHARED_INVENTORY:RegisterCallback("SlotUpdated", yourCallbackFunction)). CraftBag data = SHARED_INVENTORY:GetOrCreateBagCache(BAG_VIRTUAL) |
Thanks a lot!
I go with the event filter for the craftbag since i only track craftbag items. I can delete the other events too. |
for the search. Thats how Ive done it:
EVENT_MANAGER:RegisterForEvent(Crafty.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, Crafty.InvChange) EVENT_MANAGER:AddFilterForEvent(Crafty.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_BAG_ID, BAG_VIRTUAL) |
All times are GMT -6. The time now is 07:16 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI