Quantcast WoWInterface - View Single Post - Hiding SexyCooldown when out of combat...
View Single Post
02-26-13, 06:48 AM   #4
A Deviate Faerie Dragon
Join Date: Jan 2013
Posts: 18
To be more specific I posted the code I edited according to your instructions, I simply copy and pasted the entire LUA file after using that website provided. On an additional note just to be as thorough as possible, I did check to see if the add-on created was actually loaded in wow multiple times. It is on, however the memory usage is 0. Not sure if that means anything, Id think it would use something no matter how small but that's just what i thought, doesn't necessarily mean anything.

-- This file is loaded from "SexyCooldownHideOOC.toc"

-- Add frames to hide in this table:
local FramesToHide = {
	["SexyCooldown2Bar 1"] = "PLAYER_REGEN_ENABLED", -- Show out of combat
	["SomeOtherFrame"] = "PLAYER_REGEN_DISABLED", -- Show in combat

local CombatHider = CreateFrame("Frame")
CombatHider:SetScript("OnEvent", function(self, event)
	for frameName, showEvent in pairs(FramesToHide)
		local frame = _G[frameName]
		if frame then
			frame:SetShown(event == showEvent)
  Reply With Quote