Thread Tools Display Modes
06-27-08, 09:18 PM   #1
iindigo
An Aku'mai Servant
 
iindigo's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 32
Help needed with pets and frames...

I'm working on an addon that needs to be able to hide one of its frames based on whether or not the player's pet is alive. As far as I can tell, this can be done with the event UNIT_PET, but for some reason information on how to use this event is sparse at best.

Anybody mind shedding some light on the subject?


Thanks!
  Reply With Quote
06-27-08, 09:34 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
UNIT_PET fires whenever you gain/lose/change a pet. So you could use that in conjunction with the UnitExists("pet") function.

edit: or the frame could be parented to the pet frame, which would make it show/hide if the pet frame is shown/hidden. This would make it difficult to support numerous unit frame addons, however.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
06-28-08, 05:18 PM   #3
iindigo
An Aku'mai Servant
 
iindigo's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 32
Originally Posted by Seerah View Post
UNIT_PET fires whenever you gain/lose/change a pet. So you could use that in conjunction with the UnitExists("pet") function.

edit: or the frame could be parented to the pet frame, which would make it show/hide if the pet frame is shown/hidden. This would make it difficult to support numerous unit frame addons, however.
Thanks a lot, that did the trick!
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Help needed with pets and frames...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off