Quantcast
oUF_Abu Totems problem - WoWInterface
Thread Tools Display Modes
08-19-15, 02:09 AM   #1
evilbib
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 30
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.

Last edited by evilbib : 08-19-15 at 02:16 AM.
  Reply With Quote
08-19-15, 03:42 AM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 330
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.
__________________

Last edited by lightspark : 08-19-15 at 03:52 AM.
  Reply With Quote
08-19-15, 11:10 AM   #3
evilbib
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 30
Originally Posted by lightspark View Post
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.

Last edited by evilbib : 08-19-15 at 02:04 PM.
  Reply With Quote
08-19-15, 02:30 PM   #4
evilbib
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 30
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)

Last edited by evilbib : 08-19-15 at 02:43 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF_Abu Totems problem

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off