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

Commit

Permalink
Fix in range check, have to explicitly query == 0 or not
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyazel committed Jan 23, 2019
1 parent e9637c4 commit 93bb2c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Objects/ACTIONBUTTON.lua
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,9 @@ function ACTIONBUTTON:UpdateUsableSpell(spell)
if (notEnoughMana) then
self.iconframeicon:SetVertexColor(self.manacolor[1], self.manacolor[2], self.manacolor[3])
elseif (isUsable) then
if (self.rangeInd and IsSpellInRange(spellName, self.unit)) then
if (self.rangeInd and IsSpellInRange(spellName, self.unit) == 0) then
self.iconframeicon:SetVertexColor(self.rangecolor[1], self.rangecolor[2], self.rangecolor[3])
elseif NeuronSpellCache[spellName] and NeuronSpellCache[spellName].index and (self.rangeInd and IsSpellInRange(NeuronSpellCache[spellName].index,"spell", self.unit)) then
elseif NeuronSpellCache[spellName] and NeuronSpellCache[spellName].index and (self.rangeInd and IsSpellInRange(NeuronSpellCache[spellName].index,"spell", self.unit) == 0) then
self.iconframeicon:SetVertexColor(self.rangecolor[1], self.rangecolor[2], self.rangecolor[3])
else
self.iconframeicon:SetVertexColor(1.0, 1.0, 1.0)
Expand All @@ -698,7 +698,7 @@ function ACTIONBUTTON:UpdateUsableItem(item)
if (notEnoughMana and self.manacolor) then
self.iconframeicon:SetVertexColor(self.manacolor[1], self.manacolor[2], self.manacolor[3])
elseif (isUsable) then
if (self.rangeInd and IsItemInRange(spell, self.unit)) then
if (self.rangeInd and IsItemInRange(spell, self.unit) == 0) then
self.iconframeicon:SetVertexColor(self.rangecolor[1], self.rangecolor[2], self.rangecolor[3])
else
self.iconframeicon:SetVertexColor(1.0, 1.0, 1.0)
Expand Down Expand Up @@ -2138,7 +2138,7 @@ function ACTIONBUTTON:ACTION_UpdateUsable(action)
local isUsable, notEnoughMana = IsUsableAction(actionID)

if (isUsable) then
if (IsActionInRange(action, self.unit)) then
if (IsActionInRange(action, self.unit) == 0) then
self.iconframeicon:SetVertexColor(self.rangecolor[1], self.rangecolor[2], self.rangecolor[3])
else
self.iconframeicon:SetVertexColor(1.0, 1.0, 1.0)
Expand Down

0 comments on commit 93bb2c5

Please sign in to comment.