|
09-27-10, 06:34 PM | #1 |
HealPrediction issue..
I'm really new to oUF, so any criticism is very welcome.
I'm modifying oUF_Simple by Zork (it's a great layout to start with ), but I can't seem to get HealPrediction to not overflow. Yes - I've set maxOverFlow to 1. Yes - maxOverFlow works. .. wait what? The overflow setting works like it's supposed to when I heal myself slowly, however when I spam myself with, lets say, healing surge.. the heal prediction statusbar goes way out, then corrects itself. It's kind of annoying.. though I have a feeling that there's a way to fix it. I'm using the heal prediction code almost exactly from the example on the oUF_HealPrediction page on WoWInterface: Code:
--gen healthbar func lib.gen_hpbar = function(f) if f.mystyle == "party" or f.mystyle =="raid" then --statusbar local s = CreateFrame("StatusBar", nil, f) s:SetStatusBarTexture(cfg.statusbar_texture) s:SetHeight(f.height) s:SetWidth(f.width) s:SetPoint("CENTER",0,0) --helper local h = CreateFrame("Frame", nil, s) h:SetFrameLevel(0) h:SetPoint("TOPLEFT",-5,5) h:SetPoint("BOTTOMRIGHT",5,-5) lib.gen_backdrop(h) --bg local b = s:CreateTexture(nil, "BACKGROUND") b:SetTexture(cfg.statusbar_texture) b:SetAllPoints(s) f.Health = s f.Health.bg = b else --statusbar local s = CreateFrame("StatusBar", nil, f) s:SetStatusBarTexture(cfg.statusbar_texture) s:SetHeight(f.height) s:SetWidth(f.width) s:SetPoint("CENTER",0,0) --helper local h = CreateFrame("Frame", nil, s) h:SetFrameLevel(0) h:SetPoint("TOPLEFT",-5,5) h:SetPoint("BOTTOMRIGHT",5,-5) lib.gen_backdrop(h) --bg local b = s:CreateTexture(nil, "BACKGROUND") b:SetTexture(cfg.statusbar_texture) b:SetAllPoints(s) f.Health = s f.Health.bg = b if cfg.healprediction then local mhpb = CreateFrame('StatusBar', nil, f) mhpb:SetPoint('TOPLEFT', s:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) mhpb:SetPoint('BOTTOMLEFT', s:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) mhpb:SetWidth(f.width) mhpb:SetStatusBarTexture(cfg.statusbar_texture) mhpb:SetStatusBarColor(0, 1, 0.5, 0.25) local ohpb = CreateFrame('StatusBar', nil, f) ohpb:SetPoint('TOPLEFT', s:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) ohpb:SetPoint('BOTTOMLEFT', s:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) ohpb:SetWidth(f.width) ohpb:SetStatusBarTexture(cfg.statusbar_texture) ohpb:SetStatusBarColor(0, 1, 0, 0.25) f.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, } end end end -J |
|
09-27-10, 07:05 PM | #2 |
Hi,
I've not got time to test the problem at the moment, but something to note is that the "otherBar" should be anchored to the right-hand side of "myBar". In your code incoming heals from yourself and from others would overlap as both statusbars are anchored to the end of the statusbar "s". Changing this will not affect any overflow, but it should help to show incoming heals as intended. I'll try and get some testing done on beta servers, but it might be a while before I can get any meaningful results. |
|
09-27-10, 09:29 PM | #3 | |
|
||
09-28-10, 03:48 PM | #4 |
I've had a quick play on the beta and when standing around just healing myself there doesn't seem to be an issue.
I suspect there might be a slight issue when you've got changes in health values and incoming heals at the same time, due to a minor delay between updates of the health and healprediction elements. Can you give some more details on the situation where you are seeing unexpected overflow? |
|
09-28-10, 04:34 PM | #5 |
Here's a visual aid:
http://www.youtube.com/watch?v=ovnMbCw182Y I noticed a new bug when doing this.. the texture keeps disappearing for some reason while spamming my heal. Maybe this is all on my end of things Here's all my heal prediction code: Code:
--gen healthbar func lib.gen_hpbar = function(f) local s = CreateFrame("StatusBar", nil, f) if f.mystyle == "party" or f.mystyle =="raid" then --statusbar s:SetStatusBarTexture(cfg.statusbar_texture) s:SetHeight(f.height) s:SetWidth(f.width) s:SetPoint("CENTER",0,0) --helper local h = CreateFrame("Frame", nil, s) h:SetFrameLevel(0) h:SetPoint("TOPLEFT",-5,5) h:SetPoint("BOTTOMRIGHT",5,-5) lib.gen_backdrop(h) --bg local b = s:CreateTexture(nil, "BACKGROUND") b:SetTexture(cfg.statusbar_texture) b:SetAllPoints(s) f.Health = s f.Health.bg = b else --statusbar s:SetStatusBarTexture(cfg.statusbar_texture) s:SetHeight(f.height) s:SetWidth(f.width) s:SetPoint("CENTER",0,0) --helper local h = CreateFrame("Frame", nil, s) h:SetFrameLevel(0) h:SetPoint("TOPLEFT",-5,5) h:SetPoint("BOTTOMRIGHT",5,-5) lib.gen_backdrop(h) --bg local b = s:CreateTexture(nil, "BACKGROUND") b:SetTexture(cfg.statusbar_texture) b:SetAllPoints(s) f.Health = s f.Health.bg = b end if cfg.healprediction then local mhpb = CreateFrame('StatusBar', nil, f) mhpb:SetPoint('TOPLEFT', s:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) mhpb:SetPoint('BOTTOMLEFT', s:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) mhpb:SetWidth(f.width) mhpb:SetStatusBarTexture(cfg.statusbar_texture) mhpb:SetStatusBarColor(0, 1, 0.5, 0.25) local ohpb = CreateFrame('StatusBar', nil, mhpb) ohpb:SetPoint('TOPLEFT', s:GetStatusBarTexture(), 'TOPRIGHT', 0, 0) ohpb:SetPoint('BOTTOMLEFT', s:GetStatusBarTexture(), 'BOTTOMRIGHT', 0, 0) ohpb:SetWidth(f.width) ohpb:SetStatusBarTexture(cfg.statusbar_texture) ohpb:SetStatusBarColor(0, 1, 0, 0.25) f.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, } end end |
|
09-28-10, 05:01 PM | #6 | |
I need to get on the official forums to report it. For the overflow issue I'll try some more stuff tomorrow. |
||
WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » HealPrediction issue.. |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|