Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 894571b

Browse files
committed
fix range for spells like stormstrike/windstrike not showing correct distance
1 parent 9913516 commit 894571b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Neuron.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- This code is licensed under the MIT license (see LICENSE for details)
55

66

7-
---@class Neuron @define The main addon object for the Neuron Action Bar addon
7+
---@class Neuron : AceAddon-3.0 @define The main addon object for the Neuron Action Bar addon
88
Neuron = LibStub("AceAddon-3.0"):NewAddon(CreateFrame("Frame", nil, UIParent), "Neuron", "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0", "AceTimer-3.0")
99

1010
local DB

Objects/BUTTON.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,12 +732,14 @@ end
732732
function BUTTON:UpdateUsableSpell()
733733
local isUsable, notEnoughMana = IsUsableSpell(self.spell)
734734

735-
if notEnoughMana and self.manacolor then
735+
if notEnoughMana and self.manacolor then
736736
self.Icon:SetVertexColor(self.manacolor[1], self.manacolor[2], self.manacolor[3])
737737
elseif isUsable then
738-
if self.rangeInd and IsSpellInRange(self.spell, self.unit)==0 then
738+
if not self.rangeInd or IsSpellInRange(self.spell, self.unit)==1 then
739+
self.Icon:SetVertexColor(1.0, 1.0, 1.0)
740+
elseif self.rangeInd and IsSpellInRange(self.spell, self.unit)==0 then
739741
self.Icon:SetVertexColor(self.rangecolor[1], self.rangecolor[2], self.rangecolor[3])
740-
elseif NeuronSpellCache[self.spell:lower()] and self.rangeInd and IsSpellInRange(NeuronSpellCache[self.spell:lower()].index,"spell", self.unit)==0 then
742+
elseif self.rangeInd and NeuronSpellCache[self.spell:lower()] and IsSpellInRange(NeuronSpellCache[self.spell:lower()].index,"spell", self.unit)==0 then
741743
self.Icon:SetVertexColor(self.rangecolor[1], self.rangecolor[2], self.rangecolor[3])
742744
else
743745
self.Icon:SetVertexColor(1.0, 1.0, 1.0)

0 commit comments

Comments
 (0)