Thread Tools Display Modes
01-20-16, 07:07 AM   #1
EvilMaddness
An Aku'mai Servant
 
EvilMaddness's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 33
Exclamation Mark of the Thunderlord giving me lua code probs

Hey Everyone!
I have this lua code I been using in WeakAuras that will grab the color in the display color box. And when the timer reaches the warning_time then it changes the color by grabbing the color in the animation color box.
So this code works for mostly for any buff or debuff but when I tried it for " Mark of the Thunderlord "
( the weapon enchant buff ) nothing happend. I asked around about it and was told that Blizzard made the buff unknown instead of player? I'm not sure what that means but it's keeping the lua code from working right on it.

I messed with the code a bit but so far I have been unlucky getting it to work for that one buff.
( " Mark of the Thunderlord " ) So does Anyone know what command might work instead and can explain to me why this one buff doesn't work with this lua code when the rest do?
I also wanted to point out if I check Own Only on the trigger for Thunderlord it won't even appear after. I have to keep it unchecked.


Code:
function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
    -- Set the debuff and threshold time here:
    local debuff_name, warning_time = "Mark of the Thunderlord", 4
    
    local _,_,_,_,_,_,expires, etc = UnitAura("PLAYER", debuff_name,
    nil, "PLAYER|HELPFUL")
    if expires ~= nil then
        local time_left = expires - GetTime()
        if time_left < warning_time then
            return r2, g2, b2, a2
        end
    end
    return r1,g1,b1, a1
end
__________________
The Maddness Within lua
  Reply With Quote
01-20-16, 07:30 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Weapon enchants are handled by an entirely different API, see GetWeaponEnchantInfo().
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Mark of the Thunderlord giving me lua code probs


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off