Skip to content

Commit

Permalink
Using alt color when in shadowdance
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Dec 6, 2020
1 parent 2b47404 commit f256289
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions NugEnergy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ local defaults = {
width = 100,
height = 30,
normalColor = { 0.9, 0.1, 0.1 }, --1
altColor = { .9, 0.1, 0.4 }, -- for dispatch and meta 2
altColor = { 0.9, 0.168, 0.43 }, -- for dispatch and meta 2
maxColor = { 131/255, 0.2, 0.2 }, --max color 3
lowColor = { 141/255, 31/255, 62/255 }, --low color 4
enableColorByPowerType = false,
Expand Down Expand Up @@ -307,14 +307,23 @@ function NugEnergy.Initialize(self)

self.SPELLS_CHANGED = function(self)
local spec = GetSpecialization()
self:UnregisterEvent("UNIT_HEALTH")
self:UnregisterEvent("UNIT_AURA")
self:RegisterEvent("PLAYER_TARGET_CHANGED")
if spec == 1 and IsPlayerSpell(111240) then --blindside
execute_range = 0.30
self:RegisterUnitEvent("UNIT_HEALTH", "target")
self:RegisterEvent("PLAYER_TARGET_CHANGED")
self:UnregisterEvent("UNIT_AURA")
elseif spec == 3 then
self:RegisterUnitEvent("UNIT_AURA", "player")
self:UnregisterEvent("UNIT_HEALTH")
self.UNIT_AURA = function(self, event, unit)
execute = ( FindAura("player", 185422, "HELPFUL") ~= nil)
self:UpdateEnergy()
end
else
execute_range = nil
execute = nil
self:UnregisterEvent("UNIT_HEALTH")
self:UnregisterEvent("PLAYER_TARGET_CHANGED")
end
end
Expand Down

0 comments on commit f256289

Please sign in to comment.