Hi, I am using buttons with scripts like "ToggleSpellBook("spell") to toggle Blizzard Frames but this cannot be used in Combat because it causes crazy Lua errors due to Taint of my code being linked to Blizzards own functions. I am not sure if there is a safe way of toggling a spell book in combat. Does anyone know anything about this or has had a similar issue in the past?
Thanks!
I could block the button from working in combat but seems a shame when the keybind for opening the spell book can be used in combat which would make the button a lot less useful.
- - - Updated - - -
Also "/run ToggleFrame(SpellBookFrame)" or in a Lua file does not work while in Combat either unless the frame has been previously opened before a reload of the UI :/
- - - Updated - - -
Fixed the problem, the only way I could find out how to do it was to include:
ToggleFrame(SpellBookFrame)
ToggleFrame(SpellBookFrame)
In a PLAYER_ENTERING_WORLD event, probably not the best solution as I am worried what would happen if I reloaded the UI while in combat..