diff --git a/.luacheckrc b/.luacheckrc index 517db838..22ed076e 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -145,7 +145,6 @@ globals = { "UnitHealth", "UnitHealthMax", "UnitInParty", - "UnitInPhase", -- gone in wow_900 "UnitInRaid", "UnitInRange", "UnitIsAFK", @@ -168,7 +167,6 @@ globals = { "UnitIsTapDenied", "UnitIsUnit", "UnitIsVisible", - "UnitIsWarModePhased", -- gone in wow_900 "UnitIsWildBattlePet", "UnitLevel", "UnitName", diff --git a/Modules/HealthBar/HealthBar.lua b/Modules/HealthBar/HealthBar.lua index 24106a35..6ef0bbc5 100644 --- a/Modules/HealthBar/HealthBar.lua +++ b/Modules/HealthBar/HealthBar.lua @@ -1,5 +1,3 @@ -local wow_900 = select(4, GetBuildInfo()) > 90000 - local PitBull4 = _G.PitBull4 local L = PitBull4.L @@ -40,7 +38,7 @@ function PitBull4_HealthBar:OnEnable() timerFrame:Show() - self:RegisterEvent(wow_900 and "UNIT_HEALTH" or "UNIT_HEALTH_FREQUENT", "UNIT_HEALTH") + self:RegisterEvent("UNIT_HEALTH") self:RegisterEvent("UNIT_MAXHEALTH", "UNIT_HEALTH") self:RegisterEvent("UNIT_CONNECTION", "UNIT_HEALTH") self:RegisterEvent("PLAYER_ALIVE") diff --git a/Modules/HolyPower/HolyPower.lua b/Modules/HolyPower/HolyPower.lua index 3655abb6..93ac019b 100755 --- a/Modules/HolyPower/HolyPower.lua +++ b/Modules/HolyPower/HolyPower.lua @@ -2,14 +2,11 @@ if select(2, UnitClass("player")) ~= "PALADIN" then return end -local wow_900 = select(4, GetBuildInfo()) > 90000 - local PitBull4 = _G.PitBull4 local L = PitBull4.L -- CONSTANTS ---------------------------------------------------------------- -local PALADINPOWERBAR_SHOW_LEVEL = _G.PALADINPOWERBAR_SHOW_LEVEL local SPELL_POWER_HOLY_POWER = 9 -- Enum.PowerType.HolyPower local SPEC_PALADIN_RETRIBUTION = _G.SPEC_PALADIN_RETRIBUTION @@ -42,18 +39,11 @@ PitBull4_HolyPower:SetDefaults({ background_color = { 0, 0, 0, 0.5 } }) -local player_level = UnitLevel("player") - function PitBull4_HolyPower:OnEnable() - player_level = UnitLevel("player") - self:RegisterEvent("UNIT_POWER_FREQUENT") self:RegisterEvent("UNIT_DISPLAYPOWER") self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("PLAYER_TALENT_UPDATE", "PLAYER_ENTERING_WORLD") - if player_level < PALADINPOWERBAR_SHOW_LEVEL then - self:RegisterEvent("PLAYER_LEVEL_UP") - end end local function update_player(self) @@ -82,14 +72,6 @@ function PitBull4_HolyPower:PLAYER_ENTERING_WORLD(event) update_player(self) end -function PitBull4_HolyPower:PLAYER_LEVEL_UP(event, level) - player_level = level - if player_level >= PALADINPOWERBAR_SHOW_LEVEL then - self:UnregisterEvent("PLAYER_LEVEL_UP") - update_player(self) - end -end - function PitBull4_HolyPower:ClearFrame(frame) local container = frame.HolyPower if not container then @@ -121,7 +103,7 @@ local function update_container_size(container, vertical, max_holy_power) end function PitBull4_HolyPower:UpdateFrame(frame) - if frame.unit ~= "player" or (not wow_900 and GetSpecialization() ~= SPEC_PALADIN_RETRIBUTION) or player_level < PALADINPOWERBAR_SHOW_LEVEL then + if frame.unit ~= "player" then return self:ClearFrame(frame) end diff --git a/Modules/LuaTexts/LuaTexts.lua b/Modules/LuaTexts/LuaTexts.lua index 82c0f4fe..befd5b4e 100755 --- a/Modules/LuaTexts/LuaTexts.lua +++ b/Modules/LuaTexts/LuaTexts.lua @@ -1,5 +1,3 @@ -local wow_900 = select(4, GetBuildInfo()) > 90000 - local PitBull4 = _G.PitBull4 local L = PitBull4.L @@ -697,9 +695,7 @@ local protected_events = { -- continue to work transparently to end users. local compat_event_map = {} compat_event_map.UNIT_POWER = 'UNIT_POWER_UPDATE' -if wow_900 then - compat_event_map.UNIT_HEALTH_FREQUENT = 'UNIT_HEALTH' -end +compat_event_map.UNIT_HEALTH_FREQUENT = 'UNIT_HEALTH' compat_event_map.UNIT_HEALTHMAX = 'UNIT_MAXHEALTH' compat_event_map.UNIT_MANA = 'UNIT_POWER_FREQUENT' compat_event_map.UNIT_MAXMANA = 'UNIT_MAXPOWER' diff --git a/Modules/PhaseIcon/PhaseIcon.lua b/Modules/PhaseIcon/PhaseIcon.lua index 581e742e..a2c5a2d7 100755 --- a/Modules/PhaseIcon/PhaseIcon.lua +++ b/Modules/PhaseIcon/PhaseIcon.lua @@ -1,5 +1,3 @@ -local wow_900 = select(4, GetBuildInfo()) > 90000 - local PitBull4 = _G.PitBull4 local L = PitBull4.L @@ -31,19 +29,9 @@ end function PitBull4_PhaseIcon:OnEnter() local unit = self:GetParent().unit local tooltip = _G.PARTY_PHASED_MESSAGE - if wow_900 then - local phaseReason = UnitPhaseReason(unit) - if phaseReason then - tooltip = PartyUtil.GetPhasedReasonString(phaseReason, unit) - end - else - if UnitIsWarModePhased(unit) then - if C_PvP.IsWarModeDesired() then - tooltip = _G.PARTY_PLAYER_WARMODE_DISABLED - else - tooltip = _G.PARTY_PLAYER_WARMODE_ENABLED - end - end + local phaseReason = UnitPhaseReason(unit) + if phaseReason then + tooltip = PartyUtil.GetPhasedReasonString(phaseReason, unit) end GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText(tooltip, nil, nil, nil, nil, true) @@ -61,11 +49,7 @@ function PitBull4_PhaseIcon:GetTexture(frame) return nil end - if wow_900 then - if not UnitPhaseReason(unit) then - return nil - end - elseif UnitInPhase(unit) and not UnitIsWarModePhased(unit) then + if not UnitPhaseReason(unit) then return nil end diff --git a/Modules/VisualHeal/VisualHeal.lua b/Modules/VisualHeal/VisualHeal.lua index 2d248f50..8934654d 100755 --- a/Modules/VisualHeal/VisualHeal.lua +++ b/Modules/VisualHeal/VisualHeal.lua @@ -1,5 +1,3 @@ -local wow_900 = select(4, GetBuildInfo()) > 90000 - local PitBull4 = _G.PitBull4 local L = PitBull4.L @@ -40,7 +38,7 @@ end function PitBull4_VisualHeal:OnEnable() self:RegisterEvent("UNIT_HEAL_PREDICTION") - self:RegisterEvent(wow_900 and "UNIT_HEALTH" or "UNIT_HEALTH_FREQUENT", "UNIT_HEAL_PREDICTION") + self:RegisterEvent("UNIT_HEALTH", "UNIT_HEAL_PREDICTION") self:RegisterEvent("UNIT_MAXHEALTH", "UNIT_HEAL_PREDICTION") self:RegisterEvent("UNIT_ABSORB_AMOUNT_CHANGED", "UNIT_HEAL_PREDICTION") end