Thread Tools Display Modes
07-16-11, 05:08 AM   #1
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Removing Blizzard raid frames without taint

Since patch 4.2, the option to hide the default Blizzard raid frames isn't saved, so we need to use addons for it. However, no matter what I try, I always get taint.

First I tried just this:

Code:
CompactRaidFrameManager:UnregisterAllEvents()
CompactRaidFrameManager.Show = F.dummy
CompactRaidFrameManager:Hide()
CompactRaidFrameContainer:UnregisterAllEvents()
CompactRaidFrameContainer.Show = F.dummy
CompactRaidFrameContainer:Hide()
But that got me taint every time I entered combat while in party/raid, due to the functions below which I thus decided to disable:

Code:
CompactUnitFrame_UpdateVisible = F.dummy
CompactUnitFrame_UpdateAll = F.dummy
Now I don't get taint anymore when entering combat, but I do get taint when I enter a vehicle while in combat since I've disabled those functions:

Code:
7/16 11:57:57.252  Global variable CompactUnitFrame_UpdateAll tainted by FreeUI - Interface\AddOns\FreeUI\scripts\unitframes.lua:207
7/16 11:57:57.252  Execution tainted by FreeUI while reading CompactUnitFrame_UpdateAll - Interface\FrameXML\CompactUnitFrame.lua:101
7/16 11:57:57.252  An action was blocked in combat because of taint from FreeUI - PetFrame:Show()
7/16 11:57:57.252      Interface\FrameXML\PetFrame.lua:49 PetFrame_Update()
7/16 11:57:57.252      Interface\FrameXML\PlayerFrame.lua:319 animPostFunc()
7/16 11:57:57.252      Interface\FrameXML\AnimationSystem.lua:22 Animation_UpdateFrame()
7/16 11:57:57.252      Interface\FrameXML\AnimationSystem.lua:35
I'm getting quite frustrated over this. Has anyone found a secure and efficient way to disable the raid frames?

Any help is appreciated.

Last edited by Haleth : 07-16-11 at 05:12 AM.
  Reply With Quote
07-16-11, 05:40 AM   #2
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
i use http://www.wowinterface.com/download...RaidFrame.html for that -it hides the Raid Manager and Raid Frames seperately if you want. But has a smal problem when joining/leaving groups while in combat...
  Reply With Quote
07-16-11, 06:56 AM   #3
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
I changed a bit in my hiding addon I created but its fairly straightforward:

Code:
local Addon = "TUSUI_Customs"
local function Meta(vaL)
	local text = GetAddOnMetadata(Addon, vaL)
	return text
end

local f = CreateFrame"Frame"
local db
f:RegisterEvent("ADDON_LOADED")
f:RegisterEvent("RAID_ROSTER_UPDATE")
f:RegisterEvent("PARTY_MEMBERS_CHANGED")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:RegisterEvent("PLAYER_ALIVE")
f:SetScript("OnEvent", function(self,event,...) 
	local arg1, arg2 = ...
	db = TUSUIDB
	if event == "ADDON_LOADED" and arg1 == Addon then
		if not IsAddOnLoaded("Blizzard_CompactRaidFrames") then
			LoadAddOn("Blizzard_CompactRaidFrames")
		end
		self:UnregisterEvent("ADDON_LOADED")
	elseif event == "PLAYER_ALIVE" or event == "RAID_ROSTER_UPDATE" or event == "PLAYER_ENTERING_WORLD" or event == "PARTY_MEMBERS_CHANGED" then
		TUSUI_RaidFramesCheck()
	end
end)

function TUSUI_RaidFramesCheck()
	if not db then db = TUSUIDB end
	if db.hideRaid then
		TUSUI_HideRaidFrames()
	else
		TUSUI_ShowRaidFrames()
	end
end

function TUSUI_HideRaidFrames()
	CompactRaidFrameManager_SetSetting("IsShown","0")
end

function TUSUI_ShowRaidFrames()
	CompactRaidFrameManager_SetSetting("IsShown","1")	
end
CompactRaidFrameManager_SetSetting("IsShown","1") is the global function that sets the raid frames hidden or not. This actually "clicks" the show / hide button.

On login / player alive I check for saved variables settings and depending on a true or false the raid frames are hidden without taints(since it uses the blizzard function).
  Reply With Quote
07-16-11, 08:35 AM   #4
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Thanks, I'll be trying that. Do you really need custom hide and show functions though? You could just do this:

Code:
local Addon = "TUSUI_Customs"
local function Meta(vaL)
	local text = GetAddOnMetadata(Addon, vaL)
	return text
end

local f = CreateFrame"Frame"
local db
f:RegisterEvent("ADDON_LOADED")
f:RegisterEvent("RAID_ROSTER_UPDATE")
f:RegisterEvent("PARTY_MEMBERS_CHANGED")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:RegisterEvent("PLAYER_ALIVE")
f:SetScript("OnEvent", function(self,event,...) 
	local arg1, arg2 = ...
	db = TUSUIDB
	if event == "ADDON_LOADED" and arg1 == Addon then
		if not IsAddOnLoaded("Blizzard_CompactRaidFrames") then
			LoadAddOn("Blizzard_CompactRaidFrames")
		end
		self:UnregisterEvent("ADDON_LOADED")
	elseif event == "PLAYER_ALIVE" or event == "RAID_ROSTER_UPDATE" or event == "PLAYER_ENTERING_WORLD" or event == "PARTY_MEMBERS_CHANGED" then
		TUSUI_RaidFramesCheck()
	end
end)

function TUSUI_RaidFramesCheck()
	if not db then db = TUSUIDB end
	if db.hideRaid then
		CompactRaidFrameManager_SetSetting("IsShown","0")
	else
		CompactRaidFrameManager_SetSetting("IsShown","1")
	end
end
  Reply With Quote
07-16-11, 08:54 AM   #5
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Haleth View Post
Thanks, I'll be trying that. Do you really need custom hide and show functions though? You could just do this:
They're global functions for my TUSUI_Customs addon so that I can use the same functions for a slash command in a different lua file.

You don't have to make custom functions.
  Reply With Quote
07-16-11, 11:43 AM   #6
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Haleth View Post
Code:
CompactRaidFrameManager:UnregisterAllEvents()
CompactRaidFrameManager.Show = F.dummy
CompactRaidFrameManager:Hide()
CompactRaidFrameContainer:UnregisterAllEvents()
CompactRaidFrameContainer.Show = F.dummy
CompactRaidFrameContainer:Hide()
But that got me taint every time I entered combat while in party/raid
I'm not sure why that specific code would taint

A lot of addons have been using exactly this code for years,
and I never encountered taint with it, or any error with the CompactUnitFrame stuff
For the rest, I don't have anything useful to add ..

The addon Tonyleila linked (which I wrote) is actually badly coded and has a higher chance of tainting stuff ><
  Reply With Quote
07-16-11, 12:05 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
The raid frames seem to be fragile at the moment. There are reports (including my own experience) that they are tainting and causing action blocked messages, blaming it on random addons. My UI keeps blaming my Awwwww! addon, even though all it does is play a sound on your death. I'm sure if I disabled it, a different addon would be blamed, as others have found to be the case.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
07-16-11, 12:08 PM   #8
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
Yeah, I've thrown a simple script into the bottom of addon X and it's blaming the taint on addon Y which only handles volume profiles and nothing else. Was confused for a while.
__________________
"Someday we'll look back on this, laugh nervously and quickly change the subject."

"The truth is like sunlight: people used to think it was good for you."
  Reply With Quote
07-16-11, 12:28 PM   #9
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Yeah, I'm getting taint from the most trivial code these days. It annoys the hell out of me, I don't want to see a taint error every time I enter combat in a raid (and I don't want to resort to a solution like simply removing the taint message).
  Reply With Quote
07-16-11, 01:11 PM   #10
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
You can stop those raid frames from loading by disabling both Blizzard_CUFProfiles and Blizzard_CompactRaidFrames. You won't be able to place raid markers without them, though.
lua Code:
  1. /run DisableAddOn"Blizzard_CUFProfiles"DisableAddOn"Blizzard_CompactRaidFrames"ReloadUI()
  Reply With Quote
07-16-11, 04:20 PM   #11
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Raid markers are fairly essential to me (I mean seriously, they glow) so that's not an option I can use unfortunately.

I disabled the PetFrame_Update function now before trying it with the Blizz option method, and everything seems to actually work fine now. I'll check on a hunter tomorrow to see if I broke anything.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Removing Blizzard raid frames without taint


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