WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   oUF_Abu Totems problem (https://www.wowinterface.com/forums/showthread.php?t=52630)

evilbib 08-19-15 02:09 AM

oUF_Abu Totems problem
 
Hey,

since the author isn't that active anymore I try my luck here.

This is the totem module for shamans on oUF_Abu:

Lua Code:
  1. function ns.classModule.SHAMAN(self, config, uconfig)
  2.     if self.cUnit ~= "player" or not config.SHAMAN then return; end
  3.     TotemFrame:ClearAllPoints()
  4.     TotemFrame:SetPoint('TOP', self.Power, 'BOTTOM', -6, -0)
  5.     TotemFrame:SetParent(self)
  6.     TotemFrame:SetScale(uconfig.scale * 0.65)
  7.     TotemFrame:Show()
  8.  
  9.     for i = 1, MAX_TOTEMS do
  10.         local _, totemBorder = _G['TotemFrameTotem'..i]:GetChildren()
  11.         ns.PaintFrames(totemBorder:GetRegions())
  12.  
  13.         _G['TotemFrameTotem'..i]:SetFrameStrata('LOW')
  14.         _G['TotemFrameTotem'..i..'IconCooldown']:SetAlpha(0)
  15.         _G['TotemFrameTotem'..i..'IconCooldown'].noCooldownCount = true -- No OmniCC
  16.  
  17.         _G['TotemFrameTotem'..i..'Duration']:SetParent(self)
  18.         _G['TotemFrameTotem'..i..'Duration']:SetDrawLayer('OVERLAY')
  19.         _G['TotemFrameTotem'..i..'Duration']:ClearAllPoints()
  20.         _G['TotemFrameTotem'..i..'Duration']:SetPoint('BOTTOM', _G['TotemFrameTotem'..i], 0, 3)
  21.         _G['TotemFrameTotem'..i..'Duration']:SetFont(config.fontNormal, 10, 'OUTLINE')
  22.         _G['TotemFrameTotem'..i..'Duration']:SetShadowOffset(0, 0)
  23.     end
  24. end

But this is what I end up with:



Basically the timer sometimes stays there and "freezes". If I only use one totem at a time it is fine, but as soon as I use more the duration timer goes crazy.

Anybody who can help me with this annoying bug?

Thanks in advance.

lightspark 08-19-15 03:42 AM

You have parenting issue, hehe... Your timer is parented to a totem frame itself, but not to particular totem widget.

Lua Code:
  1. _G['TotemFrameTotem'..i..'Duration']:SetParent('TotemFrameTotem'..i)

This should fix your problem.

evilbib 08-19-15 11:10 AM

Quote:

Originally Posted by lightspark (Post 310436)
You have parenting issue, hehe... Your timer is parented to a totem frame itself, but not to particular totem widget.

Lua Code:
  1. _G['TotemFrameTotem'..i..'Duration']:SetParent('TotemFrameTotem'..i)

This should fix your problem.

These kids nowadays :P

Thank you very much will try that asap.

evilbib 08-19-15 02:30 PM

One problem with this is that the duration timer is now behind the icon, anyway to fix this?

edit:
this should do it
Lua Code:
  1. _G['TotemFrameTotem'..i..'Duration']:SetParent(totemBorder)


All times are GMT -6. The time now is 06:01 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI