| Updated: | 09-03-2010 02:37 PM |
| Created: | 09-02-2010 03:48 AM |
| Downloads: | 477 |
| Favorites: | 2 |
| MD5: |
local mhpb = CreateFrame('StatusBar', nil, self.Health)
mhpb:SetPoint('TOPLEFT', self.Health:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
mhpb:SetPoint('BOTTOMLEFT', self.Health:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
mhpb:SetWidth(width)
mhpb:SetStatusBarTexture(config.TEXTURE)
mhpb:SetStatusBarColor(0, 1, 0.5, 0.25)
local ohpb = CreateFrame('StatusBar', nil, self.Health)
ohpb:SetPoint('TOPLEFT', mhpb:GetStatusBarTexture(), 'TOPRIGHT', 0, 0)
ohpb:SetPoint('BOTTOMLEFT', mhpb:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0)
ohpb:SetWidth(width)
ohpb:SetStatusBarTexture(config.TEXTURE)
ohpb:SetStatusBarColor(0, 1, 0, 0.25)
self.HealPrediction = {
-- status bar to show my incoming heals
myBar = mhpb,
-- status bar to show other peoples incoming heals
otherBar = ohpb,
-- amount of overflow past the end of the health bar
maxOverflow = 1.05,
-- PreUpdate function (optional)
PreUpdate = function(element, unit)
...
end,
-- PostUpdate function (optional)
PostUpdate = function(element, unit)
...
end,
-- Override function (optional)
Override = function(self, event, unit)
...
end,
}
oUF.Tags['healpredictionself'] = function(unit) local myIncomingHeal = UnitGetIncomingHeals(unit, 'player') or 0 if myIncomingHeal == 0 then return nil else return myIncomingHeal end end oUF.TagEvents['healpredictionself'] = 'UNIT_HEAL_PREDICTION' oUF.Tags['healpredictionother'] = function(unit) local myIncomingHeal = UnitGetIncomingHeals(unit, 'player') or 0 local allIncomingHeal = UnitGetIncomingHeals(unit) or 0 if(allIncomingHeal < myIncomingHeal) then myIncomingHeal = allIncomingHeal allIncomingHeal = 0 else allIncomingHeal = allIncomingHeal - myIncomingHeal end if allIncomingHeal == 0 then return nil else return allIncomingHeal end end oUF.TagEvents['healpredictionother'] = 'UNIT_HEAL_PREDICTION' oUF.Tags['healpredictionall'] = function(unit) local allIncomingHeal = UnitGetIncomingHeals(unit) or 0 if allIncomingHeal == 0 then return nil else return allIncomingHeal end end oUF.TagEvents['healpredictionall'] = 'UNIT_HEAL_PREDICTION'
File Name |
Version |
Size |
Author |
Date |
b2 |
1kB |
yj589794 |
09-02-2010 04:27 PM |
|
b1 |
1kB |
yj589794 |
09-02-2010 03:48 AM |
![]() |
Comment Options |
|
|
|
|
When I set maxOverflow to "1" it sometimes overflows anyway, but then snaps back after another update is fired. Is there anyway to prevent this?
|
|
|
|
|
|
|
|
Haste has merged this addon into the oUF core, so once there is a published version of the new oUF core I will delete this addon entry.
|
|
|
|
|
|
|
|
I'm seeing some issues with incoming heal bars on target units at the moment.
Looks like there is lots of testing to do... ![]() |
|
|
|
|
|
|
|
OK, I figured out why the incoming heal bars were not shown.
Calling self.Health:GetWidth() was giving me a result of 0, so make sure you set the width correctly in your layout. |
|
|
|
|
|
|
|
The new API makes healcomm libraries obsolete, right?
![]()
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine." Paper: "OMG, WTF, Scissors!" Scissors: "Rock is OP and Paper are QQers. We need PvP buffs." "neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..." |
|
|
|
![]() |