View Single Post
08-09-20, 06:45 AM   #11
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Not sure. I'm not good with the secure handling of scripts.
I'd either track down exactly the events that lead to the construction of the frame and copy them
or I'd add checks if the frame exists before I use it which is always a good idea when you dont own a frame.

Lua Code:
  1. frameHandler:SetScript("OnEvent", function(self, event, ...) -- Hides/shows frames when leaving/entering combat
  2.   if PitBull4_Groups_Party then  
  3.     if event =="PLAYER_REGEN_DISABLED" then
  4.         inCombat = true
  5.         PitBull4_Groups_Party:Show()
  6.     else
  7.         inCombat = false
  8.         PitBull4_Groups_Party:Hide()
  9.     end
  10.   end
  11. end)
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote