|
|
#1 |
|
Senior Member
Join Date: May 2005
Posts: 259
|
Since the previous topic is mostly irrelevant as me and xbeeps agreed on 4.0, starting a new topic.
Project: http://www.wowace.com/addons/libhealcomm-4-0/ Documentation: http://www.wowace.com/addons/libpend...1-0/pages/api/ I've got pretty much all of the code/api/event/documentation done at this point, I need to go through and verify it's all 100% and then I'll write the wrapper and it should be ready for testing. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jul 2008
Posts: 437
|
The API looks good. However, for GetHealAmount doesn't seem possible to get the amount of healing incoming to a target from everyone else but yourself before your currently casting heal lands (which is kind of the core functionality used by VisualHeal and the unit frame addons that properly show these as separate, and only show the incoming heals from others that land before your own). For example, if i know that my own heal will land at the time in endTime i will call GetHealAmount like this:
HealComm:GetHealAmount(guid, HealComm.ALL_HEALS, endTime) However, there's no way to know if the heal I'm currently casting will be included in that, because the timeframe ends exactly on the point where my heal lands. I guess it depends on both rounding errors and whether you use > or >= for comparison, or other subtle things, so it's not possible to subtract the players heal size from the value returned. Regardless, from an API point of view, it should be possible to get the heal amount without the player contribution. LHC-3.0 never returned the heal from yourself in this call, and relied on the addon to remember that value by itself whenever a heal was active (which is just a matter of saving the amount in a local variable whenever a heal start event is triggered with the player as the healer). Apart from that, i think everything looks good. Perhaps you want to reconsider exposing the internal tables, because when they are exposed you get locked down in how they are laid out, because changing them is an API change. |
|
|
|
|
|
#3 | ||
|
Senior Member
Join Date: May 2005
Posts: 259
|
Quote:
Besides that for getting the end time it uses the same method 3.0 did with getting the end time through UnitCastingInfo/UnitChannelInfo. In HealComm-3.0: Quote:
Code:
local playerHealed = HealComm:GetHealAmount(guid, HealComm.ALL_HEALS, nil, UnitGUID("player"))
local restHealed = HealComm:GetHealAmount(guid, HealComm.ALL_HEALS) - playerHealed
playerHealed = math.floor(playerHealed * HealComm:GetHealModifier(guid))
restHealed = math.floor(restHealed * HealComm:GetHealModifier(guid))
That's true, the only reason the caster table was exposed is so people can see who has casted a heal or not, but I'll just replace that with a GUIDHasHealed called. The GUID -> Unit table will probably always be there/not changed unless Blizzard decides to let us get units from GUIDs. Last edited by Shadowed; 08-17-2009 at 10:15 PM. |
||
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jul 2008
Posts: 437
|
Hmm, i'm not sure you understand the problem. I want two quantites:
1) The heal that is incoming *only* from others *before* my heal lands. 2) The heal that is incoming from me. 2 is trivial, but 1 is not with the current API. Calling this: Code:
local restHealed = HealComm:GetHealAmount(guid, HealComm.ALL_HEALS) - playerHealed Code:
local restHealed = HealComm:GetHealAmount(guid, HealComm.ALL_HEALS, endTimeOfCurrentlyCastingPlayerSpell) - playerHealed Maybe this picture explains it better: http://www.wowace.com/addons/visualh...es/4-heal-bar/ Note the "Incoming heals from others that will complete before yours" |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2006
Location: Massachusetts
Posts: 69
|
In response to: http://forums.wowace.com/showpost.ph...6&postcount=90
You should've looked at how LHC4 did it first . The way it does it now isr1 will do Code:
lib.healingModifiers = lib.healingModifiers or {
[spellname1] = 0.5,
[spellname2] = 1,
}
Code:
lib.healingModifiers = lib.healingModifiers or {
[spellname1] = 0.5,
[spellname2] = 1,
[spellname3] = 1,
}
Also, AuraHandler should be something like below Code:
if AuraHandler then AuraHandler(...) end |
|
|
|
|
|
#6 | ||
|
Senior Member
Join Date: May 2005
Posts: 259
|
Quote:
So if I add a new spell in r3 it becomes Code:
lib.healingModifiers = lib.healingModifiers or {
[1] = 0.50,
[2] = 1,
}
lib.healingModifiers[3] = 2
Quote:
local healed = HealComm:GetOtherHealAmount(guid, bitFlag, endTime, casterGUID) that will return all heals within the time band (if any) not counting the players heal, if you wanted to get the players heals + everyone else's before yours land it would be: local playerHealed = HealComm:GetHealAmount(guid, HealComm.ALL_HEALS, endTime, UnitGUID("player")) local beforePlayer = HealComm:GetOtherHealAmount(guid, HealComm.ALL_HEALS, endTime) endTime would be something you kept track of through the heal events to figure out the longest player heal, it would look something like: Code:
function HealComm:GetOtherHealAmount(guid, bitFlag, time) local amount = 0 for casterGUID, spells in pairs(pendingHeals) do if( casterGUID ~= playerGUID ) then amount = amount + filterData(spells, guid, bitFlag, time) end end return amount > 0 and amount or nil end |
||
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jun 2006
Location: Massachusetts
Posts: 69
|
Ah, I see how you'll add new entries. Sorry for wasting your time, I've never done something like that.
One more thing, I think you should register CLEU, CHAT_MSG_ADDON, UNIT_AURA, and the rest for healers only when the player is in a group. |
|
|
|
|
|
#8 | |
|
Asian Sheep Lover
Join Date: Aug 2007
Location: Singapore
Posts: 3,556
|
Quote:
Especially lib upgrading/reembedding code.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others. |
|
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Jul 2008
Posts: 437
|
Quote:
GetHealAmount(guid, bitFlag[, time[, includePlayer[, casterGuid]]]) Or perhaps a HealComm.PLAYER_HEALS bit ? Dunno if that would create some other consistency problems though. You decide! |
|
|
|
|
|
|
#10 |
|
Junior Member
Join Date: Jun 2006
Location: Massachusetts
Posts: 69
|
Not a bug, but I suggest you check that GetSpellInfo(spellid) exists outside the table constructor to safeguard the lib from breaking on patch days. You never know when blizz will remove a spellid.
|
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
All times are GMT. The time now is 04:09 PM.
WowAce Forums





. The way it does it now is
