Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-21-20, 09:43 PM   #10
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 237
Hi Vrul

Thanks further testing.

I have played with my chunk and finally got some sense out of it.

This my working code;
Lua Code:
  1. for bag = 0, 4 do
  2.     for slot = 0, GetContainerNumSlots(bag) do
  3.        local itemID = GetContainerItemID(bag, slot)
  4.        if itemID then
  5.           local _, itemLink, itemQuality, _, _, _, _, _, _, _, itemValue = GetItemInfo(itemID)
  6.           local money, itemCount, refundSec = GetContainerItemPurchaseInfo(bag, slot, false)
  7.           print(bag, slot,itemLink, "- money:",money, "- count:",itemCount,"- time:", refundSec)
  8.        end
  9.     end
  10.  end

This is the bag and the output;


The strange outcomes are;
  • It only returns for items that do have a cooldown, once the refund time runs out it will return all nils.
  • The item count always returns 0, no matter how many items I have stacked.
  • The loop identifies the first equipped bag but it does not count any of the other equipped bags.

All in all a real bizarre output. I would like to get some better understanding of why the returns are all over the place but for now I am getting the result I need.

Thanks to you all for your help.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Identify items on refund cooldown


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