ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   GetItemTotalCount (https://www.esoui.com/forums/showthread.php?t=1937)

Waboku 07/09/14 07:23 PM

GetItemTotalCount
 
I am not understanding why that works with BAG_BACKPACK but not with BAG_BANK. If I use GetItemTotalCount(BAG_BACKPACK, slotId), I get the count, but GetItemTotalCount(BAG_BANK, slotId) gives me 0 even though items are in the bank. Can someone help me please. Thank you.

Garkin 07/09/14 07:56 PM

I'm not sure about this function, but if you want to know how many items are in stack, you can use:
Lua Code:
  1. local icon, stackCount, sellPrice, meetsUsageRequirement, locked, equipType, itemStyle, quality = GetItemInfo(bagId, slotIndex)

EDIT:
Also what can be useful is inventory manager. You are working with bank so:
Lua Code:
  1. local item = PLAYER_INVETORY:GetBankItem(slotIndex)
It will give you a table with the following keys:
item.bagId
item.equipType
item.filterData
item.iconFile
item.inventory
item.isJunk
item.itemInstanceId
item.locked
item.meetsUsageRequirement
item.quality
item.searchData
item.sellPrice
item.slotIndex
item.slotType
item.stackCount
item.stackSellPrice
item.statValue

Iyanga 07/13/14 01:15 AM

Quote:

Originally Posted by Waboku (Post 10360)
I am not understanding why that works with BAG_BACKPACK but not with BAG_BANK. If I use GetItemTotalCount(BAG_BACKPACK, slotId), I get the count, but GetItemTotalCount(BAG_BANK, slotId) gives me 0 even though items are in the bank. Can someone help me please. Thank you.

Is the slotId actually valid?
In the bank they are not necessarily consecutively and can start with an (more or less) arbitrary number.


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

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