Originally Posted by Walkerbo
I want to be able to determine the summon spellID from the petGUID.
|
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
- SpeciesID with BattlePetSpecies.db2
- Pet GUIDs with C_PetJournal.GetPetInfoByIndex
Lua Code:
local SpeciesIDtoSummonSpellID = {
[39] = 4055, -- Mechanical Squirrel
[40] = 10673, -- Bombay Cat
[41] = 10674, -- Cornish Rex Cat
}
local guids = {}
local _, numOwnedPets = C_PetJournal.GetNumPets()
for i = 1, numOwnedPets do
local guid, speciesID = C_PetJournal.GetPetInfoByIndex(i)
guids[guid] = SpeciesIDtoSummonSpellID[speciesID]
end
DevTools_Dump(guids)
Code:
["BattlePet-0-00000338F99E"] = 10673,
["BattlePet-0-00000338F9A3"] = 10674,
["BattlePet-0-00000338F94E"] = 4055
But you still didn't explain what you're
actually trying to do
https://xyproblem.info/