From d381d9138a771e9287bfb8aef69179fbaf8d5b31 Mon Sep 17 00:00:00 2001 From: Buds Date: Wed, 12 Jun 2024 00:22:22 +0200 Subject: [PATCH] proper fix for IsSpellInRange on TWW --- LibRangeCheck-3.0/LibRangeCheck-3.0.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/LibRangeCheck-3.0/LibRangeCheck-3.0.lua b/LibRangeCheck-3.0/LibRangeCheck-3.0.lua index 55aa52c..0265dd5 100644 --- a/LibRangeCheck-3.0/LibRangeCheck-3.0.lua +++ b/LibRangeCheck-3.0/LibRangeCheck-3.0.lua @@ -40,7 +40,7 @@ License: MIT -- @class file -- @name LibRangeCheck-3.0 local MAJOR_VERSION = "LibRangeCheck-3.0" -local MINOR_VERSION = 17 +local MINOR_VERSION = 18 ---@class lib local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) @@ -76,7 +76,15 @@ local UnitIsUnit = UnitIsUnit local UnitGUID = UnitGUID local UnitIsDeadOrGhost = UnitIsDeadOrGhost local CheckInteractDistance = CheckInteractDistance -local IsSpellInRange = IsSpellInRange or C_Spell.IsSpellInRange +local IsSpellInRange = IsSpellInRange or function(id) + local result = C_Spell.IsSpellInRange(id) + if result == true then + return 1 + elseif result == false then + return 0 + end + return nil +end local UnitClass = UnitClass local UnitRace = UnitRace local GetInventoryItemLink = GetInventoryItemLink