mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 23:50:01 +00:00
using GetSpellInfo with just a spell id is dangerous
Handful of addons will polyfill their own GetSpellInfo that only accept (bookSlot, bookType) so it's only safe to use C_Spell.GetSpellInfo with just a spell id
This commit is contained in:
+2
-1
@@ -1020,7 +1020,8 @@ hooksecurefunc("UseAction", function(slot, target, selfcast)
|
||||
local kind, id = GetActionInfo(slot)
|
||||
local effect, rank
|
||||
if kind == "spell" then
|
||||
effect, rank = GetSpellInfo(id)
|
||||
local spellInfo = C_Spell.GetSpellInfo(id)
|
||||
effect, rank = spellInfo.name, spellInfo.rank
|
||||
elseif kind == "macro" then
|
||||
effect, rank = GetMacroSpell(id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user