oUF

97.2k Downloads

UnitGetIncomingHeals and UNIT_HEAL_PREDICTION

tekkub opened this issue ยท 9 comments

commented

Yup, incoming heals are int eh API now. Lets kill HealComm!

commented

That's how I saw at as well :3

commented

cough http://github.com/Evilpaul/oUF_HealPrediction cough

If you would like it in the base oUF then just say so, I don't mind donating the code.

commented

Be my guest :P

commented

I know, it's more of a todo note for me than anything

commented

Was thinking more like patching the following into health.lua, just to keep it simple:
if(health.Prediction) then
health.Prediction:SetMinMaxValues(0, max)
health.Prediction:SetValue(min + UnitGetIncomingHeals(unit))
end

commented

While simple, that means that anyone who wants to alter the default behaviour for their own needs would then have to consider how to handle the health bar behaviour in their custom function.
If you try and separate the functionality from the health updates, but keep it within the health element, then you have the potential to create difficult to maintain code. The aura element is complex enough, lets not try to create more of them.

While some debate may continue on how best to add in a bar display, we could add in default tags to show the incoming heals as a fontstring. I've already added some custom tags in my own layout for this job, feel free to take as much of the code as you like:

http://github.com/Evilpaul/oUF_EP/blob/cataclysm/oUF_EPTags.lua

commented

I'll merge oUF_HealPrediction into oUF's git history later today.

commented

It's been done.

commented

DOOOOOOOOOOOOOOOOOOOOOOOOOOM