Hey dear PPL on here!
Some Days ago i had to discover that WeakAuras is to Strong for my Computer, so i made the plan to customise sFilter to my liking.
I wanted to give an option to show icons desaturated when not applied to my target ...
So i edited some code:
config-file (gray=true indicated that the spell should be shown desaturated when not applied)
Lua Code:
{spellId = 774 ,size = 32, unitId = "target", gray=true, isMine = 1, filter="HELPFUL", setPoint = {"CENTER",UiParent,"Center",slot1,firstrow}},
Lua Code:
local affectingCombat = UnitAffectingCombat("player");
...
if(not self.found) then
if data.gray == true and (not duration) and affectingCombat then
self.icon:SetTexture(spellIcon)
self.count:SetText("")
self.cooldown:Show()
self:SetAlpha(.5)
else
self:SetAlpha(0)
self.icon:SetTexture(spellIcon)
self.count:SetText("")
self.cooldown:Hide()
end
My knowledge in programming explains it to me like If not applied && gray=true && no duration(nearly the same as not applied && UnitAffectingCombat("player") then show icon at .5 Alpha otherwise don't show at all.
For some reason the UnitAffectingCombat doesn't fire at all. So whenever i log in, the spells are shown at .5 Alpha. In Combat, the duration is shown when i change target, which somehow is nice (e.g. on Lifebloom). But what really bothers me, is that it is shown although i'm not in combat.
Anyone know an explanation why the UnitAffectingCombat isn't working?
greetings!