Thread Tools Display Modes
04-02-21, 08:19 PM   #1
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Getting pet details from a petGUID

Hi all

I am trying to get pet details from a cursor drop onto a button.

For the pet I have been testing with the Lil' XT;
Lua Code:
  1. cursorType, petGUID = GetCursorInfo()
  2. print(cursorType, petGUID)
  3. --  resulting print -- battlepet BattlePet-0-0000003D1B7D
The issue I am having is that I cannot seem to find a function that uses the petGUID to get all the pet details.

Is there a way of getting all the pet details using the petGUID?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-03-21, 11:17 AM   #2
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
I use C_PetJournal.GetPetInfoByPetID for handling pets on action bars, maybe that's what you're looking for.
  Reply With Quote
04-03-21, 09:54 PM   #3
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi sezz

I have discovered that Blizz changed their pet functions to use the "petGUID" instead of the "petID".

So even though the documentation still uses the "petID" terminology it is actually the "petGUID" that should be used.

Now that I have those details I need to get the pet summon spellID, for some reason this is also being a tricky one to resolve.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-03-21, 11:26 PM   #4
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
Did you try it?

Edit: Still works:

Last edited by sezz : 04-03-21 at 11:31 PM.
  Reply With Quote
04-04-21, 08:54 AM   #5
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Originally Posted by Walkerbo View Post
Now that I have those details I need to get the pet summon spellID, for some reason this is also being a tricky one to resolve.
C_PetJournal.SummonPetByGUID

C_PetJournal table
  Reply With Quote
04-04-21, 08:30 PM   #6
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi all

When I use "C_PetJournal.GetPetInfoByPetID(petGUID)" I get the following results;


What I am trying to get is the summonPetSpellID.

The documentation indicates that GetSpellLink works with the spellName yet I get nils when I use it.

Right now the only way that I can get the summonPetSpellID is to get it from the "UNIT_SPELLCAST_SUCCEEDED" event, yet this returns a weird result;
- If I have no pet out I get the correct spellID.
- If I summon a new pet to replace the current pet the spell ID reflects the spellID of the pet that is dismissed.
- If I dismiss a pet the "UNIT_SPELLCAST_SUCCEEDED" does not fire.

I have not been able to find a function that dismisses a pet, if the pet is not out it will summon the pet, if the pet is already out it will dismiss it.

I am looking for a reliable way to get the summonPetSpellID, yet it still eludes me.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-04-21, 09:50 PM   #7
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
What do you need the spell id for/what should happen after dragging the pet on the button?
  Reply With Quote
04-04-21, 10:28 PM   #8
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Heya

I want to be able to track the petSpellID when the "UNIT_SPELLCAST_SUCCEEDED" fires; this event returns 3 values, castingUnit, castingGUID, and castingSpellID.

If I knew how to use the castingGUID I may be able to track that instead.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-05-21, 12:21 AM   #9
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Walkerbo View Post
I am trying to get pet details from a cursor drop onto a button.
Originally Posted by Walkerbo View Post
I want to be able to track the petSpellID when the "UNIT_SPELLCAST_SUCCEEDED" fires

You still didn't say why you specifically need the summon spell ID. First you ask about getting pet info when you're holding a pet on the cursor, afterwards you say you need to track the summon spell ID. It's hard to follow!

