Thread Tools Display Modes
01-05-15, 08:27 PM   #1
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Garrison Resources

I looked at the API, but could not find a call that would return the number of resources available. In particular, the amount in the Garrison Cache. Does anyone know if this information is retrievable?
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote
01-05-15, 08:36 PM   #2
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
One minute code job. The amount from the cache is printed to chat, so you could know it through related events and some pattern matching. If you are curious as to the amount before opening it, I am not sure that is possible to be known.

Lua Code:
  1. for i = 1, GetCurrencyListSize() do
  2.     local name, _, _, _, _, count = GetCurrencyListInfo(i)
  3.  
  4.     if (name == "Garrison Resources") then
  5.         print(count)
  6.     end
  7. end

Last edited by Clamsoda : 01-06-15 at 04:48 PM.
  Reply With Quote
01-05-15, 09:03 PM   #3
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
The cache generates 1 resource every 10 minutes and can hold up to 500, if you can track when it was looted you can figure out how many resources it contains.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Garrison Resources

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