Thread Tools Display Modes
05/02/18, 08:33 AM   #1
redgabber
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 6
Need info about OnItemLooted event - [solved]

Hi

i m hard to find a solution to get the quantity BEFORE OnItemLooted event will fire.

I work into OnInventoryUpdate(..), and the quantity is not known at this moment, just itemLink.

Is there a way to get the quantity before OnItemLooted event ?

events :

OnInventoryUpdate(eventCode,bagId,slotId,isNewItem,itemSoundCategory,updateReason)
i build itemLink from parameters here.

OnItemLooted(eventCode, lootedBy, itemLink, quantity, itemSound, lootType, isSelf, isPickpocketLoot)

same here
http://www.esoui.com/forums/showthre...=item+quantity

is it limited by the API ?

thanks

Last edited by redgabber : 05/02/18 at 06:32 PM.
  Reply With Quote
05/02/18, 09:15 AM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
I work into OnInventoryUpdate(..), and the quantity is not known at this moment, just itemLink.
You DO get the quantity from the inventory update event.

EVENT_INVENTORY_SINGLE_SLOT_UPDATE (number eventCode, Bag bagId, number slotId, boolean isNewItem, ItemUISoundCategory itemSoundCategory, number inventoryUpdateReason, number stackCountChange)

Last edited by Shinni : 05/02/18 at 09:18 AM.
  Reply With Quote
05/02/18, 09:30 AM   #3
redgabber
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 6
The quantity from the bag slot is not the quantity you looted, it s the quantity of how many you have in your bag for this item.

the quantity u got from lootItem event is different.
It concern only the loot

not the entire pile after inventory update and loot item addition.

will see for stackCountChange
  Reply With Quote
05/02/18, 09:42 AM   #4
redgabber
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 6
finally stackCountChange do the trick

solved

Thx

Last edited by redgabber : 05/02/18 at 06:32 PM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Need info about OnItemLooted event

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off