What are you trying to do? https://xyproblem.info/
  • Tracking UNIT_SPELLCAST_SUCCEEDED implies you want to know which pet was just summoned. Then just hook C_PetJournal.SummonPetByGUID()
    Lua Code:
    1. -- does not account for summoning random pets
    2. hooksecurefunc(C_PetJournal, "SummonPetByGUID", function(guid)
    3.     local speciesID, _, _, _, _, _, _, name = C_PetJournal.GetPetInfoByPetID(guid)
    4.     print(guid, speciesID, name)
    5. end)

  • If you really want to get pet info from the summon spell ID, you need to parse BattlePetSpecies.db2

    Note that method does not account for pets caught from pet battles as those always have the same summon spell ID 118301

    Lua Code:
    1. -- 9.0.5.38134
    2. local SummonSpellID = {
    3.     [4055] = 39, -- Mechanical Squirrel
    4.     [10673] = 40, -- Bombay Cat
    5.     [10674] = 41, -- Cornish Rex Cat
    6.     [10675] = 42, -- Black Tabby Cat
    7.     [10676] = 43, -- Orange Tabby Cat
    8.     [10677] = 44, -- Siamese Cat
    9.     [10678] = 45, -- Silver Tabby Cat
    10.     [10679] = 46, -- White Kitten
    11.     [10680] = 47, -- Cockatiel
    12.     [10682] = 49, -- Hyacinth Macaw
    13.     [10683] = 50, -- Green Wing Macaw
    14.     [10684] = 51, -- Senegal
    15.     [10685] = 52, -- Ancona Chicken
    16.     [10688] = 55, -- Undercity Cockroach
    17.     [10695] = 56, -- Dark Whelpling
    18.     [10696] = 57, -- Azure Whelpling
    19.     [10697] = 58, -- Crimson Whelpling
    20.     [10698] = 59, -- Emerald Whelpling
    21.     [10703] = 64, -- Wood Frog
    22.     [10704] = 65, -- Tree Frog
    23.     [10706] = 67, -- Hawk Owl
    24.     [10707] = 68, -- Great Horned Owl
    25.     [10709] = 70, -- Brown Prairie Dog
    26.     [10711] = 72, -- Snowshoe Rabbit
    27.     [10713] = 74, -- Albino Snake
    28.     [10714] = 75, -- Black Kingsnake
    29.     [10716] = 77, -- Brown Snake
    30.     [10717] = 78, -- Crimson Snake
    31.     [12243] = 83, -- Mechanical Chicken
    32.     [13548] = 84, -- Westfall Chicken
    33.     [15048] = 85, -- Pet Bombling
    34.     [15049] = 86, -- Lil' Smoky
    35.     [15067] = 87, -- Sprite Darter Hatchling
    36.     [15999] = 89, -- Worg Pup
    37.     [16450] = 90, -- Smolderweb Hatchling
    38.     [17707] = 92, -- Panda Cub
    39.     [17708] = 93, -- Mini Diablo
    40.     [17709] = 94, -- Zergling
    41.     [19772] = 95, -- Lifelike Toad
    42.     [23811] = 106, -- Jubling
    43.     [24696] = 107, -- Murky
    44.     [24988] = 111, -- Lurky
    45.     [25162] = 114, -- Disgusting Oozeling
    46.     [172695] = 115, -- Land Shark
    47.     [26010] = 116, -- Tranquil Mechanical Yeti
    48.     [26045] = 117, -- Tiny Snowman
    49.     [26529] = 118, -- Winter Reindeer
    50.     [26533] = 119, -- Father Winter's Helper
    51.     [26541] = 120, -- Winter's Little Helper
    52.     [27241] = 121, -- Gurky
    53.     [27570] = 122, -- Peddlefeet
    54.     [28505] = 124, -- Poley
    55.     [28738] = 125, -- Speedy
    56.     [28739] = 126, -- Mr. Wiggles
    57.     [28740] = 127, -- Whiskers the Rat
    58.     [28871] = 128, -- Spirit of Summer
    59.     [30156] = 130, -- Hippogryph Hatchling
    60.     [32298] = 131, -- Netherwhelp
    61.     [33050] = 132, -- Magical Crawdad
    62.     [35156] = 136, -- Mana Wyrmling
    63.     [35239] = 137, -- Brown Rabbit
    64.     [35907] = 138, -- Blue Moth
    65.     [35909] = 139, -- Red Moth
    66.     [35910] = 140, -- Yellow Moth
    67.     [35911] = 141, -- White Moth
    68.     [36027] = 142, -- Golden Dragonhawk Hatchling
    69.     [36028] = 143, -- Red Dragonhawk Hatchling
    70.     [36029] = 144, -- Silver Dragonhawk Hatchling
    71.     [36031] = 145, -- Blue Dragonhawk Hatchling
    72.     [36034] = 146, -- Firefly
    73.     [39181] = 149, -- Miniwing
    74.     [39709] = 153, -- Wolpertinger
    75.     [40405] = 155, -- Lucky
    76.     [40549] = 156, -- Bananas
    77.     [40613] = 157, -- Willy
    78.     [40614] = 158, -- Egbert
    79.     [40634] = 159, -- Peanut
    80.     [40990] = 160, -- Stinker
    81.     [42609] = 162, -- Sinister Squashling
    82.     [43697] = 163, -- Toothy
    83.     [43698] = 164, -- Muckbreath
    84.     [43918] = 165, -- Mojo
    85.     [44369] = 166, -- Pint-Sized Pink Pachyderm
    86.     [45082] = 167, -- Tiny Sporebat
    87.     [45125] = 168, -- Rocket Chicken
    88.     [45127] = 169, -- Dragon Kite
    89.     [45174] = 170, -- Golden Pig
    90.     [45175] = 171, -- Silver Pig
    91.     [45890] = 172, -- Searing Scorchling
    92.     [46425] = 173, -- Snarly
    93.     [46426] = 174, -- Chuck
    94.     [46599] = 175, -- Phoenix Hatchling
    95.     [48406] = 179, -- Spirit of Competition
    96.     [48408] = 180, -- Essence of Competition
    97.     [49964] = 183, -- Ethereal Soul-Trader
    98.     [51716] = 186, -- Nether Ray Fry
    99.     [51851] = 187, -- Vampiric Batling
    100.     [52615] = 188, -- Frosty
    101.     [53082] = 189, -- Mini Tyrael
    102.     [53316] = 190, -- Ghostly Skull
    103.     [54187] = 191, -- Clockwork Rocket Bot
    104.     [55068] = 192, -- Mr. Chilly
    105.     [59250] = 193, -- Giant Sewer Rat
    106.     [61348] = 194, -- Tickbird Hatchling
    107.     [61349] = 195, -- White Tickbird Hatchling
    108.     [61350] = 196, -- Proto-Drake Whelp
    109.     [61351] = 197, -- Cobra Hatchling
    110.     [61357] = 198, -- Pengu
    111.     [61472] = 199, -- Kirin Tor Familiar
    112.     [61725] = 200, -- Spring Rabbit
    113.     [61773] = 201, -- Plump Turkey
    114.     [61855] = 202, -- Baby Blizzard Bear
    115.     [61991] = 203, -- Little Fawn
    116.     [62491] = 204, -- Teldrassil Sproutling
    117.     [62508] = 205, -- Dun Morogh Cub
    118.     [62510] = 206, -- Tirisfal Batling
    119.     [62513] = 207, -- Durotar Scorpion
    120.     [62516] = 209, -- Elwynn Lamb
    121.     [62542] = 210, -- Mulgore Hatchling
    122.     [62561] = 211, -- Strand Crawler
    123.     [62562] = 212, -- Ammen Vale Lashling
    124.     [62564] = 213, -- Enchanted Broom
    125.     [62609] = 214, -- Argent Squire
    126.     [62674] = 215, -- Mechanopeep
    127.     [62746] = 216, -- Argent Gruntling
    128.     [63318] = 217, -- Murkimus the Gladiator
    129.     [63712] = 218, -- Sen'jin Fetish
    130.     [65046] = 220, -- Withers
    131.     [65358] = 224, -- Calico Cat
    132.     [65381] = 225, -- Curious Oracle Hatchling
    133.     [65382] = 226, -- Curious Wolvar Pup
    134.     [65682] = 227, -- Warbot
    135.     [66030] = 228, -- Grunty
    136.     [66096] = 229, -- Shimmering Wyrmling
    137.     [66520] = 231, -- Jade Tiger
    138.     [67413] = 232, -- Darting Hatchling
    139.     [67414] = 233, -- Deviate Hatchling
    140.     [67415] = 234, -- Gundrak Hatchling
    141.     [67416] = 235, -- Leaping Hatchling
    142.     [67417] = 236, -- Obsidian Hatchling
    143.     [67418] = 237, -- Ravasaur Hatchling
    144.     [67419] = 238, -- Razormaw Hatchling
    145.     [67420] = 239, -- Razzashi Hatchling
    146.     [67527] = 240, -- Onyx Panther
    147.     [68767] = 241, -- Tuskarr Kite
    148.     [68810] = 242, -- Spectral Tiger Cub
    149.     [69002] = 243, -- Onyxian Whelpling
    150.     [69452] = 244, -- Core Hound Pup
    151.     [69535] = 245, -- Gryphon Hatchling
    152.     [69536] = 246, -- Wind Rider Cub
    153.     [69539] = 247, -- Zipao Tiger
    154.     [69541] = 248, -- Pandaren Monk
    155.     [69677] = 249, -- Lil' K.T.
    156.     [70613] = 250, -- Perky Pug
    157.     [71840] = 251, -- Toxic Wasteling
    158.     [74932] = 253, -- Frigid Frostling
    159.     [75134] = 254, -- Blue Clockwork Rocket Bot
    160.     [75613] = 255, -- Celestial Dragon
    161.     [75906] = 256, -- Lil' XT
    162.     [75936] = 257, -- Murkimus the Gladiator
    163.     [78381] = 258, -- Mini Thor
    164.     [78683] = 259, -- Blue Mini Jouster
    165.     [78685] = 260, -- Gold Mini Jouster
    166.     [81937] = 261, -- Personal World Destroyer
    167.     [82173] = 262, -- De-Weaponized Mechanical Companion
    168.     [84263] = 264, -- Crawling Claw
    169.     [84492] = 265, -- Pebble
    170.     [84752] = 266, -- Fossilized Hatchling
    171.     [93836] = 267, -- Enchanted Lantern
    172.     [87344] = 268, -- Lil' Deathwing
    173.     [89039] = 270, -- Dark Phoenix Hatchling
    174.     [89472] = 271, -- Rustberg Gull
    175.     [89670] = 272, -- Armadillo Pup
    176.     [90523] = 277, -- Clockwork Gnome
    177.     [90637] = 278, -- Fox Kit
    178.     [91343] = 279, -- Tiny Shale Spider
    179.     [92395] = 280, -- Guild Page
    180.     [92396] = 281, -- Guild Page
    181.     [92397] = 282, -- Guild Herald
    182.     [92398] = 283, -- Guild Herald
    183.     [93624] = 285, -- Landro's Lil' XT
    184.     [93739] = 286, -- Mr. Grubbs
    185.     [93813] = 287, -- Tiny Flamefly
    186.     [93817] = 289, -- Scooter the Snail
    187.     [93823] = 291, -- Singing Sunflower
    188.     [93837] = 292, -- Magic Lamp
    189.     [93838] = 293, -- Elementium Geode
    190.     [94070] = 294, -- Deathy
    191.     [95786] = 296, -- Moonkin Hatchling
    192.     [95787] = 297, -- Lil' Ragnaros
    193.     [95909] = 298, -- Moonkin Hatchling
    194.     [96571] = 301, -- Panther Cub
    195.     [96817] = 302, -- Landro's Lichling
    196.     [96819] = 303, -- Nightsaber Cub
    197.     [97638] = 306, -- Winterspring Cub
    198.     [97779] = 307, -- Lashtail Hatchling
    199.     [98079] = 308, -- Legs
    200.     [98571] = 309, -- Pterrordax Hatchling
    201.     [98587] = 310, -- Voodoo Figurine
    202.     [98736] = 311, -- Guardian Cub
    203.     [99578] = 316, -- Cenarion Hatchling
    204.     [99663] = 317, -- Hyjal Bear Cub
    205.     [99668] = 318, -- Crimson Lasher
    206.     [100330] = 319, -- Feline Familiar
    207.     [100576] = 320, -- Lil' Tarecgosa
    208.     [100684] = 321, -- Creepy Crate
    209.     [100970] = 323, -- Nuts
    210.     [101424] = 325, -- Brilliant Kaliri
    211.     [101493] = 328, -- Purple Puffer
    212.     [101606] = 329, -- Murkablo
    213.     [101733] = 330, -- Darkmoon Monkey
    214.     [101986] = 331, -- Alliance Balloon
    215.     [101989] = 332, -- Horde Balloon
    216.     [102317] = 333, -- Gregarious Grell
    217.     [103074] = 335, -- Darkmoon Turtle
    218.     [103076] = 336, -- Darkmoon Balloon
    219.     [103125] = 337, -- Lumpy
    220.     [103544] = 338, -- Darkmoon Tonk
    221.     [103549] = 339, -- Darkmoon Zeppelin
    222.     [103588] = 340, -- Sea Pony
    223.     [104047] = 341, -- Lunar Lantern
    224.     [104049] = 342, -- Festival Lantern
    225.     [105122] = 343, -- Darkmoon Cub
    226.     [105228] = 344, -- Green Balloon
    227.     [105229] = 345, -- Yellow Balloon
    228.     [105633] = 346, -- Fetish Shaman
    229.     [110029] = 347, -- Soul of the Aspects
    230.     [112994] = 348, -- Eye of the Legion
    231.     [118414] = 381, -- Porcupette
    232.     [231215] = 382, -- Sun Darter Hatchling
    233.     [118419] = 384, -- Otter Pup
    234.     [89472] = 462, -- Jacob the Test Seagull
    235.     [123212] = 629, -- Shore Crawler
    236.     [123214] = 630, -- Gilnean Raven
    237.     [123778] = 650, -- Terrible Turnip
    238.     [124000] = 652, -- Tiny Goldfish
    239.     [102353] = 665, -- Sand Scarab
    240.     [249870] = 666, -- Micronax
    241.     [124660] = 671, -- Lucky Quilen Cub
    242.     [23531] = 757, -- Tiny Green Dragon
    243.     [23530] = 758, -- Tiny Red Dragon
    244.     [127816] = 792, -- Jade Crane Chick
    245.     [127813] = 802, -- Thundering Serpent Hatchling
    246.     [127815] = 820, -- Singing Cricket
    247.     [124152] = 821, -- Feral Vermling
    248.     [126251] = 834, -- Grinder
    249.     [126247] = 835, -- Hopling
    250.     [126249] = 836, -- Aqua Strider
    251.     [126885] = 844, -- Mechanical Pandaren Dragonling
    252.     [120501] = 845, -- Jade Owl
    253.     [120507] = 846, -- Sapphire Cub
    254.     [122748] = 847, -- Fishy
    255.     [114090] = 848, -- Darkmoon Rabbit
    256.     [127008] = 849, -- Chi-Ji Kite
    257.     [127006] = 850, -- Yu'lon Kite
    258.     [130759] = 855, -- Venus
    259.     [130726] = 856, -- Jade Tentacle
    260.     [131590] = 868, -- Pandaren Water Spirit
    261.     [131650] = 903, -- Baneling
    262.     [132574] = 1039, -- Imperial Moth
    263.     [132580] = 1040, -- Imperial Silkworm
    264.     [123784] = 1042, -- Red Cricket
    265.     [132762] = 1061, -- Darkmoon Hatchling
    266.     [132789] = 1063, -- Darkmoon Eye
    267.     [28487] = 1073, -- Terky
    268.     [134538] = 1117, -- Cinder Kitten
    269.     [134892] = 1124, -- Pandaren Fire Spirit
    270.     [134894] = 1125, -- Pandaren Air Spirit
    271.     [134895] = 1126, -- Pandaren Earth Spirit
    272.     [132759] = 1127, -- Spectral Cub
    273.     [135156] = 1142, -- Clock'em
    274.     [135254] = 1143, -- Giant Bone Spider
    275.     [135255] = 1144, -- Fungal Abomination
    276.     [135256] = 1145, -- Mr. Bigglesworth
    277.     [135257] = 1146, -- Stitched Pup
    278.     [135258] = 1147, -- Harbinger of Flame
    279.     [135259] = 1149, -- Corefire Imp
    280.     [135259] = 1150, -- Ashstone Core
    281.     [135263] = 1151, -- Untamed Hatchling
    282.     [135264] = 1152, -- Chrominius
    283.     [135265] = 1153, -- Death Talon Whelpguard
    284.     [135266] = 1154, -- Viscidus Globule
    285.     [135267] = 1155, -- Anubisath Idol
    286.     [135268] = 1156, -- Mini Mindslayer
    287.     [25018] = 1168, -- Murki
    288.     [136484] = 1174, -- Gusting Grimoire
    289.     [137568] = 1176, -- Red Panda
    290.     [137977] = 1177, -- Living Sandling
    291.     [138082] = 1178, -- Sunreaver Micro-Sentry
    292.     [138087] = 1180, -- Zandalari Kneebiter
    293.     [138161] = 1183, -- Son of Animus
    294.     [138287] = 1184, -- Stunted Direhorn
    295.     [138285] = 1185, -- Spectral Porcupette
    296.     [138380] = 1196, -- Sunfur Panda
    297.     [138381] = 1197, -- Snowy Panda
    298.     [138382] = 1198, -- Mountain Panda
    299.     [138825] = 1200, -- Pygmy Direhorn
    300.     [138913] = 1201, -- Spawn of G'nathus
    301.     [139148] = 1202, -- Ji-Kun Hatchling
    302.     [138824] = 1204, -- Pierre
    303.     [139153] = 1205, -- Direhorn Runt
    304.     [139361] = 1206, -- Tiny Red Carp
    305.     [139362] = 1207, -- Tiny Blue Carp
    306.     [139363] = 1208, -- Tiny Green Carp
    307.     [139365] = 1209, -- Tiny White Carp
    308.     [139932] = 1211, -- Zandalari Anklerender
    309.     [139933] = 1212, -- Zandalari Footslasher
    310.     [139934] = 1213, -- Zandalari Toenibbler
    311.     [141433] = 1226, -- Lil' Bad Wolf
    312.     [141434] = 1227, -- Menagerie Custodian
    313.     [141435] = 1228, -- Netherspace Abyssal
    314.     [141451] = 1229, -- Fiendish Imp
    315.     [141436] = 1230, -- Tideskipper
    316.     [141437] = 1231, -- Tainted Waveling
    317.     [141446] = 1232, -- Coilfang Stalker
    318.     [141447] = 1233, -- Pocket Reaver
    319.     [141448] = 1234, -- Lesser Voidcaller
    320.     [141449] = 1235, -- Phoenix Hawk Hatchling
    321.     [141450] = 1236, -- Tito
    322.     [141789] = 1237, -- Gahz'rooki
    323.     [142028] = 1243, -- Living Fluid
    324.     [142029] = 1244, -- Viscous Horror
    325.     [142030] = 1245, -- Filthling
    326.     [142880] = 1248, -- Blossoming Ancient
    327.     [143637] = 1255, -- Zeradar
    328.     [143703] = 1256, -- Rascal-Bot
    329.     [143732] = 1257, -- Crafty
    330.     [145696] = 1266, -- Xu-Fu, Cub of Xuen
    331.     [144761] = 1276, -- Moon Moon
    332.     [145697] = 1303, -- Chi-Chi, Hatchling of Chi-Ji
    333.     [145698] = 1304, -- Yu'la, Broodling of Yu'lon
    334.     [145699] = 1305, -- Zao, Calfling of Niuzao
    335.     [147124] = 1320, -- Lil' Bling
    336.     [15048] = 1322, -- Blackfuse Bombling
    337.     [148046] = 1323, -- Ashleaf Spriteling
    338.     [148068] = 1324, -- Ashwing Moth
    339.     [148069] = 1325, -- Flamering Moth
    340.     [148065] = 1326, -- Skywisp Moth
    341.     [138161] = 1328, -- Ruby Droplet
    342.     [148051] = 1329, -- Dandelion Frolicker
    343.     [148052] = 1330, -- Death Adder Hatchling
    344.     [148058] = 1331, -- Droplet of Y'Shaarj
    345.     [148059] = 1332, -- Gooey Sha-ling
    346.     [148060] = 1333, -- Jademist Dancer
    347.     [148061] = 1334, -- Kovok
    348.     [148551] = 1335, -- Ominous Flame
    349.     [148063] = 1336, -- Skunky Alemental
    350.     [148066] = 1337, -- Spineclaw Crab
    351.     [148067] = 1338, -- Gulp Froglet
    352.     [148373] = 1343, -- Bonkers
    353.     [148427] = 1344, -- Vengeful Porcupette
    354.     [148527] = 1345, -- Gu'chi Swarmling
    355.     [148530] = 1346, -- Harmonious Porcupette
    356.     [148552] = 1348, -- Jadefire Spirit
    357.     [148567] = 1349, -- Rotten Little Helper
    358.     [148684] = 1350, -- Sky Lantern
    359.     [66175] = 1351, -- Macabre Marionette
    360.     [149787] = 1363, -- Alterac Brew-Pup
    361.     [149792] = 1364, -- Murkalot
    362.     [149810] = 1365, -- Treasure Goblin
    363.     [170267] = 1384, -- Hogs
    364.     [155748] = 1386, -- Dread Hatchling
    365.     [155838] = 1387, -- Iron Starlette
    366.     [25162] = 1395, -- Lil' Leftovers
    367.     [159581] = 1396, -- Crazy Carrot
    368.     [53082] = 1401, -- Tyri
    369.     [149810] = 1402, -- Puzzle
    370.     [160403] = 1403, -- Mechanical Axebeak
    371.     [161522] = 1410, -- Mechanical Training Dummy
    372.     [161643] = 1411, -- Royal Peachick
    373.     [162135] = 1412, -- Lifelike Mechanical Frostboar
    374.     [164212] = 1416, -- Teroclaw Hatchling
    375.     [166071] = 1426, -- Elekk Plushie
    376.     [167389] = 1429, -- Autumnal Sproutling
    377.     [167390] = 1430, -- Forest Sproutling
    378.     [167392] = 1431, -- Kelp Sproutling
    379.     [167394] = 1432, -- Nightshade Sproutling
    380.     [167395] = 1433, -- Sassy Sproutling
    381.     [167397] = 1434, -- Sun Sproutling
    382.     [168668] = 1446, -- Meadowstomper Calf
    383.     [168977] = 1448, -- Sea Calf
    384.     [169220] = 1449, -- Deathwatch Hatchling
    385.     [169666] = 1450, -- Draenei Micro Defender
    386.     [169695] = 1451, -- Molten Corgi
    387.     [223110] = 1453, -- River Calf
    388.     [190036] = 1454, -- Murkidan
    389.     [170286] = 1458, -- Bone Wasp
    390.     [190035] = 1466, -- Brightpaw
    391.     [170292] = 1467, -- Sky-Bo
    392.     [170285] = 1471, -- Fruit Hunter
    393.     [170774] = 1478, -- Syd the Squid
    394.     [170280] = 1495, -- Ore Eater
    395.     [132762] = 1511, -- Lovebird Hatchling
    396.     [171222] = 1514, -- Mystical Spring Bouquet
    397.     [170282] = 1515, -- Stonegrinder
    398.     [171500] = 1516, -- Bush Chicken
    399.     [171552] = 1517, -- Blazing Cindercrawler
    400.     [171758] = 1518, -- Stout Alemental
    401.     [171912] = 1521, -- Cursed Birman
    402.     [171915] = 1523, -- Widget the Departed
    403.     [170269] = 1524, -- Netherspawn, Spawn of Netherspawn
    404.     [170274] = 1530, -- Frostwolf Ghostpup
    405.     [172632] = 1531, -- Ancient Nest Guardian
    406.     [170270] = 1532, -- Ikky
    407.     [172998] = 1533, -- Lanticore Spawnling
    408.     [173532] = 1536, -- Zangar Spore
    409.     [173542] = 1537, -- Crimson Spore
    410.     [173543] = 1538, -- Umbrafen Spore
    411.     [173544] = 1539, -- Seaborne Spore
    412.     [173547] = 1540, -- Brilliant Spore
    413.     [170273] = 1541, -- Hydraling
    414.     [170281] = 1542, -- Frostwolf Pup
    415.     [177216] = 1543, -- Pygmy Cow
    416.     [170268] = 1544, -- Hatespark the Tiny
    417.     [170291] = 1545, -- Firewing
    418.     [170289] = 1546, -- Stormwing
    419.     [10699] = 1563, -- Bronze Whelpling
    420.     [170272] = 1564, -- Doom Bloom
    421.     [170288] = 1565, -- Mechanical Scorpid
    422.     [176137] = 1566, -- Everbloom Peachick
    423.     [176140] = 1567, -- Sentinel's Companion
    424.     [170279] = 1568, -- Puddle Terror
    425.     [170276] = 1569, -- Soul of the Forge
    426.     [177227] = 1570, -- Sunfire Kaliri
    427.     [170287] = 1571, -- Albino River Calf
    428.     [170277] = 1574, -- Son of Sethe
    429.     [170271] = 1575, -- Sky Fry
    430.     [170275] = 1576, -- Eye of Observation
    431.     [187384] = 1577, -- Bloodthorn Hatchling
    432.     [187383] = 1588, -- Dusty Sporewing
    433.     [170283] = 1596, -- Veilwatcher Hatchling
    434.     [177215] = 1597, -- Kaliri Hatchling
    435.     [187376] = 1598, -- Glowing Sporebat
    436.     [177238] = 1600, -- Bone Serpent
    437.     [170278] = 1601, -- Servant of Demidos
    438.     [177234] = 1602, -- Grommloc
    439.     [177232] = 1603, -- Argi
    440.     [177220] = 1604, -- Nethaera's Light
    441.     [177233] = 1605, -- Trunks
    442.     [179811] = 1622, -- Grotesque
    443.     [179830] = 1623, -- Leviathan Hatchling
    444.     [179831] = 1624, -- Abyssius
    445.     [179832] = 1625, -- Fragment of Anger
    446.     [179833] = 1626, -- Fragment of Suffering
    447.     [179834] = 1627, -- Fragment of Desire
    448.     [179835] = 1628, -- Sister of Temptation
    449.     [179836] = 1629, -- Stinkrot
    450.     [179837] = 1631, -- Hyjal Wisp
    451.     [179838] = 1632, -- Sunblade Micro-Defender
    452.     [179839] = 1633, -- Chaos Pup
    453.     [179840] = 1634, -- Wretched Servant
    454.     [179841] = 1635, -- K'ute
    455.     [179954] = 1636, -- Race MiniZep
    456.     [181086] = 1639, -- Graves
    457.     [170272] = 1642, -- Salad
    458.     [177223] = 1655, -- Slithershock Elver
    459.     [177218] = 1656, -- Young Talbuk
    460.     [184480] = 1660, -- Fel Pup
    461.     [184481] = 1661, -- Lost Netherpup
    462.     [184482] = 1662, -- Cinder Pup
    463.     [187555] = 1663, -- Periwinkle Calf
    464.     [185055] = 1664, -- Nightmare Bell
    465.     [185591] = 1665, -- Ghostshell Crab
    466.     [185601] = 1666, -- Blorp
    467.     [187532] = 1672, -- Corrupted Nest Guardian
    468.     [188084] = 1687, -- Left Shark
    469.     [188235] = 1688, -- Crusher
    470.     [189357] = 1690, -- Shard of Cyrukh
    471.     [190020] = 1691, -- Nibbles
    472.     [190682] = 1692, -- Savage Cub
    473.     [190681] = 1693, -- Blazing Firehawk
    474.     [191071] = 1699, -- Enchanted Cauldron
    475.     [191072] = 1700, -- Enchanted Torch
    476.     [191073] = 1701, -- Enchanted Pen
    477.     [186299] = 1705, -- Grumpy
    478.     [191425] = 1706, -- Ashmaw Cub
    479.     [193680] = 1711, -- Skyhorn Nestling
    480.     [194393] = 1715, -- Nightwatch Swooper
    481.     [210669] = 1716, -- Fledgling Warden Owl
    482.     [210671] = 1717, -- Extinguished Eye
    483.     [210672] = 1718, -- Hateful Eye
    484.     [210673] = 1719, -- Eye of Inquisition
    485.     [193388] = 1720, -- Emmigosa
    486.     [193514] = 1721, -- Stormborne Whelpling
    487.     [210674] = 1722, -- Dream Whelpling
    488.     [210675] = 1723, -- Nightmare Whelpling
    489.     [191967] = 1725, -- Grumpling
    490.     [194357] = 1727, -- Nursery Spider
    491.     [193279] = 1751, -- Son of Goredome
    492.     [193368] = 1752, -- Crispin
    493.     [193434] = 1753, -- Bleakwater Jelly
    494.     [210677] = 1754, -- Sewer-Pipe Jelly
    495.     [194330] = 1755, -- Plump Jelly
    496.     [210678] = 1756, -- Ridgeback Piglet
    497.     [210679] = 1757, -- Brown Piglet
    498.     [210680] = 1758, -- Black Piglet
    499.     [210681] = 1759, -- Thaumaturgical Piglet
    500.     [194294] = 1760, -- Fel Piglet
    501.     [193572] = 1764, -- Energized Manafiend
    502.     [193589] = 1765, -- Empyreal Manafiend
    503.     [193588] = 1766, -- Empowered Manafiend
    504.     [193943] = 1777, -- Broot
    505.     [195368] = 1802, -- Fetid Waveling
    506.     [195369] = 1803, -- Thistleleaf Adventurer
    507.     [195370] = 1804, -- Risen Saber Kitten
    508.     [210682] = 1805, -- Alarm-o-Bot
    509.     [210683] = 1806, -- Knockoff Blingtron
    510.     [210691] = 1808, -- Leyline Broodling
    511.     [204148] = 1828, -- Baby Winston
    512.     [210694] = 1884, -- Baby Elderhorn
    513.     [210695] = 1885, -- Sunborne Val'kyr
    514.     [210696] = 1886, -- Trigger
    515.     [210697] = 1887, -- Wyrmy Tunkins
    516.     [210698] = 1888, -- Celestial Calf
    517.     [210699] = 1889, -- Felbat Pup
    518.     [210701] = 1890, -- Corgi Pup
    519.     [215560] = 1907, -- Pygmy Owl
    520.     [217218] = 1911, -- Sting Ray Pup
    521.     [221684] = 1918, -- Alliance Enthusiast
    522.     [221683] = 1919, -- Horde Fanatic
    523.     [221906] = 1920, -- Transmutant
    524.     [221907] = 1921, -- Untethered Wyrmling
    525.     [221908] = 1922, -- Lurking Owl Kitten
    526.     [223027] = 1926, -- Hungering Claw
    527.     [30152] = 1927, -- Ash'ana
    528.     [223339] = 1928, -- Firebat Pup
    529.     [223359] = 1929, -- Corgnelius
    530.     [223409] = 1930, -- Lagan
    531.     [224403] = 1931, -- Court Scribe
    532.     [224536] = 1932, -- Nightmare Lasher
    533.     [224786] = 1933, -- Nightmare Treant
    534.     [225200] = 1934, -- Benax
    535.     [225761] = 1936, -- Mischief
    536.     [226682] = 1937, -- Wondrous Wisdomball
    537.     [226813] = 1938, -- Rescued Fawn
    538.     [227051] = 1939, -- Legionnaire Murky
    539.     [227052] = 1940, -- Knight-Captain Murky
    540.     [227093] = 1941, -- Snowfang
    541.     [227113] = 1943, -- Noblegarden Bunny
    542.     [229090] = 1952, -- Dreadmaw
    543.     [229091] = 1953, -- Snobold Runt
    544.     [229092] = 1954, -- Nerubian Swarmer
    545.     [229093] = 1955, -- Magma Rageling
    546.     [229094] = 1956, -- Ironbound Proto-Whelp
    547.     [229095] = 1957, -- Runeforged Servitor
    548.     [229096] = 1958, -- Sanctum Cub
    549.     [229097] = 1959, -- Winter Rageling
    550.     [229098] = 1960, -- Snaplasher
    551.     [229099] = 1961, -- G0-R41-0N Ultratonk
    552.     [229100] = 1962, -- Creeping Tentacle
    553.     [229101] = 1963, -- Boneshard
    554.     [229102] = 1964, -- Blood Boil
    555.     [229103] = 1965, -- Blightbreath
    556.     [229104] = 1966, -- Soulbroken Whelpling
    557.     [229105] = 1967, -- Drudge Ghoul
    558.     [229106] = 1968, -- Wicked Soul
    559.     [229110] = 1969, -- Stardust
    560.     [230073] = 1974, -- Snowfeather Hatchling
    561.     [230074] = 1975, -- Direbeak Hatchling
    562.     [230075] = 1976, -- Sharptalon Hatchling
    563.     [230076] = 1977, -- Bloodgazer Hatchling
    564.     [230443] = 1978, -- Dutiful Squire
    565.     [230444] = 1979, -- Dutiful Gruntling
    566.     [231017] = 1984, -- Albino Buzzard
    567.     [232867] = 1997, -- Crackers
    568.     [233331] = 1998, -- Everliving Spore
    569.     [233333] = 1999, -- Cavern Moccasin
    570.     [233335] = 2000, -- Young Venomfang
    571.     [233647] = 2001, -- Dibbler
    572.     [233649] = 2002, -- Naxxy
    573.     [233650] = 2003, -- Hearthy
    574.     [233805] = 2004, -- Trashy
    575.     [234555] = 2017, -- Infinite Hatchling
    576.     [234556] = 2018, -- Paradox Spirit
    577.     [236285] = 2022, -- Tylarr Gronnden
    578.     [237250] = 2035, -- Bloodbrood Whelpling
    579.     [237251] = 2036, -- Frostbrood Whelpling
    580.     [237252] = 2037, -- Vilebrood Whelpling
    581.     [240064] = 2042, -- Scraps
    582.     [240385] = 2046, -- Arne's Test Pet
    583.     [240794] = 2047, -- Ban-Fu, Cub of Ban-Lu
    584.     [241072] = 2048, -- Golden Retriever
    585.     [242047] = 2049, -- Son of Skum
    586.     [243136] = 2050, -- Orphaned Felbat
    587.     [243499] = 2051, -- Twilight
    588.     [246105] = 2062, -- Shadow
    589.     [247123] = 2063, -- Sneaky Marmot
    590.     [247474] = 2065, -- Dig Rat
    591.     [248025] = 2071, -- Bronze Proto-Whelp
    592.     [248240] = 2072, -- Ageless Bronze Drake
    593.     [251191] = 2077, -- Ghost Shark
    594.     [253788] = 2078, -- Tinytron
    595.     [253790] = 2079, -- Discarded Experiment
    596.     [253799] = 2080, -- Rattlejaw
    597.     [253805] = 2081, -- Twilight Clutch-Sister
    598.     [253809] = 2082, -- Bound Stream
    599.     [253813] = 2083, -- Faceless Minion
    600.     [253816] = 2084, -- Zephyrian Prince
    601.     [253818] = 2085, -- Drafty
    602.     [253916] = 2086, -- Blazehound
    603.     [253918] = 2087, -- Cinderweb Recluse
    604.     [253924] = 2088, -- Surger
    605.     [253925] = 2089, -- Infernal Pyreclaw
    606.     [253926] = 2090, -- Faceless Mindlasher
    607.     [253927] = 2091, -- Corrupted Blood
    608.     [253928] = 2092, -- Unstable Tendril
    609.     [253929] = 2093, -- Amalgam of Destruction
    610.     [254255] = 2113, -- Felclaw Marsuul
    611.     [254196] = 2115, -- Cross Gazer
    612.     [254197] = 2116, -- Orphaned Marsuul
    613.     [254271] = 2117, -- Fel Lasher
    614.     [254295] = 2118, -- Docile Skyfin
    615.     [254296] = 2119, -- Fel-Afflicted Skyfin
    616.     [254297] = 2120, -- Grasping Manifestation
    617.     [254298] = 2121, -- Fossorial Bile Larva
    618.     [254749] = 2135, -- Rebellious Imp
    619.     [254763] = 2136, -- Uuna
    620.     [255702] = 2143, -- Tottle
    621.     [256010] = 2144, -- REUSE
    622.     [257603] = 2146, -- Perculia's Peculiar Parrot
    623.     [259758] = 2157, -- Dart
    624.     [261755] = 2163, -- Silithid Mini-Tank
    625.     [264001] = 2165, -- Francois
    626.     [272771] = 2184, -- Whomper
    627.     [272772] = 2185, -- Cap'n Crackers
    628.     [273159] = 2186, -- Spawn of Merektha
    629.     [273184] = 2187, -- Filthy Slime
    630.     [273195] = 2188, -- Poda
    631.     [273215] = 2189, -- Smoochums
    632.     [273839] = 2190, -- Guardian Cobra Hatchling
    633.     [273869] = 2192, -- Vengeful Chicken
    634.     [274202] = 2196, -- Lil' Tika
    635.     [274348] = 2197, -- Direhorn Hatchling
    636.     [274353] = 2198, -- Taptaf
    637.     [274380] = 2199, -- Restored Revenant
    638.     [274760] = 2201, -- Enchanted Tiki Mask
    639.     [274776] = 2202, -- Miimii
    640.     [277461] = 2352, -- Baa'l
    641.     [279129] = 2401, -- Rooter
    642.     [279171] = 2402, -- Brutus
    643.     [279205] = 2403, -- Abyssal Eel
    644.     [279206] = 2404, -- Seabreeze Bumblebee
    645.     [279207] = 2405, -- Corlain Falcon
    646.     [279208] = 2406, -- Drustvar Piglet
    647.     [279209] = 2407, -- Frenzied Cottontail
    648.     [279210] = 2408, -- Bilefang Skitterer
    649.     [279211] = 2409, -- Greatwing Macaw
    650.     [279212] = 2410, -- Mechanical Prairie Dog
    651.     [279213] = 2411, -- Wicker Pup
    652.     [279214] = 2412, -- Tiny Direhorn
    653.     [279215] = 2413, -- Zandalari Shinchomper
    654.     [279216] = 2414, -- Bloodfeaster Larva
    655.     [279217] = 2415, -- Tragg the Curious
    656.     [279218] = 2416, -- Lil' Ben'fon
    657.     [279219] = 2417, -- Ranishu Runt
    658.     [279220] = 2418, -- Child of Jani
    659.     [279221] = 2419, -- Swamp Toad
    660.     [279224] = 2420, -- Accursed Hexxer
    661.     [279225] = 2421, -- Saurolisk Hatchling
    662.     [279226] = 2422, -- Blue Flitter
    663.     [279227] = 2423, -- Freshwater Pincher
    664.     [279228] = 2424, -- Crimson Frog
    665.     [279230] = 2425, -- Barnacled Hermit Crab
    666.     [279231] = 2426, -- Sandstinger Wasp
    667.     [279232] = 2427, -- Cou'pa
    668.     [279233] = 2428, -- Carnivorous Lasher
    669.     [279234] = 2429, -- Azeriti
    670.     [279433] = 2430, -- Lost Platysaur
    671.     [279576] = 2431, -- Dreadtick Leecher
    672.     [279631] = 2432, -- Fuzzy Creepling
    673.     [279638] = 2433, -- Aldrusian Sproutling
    674.     [279643] = 2434, -- Voidwiggler
    675.     [279657] = 2435, -- Teeny Titan Orb
    676.     [279686] = 2436, -- Scabby
    677.     [279723] = 2437, -- Ragepeep
    678.     [279724] = 2438, -- Foulfeather
    679.     [279365] = 2439, -- Azerite Puddle
    680.     [279929] = 2440, -- Fozling
    681.     [279930] = 2441, -- Squawkling
    682.     [280157] = 2442, -- Bumbles
    683.     [280185] = 2443, -- Lil' Siege Tower
    684.     [280188] = 2444, -- Lil' War Machine
    685.     [177244] = 2445, -- Scuttle
    686.     [177237] = 2446, -- Sparkleshell Sandcrawler
    687.     [177236] = 2447, -- Kindleweb Spiderling
    688.     [177235] = 2448, -- Craghoof Kid
    689.     [177231] = 2449, -- False Knucklebump
    690.     [177230] = 2450, -- Tinder Pup
    691.     [280332] = 2451, -- Bloodstone Tunneler
    692.     [177241] = 2452, -- Poro
    693.     [280335] = 2453, -- Juvenile Brineshell
    694.     [280336] = 2454, -- Kunchong Hatchling
    695.     [177243] = 2455, -- Captain Nibs
    696.     [177242] = 2456, -- Barnaby
    697.     [280337] = 2457, -- Coldlight Surfrunner
    698.     [280334] = 2458, -- Muskflank Calfling
    699.     [280333] = 2459, -- Snort
    700.     [280338] = 2460, -- Voru'kar Leecher
    701.     [177239] = 2461, -- Inky
    702.     [177240] = 2462, -- Octopode Fry
    703.     [177229] = 2463, -- Sandshell Chitterer
    704.     [177228] = 2464, -- Deathsting Scorpid
    705.     [177222] = 2465, -- Playful Frostkin
    706.     [177225] = 2466, -- Giggling Flame
    707.     [177221] = 2467, -- Mischievous Zephyr
    708.     [177224] = 2468, -- Laughing Stonekin
    709.     [177226] = 2469, -- Thistlebrush Bud
    710.     [177219] = 2471, -- Littlehoof
    711.     [177217] = 2472, -- Snapper
    712.     [280331] = 2473, -- Sunscale Hatchling
    713.     [280617] = 2474, -- Gearspring Hopper
    714.     [280619] = 2475, -- Slippy
    715.     [280618] = 2476, -- Bloated Bloodfeaster
    716.     [279435] = 2477, -- Baby Crawg
    717.     [280728] = 2478, -- Sir Snips
    718.     [280727] = 2479, -- Bucketshell
    719.     [281878] = 2480, -- Test Pet
    720.     [283744] = 2482, -- Wolf Balloon
    721.     [283741] = 2483, -- Murloc Balloon
    722.     [283740] = 2484, -- Horse Balloon
    723.     [285843] = 2525, -- Redridge Tarantula
    724.     [286474] = 2526, -- Feathers
    725.     [286483] = 2527, -- Child of Pa'ku
    726.     [286484] = 2528, -- Spawn of Krag'wa
    727.     [286482] = 2529, -- Thunder Lizard Runt
    728.     [286514] = 2530, -- Mechantula
    729.     [286574] = 2531, -- Mechanical Cockroach
    730.     [286576] = 2532, -- Leper Rat
    731.     [286582] = 2533, -- Alarm-O-Dog
    732.     [286790] = 2534, -- Mini Spider Tank
    733.     [286837] = 2535, -- Wicker Wraith
    734.     [287997] = 2538, -- Dasher
    735.     [288006] = 2539, -- Trecker
    736.     [288009] = 2540, -- Tanzil
    737.     [288054] = 2541, -- Proper Parrot
    738.     [288486] = 2544, -- Darkshore Sentinel
    739.     [288582] = 2545, -- Gust of Cyclarus
    740.     [288592] = 2546, -- Detective Ray
    741.     [288595] = 2547, -- Hydrath Droplet
    742.     [288597] = 2548, -- Everburning Treant
    743.     [288598] = 2549, -- Void Jelly
    744.     [288600] = 2550, -- Zur'aj the Depleted
    745.     [288867] = 2551, -- Baby Stonehide
    746.     [288868] = 2552, -- Leatherwing Screecher
    747.     [288870] = 2553, -- Rotting Ghoul
    748.     [288875] = 2554, -- Needleback Pup
    749.     [288890] = 2555, -- Albino Duskwatcher
    750.     [288889] = 2556, -- Shadefeather Hatchling
    751.     [288895] = 2557, -- Firesting Buzzer
    752.     [288901] = 2558, -- Lord Woofington
    753.     [288910] = 2559, -- Tonguelasher
    754.     [288914] = 2560, -- Scritches
    755.     [288916] = 2561, -- Thunderscale Whelpling
    756.     [288919] = 2562, -- Crimson Octopode
    757.     [289359] = 2563, -- Nightwreathed Watcher
    758.     [289604] = 2564, -- Rebuilt Gorilla Bot
    759.     [289605] = 2565, -- Rebuilt Mechanical Spider
    760.     [289606] = 2566, -- Albatross Hatchling
    761.     [289622] = 2567, -- Crimson Bat Pup
    762.     [289629] = 2568, -- Cobalt Raven
    763.     [289633] = 2569, -- Violet Abyssal Eel
    764.     [291203] = 2575, -- Mr. Crabs
    765.     [291214] = 2576, -- Beakbert
    766.     [291215] = 2577, -- Froglet
    767.     [291223] = 2578, -- Scaley
    768.     [291513] = 2579, -- Stoneclaw
    769.     [291515] = 2580, -- Wayward Spirit
    770.     [291517] = 2581, -- Comet
    771.     [291533] = 2582, -- Baoh-Xi
    772.     [291537] = 2583, -- Azure Windseeker
    773.     [291537] = 2584, -- Spirit of the Spring
    774.     [291548] = 2585, -- Kor'thik Swarmling
    775.     [291549] = 2586, -- Amberglow Stinger
    776.     [291553] = 2587, -- Spawn of Garalon
    777.     [291556] = 2589, -- Living Amber
    778.     [291560] = 2590, -- Ravenous Prideling
    779.     [291561] = 2591, -- Happiness
    780.     [294206] = 2621, -- Lil' Nefarian
    781.     [294211] = 2622, -- Jingles
    782.     [294231] = 2623, -- Dottie
    783.     [300387] = 2638, -- Minimancer
    784.     [301015] = 2680, -- Zanj'ir Poker
    785.     [301042] = 2681, -- Murgle
    786.     [301043] = 2682, -- Necrofin Tadpole
    787.     [301020] = 2683, -- Kelpfin
    788.     [301021] = 2684, -- Glittering Diamondshell
    789.     [301022] = 2685, -- Sandclaw Nestseeker
    790.     [301023] = 2686, -- Pearlescent Glimmershell
    791.     [301024] = 2687, -- Lustrous Glimmershell
    792.     [301025] = 2688, -- Brilliant Glimmershell
    793.     [301026] = 2689, -- Chitterspine Needler
    794.     [301027] = 2690, -- Caverndark Nightmare
    795.     [301028] = 2691, -- Chitterspine Devourer
    796.     [301029] = 2692, -- Lightless Ambusher
    797.     [301030] = 2693, -- Spawn of Nalaada
    798.     [301031] = 2694, -- Mindlost Bloodfrenzy
    799.     [301032] = 2695, -- Daggertooth Frenzy
    800.     [301033] = 2696, -- Nameless Octopode
    801.     [301034] = 2697, -- Amethyst Softshell
    802.     [301035] = 2698, -- Prismatic Softshell
    803.     [301036] = 2699, -- Damplight Slug
    804.     [301037] = 2700, -- Wriggler
    805.     [301038] = 2701, -- Seafury
    806.     [301039] = 2702, -- Stormwrath
    807.     [301040] = 2703, -- Sandkeep
    808.     [301041] = 2704, -- Scalebrood Hydra
    809.     [301044] = 2706, -- Brinestone Algan
    810.     [301045] = 2707, -- Budding Algan
    811.     [301046] = 2708, -- Coral Lashling
    812.     [301047] = 2709, -- Skittering Eel
    813.     [301048] = 2710, -- Drowned Hatchling
    814.     [301049] = 2711, -- Golden Snorf
    815.     [301050] = 2712, -- Snowsoft Nibbler
    816.     [301051] = 2713, -- Mustyfur Snooter
    817.     [301052] = 2714, -- OOX-35/MG
    818.     [301053] = 2715, -- Lost Robogrip
    819.     [301054] = 2716, -- Utility Mechanoclaw
    820.     [301055] = 2717, -- Microbot XD
    821.     [301056] = 2718, -- Microbot 8D
    822.     [301136] = 2719, -- Bonebiter
    823.     [301137] = 2720, -- Arachnoid Skitterbot
    824.     [301162] = 2721, -- Echoing Oozeling
    825.     [301985] = 2747, -- Gruesome Belcher
    826.     [301992] = 2748, -- Ziggy
    827.     [301996] = 2749, -- Crypt Fiend
    828.     [302003] = 2750, -- Shrieker
    829.     [303023] = 2753, -- Spraybot 0D
    830.     [300367] = 2754, -- Ghostly Whelpling
    831.     [300934] = 2755, -- Adventurous Hopling
    832.     [303608] = 2756, -- Irradiated Elementaling
    833.     [294275] = 2757, -- Slimy Otter
    834.     [294278] = 2758, -- Slimy Eel
    835.     [294276] = 2760, -- Slimy Octopode
    836.     [294277] = 2761, -- Slimy Fangtooth
    837.     [294279] = 2762, -- Slimy Darkhunter
    838.     [294280] = 2763, -- Slimy Hermit Crab
    839.     [294274] = 2765, -- Slimy Sea Slug
    840.     [303784] = 2766, -- Armored Vaultbot
    841.     [303899] = 2767, -- Burnout
    842.     [307264] = 2776, -- Rikki
    843.     [307654] = 2777, -- Gillvanas
    844.     [307655] = 2778, -- Finduin
    845.     [308067] = 2779, -- Anima Wyrmling
    846.     [308369] = 2780, -- Daisy
    847.     [309516] = 2792, -- Papi
    848.     [309519] = 2793, -- Sunsoaked Flitter
    849.     [309522] = 2794, -- Crimson Skipper
    850.     [311289] = 2795, -- Jenafur
    851.     [312029] = 2796, -- Void-Scarred Toad
    852.     [312030] = 2797, -- Void-Scarred Pup
    853.     [312833] = 2798, -- Plagueborn Slime
    854.     [315221] = 2832, -- Muar
    855.     [315225] = 2833, -- Void-Scarred Anubisath
    856.     [315229] = 2834, -- Aqir Hivespawn
    857.     [315231] = 2835, -- Ra'kim
    858.     [315270] = 2836, -- Eye of Corruption
    859.     [315285] = 2837, -- Gloop
    860.     [315290] = 2838, -- C'Thuffer
    861.     [315297] = 2839, -- Void-Scarred Hare
    862.     [315298] = 2840, -- Void-Scarred Cat
    863.     [315301] = 2841, -- Void-Scarred Rat
    864.     [315302] = 2842, -- Anomalus
    865.     [315303] = 2843, -- Void-Scarred Beetle
    866.     [315304] = 2844, -- Reek
    867.     [315339] = 2845, -- K'uddly
    868.     [315353] = 2846, -- Corrupted Tentacle
    869.     [315355] = 2847, -- Rotbreath
    870.     [315360] = 2848, -- Aqir Tunneler
    871.     [315363] = 2849, -- Pygmy Camel
    872.     [315367] = 2850, -- Cursed Dune Watcher
    873.     [315370] = 2851, -- Wicked Lurker
    874.     [315371] = 2852, -- Jade Defender
    875.     [315372] = 2853, -- Windfeather Chick
    876.     [316629] = 2868, -- Experiment 13
    877.     [316628] = 2869, -- Tinyclaw
    878.     [316627] = 2870, -- Wailing Lasher
    879.     [318300] = 2872, -- Shadowbarb Hatchling
    880.     [318876] = 2878, -- Renny
    881.     [329900] = 2888, -- Glimr
    882.     [330997] = 2889, -- PHA7-YNX
    883.     [333794] = 2891, -- Blushing Spiderling
    884.     [333796] = 2892, -- Bound Lightspawn
    885.     [333797] = 2893, -- Animated Tome
    886.     [333800] = 2894, -- Burdened Soul
    887.     [333799] = 2896, -- Primordial Bogling
    888.     [333795] = 2897, -- Wrathling
    889.     [333802] = 2898, -- Raw Emotion
    890.     [333804] = 2899, -- Court Messenger
    891.     [333819] = 2900, -- Dal
    892.     [333803] = 2901, -- Trapped Stonefiend
    893.     [333865] = 2903, -- Crimson Dredwing Pup
    894.     [333868] = 2904, -- Violet Dredwing Pup
    895.     [334160] = 2905, -- Dodger
    896.     [334159] = 2907, -- Rocky
    897.     [334158] = 2908, -- Chirpy Valeshrieker
    898.     [334157] = 2909, -- Cloudfeather Fledgling
    899.     [334156] = 2910, -- Floofa
    900.     [334155] = 2911, -- Amber Glitterwing
    901.     [334154] = 2912, -- Dusty Sporeflutterer
    902.     [334153] = 2913, -- Fuzzy Shimmermoth
    903.     [334151] = 2914, -- Starry Dreamfoal
    904.     [334150] = 2915, -- Willowbreeze
    905.     [334149] = 2916, -- Hungry Burrower
    906.     [334146] = 2917, -- Gloober, as G'huun
    907.     [334145] = 2918, -- Grubby
    908.     [334143] = 2920, -- Gorm Needler
    909.     [334142] = 2921, -- Gorm Harrier
    910.     [334141] = 2922, -- Devouring Animite
    911.     [334139] = 2923, -- Pearlwing Heron
    912.     [334789] = 2925, -- Golden Cloudfeather
    913.     [334987] = 2928, -- Helpful Glimmerfly
    914.     [334798] = 2931, -- Brightscale Hatchling
    915.     [335050] = 2932, -- Silvershell Snapper
    916.     [334796] = 2933, -- Sable
    917.     [335053] = 2934, -- Goldenpaw Kit
    918.     [335056] = 2935, -- Purity
    919.     [335076] = 2938, -- Gilded Wader
    920.     [335083] = 2940, -- Devoured Wader
    921.     [335085] = 2941, -- Indigo
    922.     [335087] = 2942, -- Spirited Skyfoal
    923.     [335698] = 2944, -- Oonar's Arm
    924.     [335753] = 2945, -- Corpulent Bonetusk
    925.     [335755] = 2946, -- Pernicious Bonetusk
    926.     [335762] = 2947, -- Luminous Webspinner
    927.     [335764] = 2948, -- Boneweave Hatchling
    928.     [335765] = 2949, -- Skittering Venomspitter
    929.     [335966] = 2952, -- Bubbling Pustule
    930.     [335969] = 2953, -- Shy Melvin
    931.     [335972] = 2954, -- Plaguelouse Larva
    932.     [335974] = 2955, -- Corpselouse Larva
    933.     [335977] = 2956, -- Feasting Larva
    934.     [335979] = 2957, -- Writhing Spine
    935.     [335980] = 2958, -- Backbone
    936.     [336020] = 2959, -- Micromancer
    937.     [336021] = 2960, -- Invertebrate Oil
    938.     [336022] = 2961, -- Sludge Feeler
    939.     [336024] = 2962, -- Toenail
    940.     [336030] = 2963, -- Mu'dud
    941.     [336031] = 2964, -- Foulwing Buzzer
    942.     [336311] = 2965, -- Bloodfeaster Spiderling
    943.     [337031] = 2966, -- Sinheart
    944.     [337694] = 2967, -- Dredger Butler
    945.     [339590] = 3006, -- Stoneskin Dredwing Pup
    946.     [339593] = 3008, -- Lost Quill
    947.     [339668] = 3009, -- The Count
    948.     [339670] = 3010, -- Sinfall Screecher
    949.     [339671] = 3011, -- Battie
    950.     [339674] = 3012, -- Stony
    951.     [339677] = 3013, -- Bloodlouse Larva
    952.     [339976] = 3016, -- Fun Guss
    953.     [339981] = 3017, -- Leafadore
    954.     [339982] = 3018, -- Trootie
    955.     [339983] = 3019, -- Stemmins
    956.     [339997] = 3020, -- Runelight Leaper
    957.     [339999] = 3022, -- Shimmerbough Hoarder
    958.     [340002] = 3023, -- Sir Reginald
    959.     [340710] = 3024, -- Char
    960.     [340717] = 3025, -- Carpal
    961.     [340721] = 3026, -- Tower Deathroach
    962.     [340722] = 3027, -- Hissing Deathroach
    963.     [340723] = 3028, -- Severs
    964.     [341289] = 3029, -- Maw Crawler
    965.     [341292] = 3030, -- Ashen Chomper
    966.     [341293] = 3032, -- Frenzied Mawrat
    967.     [341295] = 3033, -- Maw Stalker
    968.     [341298] = 3034, -- Torghast Lurker
    969.     [341301] = 3035, -- Lavender Nibbler
    970.     [341302] = 3036, -- Will of Remornia
    971.     [341492] = 3037, -- Dread
    972.     [341493] = 3038, -- Undying Deathroach
    973.     [341494] = 3039, -- Decaying Mawrat
    974.     [341495] = 3040, -- Sharpclaw
    975.     [341497] = 3041, -- Death Seeker
    976.     [341515] = 3042, -- Ruffle
    977.     [341516] = 3043, -- Jiggles
    978.     [341519] = 3044, -- Spinemaw Gormling
    979.     [341635] = 3045, -- Iridescent Ooze
    980.     [341825] = 3046, -- Putrid Geist
    981.     [343161] = 3047, -- Spinebug
    982.     [344755] = 3053, -- Moon-Touched Netherwhelp
    983.     [344792] = 3054, -- Archivist's Quill
    984.     [345740] = 3061, -- Steward Featherling
    985.     [345741] = 3062, -- Lost Featherling
    986.     [345742] = 3063, -- Larion Pouncer
    987.     [345744] = 3064, -- Larion Cub
    988.     [345743] = 3065, -- Courage
    989.     [346192] = 3066, -- Lucy
    990.     [346236] = 3067, -- Spriggan Trickster
    991.     [346260] = 3079, -- Winterleaf Spriggan
    992. }
    993.  
    994. local function OnEvent(self, event, unit, _, spellID)
    995.     local speciesID = SummonSpellID[spellID]
    996.     if speciesID then
    997.         local name = C_PetJournal.GetPetInfoBySpeciesID(speciesID)
    998.         print(spellID, GetSpellLink(spellID), speciesID, name)
    999.     end
    1000. end
    1001.  
    1002. local f = CreateFrame("Frame")
    1003. f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
    1004. f:SetScript("OnEvent", OnEvent)

