C_MountJournal.GetMountInfoByID

From Warcraft Wiki
Jump to navigation Jump to search
GitHub Octocat.png  Townlong-Yak BAD.png  ProfIcons engineering.png  BTNTemp.png C_MountJournal.GetMountInfoByID TheWarWithin-Icon-Inline.pngDragonflight-Icon-Inline.pngCata-Logo-Small.pngWrath-Logo-Small.pngWoW Icon update.png + 7.0.3 / 1.15.0
GitHub Octocat.png  Townlong-Yak BAD.png  ProfIcons engineering.png  BTNTemp.png C_MountJournal.GetDisplayedMountInfo TheWarWithin-Icon-Inline.pngDragonflight-Icon-Inline.pngCata-Logo-Small.pngWrath-Logo-Small.pngWoW Icon update.png + 7.0.3 / 1.15.0
Wowprogramming.png  BTNTemp.png C_MountJournal.GetMountInfo + 6.0.2

Returns information about the specified mount.

name, spellID, icon, isActive, isUsable, sourceType, isFavorite, isFactionSpecific, faction, shouldHideOnChar, isCollected, mountID
    = C_MountJournal.GetMountInfoByID(mountID)
    = C_MountJournal.GetDisplayedMountInfo(displayIndex)

Arguments

GetMountInfoByID

mountID
number : MountID - Returned from C_MountJournal.GetMountIDs()

GetDisplayedMountInfo

displayIndex
number - Index of the displayed mount in the mount journal list with the current search query and filters. Ranging from 1 to C_MountJournal.GetNumDisplayedMounts()

Returns

1. name
string - The name of the mount.
2. spellID
number - The ID of the spell that summons the mount.
3. icon
number : FileID - Icon texture used by the mount.
4. isActive
boolean - Indicates if the player is currently mounted on the mount.
5. isUsable
boolean - Indicates if the mount is usable based on the player's current location, riding skill, profession skill, class, etc.
6. sourceType
number - Indicates generally how the mount may be obtained; a localized string describing the acquisition method is returned by C_MountJournal.GetMountInfoExtraByID.
7. isFavorite
boolean - Indicates if the mount is currently marked as a favorite.
8. isFactionSpecific
boolean - true if the mount is only available to one faction, false otherwise.
9. faction
number? - 0 if the mount is available only to Horde players, 1 if the mount is available only to Alliance players, or nil if the mount is not faction-specific.
10. shouldHideOnChar
boolean - Indicates if the mount should be hidden in the player's mount journal (includes Swift Spectral Gryphon and mounts specific to the opposite faction).
11. isCollected
boolean - Indicates if the player has learned the mount.
12. mountID
number - ID of the mount.
13. isForDragonriding
boolean

Details

Current values of the sourceType return include:

  • 0 - not categorized; includes many mounts that should (and may eventually) be included in one of the other categories
BATTLE_PET_SOURCE
ID Constant Value Description
1
BATTLE_PET_SOURCE_1 Drop
2
BATTLE_PET_SOURCE_2 Quest
3
BATTLE_PET_SOURCE_3 Vendor
4
BATTLE_PET_SOURCE_4 Profession
5
BATTLE_PET_SOURCE_5 Pet Battle
6
BATTLE_PET_SOURCE_6 Achievement
7
BATTLE_PET_SOURCE_7 World Event
8
BATTLE_PET_SOURCE_8 Promotion
9
BATTLE_PET_SOURCE_9 Trading Card Game
10
BATTLE_PET_SOURCE_10 In-Game Shop
11
BATTLE_PET_SOURCE_11 Discovery

Patch changes

Dragonflight Patch 10.0.0 (2022-10-25): Added isForDragonriding return.
Legion Patch 7.0.3 (2016-07-19): Added. Replaces C_MountJournal.GetMountInfo()