end) |
|
local function onUpdate(self,elapsed) |
if VoodooDB[GetActiveTalentGroup()]["spell"] and VoodooDB[GetActiveTalentGroup()]["target"] then |
if IsSpellInRange(VoodooDB[GetActiveTalentGroup()]["spell"],VoodooDB[GetActiveTalentGroup()]["target"]) == 1 or IsItemInRange(VoodooDB[GetActiveTalentGroup()]["spell"],VoodooDB[GetActiveTalentGroup()]["target"]) == 1 then |
frame:SetBackdropBorderColor(0,1,0,1) |
elseif string.lower(VoodooDB[GetActiveTalentGroup()]["target"]) == string.lower(UnitName("player")) then |
frame:SetBackdropBorderColor(1,1,0,1) |
else |
frame:SetBackdropBorderColor(1,0,0,1) |
timer = timer + elapsed |
if timer >= wait then |
if VoodooDB[GetActiveTalentGroup()]["spell"] and VoodooDB[GetActiveTalentGroup()]["target"] then |
if IsSpellInRange(VoodooDB[GetActiveTalentGroup()]["spell"],VoodooDB[GetActiveTalentGroup()]["target"]) == 1 or IsItemInRange(VoodooDB[GetActiveTalentGroup()]["spell"],VoodooDB[GetActiveTalentGroup()]["target"]) == 1 then |
frame:SetBackdropBorderColor(0,1,0,1) |
elseif string.lower(VoodooDB[GetActiveTalentGroup()]["target"]) == string.lower(UnitName("player")) then |
frame:SetBackdropBorderColor(1,1,0,1) |
else |
frame:SetBackdropBorderColor(1,0,0,1) |
end |
else |
frame:SetBackdropBorderColor(1,1,1,1) |
end |
else |
frame:SetBackdropBorderColor(1,1,1,1) |
timer = 0 |
end |
end |
|