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...shot.jpg 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, 08:17 PM   #3
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   #4
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   #5
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   #6
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-02-10, 10:56 AM   #7
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   #8
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

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