Go Back   WowAce Forums > Addon Chat > Libraries
Libraries Threads for new libraries and mixins.

Reply
 
Thread Tools
Old 01-27-2008   #1
xbeeps
Senior Member
 
Join Date: Jul 2008
Posts: 437
Default LibHealComm-3.0 Official Thread

LibHealComm-3.0 is a library that keeps track of healing spells cast by healers in a group.

LibHealComm-3.0 arised as the backend for the next generation of VisualHeal (http://www.wowace.com/wiki/VisualHeal), solving some of the problems with HealComm-2.0 (mainly the lack of an event when other player's healing stops). It is a generic heal tracking library, that makes it easy for addons to retrieve information about the healing being cast by anyone in a group, as well as keeping track of buffs/debuffs that affect healing.

API Documentation can be found here:
http://www.wowace.com/projects/libhealcomm-3-0/

Last edited by xbeeps; 03-16-2009 at 07:20 PM. Reason: Update to current state of things
xbeeps is offline   Reply With Quote
Old 01-28-2008   #2
maia
Amazing Member
 
Join Date: Dec 2005
Posts: 1,124
Default Re: LibHealComm-3.0 Official Thread

xbeeps, thanks a lot.

May I suggest to add a flag to skip your own heals in UnitIncomingHealGet() if possible somehow, or maybe return the heal amount you're healing yourself as additional return value in general?

This would allow having Grid status indicators that simply show if a unit is healed by another healer, without distracting you with your own heals. I remember I ended up canceling my own heals once the indicator showed an incoming heal - not realizing that it's my heal that's incoming, not a heal from someone else - with the effect that the tank died, and I added the "do not display your own heals" to GridStatusHeals.
maia is offline   Reply With Quote
Old 01-28-2008   #3
xbeeps
Senior Member
 
Join Date: Jul 2008
Posts: 437
Default Re: LibHealComm-3.0 Official Thread

Quote:
Originally Posted by maia
May I suggest to add a flag to skip your own heals in UnitIncomingHealGet() if possible somehow, or maybe return the heal amount you're healing yourself as additional return value in general?
This is already the case. I've updated the wiki to more clearly describe that the UnitIncomingHealGet(unit, time) call only returns information about healing cast by remote clients.

To get the information about the healing cast by the player, it is usally best to save the information delivered in the HealComm_DirectHealStart event (when triggered for the player) or use the UnitCastingHealInfoGet(unit) call to retrieve it anytime.
xbeeps is offline   Reply With Quote
Old 01-30-2008   #4
xbeeps
Senior Member
 
Join Date: Jul 2008
Posts: 437
Default Re: LibHealComm-3.0 Official Thread

Just a heads-up because i changed a library call name, and i noticed Julith started integration on GridStatusHeals:

LibHealComm-3.0 (r59779):
- Completely rewrote the buff/debuff scanner. Garbage generation reduced to absolute minimum, uses mainly strings that are already interned and is roughly 80%-100% faster than the previous implementation.
- Added support for a large number of additional buffs/debuffs that affect healing.
- Renamed UnitCastingHealInfoGet to UnitCastingHealGet for consistency with other library calls.

The wiki page was updated earlier today to reflect this change in the API.
xbeeps is offline   Reply With Quote
Old 01-31-2008   #5
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 3,556
Default Re: LibHealComm-3.0 Official Thread

Can you update the wiki to have a section telling us what 3.0 is different from 2.0? How are they different? What is different? Speed? Efficiency? Garbage generated? API changes? New things? What things should authors take note of if they upgrade from 2.0 to 3.0?
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.
Xinhuan is offline   Reply With Quote
Old 01-31-2008   #6
xbeeps
Senior Member
 
Join Date: Jul 2008
Posts: 437
Default Re: LibHealComm-3.0 Official Thread

Quote:
Originally Posted by Xinhuan
Can you update the wiki to have a section telling us what 3.0 is different from 2.0? How are they different? What is different? Speed? Efficiency? Garbage generated? API changes? New things? What things should authors take note of if they upgrade from 2.0 to 3.0?
To my knowledge, HealComm-2.0 is only used in the current VisualHeal (although a number of other addons listens to the messages), but if you can prove me wrong here, I'd be happy to add such a section.

Just to outline, the major difference is that HC-2.0 only sends a message when a player starts casting, while LHC-3.0 sends out a message at stop also. This was a necessity in order to avoid polling for completion of the spell you're watching, which can become quite excessive when many players are healing. This was not a problem in the current VisualHeal, because at most it only displayed the incoming heals to yourself, and a sum of heals to someone else when you were healing someone, so the polling done was very limited. However, when scaling to a full set of unit frames, this is clearly too much unnecessary overhead for no reason at all.

The other significant difference is that it's not based on Ace2, it just uses LibStub and 2 libraries that only use LibStub (no additional dependencies). A lot of heavy dependencies have been pruned here, paving the way for integration into coming Ace3 addons without requiring the legacy code of Ace2. Also Roster-2.1 has been removed, as it is not needed when it is possible to give group member names instead of UnitID's to virtually all WOW API calls (don't know if it has always been like that, but I just found out when I started hacking on LCH-3.0 some months ago...).

In terms of features, it adds support for multi target heals and a large number of additional buffs/debuffs that affect healing. Generally the code is quite a bit more efficient (we all learn!), especially the time critical parts (spell reception and debuff/buff scanner mainly) that have been optimised by doing timing measurements. Also the state machine that processes spell events is significantly more robust to the special sequences delivered by the WOW API - especially in cases where /stopcasting is used or new spells are cast right before a new one begins (which was made possible in one of the recent patches).

In terms of API, there's of course additional events for stop casting, and the library calls have been improved to be more useful in real life scenarios. Generally HC-2.0 and LHC-3.0 are not compatible (although HC-2.0 is capabable of receiving the messages it need from LHC-3.0), but it is pretty straightforward to do the transition.
xbeeps is offline   Reply With Quote
Old 01-31-2008   #7
Julith
Full Member
 
Join Date: Aug 2005
Posts: 118
Default Re: LibHealComm-3.0 Official Thread

I've got the following error message when fighting "Phantasmal Possessors" in Auchenai Crypts:

Code:
...AddOns\Grid\libs\LibHealComm-3.0\LibHealComm-3.0.lua:224: bad argument #1 to 'tonumber' (value expected).
I think it had something to do with the Phantasmal Possessors because the error came everytime when fighting with them.
I'm pretty sure I was the only one from the group who had your library loaded and I was playing my warrior when the error occured.

Just wanted to report it.

edit: revision was 59780
Julith is offline   Reply With Quote
Old 01-31-2008   #8
xbeeps
Senior Member
 
Join Date: Jul 2008
Posts: 437
Default Re: LibHealComm-3.0 Official Thread

Thanks for reporting this. It seems that when you use select you must be careful, because it returns "nothing" (not nil) if there are no arguments, so this fails:

local x = tonumber(select(3, somefunctionthatreturnsnothing()))

while this works:

local x = select(3, somefunctionthatreturnsnothing());
local x = tonumber(x);

Presumeably because x is not assigned to, and has the value nil in advance. I've checked the use of select in all of the code, and taken the necessary precautions.

On a site-note, the most recent LibHealComm-3.0 does not depend on LibGratuity-3.0 anymore, I use a small scanning tooltip inside the library instead (in the "independence of libraries"-spirit of Ace3).
xbeeps is offline   Reply With Quote
Old 02-06-2008   #9
xbeeps
Senior Member
 
Join Date: Jul 2008
Posts: 437
Default Re: LibHealComm-3.0 Official Thread

LibHealComm-3.0 has been moved to trunk, and therefore the API is now frozen.
xbeeps is offline   Reply With Quote
Old 02-07-2008   #10
OrionShock
Legendary Member
 
OrionShock's Avatar
 
Join Date: May 2006
Location: Arizona
Posts: 3,500
Default Re: LibHealComm-3.0 Official Thread

Quote:
Originally Posted by xbeeps
LibHealComm-3.0 has been moved to trunk, and therefore the API is now frozen.
are you going to make this thing embeddable?
__________________
Author of GuildCraft, SickOfClickingDailies, and CursorCooldown

"I was there in the beginning... and things were very different back then" --An Echo from a time before.
OrionShock is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:57 PM.