DismissCompanion("CRITTER") not work anymore ?
Hi all,
I am slowly check my simple addons to run smoothly on patch 6.0.x. I am now curious why this function DismissCompanion("CRITTER") is not working anymore for me ... even if I have found in the api changes no evidence that it should be broken/removed. Lua Code:
Is it broken the function or I am doing something wrong ? Thanks very much for your help and attention. |
The companion API has been deprecated for a while. You should use the actual pet journal functions.
/run C_PetJournal.SummonPetByGUID(C_PetJournal.GetSummonedPetGUID()) |
Hi Phanx,
it is always a great pleasure to read you. I think I am usign your code right now "to summon" the pet, the problem is that I am not able to find now the right function to dismiss it once summoned :-) I used: http://wowprogramming.com/docs/api/DismissCompanion and it worked nicely in 5.4.x, but not anymore :-/ I post the entire addon so you can understand better: Lua Code:
Thanks really very much for your time. |
If you look at the default UI's /dismisspet command, you'll see that it calls SummonPetByGUID with the currently summoned pet's GUID to dismiss it (the same as Phanx's code).
|
Quote:
Sorry guys, now I have understood... I am a little bit slowly :-)) Fixed and it works like a charm with the Phanx code (as usual) :-)) Thanks again at all of you. |
I noticed two of the same issue right away. You are missing the word local in front of lines 10 and 13.
|
All times are GMT -6. The time now is 07:10 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI