Skip to content

Commit d681320

Browse files
author
Freddie
committed
Use C_SpellBook.IsSpellKnown instead of IsSpellKnown
1 parent 7d11a87 commit d681320

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Modules/Spells.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local AURA_TYPES = { 'HELPFUL', 'HARMFUL' }
88

99
local CUA_GetAuraDataByIndex = C_UnitAuras.GetAuraDataByIndex
1010
local CUA_GetPlayerAuraBySpellID = C_UnitAuras.GetPlayerAuraBySpellID
11-
local IsSpellKnown = IsSpellKnown
11+
local CSB_IsSpellKnown = C_SpellBook.IsSpellKnown
1212

1313
function Module:OnEnable()
1414
Addon.charData.knownSpells = Addon.charData.knownSpells or {}
@@ -89,24 +89,24 @@ function Module:UpdateSpells()
8989
wipe(knownSpells)
9090

9191
-- Master Riding
92-
if IsSpellKnown(90265) then
92+
if CSB_IsSpellKnown(90265) then
9393
Addon.charData.mountSkill = 5
9494
-- Artisan Riding (DEPRECATED but still gives 280%)
95-
elseif IsSpellKnown(34091) then
95+
elseif CSB_IsSpellKnown(34091) then
9696
Addon.charData.mountSkill = 4
9797
-- Expert Riding
98-
elseif IsSpellKnown(34090) then
98+
elseif CSB_IsSpellKnown(34090) then
9999
Addon.charData.mountSkill = 3
100100
-- Journeyman Riding
101-
elseif IsSpellKnown(33391) then
101+
elseif CSB_IsSpellKnown(33391) then
102102
Addon.charData.mountSkill = 2
103103
-- Apprentice Riding
104-
elseif IsSpellKnown(33388) then
104+
elseif CSB_IsSpellKnown(33388) then
105105
Addon.charData.mountSkill = 1
106106
end
107107

108108
for _, spellId in ipairs(self.db.known) do
109-
if IsSpellKnown(spellId) then
109+
if CSB_IsSpellKnown(spellId) then
110110
tinsert(knownSpells, spellId)
111111
end
112112
end

0 commit comments

Comments
 (0)