Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetCompanionInfo

Last wiki revision 2023-05-06

Returns info for a companion. creatureID, creatureName, creatureSpellID, icon, issummoned, mountType = GetCompanionInfo(type, id)

  • type: - Companion type to query: "CRITTER" or "MOUNT".
  • id: - Index of the slot to query. Starting at 1 and going up to GetNumCompanions("type").
  • creatureID: - The NPC ID of the companion.
  • creatureName: - The name of the companion.
  • creatureSpellID: - The spell ID to cast the companion. This is not passed to, but can be used with, e.g.,.
  • icon: - The texture of the icon for the companion.
  • issummoned: - 1 if the companion is summoned, nil if it's not.
  • mountType: - Bitfield for air/ground/water mounts
  • 0x1: Ground
  • 0x2: Can fly
  • 0x4: ? (set for most mounts)
  • 0x8: Underwater
  • 0x10: Can jump (turtles cannot)
  • The indices are unstable: you may not rely on the mapping to the same companion after an arbitrary amount of time, even if the player does not learn/unlearn any companions during the period.
  • Generally, the indices are ordered alphabetically, though this order may be violated during the initial loading process and upon zoning.
  • C_PetJournal function

Source

https://warcraft.wiki.gg/wiki/API_GetCompanionInfo · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.