Thread Tools Display Modes
07/09/14, 07:23 PM   #1
Waboku
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 6
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.
  Reply With Quote
07/09/14, 07:56 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
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

Last edited by Garkin : 07/09/14 at 08:27 PM.
  Reply With Quote
07/13/14, 01:15 AM   #3
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by Waboku View Post
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.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » GetItemTotalCount

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