Skip to content

feat: add ten Maelstrom Weapon ticks and configurable highlight threshold for Enhancement Shaman#65

Open
LorenzenLars wants to merge 6 commits intoSnsei987:mainfrom
LorenzenLars:feature/enhancement-ten-tick-maelstrom-bar
Open

feat: add ten Maelstrom Weapon ticks and configurable highlight threshold for Enhancement Shaman#65
LorenzenLars wants to merge 6 commits intoSnsei987:mainfrom
LorenzenLars:feature/enhancement-ten-tick-maelstrom-bar

Conversation

@LorenzenLars
Copy link

This pull request adds a new feature for Enhancement Shamans:

  • A checkbox to enable 10-tick Maelstrom Weapon bar (default 5 ticks)
  • A slider to set the highlight threshold for the Maelstrom Weapon bar (default >=6, adjustable 6-10)
  • The 10-tick option and slider are only enabled for Enhancement Shamans
  • Bar Visuals update immidiatly when toggling the 10-tick bar or changing the threshold
  • Existing behavior for 5-tick bar (original) remains unchanged for other specs and classes

This change adds a bit of customization for Enhancement Shamans tracking Maelstrom Weapon stacks.

Tested in-game with Enhancement Specialization. Not enabled when playing other classes or other shaman specs.
Located under Bar Style in Edit Mode (Not sure about the placement there though) - Can be moved if like the changes but wants the settings elsewhere.

@Snsei987
Copy link
Owner

Snsei987 commented Jan 26, 2026

Hi, thanks. Can you remove the slider to change the threshold please, I intend to something for that. I will accept the 10 bars mode though.

@LorenzenLars
Copy link
Author

Hi, thanks. Can you remove the slider to change the threshold please, I intend to something for that. I will accept the 10 bars mode though.

Removed the slider and everything related to threshold. Now it's just a toggle for using 10 bar for maelstrom. Threshold is back to "> 5" whether it's 5 or 10 bars.

Copy link
Owner

@Snsei987 Snsei987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the time you can do something quicker because data is not null, so no need to check against that.

local specID = C_SpecializationInfo.GetSpecializationInfo(spec)
return playerClass == "SHAMAN" and specID == 263
end,
tooltip = L["USE_TEN_TICK_MAELSTROM_BAR"],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tooltip = L["USE_TEN_TICK_MAELSTROM_BAR"],

No need.

Comment on lines +394 to +399

local data = SenseiClassResourceBarDB[dbName][layoutName]
data.maelstromWeaponUseTenBars = value

bar:ApplyLayout(layoutName)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local data = SenseiClassResourceBarDB[dbName][layoutName]
data.maelstromWeaponUseTenBars = value
bar:ApplyLayout(layoutName)
SenseiClassResourceBarDB[dbName][layoutName].maelstromWeaponUseTenBars = value
bar:ApplyLayout(layoutName)


end,
isEnabled = function(layoutName)
local _, playerClass = UnitClass("player")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local _, playerClass = UnitClass("player")
local playerClass = select(2, UnitClass("player"))

local _, playerClass = UnitClass("player")
local spec = C_SpecializationInfo.GetSpecialization()
local specID = C_SpecializationInfo.GetSpecializationInfo(spec)
return playerClass == "SHAMAN" and specID == 263
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return playerClass == "SHAMAN" and specID == 263
return playerClass == "SHAMAN" and specID == 263 -- Enhancement

@@ -139,7 +139,14 @@
local current = auraData and auraData.applications or 0
local max = 10
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local max = 10
local max = data.maelstromWeaponUseTenBars and 10 or 5

Comment on lines +142 to +149
local data = self:GetData()
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars

if maelstromWeaponUseTenBars then
return max, current
else
return max / 2, current
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local data = self:GetData()
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars
if maelstromWeaponUseTenBars then
return max, current
else
return max / 2, current
end
return max, current

Comment on lines +953 to +957
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars

local maxPower
if resource == "MAELSTROM_WEAPON" then
maxPower = maelstromWeaponUseTenBars and 10 or 5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars
local maxPower
if resource == "MAELSTROM_WEAPON" then
maxPower = maelstromWeaponUseTenBars and 10 or 5
local maxPower
if resource == "MAELSTROM_WEAPON" then
maxPower = data.maelstromWeaponUseTenBars and 10 or 5

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried inlining data.maelstromWeaponUseTenBars as suggested, but in testing it caused incorrect bar filling for the ten tick bar. Coloring only the first 5 bars, even at 10 maelstrom.

The current implementation keeps the behavior as expected and stable in-game, so i have kept it as is.

If there is another preferred pattern for guarding against data being nil during refresh, i am happy to adjust.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this in the getter in the file SecondaryResourceBar.lua l.401

                    local data = SenseiClassResourceBarDB[dbName][layoutName]
                    if data and data.maelstromWeaponUseTenBars ~= nil then
                        return data.maelstromWeaponUseTenBars
                    else
                        return defaults.maelstromWeaponUseTenBars
                    end

This will assure you always have something

Comment on lines +914 to +915
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars
maxPower = maelstromWeaponUseTenBars and 10 or 5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars
maxPower = maelstromWeaponUseTenBars and 10 or 5
maxPower = data.maelstromWeaponUseTenBars and 10 or 5

Comment on lines +842 to +843
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars
max = maelstromWeaponUseTenBars and 10 or 5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars
max = maelstromWeaponUseTenBars and 10 or 5
max = data.maelstromWeaponUseTenBars and 10 or 5

Copy link
Owner

@Snsei987 Snsei987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the formats option for the text, I think they are broken.

Comment on lines +953 to +957
local maelstromWeaponUseTenBars = data and data.maelstromWeaponUseTenBars

local maxPower
if resource == "MAELSTROM_WEAPON" then
maxPower = maelstromWeaponUseTenBars and 10 or 5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this in the getter in the file SecondaryResourceBar.lua l.401

                    local data = SenseiClassResourceBarDB[dbName][layoutName]
                    if data and data.maelstromWeaponUseTenBars ~= nil then
                        return data.maelstromWeaponUseTenBars
                    else
                        return defaults.maelstromWeaponUseTenBars
                    end

This will assure you always have something

- Fix text formatting to adjust to max maelstrom weapon buffs
- Auto-disable 10-tick bar if Raging Maelstrom talent is unlearned
- 10-tick bar can only be enabled if Raging Maelstrom talent is learned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants