Hello Folks,
i used to have a weakaura for my ice barrier where the color of the icon was changing depending on the %pf the shield left. The custom function for the color stuff was :
value5 used to give the max value of the shield but it's now always returning 1. is there another way of getting the max value of a shield or am i missing something ?Code:function(progress, r1, g1, b1, a1, r2, g2, b2, a2) local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId, canApplyAura, isBossDebuff, value1, value2, value3,value4,value5 = UnitBuff("player", "Ice Barrier"); if value4 ~= nill then local percent = value4/value5 if percent < 0.9 and percent>=0.7 then return 0, 1, 0, 1 end if percent < 0.7 and percent>=0.45 then return .9, 1, 0, 1 end if percent < 0.45 and percent>=0.2 then return .8, .5, 0, 1 end if percent < 0.2 then return 1, 0, 0, 1 end end return r1,g1,b1, a1 end