Skip to content

Commit

Permalink
Fix error with IsSpellBookItemInRange when loadDepractionFallbacks cv…
Browse files Browse the repository at this point in the history
…ar is enable

Fixes #26
  • Loading branch information
mrbuds authored and InfusOnWoW committed Jul 24, 2024
1 parent c81326f commit 0531c8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LibRangeCheck-3.0/LibRangeCheck-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ License: MIT
-- @class file
-- @name LibRangeCheck-3.0
local MAJOR_VERSION = "LibRangeCheck-3.0"
local MINOR_VERSION = 19
local MINOR_VERSION = 20

---@class lib
local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
Expand Down Expand Up @@ -86,6 +86,10 @@ local IsSpellInRange = _G.IsSpellInRange or function(id, unit)
return nil
end
local IsSpellBookItemInRange = _G.IsSpellInRange or function(index, spellBank, unit)
-- Deprecated_11_0_0.lua set BOOKTYPE_SPELL to "spell" but doesn't provide a compatibility wrapper for IsSpellBookItemInRange
if type(spellBank) == "string" then
spellBank = (spellBank == "spell") and Enum.SpellBookSpellBank.Player or Enum.SpellBookSpellBank.Pet;
end
local result = C_SpellBook.IsSpellBookItemInRange(index, spellBank, unit)
if result == true then
return 1
Expand Down

0 comments on commit 0531c8a

Please sign in to comment.