View Single Post
08-27-12, 01:54 PM   #2
Maul
Ion Engines, Engage!
 
Maul's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 401
You could use the [petbattle] macro conditional that others of us requested for just this sort of thing -

Code:
local frame = CreateFrame("Frame", nil, UIParent, "SecureHandlerStateTemplate")

RegisterStateDriver(frame, "petbattle", "[petbattle] dostuff1; [nopetbattle] dostuff2")

frame:SetAttribute("_onstate-petbattle", [[
         if (self:GetAttribute("state-petbattle") == "dostuff1") then
              --do stuff
         elseif (self:GetAttribute("state-petbattle") == "dostuff2") then
              -- do stuff
         end
]])
__________________

Twitter: @IonMaul | Windows Live: [email protected] | Google Talk: [email protected]

Last edited by Maul : 08-27-12 at 01:58 PM.
  Reply With Quote