Returns information about a non-combat pet or mount


See also Companion functions.

Signature:

creatureID, creatureName, spellID, icon, active, mountFlags = GetCompanionInfo("type", index)

Arguments:

  • type - Type of companion (string)

    • CRITTER - A non-combat pet
    • MOUNT - A mount

  • index - Index of a companion (between 1 and GetNumCompanions(type)) (number)

Returns:

  • creatureID - Unique ID of the companion (usable with PlayerModel:SetCreature) (number)
  • creatureName - Localized name of the companion (string)
  • spellID - The "spell" for summoning the companion (usable with GetSpellLink et al) (number)
  • icon - Path to an icon texture for the companion (string)
  • active - 1 if the companion queried is currently summoned; otherwise nil (1nil)
  • mountFlags - A bitfield that indicates mount capabilities. Only returned for mounts. (bitfield)
    • 0x01 - Ground mount
    • 0x02 - Flying mount
    • 0x04 - Usable at the water's surface
    • 0x08 - Usable underwater
    • 0x10 - Can jump (the turtle mount cannot, for example)