Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed Aug 30, 2022
1 parent 7a1635e commit ba92007
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
10 changes: 2 additions & 8 deletions NugEnergy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,13 @@ if APILevel <= 3 then
MONK = { "Disabled", "Disabled", "Disabled" },
WARLOCK = { "Disabled", "Disabled", "Disabled" },
DEMONHUNTER = { "Disabled", "Disabled" },
DEATHKNIGHT = { "Disabled", "Disabled", "Disabled" },
MAGE = { "ArcaneBlastClassic", "ArcaneBlastClassic", "ArcaneBlastClassic" },
DEATHKNIGHT = { "RunicPower", "RunicPower", "RunicPower" },
MAGE = { "Disabled", "Disabled", "Disabled" },
WARRIOR = { "RageWarriorClassic", "RageWarriorClassic", "RageWarriorClassic" },
SHAMAN = { "Disabled", "Disabled", "Disabled" },
HUNTER = { "Disabled", "Disabled", "Disabled" },
PRIEST = { "Disabled", "Disabled", "Disabled" },
}
if APILevel == 1 then
defaults.global.classConfig.MAGE = { "Disabled", "Disabled", "Disabled" }
end
if APILevel <= 2 then
defaults.global.classConfig.SHAMAN = { "Disabled", "Disabled", "Disabled" }
end
end

local normalColor = defaults.profile.normalColor
Expand Down
17 changes: 17 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -649,4 +649,21 @@ if APILevel <= 3 then
end
}, "DRUID")

NugEnergy:RegisterConfig("RunicPower", {
triggers = { GetSpecialization },
setup = function(self, spec)
self:SetPowerFilter("RUNIC_POWER", Enum.PowerType.RunicPower)
self:SetNormalColor()

self.eventProxy:RegisterUnitEvent("UNIT_MAXPOWER", "player")
self.eventProxy.UNIT_MAXPOWER = GENERAL_UNIT_MAXPOWER
GENERAL_UNIT_MAXPOWER(self)

self.eventProxy:RegisterUnitEvent("UNIT_POWER_UPDATE", "player")
self.eventProxy.UNIT_POWER_UPDATE = FILTERED_UNIT_POWER_UPDATE("RUNIC_POWER")

self:SetPowerGetter(MakeGeneralGetPower(Enum.PowerType.RunicPower, 30, 10, nil, nil))
end,
}, "DEATHKNIGHT")

end

0 comments on commit ba92007

Please sign in to comment.