Originally Posted by Walkerbo View Post
The documentation indicates that GetSpellLink works with the spellName yet I get nils when I use it.

GetSpellLink() is working fine for me with the summon spell ID, as shown in the example

Originally Posted by Walkerbo View Post
If I knew how to use the castingGUID I may be able to track that instead.

The castGUID from UNIT_SPELLCAST_SUCCEEDED is different from the petGUID so I'm not sure if that would work even if you could kind of convert the castGUID into a unitGUID

Last edited by Ketho : 04-05-21 at 12:56 AM.
  Reply With Quote
04-05-21, 02:32 AM   #10
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Heya Ketho

Thanks for your post I will try and hit all of your points.

I want to play a sound when someone summons a blingtron, this will allow me to know when I can get a free gift, it will also allow me to play a blingtron to fight.

To do this I track the "UNIT_SPELLCAST_SUCCEEDED"
event to identify the different blingtrons by their summonPetSpellID.

When I first started this thread my initial issue was that I could not get pet details of the pet held on my cursor, the documentation indicated that I needed the petID to get pet details using C_PetJournal.GetPetInfoByPetID("petID"), yet there was no way for me to get the petID from the cursor.

This initial issue was solved once I worked out that even though the api documentation said that to get the pet information I had to use the petID, it actually required the petGUID.

