Hrm, xbeeps, given how LHC4 handles HoTs, you're going to have some big numbers with "remaining heals" in VisualHeal unless you filter out HoTs for that matter or use a medium time limit (like 6 or 8 seconds).
(BTW, just noticed this evening that Healbot updated to LHC4.)
Also there are some inconsistencies between the names used in the actual library and the documentation.
I found out the hard way because i did GetGUIDUnitMapTable()[guid] and got C stack overflow. I copy-pasted the function name from the API page and didn't realise until i split it up into two lines (function call + lookup) that the problem was the function name.
Inconsistent in what way, also what names do not match up? The GUIDHasHealed(guid) should be GUIDHasHealed(casterGUID) and it references LibPendingHeals rather than LibHealComm, but the rest looks consistent.
I'm not sure how you are C stack overflowing there, that's a bit curious actually can you pasty the code you are using that's triggering the overflow?
The C stack overflow was caused by this code:
Since there is no GetGUIDUnitMapTable function this probably throws off the interpreter completely because i try to index into the return value of a failed call to non-existing function. It's not in the library, it was just me copy-pasting the function name from the documentation that doesn't match the name in the library.
I don't suppose the unit map includes non-grouped units like target, focus, targettarget and focustarget?
I use the following function to convert to unit ID:
return self.HealComm:GetGuidUnitMapTable()[guid] or (guid == UnitGUID('target')) and 'target' or (guid == UnitGUID('focus')) and 'focus' or (guid == UnitGUID('targettarget')) and 'targettarget' or (guid == UnitGUID('focustarget')) and 'focustarget' or nil;
Not that it is a problem, i used something very similar before which converted the name to a unit ID:
return UnitExists(targetName) and targetName or (targetName == self:UnitFullName('target') and 'target') or (targetName == self:UnitFullName('focus') and 'focus') or (targetName == self:UnitFullName('targettarget') and 'targettarget') or (targetName == self:UnitFullName('focustarget') and 'focustarget') or nil;
Just wondering if it would be easy for LHC-4.0 to also keep track of these extra few non-grouped units?
It's not really that easy to support non-grouped units since as soon you untarget or unfocus the unit they would get purged the next RAID_ROSTER_UPDATE/PARTY_MEMBERS_CHANGED and the heals cast on them removed anyway, something I'll look into after I get Wild Growth and such supported though.
You should register HealComm_GUIDDisappeared(event, disappearedGUID) and when that fires invalidate any casterGUID or targetGUIDs you have that match the disappearedGUI in your self.heals table. Might need to register HealComm_HealUpdated(event, casterGUID, spellID, healType, endTime, ...) too depending on how you display data if you add hot support as the end time on hots tends to drift due to latency.
Random note, but line #303 you have _ and icon as leaked globals.