Skip to content

Commit

Permalink
update for Cataclysm Classic
Browse files Browse the repository at this point in the history
  • Loading branch information
nyyr committed May 2, 2024
1 parent 52fbaf2 commit 7b53acd
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ArcHUD3.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100205
## Interface: 100206
## Title: ArcHUD3
## Notes: Smooth combat HUD based on ArcHUD2
## Author: nyyr, Nenie, rookdorf
Expand Down
39 changes: 39 additions & 0 deletions ArcHUD3_Cata.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Interface: 40400
## Title: ArcHUD3
## Notes: Smooth combat HUD based on ArcHUD2
## Author: nyyr, Nenie, rookdorf
## SavedVariables: ArcHUD3DB
## Version: @project-version@
## X-Date: @project-date-iso@
## X-Category: HUDs
## X-WoWI-ID: 24629
## X-Curse-Project-ID: 26891

# Libraries
embeds.xml

# Locales
Locales\Locales.xml

# Core addon
Core.lua
Frames.xml
Nameplates.lua
BlizzardFrames.lua
Utils.lua

# Module core
RingTemplate.xml
ModuleCore.lua

# Config
Config.lua

# Rings
Rings\Rings-cata.xml

# Extensions
#Extensions\Extensions.xml

# Unit frames
#UnitFrames\UnitFrames.xml
5 changes: 5 additions & 0 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ ArcHUD.authors = "nyyr, Nenie"
ArcHUD.isClassicWoW = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
ArcHUD.isClassicTbc = (WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC)
ArcHUD.isClassicWrath = (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC)
ArcHUD.isClassicCata = (WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC)
-- generic classic only up to Wrath
ArcHUD.classic = ArcHUD.isClassicWoW or ArcHUD.isClassicTbc or ArcHUD.isClassicWrath
-- generic feature switches based on expansion
ArcHUD.hasHealPrediction = not ArcHUD.classic
ArcHUD.hasAbsorbs = not ArcHUD.classic and not ArcHUD.isClassicCata
ArcHUD.UnitCastingInfo = UnitCastingInfo
ArcHUD.UnitChannelInfo = UnitChannelInfo

Expand Down
12 changes: 7 additions & 5 deletions Rings/Health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ module.defaults = {
ShowTextMax = true,
ShowPerc = true,
ShowDef = false,
ShowIncoming = not ArcHUD.classic,
ShowAbsorbs = not ArcHUD.classic,
ShowIncoming = ArcHUD.hasHealPrediction,
ShowAbsorbs = ArcHUD.hasAbsorbs,
SwapHealthPowerText = false,
ColorMode = "fade",
Color = {r = 0, g = 1, b = 0},
Expand All @@ -27,7 +27,7 @@ module.defaults = {
Level = 0,
}
}
if (ArcHUD.classic) then
if (not ArcHUD.hasAbsorbs) then
module.options = {
{name = "ShowText", text = "SHOWTEXT", tooltip = "SHOWTEXT"},
{name = "ShowTextMax", text = "SHOWTEXTMAX", tooltip = "SHOWTEXTMAX"},
Expand Down Expand Up @@ -180,8 +180,10 @@ function module:OnModuleEnable()
self:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", "UpdateHealth")
end
self:RegisterUnitEvent("UNIT_MAXHEALTH", "UpdateHealth")
if (not ArcHUD.classic) then
if (ArcHUD.hasHealPrediction) then
self:RegisterUnitEvent("UNIT_HEAL_PREDICTION", "UpdateHealthPrediction")
end
if (ArcHUD.hasAbsorbs) then
self:RegisterUnitEvent("UNIT_ABSORB_AMOUNT_CHANGED", "UpdateAbsorbs")
end
self:RegisterEvent("PLAYER_LEVEL_UP")
Expand Down Expand Up @@ -246,7 +248,7 @@ function module:UpdateHealth(event, arg1)

self.f:SetMax(maxHealth)

if (not ArcHUD.classic) then
if (ArcHUD.hasAbsorbs) then
local totalAbsorbs = UnitGetTotalAbsorbs(self.unit)
if totalAbsorbs > 0 then
self.frames[2]:SetMax(maxHealth - health)
Expand Down
36 changes: 36 additions & 0 deletions Rings/Rings-cata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">

<Script file="Anchors.lua" />
<Script file="MirrorTimer.lua" />

<Script file="Health.lua" />
<Script file="Power.lua" />
<Script file="Casting.lua" />
<Script file="TargetHealth.lua" />
<Script file="TargetPower.lua" />
<Script file="TargetCasting.lua" />
<Script file="PetHealth.lua" />
<Script file="PetPower.lua" />
<Script file="FocusHealth.lua" />
<Script file="FocusPower.lua" />
<Script file="FocusCasting.lua" />

<Script file="PowerTemplate.lua" />
<Script file="ArcaneCharges.lua" />
<Script file="ComboPoints.lua" />
<Script file="ComboPointsDruid.lua" />
<Script file="HolyPower.lua" />
<Script file="SoulShards.lua" />
<Script file="ManaShadowPriest.lua" />
<Script file="ManaBalanceDruid.lua" />
<Script file="ManaDruid.lua" />
<Script file="ManaElementalShaman.lua" />
<!-- Script file="Chi.lua" /-->
<Script file="Runes.lua" />
<!-- Script file="RunesClassic.lua" /-->
<!-- Script file="Stagger.lua" /-->
<!-- Script file="Essence.lua" /-->

<Script file="CustomBuff.lua" />

</Ui>

0 comments on commit 7b53acd

Please sign in to comment.