Now that I had gotten the pet details I still needed the petSummonSpellID that I could track with "UNIT_SPELLCAST_SUCCEEDED"
event; so my next task was to get the petSummonSpellID.

To this end I tried link, spellID = GetSpellLink(spellID or spellName)

This function returns the link and spellID using either the spellName or the spellID; as my goal was to get the spellID I had to use the spellName, which unfortunately returned nil; since you had the spellID the function would have worked fine returning both the link and spellID.

So you used the summonSpellID which is the one bit of data that I can not seem to get.

I have no idea why using GetSpellLink(spellName) returns nil, and I have no idea as to how I can find the spellID without it.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-05-21, 02:48 AM   #11
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Walkerbo View Post
I want to play a sound when someone summons a blingtron, this will allow me to know when I can get a free gift, it will also allow me to play a blingtron to fight.

Blingtron isn't even a pet... it's a toy, they are summoned with the COMBAT_LOG_EVENT_UNFILTERED SPELL_SUMMON subevent

Originally Posted by Walkerbo View Post
To this end I tried link, spellID = GetSpellLink(spellID or spellName)

This function returns the link and spellID using either the spellName or the spellID; as my goal was to get the spellID I had to use the spellName, which unfortunately returned nil; since you had the spellID the function would have worked fine returning both the link and spellID.

