Plexus

Plexus

430k Downloads

[Request] Make an option for "Incoming heals" status to work in conjunction with health deficit

dabadoo opened this issue ยท 1 comments

commented

Using plexus in raids, I've been missing the functionality of other healframe addons I've used in the past.

Currently as intended, if I have health deficit and incoming heal checked, only one of them will display depending on priority.
If I am missing 2000 health and I do a incoming heal for 500 -> it will show 500 since that is my priority.

I think it would be cool with an option that makes them work together.
So the same example -> it will show -1500 since that is the final estimated health deficit and "incoming heals" is the higher priority.

I don't really understand lua but with the help of chatgpt I got the following working around line 191 (Heals.lua):

-- ... (previous code)

function PlexusStatusHeals:SendIncomingHealsStatus(guid, incoming, estimatedHealth, maxHealth)
local healthDeficit = maxHealth - estimatedHealth

local deficitText
if healthDeficit < 0 then
    if healthDeficit > 0.1 then
        deficitText = tostring(-healthDeficit)  -- Convert to string without "-" sign
    else
        deficitText = format("+%.1fk", -healthDeficit / 1000)
    end
else
    if healthDeficit <= -0.1 then
        deficitText = tostring(healthDeficit)  -- Convert to string without "+" sign
    else
        deficitText = format("-%.1fk", healthDeficit / 1000)
    end
end


local incomingText = format("%s", deficitText, incoming)

self.core:SendStatusGained(guid, "alert_heals",
    settings.priority,
    settings.range,
    settings.color,
    incomingText,
    estimatedHealth,
    maxHealth,
    settings.icon)

end

-- ... (rest of the code)

No idea how clean/dirty this code is, but it works from what little testing I have done. Unsure if it will cause a ton of errors when I bring it into my next raid.

If this is not something you wish to be part of the addon I fully understand. Just felt like I wanted to share the idea+code since I'm happy with the functionally myself. (assuming it doesn't blow up when I attend my next raid ๐Ÿ˜„ )

commented

I hear you and I think I could ad this as an optional setting. I will look into this. Thanks!