WoWInterface - View Single Post - How do I prevent a frame from showing during combat
View Single Post
10-22-19, 02:54 AM   #5
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 61
I found a method that works, after a little epiphany...

First, I can't reassign the function for Show() for the specific frame. It became a script error, probably due to the nature of the function.
Trying to Hook a Script or modify the OnShow script to hide the frame, the OnShow Script and the HookScript() attachment run prior to setting the frame to show, so the frame will show.
I didn't try disabling the WoW UI button to open the Spellbook. The reason is that I will also have to disable the key binding, which involves a protected function that I doubt works in a restricted environment.

What I forgot, if the parent frame is hidden, the child frames are hidden regardless if shown. Therefore, I have a blank frame that will always stay hidden set to be SpellBookFrame's parent when PLAYER_REGEN_DISABLED and then restore SpellBookFrame's parent to UIParent when PLAYER_REGEN_ENABLED. This works.

Last edited by LBXZero : 10-22-19 at 03:00 AM.
  Reply With Quote