GetPlayerAuraBySpellID doesn't exist in classic
jfarmer opened this issue ยท 3 comments
GetPlayerAuraBySpellID
doesn't exist in classic. According to WoWPedia it wasn't added until Shadowlands.
The check at the top of handlers/config.lua
now fails (https://github.com/kemayo/wow-handynotes-handler/blob/823b5b1e12b311b40531fde743e3e6b3b661a066/config.lua#L4):
-- compatibility between 10.0.0 and classic
local GetPlayerAuraBySpellID = _G.GetPlayerAuraBySpellID or C_UnitAuras.GetPlayerAuraBySpellID
Since _G.GetPlayerAuraBySpellID
is nil
, WoW tries to load C_UnitAuras.GetPlayerAuraBySpellID
which fails immediately because C_UnitAuras
doesn't exist in classic, either.
IIRC, detecting auras by spell names or IDs in classic requires iterating with UnitAura
To be fair, it's mostly an issue because C_UnitAuras
doesn't exist on classic either.
To be fair, it's mostly an issue because
C_UnitAuras
doesn't exist on classic either.
Yeah, sorry, I hit a key combo that submitted the issue before I finished.
Regardless, checking for GetPlayerAuraBySpellID
is good for Shadowlands vs. Dragonflight, but won't do anything for classic.
Right now in classic, the addon throws an error as soon as you load in. I'm guessing it would've thrown an error previously if the player were ever looking at a map where an icon depending on an aura being present or not present.
I'm guessing it would've thrown an error previously if the player were ever looking at a map where an icon depending on an aura being present or not present.
Yeah, it would have before -- there's just nothing in Wrath that needs that, so leaving retail code in there was perfectly fine for it.