WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Garrison Resources (https://www.wowinterface.com/forums/showthread.php?t=51430)

JDoubleU00 01-05-15 08:27 PM

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?

Clamsoda 01-05-15 08:36 PM

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

semlar 01-05-15 09:03 PM

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.


All times are GMT -6. The time now is 05:55 AM.

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