Lore archive · Warcraft Wiki, 2023 dump
API UnitSpellHaste
Last wiki revision 2023-04-23
Returns the current spell haste percentage for a unit. spellHastePercent = UnitSpellHaste(unit)
- unit: : UnitId
- spellHastePercent: - The spell haste percent for the queried unit. Will return 0 if no valid unitId is provided.
Prints the current spell haste percentage modifier for the targeted unit: /dump UnitSpellHaste("target") > 13.515724182129
You can use this function to get the non-modified cast time of a spell: local spellId = 2060 --Greater Heal local castTimeWithHaste = select(7,GetSpellInfo(spellId)) local spellHasteModifier = 1-UnitSpellHaste("player")/100 local castTimeWithoutHaste = floor(castTimeWithHaste/spellHasteModifier/100)/10 print(castTimeWithoutHaste)
This should print 2.5 for Greater Heal.
Source
https://warcraft.wiki.gg/wiki/API_UnitSpellHaste · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.