12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

688 Part IV ■ <strong>Reference</strong>Returns:timeLeft—Amount <strong>of</strong> time remaining be<strong>for</strong>e the player can resurrect(in seconds); 0 if the player can resurrect immediately (number)GetCritChanceReturns the player’s melee critical strike chance.critChance = GetCritChance()Returns:critChance—The player’s percentage critical strike chance <strong>for</strong> melee attacks(number)GetCritChanceFromAgilityReturns additional critical strike chance provided by Agility.critChance = GetCritChanceFromAgility([“unit“])Arguments:unit (optional)—A unit to query; only valid <strong>for</strong> player <strong>and</strong> pet, defaultstoplayer if omitted (string, unitID)Returns:critChance—Additional percentage chance <strong>of</strong> critical strikes conferred by theunit’s Agility statistic (number)GetCurrencyListInfoReturns in<strong>for</strong>mation about a currency type (or headers in the Currency UI).name, isHeader, isExp<strong>and</strong>ed, isUnused, isWatched, count, iextraCurrencyType, icon, itemID = GetCurrencyListInfo(index)Arguments:index—Index <strong>of</strong> a currency type in the currency list (between 1 <strong>and</strong>GetCurrencyListSize()) (number)Returns:name—Name <strong>of</strong> the currency type or category header (string)isHeader—True if this listing is a category header, false <strong>for</strong> actual currencies(boolean)isExp<strong>and</strong>ed—True if this listing is a category header whose contents areshown, false <strong>for</strong> collapsed headers <strong>and</strong> actual currencies (boolean)isUnused—True if the player has marked this currency as Unused (boolean)isWatched—True if the player has marked this currency to be watched on thebackpack UI (boolean)count—Amount <strong>of</strong> the currency the player has (number)extraCurrencyType—1 <strong>for</strong> Arena points, 2 <strong>for</strong> Honor points, 0 <strong>for</strong> other currencies(number)icon—Path to a texture representing the currency item (not applicable <strong>for</strong>Arena/Honor points) (string)itemID—ID <strong>for</strong> the currency item (number)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!