Skip to content

Commit

Permalink
Merge pull request #288 from p3lim-wow/legion-cleanup
Browse files Browse the repository at this point in the history
Post-Legion cleanup
  • Loading branch information
haste committed Sep 10, 2016
2 parents 8b8fd7d + e76b8e1 commit aa309f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 53 deletions.
28 changes: 4 additions & 24 deletions elements/classicons.lua
Expand Up @@ -51,8 +51,6 @@
local parent, ns = ...
local oUF = ns.oUF

local isBetaClient = select(4, GetBuildInfo()) >= 70000

local _, PlayerClass = UnitClass'player'

-- Holds the class specific stuff.
Expand Down Expand Up @@ -212,40 +210,22 @@ do
if(PlayerClass == 'MONK') then
ClassPowerID = SPELL_POWER_CHI
ClassPowerType = "CHI"

if(isBetaClient) then
RequireSpec = SPEC_MONK_WINDWALKER
end
RequireSpec = SPEC_MONK_WINDWALKER
elseif(PlayerClass == 'PALADIN') then
ClassPowerID = SPELL_POWER_HOLY_POWER
ClassPowerType = "HOLY_POWER"

if(isBetaClient) then
RequireSpec = SPEC_PALADIN_RETRIBUTION
else
RequireSpell = 85673 -- Word of Glory
end
elseif(PlayerClass == 'PRIEST' and not isBetaClient) then
ClassPowerID = SPELL_POWER_SHADOW_ORBS
ClassPowerType = "SHADOW_ORBS"
RequireSpec = SPEC_PRIEST_SHADOW
RequireSpell = 95740 -- Shadow Orbs
RequireSpec = SPEC_PALADIN_RETRIBUTION
elseif(PlayerClass == 'WARLOCK') then
ClassPowerID = SPELL_POWER_SOUL_SHARDS
ClassPowerType = "SOUL_SHARDS"

if(not isBetaClient) then
RequireSpec = SPEC_WARLOCK_AFFLICTION
RequireSpell = WARLOCK_SOULBURN
end
elseif(PlayerClass == 'ROGUE' or PlayerClass == 'DRUID') then
ClassPowerID = SPELL_POWER_COMBO_POINTS
ClassPowerType = 'COMBO_POINTS'

if(isBetaClient and PlayerClass == 'DRUID') then
if(PlayerClass == 'DRUID') then
RequireSpell = 5221 -- Shred
end
elseif(PlayerClass == 'MAGE' and isBetaClient) then
elseif(PlayerClass == 'MAGE') then
ClassPowerID = SPELL_POWER_ARCANE_CHARGES
ClassPowerType = 'ARCANE_CHARGES'
RequireSpec = SPEC_MAGE_ARCANE
Expand Down
6 changes: 1 addition & 5 deletions elements/health.lua
Expand Up @@ -86,8 +86,6 @@
local parent, ns = ...
local oUF = ns.oUF

local isBetaClient = select(4, GetBuildInfo()) >= 70000

oUF.colors.health = {49/255, 207/255, 37/255}

local Update = function(self, event, unit)
Expand All @@ -109,9 +107,7 @@ local Update = function(self, event, unit)
health.disconnected = disconnected

local r, g, b, t
if(health.colorTapping and not UnitPlayerControlled(unit) and
(isBetaClient and UnitIsTapDenied(unit) or not isBetaClient and UnitIsTapped(unit) and
not UnitIsTappedByPlayer(unit) and not UnitIsTappedByAllThreatList(unit))) then
if(health.colorTapping and not UnitPlayerControlled(unit) and UnitIsTapDenied(unit)) then
t = self.colors.tapped
elseif(health.colorDisconnected and not UnitIsConnected(unit)) then
t = self.colors.disconnected
Expand Down
32 changes: 8 additions & 24 deletions elements/power.lua
Expand Up @@ -98,8 +98,6 @@
local parent, ns = ...
local oUF = ns.oUF

local isBetaClient = select(4, GetBuildInfo()) >= 70000

oUF.colors.power = {}
for power, color in next, PowerBarColor do
if (type(power) == "string") then
Expand All @@ -115,11 +113,6 @@ for power, color in next, PowerBarColor do
end
end

if(isBetaClient) then
-- COMBO_POINTS don't have a color pre-Legion so we need to supply that color
oUF.colors.power.COMBO_POINTS = {1, 0.96, 0.41}
end

-- sourced from FrameXML/Constants.lua
oUF.colors.power[0] = oUF.colors.power.MANA
oUF.colors.power[1] = oUF.colors.power.RAGE
Expand All @@ -129,22 +122,14 @@ oUF.colors.power[4] = oUF.colors.power.COMBO_POINTS
oUF.colors.power[5] = oUF.colors.power.RUNES
oUF.colors.power[6] = oUF.colors.power.RUNIC_POWER
oUF.colors.power[7] = oUF.colors.power.SOUL_SHARDS
oUF.colors.power[8] = oUF.colors.power.LUNAR_POWER
oUF.colors.power[9] = oUF.colors.power.HOLY_POWER
oUF.colors.power[11] = oUF.colors.power.MAELSTROM
oUF.colors.power[12] = oUF.colors.power.CHI

if(isBetaClient) then
oUF.colors.power[8] = oUF.colors.power.LUNAR_POWER
oUF.colors.power[11] = oUF.colors.power.MAELSTROM
oUF.colors.power[13] = oUF.colors.power.INSANITY
oUF.colors.power[16] = oUF.colors.power.ARCANE_CHARGES
oUF.colors.power[17] = oUF.colors.power.FURY
oUF.colors.power[18] = oUF.colors.power.PAIN
else
oUF.colors.power[8] = oUF.colors.power.ECLIPSE
oUF.colors.power[13] = oUF.colors.power.SHADOW_ORBS
oUF.colors.power[14] = oUF.colors.power.BURNING_EMBERS
oUF.colors.power[15] = oUF.colors.power.DEMONIC_FURY
end
oUF.colors.power[13] = oUF.colors.power.INSANITY
oUF.colors.power[16] = oUF.colors.power.ARCANE_CHARGES
oUF.colors.power[17] = oUF.colors.power.FURY
oUF.colors.power[18] = oUF.colors.power.PAIN

local GetDisplayPower = function(unit)
local _, min, _, _, _, _, showOnRaid = UnitAlternatePowerInfo(unit)
Expand Down Expand Up @@ -176,9 +161,8 @@ local Update = function(self, event, unit)
power.disconnected = disconnected

local r, g, b, t
if(power.colorTapping and not UnitPlayerControlled(unit) and
(isBetaClient and UnitIsTapDenied(unit) or not isBetaClient and UnitIsTapped(unit) and
not UnitIsTappedByPlayer(unit) and not UnitIsTappedByAllThreatList(unit))) then

if(power.colorTapping and not UnitPlayerControlled(unit) and UnitIsTapDenied(unit)) then
t = self.colors.tapped
elseif(power.colorDisconnected and disconnected) then
t = self.colors.disconnected
Expand Down

0 comments on commit aa309f5

Please sign in to comment.