Quantcast
WoWInterface - View Single Post - Identify items on refund cooldown
View Single Post
04-21-20, 09:43 PM   #10
Walkerbo
A Cyclonian
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 43
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