Thread Tools Display Modes
08-02-10, 10:52 AM   #1
Stusteh
A Murloc Raider
Join Date: Jan 2009
Posts: 8
Default aura help

I was trying out oUF_Faith and decided I wanted the player auras on the frame instead of somewhere else. To do this i just copied the code for the target auras and placed it in with the player code...Click image for larger version

Name:	shot.jpg
Views:	269
Size:	296.8 KB
ID:	4668 The problem is it didn't get rid of blizzards default aura frames.


Code:
		self.Buffs = CreateFrame('Frame', nil, self)
		self.Buffs:SetPoint('LEFT', self, 'LEFT', -22, -0)
		self.Buffs:SetHeight(20 * 2)
		self.Buffs:SetWidth(240)
		self.Buffs.num = 11
		self.Buffs.size = 19
		self.Buffs.spacing = 2
		self.Buffs.initialAnchor = 'LEFT'
		self.Buffs['growth-x'] = 'LEFT'
		self.Buffs['growth-y'] = 'DOWN'

		self.Debuffs = CreateFrame('Frame', nil, self)
		self.Debuffs:SetPoint('BOTTOM', self, 'BOTTOM', 106, -33)
		self.Debuffs:SetHeight(20 * 2)
		self.Debuffs:SetWidth(240)
		self.Debuffs.num = 5
		self.Debuffs.size = 30
		self.Debuffs.spacing = 2
		self.Debuffs.initialAnchor = 'BOTTOM'
		self.Debuffs['growth-x'] = 'LEFT'
		self.Debuffs['growth-y'] = 'DOWN'
		self.Debuffs.onlyShowPlayer = True
  Reply With Quote
08-02-10, 10:54 AM   #2
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
I guess you mean the buffs in the top right corner?

Code:
		local BlizzFrame = _G['BuffFrame']					-- get the default Blizzard BuffFrame
		BlizzFrame:UnregisterEvent('UNIT_AURA')				-- Unregister the event
		BlizzFrame:Hide()									-- hide the default Blizzard BuffFrame

		BlizzFrame = _G['TemporaryEnchantFrame']
		BlizzFrame:Hide()
		BlizzFrame:SetScript('OnUpdate', nil)
__________________
  Reply With Quote
08-02-10, 10:56 AM   #3
Stusteh
A Murloc Raider
Join Date: Jan 2009
Posts: 8
Do i just throw that in above it? I really don't know what i am doing.


EDIT: nvm thanks a ton

Last edited by Stusteh : 08-02-10 at 10:59 AM.
  Reply With Quote
08-02-10, 11:02 AM   #4
Stusteh
A Murloc Raider
Join Date: Jan 2009
Posts: 8
Ahh one more question. I forgot to throw the temp enchant frame on there. Is there a quick fix for that?
  Reply With Quote
08-02-10, 08:17 PM   #5
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Code:
BlizzFrame:Hide()
Question for you Mishback, or anyone else, why use

BlizzFrame:UnregisterEvent('UNIT_AURA')
? I'm just curious, because the BlizzFrame:Hide() works alone, does it create memory problems?
  Reply With Quote
08-02-10, 11:29 PM   #6
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Blizzard registered its buff-frame to this event to catch all the buffs/debuffs-stuff going on.
With this event the default-Blizzard-code is triggered. But since we're hiding the Blizzard-frame anyway, why we should keep the stuff runniing in background? So I unregister the event, which results in Blizzard's code NOT being triggered, so less CPU cycles are used on this.
__________________
  Reply With Quote
08-03-10, 01:23 AM   #7
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Mischback View Post
Blizzard registered its buff-frame to this event to catch all the buffs/debuffs-stuff going on.
With this event the default-Blizzard-code is triggered. But since we're hiding the Blizzard-frame anyway, why we should keep the stuff runniing in background? So I unregister the event, which results in Blizzard's code NOT being triggered, so less CPU cycles are used on this.
Okay cool, thanks Mischback. I was merely curious

So I want to unregister the weapon enchant event as well
  Reply With Quote
08-03-10, 02:24 AM   #8
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
There is no weapon enchant-event...
Have a look nto the FrameXML-code. TempEnchants are checked with an OnUpdate-function. This is the script I set to 'nil' in my code-snippet.
__________________
  Reply With Quote
08-04-10, 08:36 AM   #9
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Mischback View Post
This is the script I set to 'nil' in my code-snippet.
Hiding a frame with an OnUpdate script on it will pause/stop the script.
  Reply With Quote
08-04-10, 09:34 AM   #10
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by p3lim View Post
Hiding a frame with an OnUpdate script on it will pause/stop the script.
Oh, nice... Wasn't aware of that... Thanks! You never run out of things to learn!
__________________
  Reply With Quote
08-13-10, 11:49 PM   #11
Taroven
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 49
Originally Posted by Mischback View Post
There is no weapon enchant-event...
Have a look nto the FrameXML-code. TempEnchants are checked with an OnUpdate-function. This is the script I set to 'nil' in my code-snippet.
Little late here, but hey, I'm bored. I always thought it was odd how they did that.

Random somewhat-related-but-irrelevant-in-context info about the bolded quote:

UNIT_INVENTORY_CHANGED is fired when temporary enchants are applied, removed, or altered. However, there's a caveat: Immediately on a fresh enchant or refresh, GetWeaponEnchantInfo() will return whether or not a weapon is enchanted - but it usually won't provide an accurate expiration time (mostly zero, sometimes the previous enchant duration on a refresh, and very rarely the correct time).

So if you're looking for enchant info with an accurate duration, call GetWeaponEnchantInfo() immediately on UNIT_INVENTORY_CHANGED, and if enchant info is found check it again about a second later via OnUpdate for the expiration time. It's a bit clunky, but also completely accurate and saves a few cycles when enchants aren't present.
__________________
Former author of EventHorizon Continued and Other Releases.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Default aura help


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