Download
(40Kb)
Download
Updated: 06-29-10 10:30 AM
Pictures
File Info
Updated:06-29-10 10:30 AM
Created:09-28-09 12:33 PM
Downloads:13,624
Favorites:52
MD5:

oUF HealComm4  Popular! (More than 5000 hits)

Version: v2.2.2
by: yj589794 [More]

This is an update of oUF_HealComm to use the new LibHealComm-4.0 library and includes LibWrapperHealComm-1.0 for backwards compatability with LibHealComm-3.0 used by lots of healing and unit frame addons.

The main advantages of the new library is support for Heals over Time and Channelled Heals, and for using the unique GUID for identifying the healing targets.

Horizontal and Vertical oUF layouts are also supported.

-----------

To display a bar for incoming heals your oUF layout needs to define a statusbar self.HealCommBar

Code:
	self.HealCommBar = CreateFrame('StatusBar', nil, self.Health)
	self.HealCommBar:SetHeight(0)
	self.HealCommBar:SetWidth(0)
	self.HealCommBar:SetStatusBarTexture(self.Health:GetStatusBarTexture():GetTexture())
	self.HealCommBar:SetStatusBarColor(0, 1, 0, 0.25)
	self.HealCommBar:SetPoint('LEFT', self.Health, 'LEFT')

	-- optional flag to show overhealing
	self.allowHealCommOverflow = true

To display text for incoming heals your oUF layout needs to define a fontstring self.HealCommText
Code:
	self.HealCommText = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmallRight')
	self.HealCommText:SetTextColor(0, 1, 0)
	self.HealCommText:SetPoint('RIGHT', health, 'LEFT', -5, 0)

	-- optional routine override to format the text display
	self.HealCommTextFormat = shortVal

If you do not want to see the heals you cast, then you can define the flag self.HealCommOthersOnly
Code:
	self.HealCommOthersOnly = true
If you want to limit the incoming heals to those that land x seconds from now you can define the option self.HealCommTimeframe
Code:
	-- limit to the next 3 seconds incoming heals
	self.HealCommTimeframe = 3

v2.2.2
- update to v1.6.6 of LibHealComm-4.0

v2.2.1
- update to v1.6.5 of LibHealComm-4.0
- minor code style changes that have no effect on functionality

v2.2.0
- update to v1.6.4 of LibHealComm-4.0
- ensure we make a local copy of string.format (unnoticeable speed boost)
- remove LibWrapperHealComm-1.0 library as I see next to no traffic on it now

v2.1.0
- update to v1.6.3 of LibHealComm-4.0
- fix minor bug with some incoming heal bars showing on units with full health and overflow disabled

v2.0.6
- update to v1.6.2 of LibHealComm-4.0
- addition of self.HealCommTimeframe option

v2.0.5
- update to v1.6.1 of LibHealComm-4.0

v2.0.4
- update to v1.6 of LibHealComm-4.0

v2.0.3
- update to v1.5.7 of LibHealComm-4.0

v2.0.2
- tidy namespace code
- update to v1.5.6 of LibHealComm-4.0
- update to v5.2 of LibWrapperHealComm-1.0

v2.0.1
- fix namespace issue

v2.0.0
- update to v1.5.5-release of LibHealComm-4.0
- major rewrite of code to be not hooky
Post A Reply Comment Options
Unread 03-23-10, 04:36 PM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
Well in the EU we don't get patch 3.3.3 until later tonight, and I'm also busy with work as well. I'll look to see if there can be any improvements made, but they may take a while.
Report comment to moderator  
Reply With Quote
Unread 03-23-10, 03:50 PM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 154
File comments: 330
Uploads: 9
New anchoring possibility in 3.3.3

Any chance you'll make use of the new way StatusBar textures are setup to position the overhealing bar? In 3.3.3, the StatusBar's texture actually gets resized instead of just having its TexCoords manipulated, so you could anchor your overhealing bar to the right side of that and only need to adjust the width. It would fix the slight pause between StatusBar value changes and the position of the overhealing segment as a nice side-effect too.
Report comment to moderator  
Reply With Quote
Unread 03-06-10, 02:32 PM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
It's going to have to be something for the next major update (maybe with cataclysm launch) due to the added complexity of the options required and having to break the existing options.
Report comment to moderator  
Reply With Quote
Unread 03-06-10, 01:42 PM  
mrruben5
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Originally posted by yj589794
[...]

I admit that for cosmetic reasons your suggestion could be used to stop the incoming heal bar overlapping onto adjacent unit frames, but is that your only concern?
Exactly.

Thinking about your opinion, it be even better if a maximum in pixels was allowed I guess.

You could also color the overheal bar/text to indicate the % of overhealing done on the unit, but that would need a PostUpdateHealComm I think. This way you can avoid overlapping on other frames.
Last edited by : 03-06-10 at 01:49 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 03-03-10, 07:35 AM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
I've been thinking about why you would want to see incoming overhealing up to a certain percentage, and I just can't see it.

If you don't want to see over healing, you can turn it off.

If you do want to see overhealing you can limit the amount, in a round about way, by limiting the timeframe of the incoming heals you see.


What benefit would your suggestion give to actually playing a healer? as I'm struggling to see any.

I admit that for cosmetic reasons your suggestion could be used to stop the incoming heal bar overlapping onto adjacent unit frames, but is that your only concern?
Report comment to moderator  
Reply With Quote
Unread 03-02-10, 01:35 PM  
mrruben5
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Can I ask if you change the sizing of the commbar to use SetMinMaxValues and SetValue, instead of changing the height or width? That way you could implement overflow (like set allowHealCommOverflow to 1.3 for 30% overflow).

The trick is that SetValue will never set the statusbar bigger then SetMinMaxValues allows.

Credits to Shadowed for this idea, he implemented it in his own unit frames.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 02-21-10, 06:58 AM  
Taroven
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 49
File comments: 837
Uploads: 11
Thanks for the update!
__________________
Former author of EventHorizon Continued and Other Releases.
Report comment to moderator  
Reply With Quote
Unread 02-18-10, 09:38 AM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
Np, I know the stupidity of changing stuff and then not reloading my UI well.
Report comment to moderator  
Reply With Quote
Unread 02-18-10, 09:13 AM  
Taroven
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 49
File comments: 837
Uploads: 11
Originally posted by yj589794
You are embedding oUF_HealComm4, so the .toc will not be read anyway...

For those people who do not embed oUF_HealComm4, then oUF is not optional.
/facepalm. Must've been something really stupid that was stopping it from loading - Just threw in the toc from the zip here and it's playing nice again. I'll just assume that my xml file was hosting an early April Fools. Sorry to bug you about it.

Edit for clarity: Yes, I know tocfiles aren't used for embedded modules. In my defense the only thing that seemingly got it working earlier was the off-the-wall toc edit. I probably had it fixed in a previous change and not thought to reload, causing the impression that the toc change fixed it.
__________________
Former author of EventHorizon Continued and Other Releases.
Last edited by Taroven : 02-18-10 at 09:18 AM.
Report comment to moderator  
Reply With Quote
Unread 02-18-10, 08:09 AM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
Originally posted by Taroven
Mind setting oUF as an optionaldep rather than a dependency? Facepalmed earlier when I updated to find it not loading.
You are embedding oUF_HealComm4, so the .toc will not be read anyway...

For those people who do not embed oUF_HealComm4, then oUF is not optional.

Originally posted by Taroven
Also, little feature request: self.HealCommTimeframe = <number>

Using healcomm.ALL_HEALS alone is an incredibly spammy way of seeing incoming heals. For example, with a Druid and Priest and all relevant hots on a unit, the incoming heal bar is atrociously long and quite useless.

Previously I'd just change healcomm.ALL_HEALS to healcomm.CASTED_HEALS and be done with it, but with this update I decided to do a little research on the API and came up with a better method. Instead of watching only certain healing types, why do something a little more intelligent?

Working code as follows, replace the current local incHeals with it.
Code:
local incHeals = self.HealCommOthersOnly and healcomm:GetOthersHealAmount(guid, healcomm.ALL_HEALS, self.HealCommTimeframe and self.HealCommTimeframe + GetTime() or nil) or not self.HealCommOthersOnly and healcomm:GetHealAmount(guid, healcomm.ALL_HEALS, self.HealCommTimeframe and self.HealCommTimeframe + GetTime() or nil) or 0
This gives oUF_Healcomm4 the ability to watch only a specific time window (I find 3 seconds to be just about right), limiting the effect that HoT spells have on the size of the healcomm bar/text.

No needed changes in any layout that uses it, just the added option.
I'll think about it.
Report comment to moderator  
Reply With Quote
Unread 02-17-10, 11:35 PM  
Taroven
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 49
File comments: 837
Uploads: 11
Mind setting oUF as an optionaldep rather than a dependency? Facepalmed earlier when I updated to find it not loading.

Also, little feature request: self.HealCommTimeframe = <number>

Using healcomm.ALL_HEALS alone is an incredibly spammy way of seeing incoming heals. For example, with a Druid and Priest and all relevant hots on a unit, the incoming heal bar is atrociously long and quite useless.

