• 0

    posted a message on PitBull 4.0
    Quote from Aoxomoxoa

    local tmpr,tmpg,tmpb = 255,100,100
    local auraarray = {"Essence of the Blood Queen","Frenzied Bloodthirst","Plague","Infest"}
    for i=1,i<=4,i+1 do
      local a = UnitAura(unit, auraarray[i])
      if a ~= nil then return '|cff%02x%02x%02x%s|r',tmpr,tmpg,tmpb,a
      end
    end

    However, wow keeps yelling at me telling me in comparing a string to nil. I thought a loop would be cleaner than this, especially if I want to expand the list.

    Can anyone can help me clean up the first example and make it work?


    Probably best if this was in the Lua texts thread.

    I've gone down the same path you have. I started with a ton of "if" checks and as new bosses (debuffs) etc were released and I added the texts to different layouts it became a pain to manage. Here's what I did (its probably more than you want but meh).

    I created a very simple addon that has a global table which contains all the debuffs I'm interested in and some information about how I want them displayed. It also contains a global function to return a string of the debuffs on the target that match. I simply call the function with a few parameters in my lua text and it gives me the string to print.

    This way I only had to update debuffs in 1 spot instead of for every layout like raid, main tanks, and player, since I have different layouts for each one.

    The other advantages are that I loop through each debuff on the unit. If there are none (most cases) it's done fast. If there are debuffs (usually just a few), the table lookup is a hash so it's fast (not scanning a large array of my desired debuffs or tons of "if" statements). The table allows me to have some extra information that controls what I actually display, like an abbreviated name, stacks, or expiration. The function also lets me display the name of several debuffs at the same time along with a few other things like having a character limit etc.

    I don't know Lua all that well so I'm sure that my print function could be optimized and that I don't need some of the addon stuff (i just used the bones of another pitbull module).

    You can check it out at
    http://rapidshare.com/files/430987019/PitBull4_DebuffText.zip

    It would be easy to change the print function to display the debuffs exactly how you want.

    To use the function in pitbull I just add a new text to the layout that has the following code and set events to UNIT_AURA like normal

    local debuffs, UpdateInflag = DebuffPrint(unit, false, 3)
    if UpdateInflag then UpdateIn(0.2) end
    return debuffs


    debuffs is the text. UpdateInflag returns true if there's an expiration enabled for a debuff that way it displays a countdown timer. The second parameter to the function controls whether you want to display debuffs not in the table (for content where I don't know the debuffs yet). The third parameter controls the character limit on unknown debuffs.

    Right now my call to UnitAura uses HARMFUL as I'm only intrested in debuffs. It could be changed to look at all Aura's but I don't want to waste time scanning for Buffs when so far, there's none I'm interested in for this.
    Posted in: Unit Frames
  • 0

    posted a message on Health DogTag
    I'm in the process of converting a couple DogTags for the health display on my Unitframes.

    For Player, Pets, Party, Raid and Focus.
    After converting to DogTag 3.0 it seems to work but I was wonder if this is a "correct" way.

    [(IsMaxHP ? IsMouseOver ? MaxHP) (IsFriend ? MissingHP:Hide(0):Prepend("-") ! HP)]


    What I want is

    If the unit is at Max HP don't display anything unless the unit is moused over then show Max HP
    Otherwise if the unit is friendly then show missing HP with a -. If the unit isn't friendly (usually focus) then just show HP.

    Is there a better way to write this?
    Assuming the Status/Offline bug gets fixed, how would I make sure Status is included in this tag?

    Thanks
    Posted in: AddOn HELP!
  • 0

    posted a message on PitBull 2.0
    I have a similar problem with buffs on Raid unit frames as the poster above me.

    After zoning into a battleground and while waiting in the cave, I typically buff Power Word: Fortitude on members of the raid by using a mouse over macro on each members raid unit frame. I'd say 90% of the time the icon for Fort shows up on their unit frame. The other 10% of the time, I buff them and they have the buff, but it isn't shown on their raid unit frame. If I press M, to bring up the default Blizzard map then hide the map, the unit frame will refresh and the buff is displayed. I do have buff filtering turned on so I only see my buffs.

    I wonder if this occurs because of people coming into the raid group. I'll try to pay more attention to what's going on at the same time as the buffing.

    Oh btw, thanks for the abolish disease, inspiration, and fear ward fix. :)

    Raid unit frames settings
    http://img147.imageshack.us/img147/7944/pitbullconfigen9.jpg

    Picture of configured raid unit frames.
    http://img253.imageshack.us/img253/3864/raidframesmc3.jpg
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 2.0
    Quote from wolff »

    Is anyone else having this problem with auras?

    They are not showing up on my party, personal, or raid frames, when I have buff/debuff filtering on. When I turn off buff/debuff filtering they do appear.

    Thanks,

    Wolff


    I am having the same problem. It seems as if the aura filtering is inverted. Filters the buffs listed, instead of filtering everything but the listed buffs.
    Posted in: Unit Frames
  • 0

    posted a message on [PitBull] IMPORTANT - Aura module rewrite.
    Quick question. I may be going crazy but it seems like Buff filtering in the new aura module is inverted compared to the previous version before the rewrite.

    When I have buff filtering enabled for a unit frame (and the buff is listed and checked in the General Settings->Aura) that particular buff is not being displayed on the unit frame.

    It seems like the buffs that are listed (class specific buffs)are the ones being filtered out. Whereas the previos version of Aura filtered all buffs except the ones listed.
    Posted in: Unit Frames
  • 0

    posted a message on ClassTimer - Official thread
    Is there any chance of getting the "Focused Casting" buff added to Bars\Priest.lua?

    Currently the Buffs section has Martyrdom, but the actual buff you receive from the Talent is named Focused Casting.

    Posted in: General AddOns
  • 0

    posted a message on PitBull 2.0
    Try disabling the combat fader module.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 2.0
    Is there any chance of getting Abolish Disease (which has a duration) added to the list of priests buffs and also changing Fear Ward to all races?

    Everytime I update I have to change Aura.lua in Pitbull_Aura starting at line 191 from

    friendBuffs = {
    			[BSL["Divine Spirit"]] = true,
    			[BSL["Elune's Grace"]] = playerRace == "NightElf" or nil,
    			[BSL["Fear Ward"]] = (playerRace == "Draenei" or playerRace == "Dwarf") or nil,



    to

    friendBuffs = {
                [BSL["Abolish Disease"]] = true,
    			[BSL["Divine Spirit"]] = true,
    			[BSL["Elune's Grace"]] = playerRace == "NightElf" or nil,
    			[BSL["Fear Ward"]] = true,



    Posted in: Unit Frames
  • 0

    posted a message on DogTag and Party Targets(Pitbull)
    Is there anyway to add each Party Members name to the associated Party Target unit frame using a DogTag text?

    The majority of my unit frames are towards the center of the screen so I have I one place to look. However, I keep the Party Target frames to the right hand side of my screen so I can see what each member is targetting and also to assist. I have the targets name in the health bar but would like to add the associated party members name in a blank space above (since those frames are not actually beside the party members).

    I read through DogTag spec and didn't see anything that could help. It seems like I need something like the units parent name, although I'm not really sure if the parent frame of Party Targets is Party.
    Posted in: Libraries
  • 0

    posted a message on PitBull 2.0
    Quote from Wiltock »

    You can go into the lua and add L to the front of the 5 lines or so starting at line 428, they are missing. That is what I did until a fix is up on WAU.


    Yep that's what I did to fix it. I also removed the commas at the end of each line in that area, since no other lines around them had it.
    Posted in: Unit Frames
  • To post a comment, please or register a new account.