@@ -183,7 +183,7 @@ do -- C_Spell
183183 elseif _G .GetSpellCharges then
184184 GetSpellChargesByID = _G .GetSpellCharges
185185 function SHIM :GetSpellChargesByID (spellID )
186- return GetSpellChargesByID (spellID )
186+ return GetSpellCharges (spellID )
187187 end
188188 end
189189end
@@ -316,16 +316,22 @@ do -- C_SpellBook
316316 -- GetSpellCharges
317317 if C_SpellBook and C_SpellBook .GetSpellBookItemCharges then
318318 GetSpellCharges = C_SpellBook .GetSpellBookItemCharges
319- function SHIM :GetSpellCharges (index , bookType )
320- local info = GetSpellCharges (index , bookType )
319+ function SHIM :GetSpellCharges (index , book )
320+ if book == " spell" then
321+ book = Enum .SpellBookSpellBank .Player
322+ elseif book == " pet" then
323+ book = Enum .SpellBookSpellBank .Pet
324+ end
325+
326+ local info = GetSpellCharges (index , book )
321327 if info then
322328 return info .currentCharges , info .maxCharges , info .cooldownStartTime , info .cooldownDuration , info .chargeModRate
323329 end
324330 end
325331 elseif _G .GetSpellCharges then
326332 GetSpellCharges = _G .GetSpellCharges
327- function SHIM :GetSpellCharges (index , bookType )
328- return GetSpellCharges (index , bookType )
333+ function SHIM :GetSpellCharges (index , book )
334+ return GetSpellCharges (index , book )
329335 end
330336 end
331337end
0 commit comments