Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger for tracking absorbs would be useful #5200

Closed
Causese opened this issue Jun 30, 2024 · 1 comment
Closed

Trigger for tracking absorbs would be useful #5200

Causese opened this issue Jun 30, 2024 · 1 comment
Labels
🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature.

Comments

@Causese
Copy link
Contributor

Causese commented Jun 30, 2024

Is your feature request related to a problem? Please describe.
Tracking a unit's absorb ("shields") is a recurring theme in dungeons and raids.
It would be neat if there was a trigger for purely tracking its absorb value.
Some achieve this by using :SetDurationInfo etc

Describe the solution you'd like

  • should support npcID / nameplate and boss units ideally

pretty much this as a trigger

function(allstates, event, unit)
    if event == "UNIT_ABSORB_AMOUNT_CHANGED" then
        local absorb = UnitGetTotalAbsorbs(unit)
        local state = allstates["shield"]
        if state then
            if absorb <= 0 then
                state.show = false
            else
                state.value = absorb
            end
            state.changed = true
        else
            if absorb and absorb > 0 then
                allstates["shield"] = {
                    show = true,
                    changed = true,
                    progressType = "static",
                    total = absorb,
                    value = absorb,
                }
            end
        end
        return true
    end
end

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@Causese Causese added the 🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature. label Jun 30, 2024
@InfusOnWoW
Copy link
Contributor

That should be covered by the health trigger with absorb > 0 and progressSource set to absorb. Do note that due to a bug the absorb overlay does show up: #5198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Feature Request This is a request for a new feature, or an expansion of an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants