From 394af3a37483b6a73be50e30625c7a40f47b47d2 Mon Sep 17 00:00:00 2001 From: Infus Date: Sun, 21 Jul 2024 23:12:49 +0200 Subject: [PATCH] Fix IsSpellInRange --- main.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index c9f621b..d6842bc 100644 --- a/main.lua +++ b/main.lua @@ -214,6 +214,14 @@ spelloverlay_frame:SetScript("OnEvent", function(self, event, spellId) specDB.spellsWithGlowOverlay[spellId] = true end) +local IsSpellInRange = IsSpellInRange +if not IsSpellInRange then + IsSpellInRange = function(...) + local r = C_Spell.IsSpellInRange(...) + return r and 1 or 0 + end +end + local function checkTargetedSpells() for spellId in pairs(specDB.spellsWithCd) do local spellName = GetSpellInfo(spellId) @@ -591,7 +599,9 @@ local bannedCds = { } function export() - DevTool:AddData(specDB, "specDB") + if DevTool and DevTool.AddData then + DevTool:AddData(specDB, "specDB") + end local buffs = " [1] = {\n" ..