Hello
I want to increase the size of target buffs if the target is enemy, and leave them normal if the target is friendly.
I am adding this code into where size for target buffs is defined:
Code:
if UnitIsEnemy("player","target") then b.size = 50 else b.size = 24 end
for example, in ouf skaarj it becomes:
Code:
if cfg.aura.target_buffs then
local b = CreateFrame('Frame', nil, self)
-- b.size = 24
if UnitIsEnemy("player","target") then b.size = 50 else b.size = 24 end
b.spacing = 4
b.num = cfg.aura.target_buffs_num
b:SetSize(b.size*b.num/2+b.spacing*(b.num/2-1), b.size)
b:SetPoint('TOPLEFT', self, 'TOPRIGHT', 5, 0)
b.initialAnchor = 'TOPLEFT'
b['growth-y'] = 'DOWN'
b.PostCreateIcon = auraIcon
b.PostUpdateIcon = PostUpdateIcon
self.Buffs = b
end
I also check that the target is properly identified as enemy by testing my if statement in a custom weakauras script. But my aura icons are always small. So far, I have tried modifying ouf_skaarj and ouf_drk_fanupdate using the if statement above but it did not work.
Is this a design limitation or is my code is a wrong one?
Thanks and regards