can anyone tell, why does this code not working? Im trying to get the frame load if the party unit has threat >0
...
...
table.insert(self.__elements, function(self, _, unit, event, ...)
local status = UnitThreatSituation(unit)
if (unit == 'party1') or (unit == 'party2') or (unit == 'party3') or (unit == 'party4') then
if status and status >0 then
frame_3texture:SetTexture(m.textures.frame_3)
frame_3texture:Show()
else
frame_3texture:Hide()
end
end
end)
frame_3texture:SetPoint('CENTER', self, 'CENTER', 22, -2)
frame_3texture:SetSize(256,128)
frame_3texture:SetTexCoord(1, 0, 0, 1)
|
But It just does nothing