• 0

    posted a message on ButtonFacade (was LibButtonSkin-1.0)
    As I'm logging in to get a raid going I saw there is a buttonfacade update. So I grabbed it. I login and see that none of my skinned buttons are right. Logged out, rolled back to a previous version and everything is back.

    I understand you're making some changes, but a smoother transition to the new version would be preferable. Do we need to manually rename the files that stored settings for "buttonfacade"? Isn't a name change a somewhat unnecessary and problematic move?

    We just had a patch and I'm still waiting for everything to get back to normal in terms of addon updates. I guess I'll put off updating BF until the new bugs are resolved....I don't have the time or patience to sit and reconfigure everything under a new addon name if that is indeed the problem.
    Posted in: General AddOns
  • 0

    posted a message on LuaTexts Official Thread
    I've been working on a luatext for casting that will color and adjust opacity for spells based on whether they are cast by friend or foe, and whether they are interruptible or not. I found that i tend to focus more on the text color than the color of the bar behind it for some reason : /....anyway I think I have it working pretty well, and I've tested it on all sort of mobs to make sure it works as expected. It seems ok until I get into certain boss encounters in 5 mans, where it will often show spells that cannot be interrupted as interruptible while the bar behind it indicates that it can't. Again I've tested on various barrens mobs, making sure to find a non-interrptible cast, as well as a non int. channeled spell, an interruptible cast and an interruptible channeled spell. I'm still pretty green when it comes to lua and programming in general and I'm wondering if I've done something wrong here. I'm particularly unsure about the proper use of parenthesis around the "and" and "or" operators.

    local cast_data = CastData(unit)
    local _,_,_,_,_,_,_,_,nonintcast = UnitCastingInfo(unit) 
    local _,_,_,_,_,_,_,nonintchan = UnitChannelInfo(unit)
    local friend = UnitIsFriend("player", unit)
    local r,g,b = 255,255,255
    local ir,ig,ib = 255,32,32
    local noir,noig,noib = 132,132,132
    local stopr,stopg,stopb = 132,132,132
    local maxstrlen = 30
    local opacity
    Outline()
    
    if cast_data then
      local spell,stop_message,target = cast_data.spell,cast_data.stop_message,cast_data.target
      local stop_time,stop_duration = cast_data.stop_time
      if stop_time then
       r,g,b = stopr,stopg,stopb
       stop_duration = GetTime() - stop_time
      elseif (nonintcast == true or nonintchan == true) and unit ~= "player" then
       r,g,b = noir,noig,noib
      else
       if not friend then 
        r,g,b = ir,ig,ib
       end
      end
    
      if (nonintcast ~= true and nonintchan ~= true and friend == nil) then
       opacity = .5
      else
       opacity = .25
      end
    
      Alpha(-(stop_duration or 0) + opacity)
    
      if stop_message then
       return "|cff%02x%02x%02x%s|r",r,g,b,stop_message
      else
       if strlen(spell) >= maxstrlen then
        return "|cff%02x%02x%02x%s|r",r,g,b,Abbreviate(spell)
       else
        return "|cff%02x%02x%02x%s|r",r,g,b,strupper(spell)
       end
     end
    end
    return ConfigMode()
    


    If anyone can see any major flaws in this or can help me understand why certain boss abilities would be inconsistent with my barrens testing results I would appreciate it. Thanks ; )

    P.S. the unit ~= "player" part is to prevent what appears to be a bug that occurs when you target yourself and cast a "cast" spell. This bug affects the bar color as well so I know that problem isn't an issue with just my luatext, but I've attempted to work around it by checking to see if the unit is the "player". That's a whole different issue though and I've posted a ticket about it (still pending review)
    Posted in: Unit Frames
  • 0

    posted a message on LuaTexts Official Thread
    I am a bit curious as to why cast_data.target doesn't seem to return anything. The documentation says it returns the target of the spell "if available".
    Posted in: Unit Frames
  • 0

    posted a message on LuaTexts Official Thread
    I've recently switched to PitBull4 from xperl and I miss a feature that would show on raid units when they were being resed and who was doing the resing. I've been attempting to come up with an luatext for casting that can do something like this but it suffers from two major flaws. First, it displays the name of the res target on the casters cast bar as opposed to showing the name of the reser on the units frame somewhere, and this isn't exactly ideal. Second, if the reser changes to a new target while the res is still casting it doesn't maintain the original target..it just flips over to the new target. I know I like to pick up my next res target while I'm still casting the previous.

    Here's a trimmed down version of what I've been trying:

    local cast_data = CastData(unit)
    local r,g,b = 255,255,255
    local reslist = {
    "Rebirth",
    "Revive",
    "Redemption",
    "Resurrection",
    "Ancestral Spirit",
    "Goblin Jumper Cables",
    "Goblin Jumper Cables XL",
    "Gnomish Army Knife",
    }
    
    if cast_data then
     local spell,stop_message,target = cast_data.spell,cast_data.stop_message,cast_data.target
     local stop_time,stop_duration = cast_data.stop_time
    
     for i=1,#reslist,1 do
      if spell == reslist[i] then
       return "|cff%02x%02x%02xRes %s|r",r,g,b,UnitName(unit.."-target")
      end
     end
    
    end
    
    


    I considered trying to use a global variable to set the target name, but then it occurred to me that id have to make a global variable for each reser in the raid somehow. And I don't want to start making too many global variables. However it would be possible to set a variable during only the first few ms of casting then stop for the rest of the duration of the cast by comparing cast_data.start_time with GetTime().

    I've tried googling and searching this thread but haven't found any examples. Any assistance would be very much appreciated, and I apologize if this has already been covered somewhere else.
    Posted in: Unit Frames
  • 0

    posted a message on PitBull 4.0
    I'm looking for a clean way to search for specific auras on the target and display the name of the aura if it exists with lua texts. After hours of smashing my head on a wall I've gotten as far as:

    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.

    local tmpr,tmpg,tmpb = 255,100,100
    local temp1 = UnitAura(unit,"Essence of the Blood Queen")
    local temp2 = UnitAura(unit,"Infest")
    local temp3 = UnitAura(unit,"Water Shield")
    local temp4 = UnitAura(unit,"Infest")
    if temp1 ~= nil then return '|cff%02x%02x%02x%s|r',tmpr,tmpg,tmpb,temp1
    elseif temp2 ~= nil then return '|cff%02x%02x%02x%s|r',tmpr,tmpg,tmpb,temp2
    elseif temp3 ~= nil then return '|cff%02x%02x%02x%s|r',tmpr,tmpg,tmpb,temp3
    elseif temp4 ~= nil then return '|cff%02x%02x%02x%s|r',tmpr,tmpg,tmpb,temp4
    


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


    *UPDATE*
    I worked it out, needed to use:

    for i=1,#aa,1 do
    
    Posted in: Unit Frames
  • To post a comment, please or register a new account.