Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Tag: WoW API docs
KethoBot (talk | contribs)
m (Remove multi elinks)
Tag: WoW API docs
(17 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
Returns information about currencies in the [[currency tab]].
 
Returns information about currencies in the [[currency tab]].
 
info = C_CurrencyInfo.GetCurrencyInfo(type)
 
info = C_CurrencyInfo.GetCurrencyInfo(type)
  +
= C_CurrencyInfo.GetCurrencyInfoFromLink(link)
   
 
== Arguments ==
 
== Arguments ==
 
=== <font color="#4ec9b0">GetCurrencyInfo</font> ===
 
=== <font color="#4ec9b0">GetCurrencyInfo</font> ===
;type : <font color="#ecbc2a">number</font> : [[CurrencyID]]
+
:;type : <span class="apitype">number</span> : [[CurrencyID]]
   
 
=== <font color="#4ec9b0">GetCurrencyInfoFromLink</font> ===
 
=== <font color="#4ec9b0">GetCurrencyInfoFromLink</font> ===
;link : <font color="#ecbc2a">string</font> : [[ItemLink]]
+
:;link : <span class="apitype">string</span> : [[UI_escape_sequences#currency|currencyLink]]
   
 
== Returns ==
 
== Returns ==
;info : <font color="#ecbc2a">CurrencyInfo</font>
+
;info : <span class="apitype">CurrencyInfo</span>
 
{{:Struct CurrencyInfo|nocaption=1}}
 
{{:Struct CurrencyInfo|nocaption=1}}
   
 
== Patch changes ==
 
== Patch changes ==
* {{Patch 9.0.1|note=Moved to <code>C_CurrencyInfo.GetCurrencyInfo() and returns structured data.</code>}}
+
* {{Patch 9.0.1|note=Moved to <code>C_CurrencyInfo.GetCurrencyInfo()</code> and returns structured data.}}
  +
* {{Patch 4.0.1|note=Added as <code>name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity = GetCurrencyInfo(id)</code>}}
* {{Patch 5.2.0|note=Returns the full texture path.}}
 
* Some time after Patch 4.0.1, additional returns were added beyond the first three.
 
* {{Patch 4.0.1|note=Added as {{api|GetCurrencyInfo}}()}}
 
 
== External links ==
 
<!-- Please read https://wow.gamepedia.com/Wowpedia:External_links_policy before adding new links. -->
 
[[File:Icon-wowhead-22x22.png|18px]] [http://www.wowhead.com/currencies Wowhead]
 
{|
 
! align="left" | GetCurrencyInfo() !! align="left" | GetCurrencyInfoFromLink()
 
|-
 
| {{Elinks-api|t=a|namespace=C_CurrencyInfo|system=CurrencySystem|name=GetCurrencyInfo}}
 
| {{Elinks-api|t=a|namespace=C_CurrencyInfo|system=CurrencySystem|name=GetCurrencyInfoFromLink}}
 
|}
 

Revision as of 08:33, 6 September 2021

Returns information about currencies in the currency tab.

info = C_CurrencyInfo.GetCurrencyInfo(type)
     = C_CurrencyInfo.GetCurrencyInfoFromLink(link)

Arguments

GetCurrencyInfo

type
number : CurrencyID

GetCurrencyInfoFromLink

link
string : currencyLink

Returns

info
CurrencyInfo
Field Type Description
name string Localized name of the currency
description string Added in 10.0.0
isHeader boolean Used by currency window (some currency IDs are the headers)
isHeaderExpanded boolean Whether header is expanded or collapsed in currency window
isTypeUnused boolean Sorts currency at the bottom of currency window in "Unused" header
isShowInBackpack boolean Shows currency on Blizzard backpack frame
quantity number Current amount of the currency
trackedQuantity number Added in 9.1.5
iconFileID number FileID
maxQuantity number Total maximum currency possible
canEarnPerWeek boolean Whether the currency is limited per week
quantityEarnedThisWeek number 0 if canEarnPerWeek is false
isTradeable boolean
quality Enum.ItemQuality🔗
maxWeeklyQuantity number 0 if canEarnPerWeek is false
totalEarned number Added in 9.0.2; Returns 0 if useTotalEarnedForMaxQty is false, prevents earning if equal to maxQuantity
discovered boolean Whether the character has ever earned the currency
useTotalEarnedForMaxQty boolean Added in 9.0.2; Whether the currency has a moving maximum (e.g. seasonal)

Patch changes

  • Shadowlands Patch 9.0.1 (2020-10-13): Moved to C_CurrencyInfo.GetCurrencyInfo() and returns structured data.
  • Cataclysm Patch 4.0.1 (2010-10-12): Added as name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity = GetCurrencyInfo(id)