Get pet summon spell ID
Hi all
I want to be able to determine the summon spellID from the petGUID. Right now I can get the pet summon spellID only when I track the UNIT_SPELLCAST_SUCCEEDED event. Here is my chunk and its result; Here is all the pet details in-game using the WoWLua addon; I have read up on strings and wonder if I can strip and convert the petGUID to the spellID, yet have not yet been successful. Is there a way to capture the pet summon spellID other than summoning? |
Quote:
I have no idea WHY you want to map from a GUID to a SpellID, like in this thread and the other thread I did explain how to do that anyway there, by mapping from SummonSpellID to
Lua Code:
Code:
["BattlePet-0-00000338F99E"] = 10673, |
Hi Ketho
Thanks for your post, and for the link to the wowtools database, something that I can see will be very useful in the future. I have a button that will get the petGUID from the cursor on drop. From the petGUID I want to add the following pet details to a table; Lua Code:
Testing with Abyssal Slitherling I can get the following on drop; Lua Code:
However I can only get the petSummonSpellID by tracking the UNIT_SPELLCAST_SUCCEEDED event; Lua Code:
I want to be able to get the petSummonSpellID without having to summon the pet itself. Using the csv table from the wowtools database the Abyssal Slitherling does not have a corresponding petSummonSpellID; so even if I use the database in a lua file and map the petSpeciesID I get a zero instead of the correct 118301. Is there a reliable way to get either the petSummonSpellID without having to track the UNIT_SPELLCAST_SUCCEEDED event, or, getting a full and complete pet database? |
All pets obtained from pet battles use the same summonSpellID so you cannot use this ID for that purpose
https://www.wowhead.com/spell=118301/summon-battle-pet Quote:
You still didn't explain why you need it and how you're going to use it |
Hi Ketho
Thanks for your post. I did not realise that all pets that we can catch share the same summonSpellID. Also after testing the spellCastGUID, (arg2), from UNIT_SPELLCAST_SUCCEEDED these too do not match as each summon has a unique spellCastGUID even if it is the exact same pet that is summoned. As for my goal; I wish to be able to add a pet to a table, and when a UNIT_SPELLCAST_SUCCEEDED event fires if the pet is listed it will send a customisable emote to chat. I figured that tracking the spellID, (arg3), from UNIT_SPELLCAST_SUCCEEDED I could send the appropriate customisable emote for that pet to chat. As it stands right now I can filter out all pets that have a zero petSummonSpellID from the wowtools database to only allow pets with a unique petSummonSpellID to be added to the table. If there is a better solution I would be grateful for some direction. |
Quote:
Hook the summon pet API to get the GUID and map it to a speciesID. This is just a minimal example without e.g. formatting the pet name in the message with "%s" This is why I keep telling you to always explain what you're trying to do for the bazillionth time Lua Code:
|
Hi Ketho
Thanks for your post. In you chunk you have; Lua Code:
Is this not just a mapped table, as you have to have the petSpeciesID to compare to the summoned pet? |
That is for the custom messages. You do know how to look up a speciesID?
https://wowpedia.fandom.com/wiki/BattlePetSpeciesID |
Hi Ketho
Yes getting the speciesID is pretty easy, though I prefer the BattlePetSpecies.db2 on wowtools database that you linked; once again a great tool that you introduced to me. Thanks for your help. |
All times are GMT -6. The time now is 06:11 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI