Select creature or unit object just from creature's spawnId.

Hey! I was wondering if there was a simple way to get a unit object by a creature’s spawn ID, I have a way to do it at the moment that involves using the map->GetCreatureBySpawnIdStore(); but it seems extremely round about for what I would assume would be an easy thing.

I’m probably missing something obvious but if anyone has any insight into it that’d be awesome.

Thanks for your time.

map->GetCreatureBySpawnIdStore() is inedeed the intended method to use to get it. The plan is to support multiple spawns from a single spawn id (the blizzlike respawn before old corpse despawned) which is why it is a std::unordered_multimap instead of simple std::unordered_map

Ah that makes sense.

Thanks for the reply!