01-12-16, 04:51 AM
|
#12
|
A Pyroguard Emberseer
Join Date: Mar 2010
Posts: 1,290
|
Originally Posted by SDPhantom
You can use RegisterAttributeDriver() to securely swap the unit of a SecureUnitFrame. Just use this to replace the entire self.frame.state block.
Code:
RegisterAttributeDriver(self.frame,"unit","[vehicleui] player; pet")
Updating the frame when this happens can be done with an OnAttributeChanged script hook. Since I highly doubt you're doing anything protected in PlayerPet:UpdateDisplay(), you can just call that.
Code:
self.frame:HookScript("OnAttributeChanged",function() PlayerPet:UpdateDisplay(); end)
|
Thanks, gonna try it.
|
|
|