Thanks for the help :) I will remember to copy the whole code next time, as I mentioned before Im super new to this so Im on the very beginning of the long road so I guess you'll see me post quite some newbie questions here :] (I will ofc look for an answer before posting!)
does it with other layouts? havent tested or anything
Most layouts just update level within their updatename functions, and updatename probably won't run more than once for the player frame since the player's name won't ever change so that'd be a no afaik.
Little bit hackish but adding this after line 360 in Ammo's layout should get Iswooks what he wants though:
if unit == "player" then
local lvlupdater = CreateFrame("Frame",nil,self)
lvlupdater:RegisterEvent"PLAYER_LEVEL_UP"
lvlupdater:SetScript("OnEvent",function(frame,event,newlvl)self.Lvl:SetText(newlvl) end)
end
Since my computer thinks that Hyjal and PitBull do not mix well and crunches me down to a whopping 1 fps for most of the trash pulls and most of the bosses, I'm trying to switch over to oUF to lighten up the load (It's obvious that my computer was never meant to play wow, even with the upgrades I've done for it) on the system. But here's the kicker - out of every single oUF layout there is out there... no one plays a healer. I've spent most of last night and almost all of today trying to get this thing fixed how I need it (ie, raid frames bigger, names/health displayed on those frames, and as just visual eye candy, I like to have class colors on my frame and the target's frame instead of the mana bar being colored as the class color) however, I'm pretty much a LUA n00b, only having done DogTags before. I'm trying to combine both p3lim's and Lolzen's oUF layouts (taking the majority of p3lim's, but adding in power bar colors and raid frames from Lolzen) but I'm having the most issues getting class colors to display at all. Are there any helpful hints that anyone could give me before I toss my computer down the stairs? :)
Rabbit, thank you so much for the heads up about your oUF layout, it saved me a ton of headaches. But I've got only one problem - I switched the raid frames around to deplete from right to left, as well as the mana/rage/energy bars, but for some reason, if a person has full mana, the mana bar seems to disappear entirely, leaving only the backdrop behind it. Is there a way to fix that in the raid.lua itself? Once someone uses mana or gains rage, etc, the bars are there, but not if they're sitting at full.
I don't understand. You changed the Health AND Power bars to deplete from RIGHT to LEFT, and you're complaining that the Power bar is not visible?
The Power bar is 6 pixels WIDE, if it depletes from RIGHT to LEFT, then it won't matter if you *ever* see it, because 6 pixels is not enough to gauge a persons power level.
Did you also move the Power bar so that it is positioned below the Health bar? Could you please take more time writing your post, and also, when you type (anywhere, really, not just on a forum), try to use paragraphs more.
I don't understand. You changed the Health AND Power bars to deplete from RIGHT to LEFT, and you're complaining that the Power bar is not visible?
The Power bar is 6 pixels WIDE, if it depletes from RIGHT to LEFT, then it won't matter if you *ever* see it, because 6 pixels is not enough to gauge a persons power level.
Did you also move the Power bar so that it is positioned below the Health bar? Could you please take more time writing your post, and also, when you type (anywhere, really, not just on a forum), try to use paragraphs more.
Here's the code for what I changed:
local hp = CreateFrame("StatusBar")
hp:SetStatusBarTexture(statusbarTextureHorizontal)
hp:SetOrientation("HORIZONTAL")
hp:SetParent(self)
hp:SetPoint("LEFT", self, "LEFT")
hp:SetPoint("RIGHT")
hp:SetPoint("TOP")
hp:SetHeight(20)
self.Health = hp
self.OverrideUpdateHealth = updateHealthRaid
local mana = power[0]
local pp = CreateFrame("StatusBar")
pp:SetStatusBarTexture(statusbarTextureHorizontal)
pp:SetStatusBarColor(mana.r, mana.g, mana.b)
pp:SetOrientation("HORIZONTAL")
pp:SetParent(self)
pp:SetPoint("LEFT", self, "LEFT")
pp:SetPoint("RIGHT")
pp:SetPoint("BOTTOM")
pp:SetHeight(5)
self.Power = pp
self.OverrideUpdatePower = updatePowerRaid
Does that explain things a tad better?
Unless I'm to put the SetPoint of the mana bar at ("LEFT", hp, "LEFT") or something, I'm scratching my head. And somewhat of an apology for the last post - I was trying to heal a heroic magister's terrace with a MS warrior tanking.
ETA: And now that I looked it over, should I change the local mana = power[0] to a different number?
I found this today. I was looking for something to show me the differences in files to make it easier to update and keep my customizations. I was not always successful in the scroll dual window thing and some of these have quite a few lines. :)
Anyways, I thought I would share. I am on a mac.(Leopard) It's freeware and works like a charm at comparing and highlighting differences and can even merge into a new 3rd file. [url=http://DiffMerge [url]http://www.sourcegear.com/diffmerge/downloads.html]DiffMerge[/url] http://www.sourcegear.com/diffmerge/downloads.html[/url]
got a slight issue with my updatehealth function atm.
The problem is that say im missing 500 hp
now if i would regen that normally ie standing around doing nothing the missing part would get stuck at 14 or thereabout.
but if i heal myself it works as intended.
ive tried using
if min ~= max
but with no success
local updateHealth = function(self, event, bar, unit, min, max)
local cur, maxhp
local perc = string.format("%d%%", min/max*100)
local missing = max-min
local miss = "-"..numberize(missing)
if LibMobHealth then
cur, maxhp = LibMobHealth:GetUnitHealth(unit)
else
cur, maxhp = min, max
end
local cursh = numberize(cur)
if(UnitIsDead(unit)) then
bar:SetValue(0)
bar.value:SetText"Dead"
self.Missing:SetText("0") -- Hopefully fixes errors
elseif(UnitIsGhost(unit)) then
bar:SetValue(0)
bar.value:SetText"Ghost"
self.Missing:SetText("0") -- Hopefully fixes errors
elseif(not UnitIsConnected(unit)) then
bar.value:SetText"Offline"
self.Missing:SetText("")
elseif unit == "player" or unit == "pet" or unit == "targettarget" then
if min < max then
local percent = floor(min/max*100)
bar.value:SetText("|cff00ff22"..cursh.."|r/|cff00ff22"..perc)
self.Missing:SetText((missing > 0 and "|cffff0000-"..numberize(maxhp-cur).."|r") or "")
else
bar.value:SetText(cursh)
end
elseif unit == "target" or unit == "focus" then
if min < max then
local percent = floor(min/max*100)
bar.value:SetText("|cff00ff22"..cursh.."|r/|cff00ff22"..perc)
self.Missing:SetText((missing > 0 and "|cffff0000-"..numberize(maxhp-cur).."|r") or "")
else
bar.value:SetText(cursh)
end
elseif self:GetParent():GetName()=="oUF_Party" then
self.Missing:SetText((missing > 0 and "|cffff0000-"..numberize(maxhp-cur).."|r") or "")
else
bar.value:SetText(perc)
end
elseif unit == "player" or unit == "pet" or unit == "targettarget" then
if min < max then
local percent = floor(min/max*100)
bar.value:SetText("|cff00ff22"..cursh.."|r/|cff00ff22"..perc)
self.Missing:SetText((missing > 0 and "|cffff0000-"..numberize(maxhp-cur).."|r") or "")
else
bar.value:SetText(cursh)
self.Missing:SetText((missing > 0 and "|cffff0000-"..numberize(maxhp-cur).."|r") or "")
end
I cant get the PvP flagging to work and Im wondering if there is a way to make your unitframe turn red if someone is targeting you? I've checked Coldfurys lua but I dont get where to put what xD I found this and guessing it might be atleast the pvp flagging thingie tho where should I put it?
local updatePvp = function(self, unit)
if (unit) then
if unit == "pet" or unit == "pettarget" or unit == "targettarget" then
self.Pvp:SetText("")
elseif UnitIsPlayer(unit) and UnitIsPVP(unit) then
self.Pvp:SetText("[PvP]")
else
self.Pvp:SetText("")
end
end
end
and if there is a way to get some kind of combat notification on the bars like a C that turns visiable when you enter combat.
screenshot: no refesh my level~!
Little bit hackish but adding this after line 360 in Ammo's layout should get Iswooks what he wants though:
self:RegisterEvent("UNIT_LEVEL")
self.UNIT_LEVEL = updateName
-Ammo
Open raid.lua and change the options at the top to suit your needs, such as UNIT_SPACING, REVERSE_STATUSBARS, HEALTH_DISPLAY_AS and SCALE.
Seems to me that should satisfy what you described in that post, at least.
I haven't! I completely forgot that it was up on the SVN. thank you so much! Maybe I'll be able to raid tonight!
The Power bar is 6 pixels WIDE, if it depletes from RIGHT to LEFT, then it won't matter if you *ever* see it, because 6 pixels is not enough to gauge a persons power level.
Did you also move the Power bar so that it is positioned below the Health bar? Could you please take more time writing your post, and also, when you type (anywhere, really, not just on a forum), try to use paragraphs more.
Here's the code for what I changed:
Does that explain things a tad better?
Unless I'm to put the SetPoint of the mana bar at ("LEFT", hp, "LEFT") or something, I'm scratching my head. And somewhat of an apology for the last post - I was trying to heal a heroic magister's terrace with a MS warrior tanking.
ETA: And now that I looked it over, should I change the local mana = power[0] to a different number?
Anyways, I thought I would share. I am on a mac.(Leopard) It's freeware and works like a charm at comparing and highlighting differences and can even merge into a new 3rd file. [url=http://DiffMerge [url]http://www.sourcegear.com/diffmerge/downloads.html]DiffMerge[/url] http://www.sourcegear.com/diffmerge/downloads.html[/url]
Thanks, was thinking of looking up for something like this a few days before, gonna try it ;D
The problem is that say im missing 500 hp
now if i would regen that normally ie standing around doing nothing the missing part would get stuck at 14 or thereabout.
but if i heal myself it works as intended.
ive tried using but with no success
and if there is a way to get some kind of combat notification on the bars like a C that turns visiable when you enter combat.
oUF_Banzai should do that.