WeakAuras

WeakAuras

206M Downloads

Trigger for tracking absorbs would be useful

Causese opened this issue ยท 1 comments

commented

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.

commented

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