[...]

I have no idea why using GetSpellLink(spellName) returns nil, and I have no idea as to how I can find the spellID without it.

uhmm wtf I can't follow that logic

GetSpellLink() doesn't work with spell names if it's not a known spell to the player character. Like, just use the Spell ID?
  Reply With Quote
04-05-21, 05:27 PM   #12
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Heya Ketho

What a dunce I am, yes blingtron is a toy, a point that I totally missed.

As for getSpellLink() the documentation shows that the function can take one of two parameters, either the spellName or the spellID.

link, spellID = GetSpellLink(spellID or spellName)

Yes it would be better for me to use the spellID yet I have not found a way to get it.

How do I get the summonPetSpellID itself?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-05-21, 05:48 PM   #13
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
GetSpellInfo(spellName) and GetSpellLink(spellName) only return information for spells in your own spell book. This is a way to confirm you have actually learned a spell.

GetSpellInfo(spellID) and GetSpellLink(spellID) work always for any valid spellID -- although in your case this isn't helpful for what you are trying to do.

Since you are interested in Blingtron spells, you need to first get the spellID associated with the summoning spells. The simplest way is, honestly, to just look it up on popular database websites such as Wowhead (q=blingtron#uncategorized-spells).

The spellID is in the url of each page on these sites. For example:
  Reply With Quote
04-05-21, 06:01 PM   #14
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hey DahkCeles

Ah, I see, as it is not a spell in my spellbook I cannot get the petSummonSpellID, well that clears that up.

As to get the spellID from wowhead, wouldn't that mean I would need to manually create a table of all pets and their spellIDs, or is there a way I can query the server to grab the spellID of a pet from the pet journal itself?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-05-21, 07:37 PM   #15
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I thought you just wanted to play a sound when someone summons a Blingtron?
__________________
"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
04-05-21, 08:52 PM   #16
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
I would make a table with just the few (three?) spellIDs corresponding to summoning Blingtrons. Given its so few in number, a manual lookup is probably easier than trying to put together a solution that builds a table automatically.

Also, you might want to add logic to detect if you have received a package from that particular kind of Blingtron earlier in the day, so the chime doesn't go off repeatedly when you cannot actually use it.
  Reply With Quote
04-05-21, 10:13 PM   #17
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hey Seerah

Yes, that was my goal, but I like a mystery and once I hit a limitation I wanted to follow it.

To say that I am a noob when it comes to programming is a gross understatement and I take these moments to try and better understand.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-05-21, 10:20 PM   #18
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Heya DahkCeles

Thanks for that, yes I will be able to track that to ensure it won't go off it is still on cooldown.

Thanks to all for your help.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
04-06-21, 10:37 AM   #19
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Originally Posted by Walkerbo View Post
Yes, that was my goal, but I like a mystery and once I hit a limitation I wanted to follow it.

Well in that light.... here is the world's most inefficient way of doing it:

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  3. f:HookScript("OnEvent", function(self, event, arg1, arg2, spellId)
  4.     if (event == "UNIT_SPELLCAST_SUCCEEDED" and GetSpellInfo(spellId):sub(1,10) == "Blingtron ") then
  5.         -- doSomething()
  6.     end
  7. end)

This checks every single spell cast, and queries for the spell name. If the first ten characters are "Blingtron " then it assumes it must be one of the Blingtron casts.

Suffice to say, I don't recommend actually trying this. The string function would probably be very wasteful on CPU resources in combat.
  Reply With Quote
04-06-21, 05:25 PM   #20
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi DahkCeles

Thanks for that, I am still learning and even though code can make me cry I still love it.

Your chunk was great fun to try but I will take your advice and use the earlier method.

Once again cheers for the help.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Getting pet details from a petGUID

Thread Tools
Display Modes

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