• 0

    posted a message on Unofficial oUF - methods used for layouts
    Your parentheses are off.

    string.format("%d || |cff%02x%02x%02x%d%%|r")
    >> needs to be something like:
    string.format("%d || |cff%02x%02x%02x%d%%|r", num1, num2, num3, num4, num5)

    Among other ridiculousness:

    Don't define a new function (ColourGradient) inside your updateHealth function.

    You check to see if the unit is player, focus, pet, or target, then try to set your string to the value of the player:
    local curhealth, maxhealth = UnitHealth("player"), UnitHealthMax("player")
    >> needs to be something like:
    local curhealth, maxhealth = UnitHealth(unit), UnitHealthMax(unit)
    Posted in: Unit Frames
  • 0

    posted a message on RBM Offical Thread
    @Gankuu

    Check this mod out for school lockouts:
    http://www.wowinterface.com/downloads/info8323-Spellbreak.html#info

    I don't use it, so it may blow, but in concept it does what you want.
    Posted in: Raid AddOns
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    @BOOBLIK:

    Your OverrideUpdateHealth or PostUpdateHealth will be given the following args: (self, event, bar, unit, min, max). If you have a color table with r, g and b values, you can make them darker on, for example, a StatusBar, like so:

    bar:SetStatusBarColor(color.r * min/max, color.g * min/max, color.b * min/max)

    Not sure if max can ever be 0, so you may want to watch out for that.


    If this information doesn't help you, you may want to consider learning more about Addons and Lua before banging your head against oUF. Most people here are willing to help, but there's a limit to 'how much.' :)
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from Snago »

    ...levelFormats table don't have an entry for "trivial"...


    Wow, hey, thanks for that! I've been using L[UnitClassification(unit)] or "" for like a month now after being too lazy to find the source of the problem.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    @Suzumiya

    Check out this older post, it has an example that should give you an idea of what to do:
    http://www.wowace.com/forums/index.php?topic=10696.msg209064#msg209064

    Also the attributes you need to set on your party and raid headers can be found in SecureTemplates.lua:

    showRaid = [BOOLEAN] -- true if the header should be shown while in a raid

    showParty = [BOOLEAN] -- true if the header should be shown while in a party and not in a raid
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    You check to see if GetNumRaidMembers() == (GetNumPartyMembers() + 1)
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from Slakah »

    You can put a stationary statusbar behind your moving one. Have your moving status bar reveal the hidden one inversly. If you can understand what I'm trying to say.


    How would that produce a result any different from the above (background texture + statusbar)?
    Posted in: Unit Frames
  • 0

    posted a message on Dominos - A main actionbar replacement
    Quote from Tuller »

    Also, did I mention how profiles work in Mangos? Every one is set to use the profile, Default, by default. Paging settings are saved per profile, per class.


    <3
    Posted in: General AddOns
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from Borhast »




    You've noticed how alpha blending works with WoW. I can give you a few hints from my testing, but I'm afraid my knowledge is limited.

    - When you set a frame's alpha, it is applied to all child frames and regions, too. Hence you can see through the 50% of your statusbar texture to the 50% of your background. Which means you need to draw your background texture exactly to the size of the area the statusbar does not cover.

    - The texture of a 'StatusBar' frame is actually sized to the whole frame no matter what value is set. Which means, for example, you can't do something like :SetPoint("LEFT", statusbartexture, "RIGHT") for your background texture.


    And since you can't tell a statusbar to fill in the opposite direction, I think you're going to have to make your own version of a StatusBar to suit your needs. As far as I know, oUF only uses the :SetMinMaxValues, :SetValue, and :SetStatusBarColor methods (plus whatever you use in your layout).
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from seventoes »

    Anyone? please?


    self.unit is a string, and the unit ID of that unit's target is going to be that same string with the other string 'target' stuck on the end of it:

    self.unit .. "target"
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    The problem with doing it that way is that if an aura icon is used as a debuff, and then reused later as a buff, it would still have the same highlight color of the debuff. (I think.)
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    I was looking at this to try to solve Ganders' problem (and met with 0 success), but I think the following is true for .Auras:

    If you specify b buffs and d debuffs, the first b entries in .Auras will be buffs and the remaining d will be debuffs.

    If b is less than half of (b + d), the debuffs will start repeating themselves because the index used for UnitDebuff will be (<the current aura number> % b). (maybe try subtraction here instead, eh?)

    Anything you do in .PostCreateAuraIcon involving hiding/showing the .overlay texture will fail because it is shown and hidden in the updateIcon function.


    I might be wrong (I'm not that great with programming), but some of this may help you guys. Cheers.

    Edit: I was wrong about the first thing. Which means you might want to create your own, separate overlay texture in .PostCreateAuraIcon:
    local tex = button:CreateTexture(nil, "OVERLAY")
    tex:SetTexture(buffborder)
    tex:SetAllPoints(button)
    button.overlay2 = tex


    and then make a .PostUpdateAura function that scans through each icon in .Auras and hides .overlay and shows and colors .overlay2 as appropriate. Though you may want to look into just disabling the .ovelay somehow so you don't show/hide it a bunch of times.

    Edit 2: Jesus I fail at forums.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    @Strange:

    Try setting "unitsPerColumn" to 1.
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    Quote from Alarisha »
    is there any way to make a 5-man raid show as party, rather than raid frames?


    The way I had been doing it was by watching the PARTY_MEMBERS_CHANGED and RAID_ROSTER_UPDATE events (and checking to see if the player is in combat and registering the PLAYER_REGEN_ENABLED event as needed), and checking to see if GetNumPartyMembers() + 1 == GetNumRaidMembers(). Then you just set the showRaid attribute for your raid and party frames as needed.

    I have a ghetto little mod that rearranges crap in my UI based on the number of raid members, this is its event handler:
    local state, nr
    local mod = CreateFrame"Frame"
    mod:SetScript("OnEvent", function(self, event, ...)
    	if(InCombatLockdown()) then
    		self:RegisterEvent"PLAYER_REGEN_ENABLED"
    	else
    		self:UnregisterEvent"PLAYER_REGEN_ENABLED"
    		nr = GetNumRaidMembers()
    
    		if(nr == 0 or 	-- No raid members or one-party raid (arena)
    		  nr == (GetNumPartyMembers() + 1)) then
    			if(state == 0) then return end
    			
    			-- .. do whatever here
    		
    			state = 0
    		else		-- Raid is present
    			if(state == 1) then return end
    			
    			-- .. do whatever else here
    			
    			state = 1
    		end
    	end
    end)
    mod:RegisterEvent"PLAYER_ENTERING_WORLD"
    mod:RegisterEvent"RAID_ROSTER_UPDATE"
    mod:RegisterEvent"PARTY_MEMBERS_CHANGED"
    Posted in: Unit Frames
  • 0

    posted a message on Unofficial oUF - methods used for layouts
    WoWWiki describes UnitInRange as only working for party/raid members. Never bothered to test it myself, but that's probably your explanation.
    Posted in: Unit Frames
  • To post a comment, please or register a new account.