Previously I'd just change healcomm.ALL_HEALS to healcomm.CASTED_HEALS and be done with it, but with this update I decided to do a little research on the API and came up with a better method. Instead of watching only certain healing types, why do something a little more intelligent?

Working code as follows, replace the current local incHeals with it.
Code:
local incHeals = self.HealCommOthersOnly and healcomm:GetOthersHealAmount(guid, healcomm.ALL_HEALS, self.HealCommTimeframe and self.HealCommTimeframe + GetTime() or nil) or not self.HealCommOthersOnly and healcomm:GetHealAmount(guid, healcomm.ALL_HEALS, self.HealCommTimeframe and self.HealCommTimeframe + GetTime() or nil) or 0
This gives oUF_Healcomm4 the ability to watch only a specific time window (I find 3 seconds to be just about right), limiting the effect that HoT spells have on the size of the healcomm bar/text.

No needed changes in any layout that uses it, just the added option.
__________________
Former author of EventHorizon Continued and Other Releases.
Report comment to moderator  
Reply With Quote
Unread 02-16-10, 04:01 AM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
Originally posted by bone123
I've got a problem, made it work to show me the healbars but it screws up a single panel attached to the background of recount. And I've got no idea why.

Only this panel can no longer find its Parent and places itself simply in the middle of the screen. If I turn off HealComm everything is fine:

snip

No other panel has this problem. They are all working as intended...
Hi, it looks like your trying to do something I've not seen done before. The posted code portion is too small to try and understand what is happening. Could you please PM me a link with your oUF layout, and any other relevant UI items?

Originally posted by bone123
Edit: another problem: the +heal bar disconnects from the current health bar if you get dmg while casting
If you have .frequentUpdates enabled on your health bar then there will be occasions when there is a little lag before the incoming heal bar snaps back to the end of the health bar.
It does snap back into place after a moment, doesn't it?
Report comment to moderator  
Reply With Quote
Unread 02-15-10, 06:21 AM  
bone123
A Kobold Labourer

Forum posts: 0
File comments: 7
Uploads: 0
I've got a problem, made it work to show me the healbars but it screws up a single panel attached to the background of recount. And I've got no idea why.

Only this panel can no longer find its Parent and places itself simply in the middle of the screen. If I turn off HealComm everything is fine:
Code:
local dmgmeter = CreateFrame("Frame", dmgpanel, Recount_MainWindow)
dmgmeter:SetFrameLevel(2)
dmgmeter:SetFrameStrata("medium")
       dmgmeter:SetHeight(23) -- these 3 lines are debug
       dmgmeter:SetWidth(50)
       dmgmeter:SetPoint("center",0,45)
--the following lines are the ones normally working 
--dmgmeter:SetPoint("TOPRIGHT", Recount_MainWindow, "TOPRIGHT", 0, -30)
--dmgmeter:SetPoint("BOTTOMLEFT", Recount_MainWindow, "BOTTOMLEFT", -0, 1)
dmgmeter:SetScale(1)
dmgmeter:SetBackdrop( {
    bgFile = BLANK_TEXTURE,
    edgeFile = BLANK_TEXTURE,
    tile = false, tileSize = 0, edgeSize = 1,
    insets = { left = -1, right = -1, top = -1, bottom = -1 }
})
dmgmeter:SetBackdropColor(.1,.1,.1,1)
No other panel has this problem. They are all working as intended...


Edit: another problem: the +heal bar disconnects from the current health bar if you get dmg while casting
Last edited by bone123 : 02-15-10 at 07:13 AM.
Report comment to moderator  
Reply With Quote
Unread 01-23-10, 11:50 PM  
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view AddOns

Forum posts: 314
File comments: 43
Uploads: 1
Originally posted by Toran
How can I make this only appear on the player frame if I'm not on my Priest or Druid? That is, I don't need to see the healcomm bars for every other unitframe on my warlock or other non-healing class.
use the UnitClass() routine to get the player class and then add some logic to your layout to do specific actions based on the class.

like....

Code:
local _, playerClass = UnitClass('player')

if(playerClass == "DRUID" or playerClass == "PRIEST") then
    -- always add healcomm bars to all frames
else
    if(unit == "player") then
        -- only add healcom bars to the player frame
    end
end

tidy up the logic as you see fit, but that should do the job.
Last edited by yj589794 : 01-23-10 at 11:52 PM.
Report comment to moderator  
Reply With Quote
Unread 01-23-10, 10:16 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
Uploads: 0
How can I make this only appear on the player frame if I'm not on my Priest or Druid? That is, I don't need to see the healcomm bars for every other unitframe on my warlock or other non-healing class.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: