Thread Tools Display Modes
01-19-11, 07:43 PM   #1
MMOGames
A Murloc Raider
 
MMOGames's Avatar
Join Date: Apr 2008
Posts: 8
Cancel Aura

There is no way to cancelaura by right clicking the buff using Ouf anymore?
  Reply With Quote
01-20-11, 03:24 AM   #2
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
With 4.0.6 we will be able to when out of combat. Right now, no.
  Reply With Quote
01-20-11, 04:03 AM   #3
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
You could kinda worka around that by overwriting the function UpdateAllBuffAnchors (that's not protected), and anchor all the buffs to your player frame, make them look the way you want, hide some and stuff... then they'll be right-clickable even in combat.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote
01-22-11, 10:58 AM   #4
MMOGames
A Murloc Raider
 
MMOGames's Avatar
Join Date: Apr 2008
Posts: 8
Originally Posted by Pyrates View Post
You could kinda worka around that by overwriting the function UpdateAllBuffAnchors (that's not protected), and anchor all the buffs to your player frame, make them look the way you want, hide some and stuff... then they'll be right-clickable even in combat.
Can you give me an example?
  Reply With Quote
01-22-11, 10:59 AM   #5
MMOGames
A Murloc Raider
 
MMOGames's Avatar
Join Date: Apr 2008
Posts: 8
Originally Posted by Freebaser View Post
With 4.0.6 we will be able to when out of combat. Right now, no.
Isnt there a workaroung since i dont want the addon to cancel for me. I want to click and cancel it
  Reply With Quote
01-22-11, 04:53 PM   #6
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You have to use the SecureAuraHeader. There isn't an element for it in oUF yet, because the API is cumbersome to work with, and it doesn't provide too much flexibility for layout others.

Right now it's better to manage it all from the layout. Unless I get some great idea for a solution.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
01-24-11, 07:15 AM   #7
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Originally Posted by MMOGames View Post
Can you give me an example?
Ok, this is c&p from a working addon, so it might not actually work, but give you the idea. I think I was wrong with UpdateAllBuffAnchors being not protected, by one can securehook it and then just redo everything it does anyways. The lines marked with "--SAF" are new code, they change the anchors because some of the buffs might be hidden, and you don't want an empty space (this is done in another portion of the code). But what you can do is just replace the "SetPoint" executions by some that you like (maybe you'd need to use ClearAllPoint() first) and anchor the buffs to your ouf_player frame:

Code:
local function MyBuffFrame_UpdateAllBuffAnchors()
	local buff, previousBuff, aboveBuff;
	local numBuffs = 0;
	local hidden = 0; -- SAF
	local slack = BuffFrame.numEnchant or 0
	local inde = 0;
	
	if ( BuffFrame.numConsolidated > 0 ) then
		slack = slack + 1;	-- one icon for all consolidated buffs
	end
	
	for i = 1, BUFF_ACTUAL_DISPLAY do
		buff = _G["BuffButton"..i];
		if not buff:IsShown() then --SAF
			hidden = hidden + 1 --SAF
			numBuffs = numBuffs + 1; --SAF
		else
			if ( buff.consolidated ) then	
				if ( buff.parent == BuffFrame ) then
					buff:SetParent(ConsolidatedBuffsContainer);
					buff.parent = ConsolidatedBuffsContainer;
				end
			else
				numBuffs = numBuffs + 1;
				inde = numBuffs + slack;
				if ( buff.parent ~= BuffFrame ) then
					buff.count:SetFontObject(NumberFontNormal);
					buff:SetParent(BuffFrame);
					buff.parent = BuffFrame;
				end
				buff:ClearAllPoints();
				if ( (inde > 1) and (mod(inde, BUFFS_PER_ROW) == 1) ) then
					-- New row
					if ( inde == BUFFS_PER_ROW+1 ) then
						buff:SetPoint("TOP", ConsolidatedBuffs, "BOTTOM", 0, -BUFF_ROW_SPACING);
					else
						buff:SetPoint("TOP", aboveBuff, "BOTTOM", 0, -BUFF_ROW_SPACING);
					end
					aboveBuff = buff;
				elseif ( inde == 1 ) then
					buff:SetPoint("TOPRIGHT", BuffFrame, "TOPRIGHT", 0, 0);
				else
					if ( numBuffs == 1 ) then
						if ( BuffFrame.numEnchants > 0 ) then
							buff:SetPoint("TOPRIGHT", "TemporaryEnchantFrame", "TOPLEFT", -5, 0);
						else
							buff:SetPoint("TOPRIGHT", ConsolidatedBuffs, "TOPLEFT", -5, 0);
						end
					else
						buff:SetPoint("RIGHT", previousBuff, "LEFT", -5, 0);
					end
				end
				previousBuff = buff;
			end
		end --SAF
	end

	if ( ConsolidatedBuffsTooltip:IsShown() ) then
		ConsolidatedBuffs_UpdateAllAnchors();
	end
end

hooksecurefunc("BuffFrame_UpdateAllBuffAnchors",MyBuffFrame_UpdateAllBuffAnchors)
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Cancel Aura


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