From e14725974ae65b7d4d150b46796f9fbd1032f246 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 26 Aug 2008 05:43:00 +0000 Subject: [PATCH] - fixed own buffs/debuffs in the TargetInfo module overlapping the icons next to them --- modules/TargetInfo.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua index 164c5a3..14ccc1b 100644 --- a/modules/TargetInfo.lua +++ b/modules/TargetInfo.lua @@ -626,6 +626,7 @@ end function TargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type) local lastX = 0 + local lastBuffSize = 0 for i = 1, IceCore.BuffLimit do if (not buffs[i]) then @@ -664,19 +665,17 @@ function TargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type) buffSize = self.moduleSettings.ownBuffSize end - local pos = math.fmod(i, self.moduleSettings.perRow) - if (pos == 0) then - pos = self.moduleSettings.perRow - elseif (pos == 1) then - lastX = (((pos-1) * buffSize) + pos) * direction - end - - local x = lastX + (buffSize * direction) + local x = lastX + lastBuffSize lastX = x + lastBuffSize = (buffSize * direction) local y = math.floor((i-1) / self.moduleSettings.perRow) * math.max(self.moduleSettings.buffSize, self.moduleSettings.ownBuffSize) * -1 buffs[i]:ClearAllPoints() - buffs[i]:SetPoint("TOP", x, y) + if direction < 0 then + buffs[i]:SetPoint("TOPRIGHT", x, y) + else + buffs[i]:SetPoint("TOPLEFT", x, y) + end buffs[i].icon:ClearAllPoints()