WoW API: GetRangedCritChance

Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetRangedCritChance to API GetRangedCritChance without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW API < GetRangedCritChance

ParametersEdit

None.

ReturnsEdit

The players critical strike chance with the currently equipped range weapon as a floating point figure.

NotesEdit

If you are displaying this figure in a UI element and want it to update, hook to the UNIT_INVENTORY_CHANGED and SPELLS_CHANGED events as well as any other that effect equipment and buffs.

FormattingEdit

To retrieve the ranged crit chance as a two-decimal float (like 10.25), use the following function:

myRangedCrit = format("%.2f%%", GetRangedCritChance());