Skip to content

Commit

Permalink
Fixed more spell info calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicebar committed Jul 23, 2024
1 parent ec13b67 commit 0986735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function MOD:SetCooldownDefaults()
local stype, id = SHIM:GetSpellBookItemInfo(index, book)
if id then -- make sure valid spell book item
if stype == "SPELL" then -- in this case, id is not the spell id despite what online docs say
local name, _, icon = SHIM:GetSpellInfo(index, book)
local name, _, icon = SHIM:GetSpellInfo(id)
if name and name ~= "" and icon then iconCache[name] = icon end
elseif stype == "FLYOUT" then -- in this case, id is flyout id
local _, _, numSlots, known = GetFlyoutInfo(id)
Expand Down Expand Up @@ -355,7 +355,7 @@ function MOD:SetCooldownDefaults()
for i = 1, numSpells do
local stype, id = SHIM:GetSpellBookItemInfo(i, book) -- verify this is a pet action
if stype == "PETACTION" then
local name, _, icon, _, _, _, spellID = SHIM:GetSpellInfo(i, book)
local name, _, icon, _, _, _, spellID = SHIM:GetSpellInfo(id)
if name and name ~= "" and icon and spellID then
iconCache[name] = icon
local duration = GetSpellBaseCooldown(spellID) -- duration is in milliseconds
Expand Down

0 comments on commit 0986735

Please sign in to comment.