UnitGetIncomingHeals and UNIT_HEAL_PREDICTION
tekkub opened this issue ยท 9 comments
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.
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
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