From 6c623d69655cebbc2d1f971e6e4ebaf91397bb00 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 30 Aug 2022 21:59:58 -0500 Subject: [PATCH] Initial Wrath-Classic compatibility Briefly fought a training dummy with a Death Knight and a Shaman. I'm sure stuff like Slice-and-dice will need attention for talents moving around and such. --- .github/workflows/release.yml | 5 +++++ IceHUD.lua | 23 +++++++++++++++++------ IceHUD.toc | 1 + IceHUD_Options/IceHUD_Options.toc | 1 + modules/Runes.lua | 8 ++++---- modules/TargetCast.lua | 2 +- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad9b9a3..f849dbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,3 +48,8 @@ jobs: uses: BigWigsMods/packager@master with: args: -g bcc -w 0 + + - name: Package and release for Wrath + uses: BigWigsMods/packager@master + with: + args: -g wrath -w 0 diff --git a/IceHUD.lua b/IceHUD.lua index cfc3faf..aa9d135 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -19,24 +19,35 @@ IceHUD.debugging = false IceHUD.WowVer = select(4, GetBuildInfo()) IceHUD.WowMain = not WOW_PROJECT_ID or WOW_PROJECT_ID == WOW_PROJECT_MAINLINE IceHUD.WowClassic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC -IceHUD.WowClassicBC = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC +IceHUD.WowClassicBC = false +IceHUD.WowClassicWrath = false +if WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + if not LE_EXPANSION_LEVEL_CURRENT or LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_BURNING_CRUSADE then + IceHUD.WowClassicBC = true + elseif LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_WRATH_OF_THE_LICH_KING then + IceHUD.WowClassicWrath = true + end +end -- compatibility/feature flags IceHUD.SpellFunctionsReturnRank = IceHUD.WowMain and IceHUD.WowVer < 80000 -IceHUD.EventExistsPlayerPetChanged = IceHUD.WowVer < 80000 and not IceHUD.WowClassic and not IceHUD.WowClassicBC -IceHUD.EventExistsPetBarChanged = IceHUD.WowVer < 80000 and not IceHUD.WowClassic and not IceHUD.WowClassicBC +IceHUD.EventExistsPlayerPetChanged = IceHUD.WowVer < 80000 and not IceHUD.WowClassic and not IceHUD.WowClassicBC and not IceHUD.WowClassicWrath +IceHUD.EventExistsPetBarChanged = IceHUD.WowVer < 80000 and not IceHUD.WowClassic and not IceHUD.WowClassicBC and not IceHUD.WowClassicWrath IceHUD.EventExistsPlayerComboPoints = IceHUD.WowMain and IceHUD.WowVer < 30000 IceHUD.EventExistsUnitComboPoints = IceHUD.WowMain and IceHUD.WowVer < 70000 IceHUD.EventExistsUnitMaxPower = IceHUD.WowMain and IceHUD.WowVer < 80000 -IceHUD.EventExistsGroupRosterUpdate = IceHUD.WowVer >= 50000 or IceHUD.WowClassic or IceHUD.WowClassicBC +IceHUD.EventExistsGroupRosterUpdate = IceHUD.WowVer >= 50000 or IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath IceHUD.EventExistsUnitDynamicFlags = IceHUD.WowMain and IceHUD.WowVer < 80000 IceHUD.PerPowerEventsExist = IceHUD.WowMain and IceHUD.WowVer < 40000 IceHUD.PerTargetComboPoints = IceHUD.WowVer < 60000 IceHUD.CanTrackOtherUnitBuffs = not IceHUD.WowClassic IceHUD.CanTrackGCD = not IceHUD.WowClassic IceHUD.GetSpellInfoReturnsFunnel = IceHUD.WowMain and IceHUD.WowVer < 60000 -IceHUD.CanHookDestroyTotem = IceHUD.WowClassic or IceHUD.WowClassicBC +IceHUD.CanHookDestroyTotem = IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath IceHUD.ShouldUpdateTargetHealthEveryTick = (IceHUD.WowClassic or IceHUD.WowClassicBC) and GetCVarBool("predictedHealth") +IceHUD.UsesUIPanelButtonTemplate = IceHUD.WowVer >= 50000 or IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath +IceHUD.EventExistsSpellcastInterruptible = IceHUD.WowVer >= 30200 and not IceHUD.WowClassicWrath +IceHUD.DeathKnightUnholyFrostRunesSwapped = IceHUD.WowVer < 70300 and not IceHUD.WowClassicWrath IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE" @@ -345,7 +356,7 @@ end -- blizzard interface options local blizOptionsPanel = CreateFrame("FRAME", "IceHUDConfigPanel", UIParent) blizOptionsPanel.name = "IceHUD" -blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, (IceHUD.WowVer >= 50000 or IceHUD.WowClassic or IceHUD.WowClassicBC) and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2") +blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, IceHUD.UsesUIPanelButtonTemplate and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2") blizOptionsPanel.button:SetText("Open IceHUD configuration") blizOptionsPanel.button:SetWidth(240) blizOptionsPanel.button:SetHeight(30) diff --git a/IceHUD.toc b/IceHUD.toc index 96284f4..39425c6 100644 --- a/IceHUD.toc +++ b/IceHUD.toc @@ -2,6 +2,7 @@ ## Interface-Retail: 90205 ## Interface-Classic: 11403 ## Interface-BCC: 20504 +## Interface-Wrath: 30400 ## Author: Parnic, originally created by Iceroth ## Name: IceHUD ## Title: IceHUD |cff7fff7f-Ace3-|r diff --git a/IceHUD_Options/IceHUD_Options.toc b/IceHUD_Options/IceHUD_Options.toc index 2965fb8..250b8ee 100644 --- a/IceHUD_Options/IceHUD_Options.toc +++ b/IceHUD_Options/IceHUD_Options.toc @@ -2,6 +2,7 @@ ## Interface-Retail: 90205 ## Interface-Classic: 11403 ## Interface-BCC: 20504 +## Interface-Wrath: 30400 ## Title: IceHUD |cff7fff7f-Options-|r ## Author: Parnic ## Version: @project-version@ diff --git a/modules/Runes.lua b/modules/Runes.lua index d20631e..04ac190 100644 --- a/modules/Runes.lua +++ b/modules/Runes.lua @@ -9,15 +9,15 @@ if CooldownFrame_Set then end local RUNETYPE_BLOOD = 1; -local RUNETYPE_DEATH = IceHUD.WowVer < 70300 and 2 or 3; -local RUNETYPE_FROST = IceHUD.WowVer < 70300 and 3 or 2; +local RUNETYPE_DEATH = IceHUD.DeathKnightUnholyFrostRunesSwapped and 2 or 3; +local RUNETYPE_FROST = IceHUD.DeathKnightUnholyFrostRunesSwapped and 3 or 2; local RUNETYPE_CHROMATIC = 4; local RUNETYPE_LEGION = 5; -- not real, but makes for an easy update local GetRuneType = GetRuneType -if IceHUD.WowVer >= 70000 and IceHUD.WowVer < 70300 then +if IceHUD.WowVer >= 70000 and IceHUD.WowVer < 70300 and RUNETYPE_LEGION then GetRuneType = function() return RUNETYPE_LEGION end -elseif IceHUD.WowVer >= 70300 then +elseif IceHUD.WowVer >= 70300 and GetSpecialization then GetRuneType = function() return GetSpecialization() end end diff --git a/modules/TargetCast.lua b/modules/TargetCast.lua index 3d6eecf..5bba841 100644 --- a/modules/TargetCast.lua +++ b/modules/TargetCast.lua @@ -15,7 +15,7 @@ end function TargetCast.prototype:Enable(core) TargetCast.super.prototype.Enable(self, core) - if IceHUD.WowVer >= 30200 then + if IceHUD.EventExistsSpellcastInterruptible then self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE", "SpellCastInterruptible") self:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "SpellCastNotInterruptible") end