Add C_PetJournal module with functions for managing pet journal operations
This commit is contained in:
427
C_PetJournal.lua
Normal file
427
C_PetJournal.lua
Normal file
@@ -0,0 +1,427 @@
|
|||||||
|
---@meta
|
||||||
|
---
|
||||||
|
--- C_PetJournal is a namespace for functions related to the pet journal system.
|
||||||
|
---
|
||||||
|
--- @class C_PetJournal
|
||||||
|
C_PetJournal = {
|
||||||
|
--- Puts the pet into a cage.
|
||||||
|
--- @param petID number The ID of the pet to cage
|
||||||
|
--- @return boolean success Whether the pet was successfully caged
|
||||||
|
CagePetByID = function(petID) end,
|
||||||
|
|
||||||
|
--- Clears the fanfare state for newly acquired pets
|
||||||
|
--- @return nil
|
||||||
|
ClearFanfare = function() end,
|
||||||
|
|
||||||
|
--- Clears the currently hovered battle pet
|
||||||
|
--- @return nil
|
||||||
|
ClearHoveredBattlePet = function() end,
|
||||||
|
|
||||||
|
--- Clears recent fanfare notifications
|
||||||
|
--- @return nil
|
||||||
|
ClearRecentFanfares = function() end,
|
||||||
|
|
||||||
|
--- Clears the search box in the pet journal.
|
||||||
|
--- @return nil
|
||||||
|
ClearSearchFilter = function() end,
|
||||||
|
|
||||||
|
--- Finds a pet by its name
|
||||||
|
--- @param petName string The name of the pet to find
|
||||||
|
--- @return number speciesId The species ID of the found pet
|
||||||
|
--- @return string petGUID The unique identifier of the found pet
|
||||||
|
FindPetIDByName = function(petName) end,
|
||||||
|
|
||||||
|
--- Returns a battle pet link.
|
||||||
|
--- @param petID number The ID of the pet
|
||||||
|
--- @return string link The chat link for the battle pet
|
||||||
|
GetBattlePetLink = function(petID) end,
|
||||||
|
|
||||||
|
--- Gets the display ID for a pet species at a specific index
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @param index number The display index
|
||||||
|
--- @return number displayID The display ID for the pet
|
||||||
|
GetDisplayIDByIndex = function(speciesID, index) end,
|
||||||
|
|
||||||
|
--- Gets the probability of a specific display variation
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @param index number The display index
|
||||||
|
--- @return number displayProbability The probability of this display variation
|
||||||
|
GetDisplayProbabilityByIndex = function(speciesID, index) end,
|
||||||
|
|
||||||
|
--- Gets collection information for a pet species
|
||||||
|
--- @param speciesId number The species ID
|
||||||
|
--- @return number numCollected Number of this species collected
|
||||||
|
--- @return number limit Maximum number that can be collected
|
||||||
|
GetNumCollectedInfo = function(speciesId) end,
|
||||||
|
|
||||||
|
--- Gets the number of display variations for a pet species
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @return number numDisplays Number of display variations
|
||||||
|
GetNumDisplays = function(speciesID) end,
|
||||||
|
|
||||||
|
--- Returns information about the number of battle pets.
|
||||||
|
--- @return number numPets Total number of pets
|
||||||
|
--- @return number numOwned Number of owned pets
|
||||||
|
GetNumPets = function() end,
|
||||||
|
|
||||||
|
--- Gets the number of pets of a specific type in the journal
|
||||||
|
--- @param creatureID number The creature ID
|
||||||
|
--- @return number maxAllowed Maximum allowed
|
||||||
|
--- @return number numPets Number of pets owned
|
||||||
|
GetNumPetsInJournal = function(creatureID) end,
|
||||||
|
|
||||||
|
--- Gets the number of pets needing fanfare display
|
||||||
|
--- @return number count Number of pets needing fanfare
|
||||||
|
GetNumPetsNeedingFanfare = function() end,
|
||||||
|
|
||||||
|
--- Returns information about the number of pet sources.
|
||||||
|
--- @return number numSources Number of different pet sources
|
||||||
|
GetNumPetSources = function() end,
|
||||||
|
|
||||||
|
--- Returns information about the number of pet types.
|
||||||
|
--- @return number numTypes Number of different pet types
|
||||||
|
GetNumPetTypes = function() end,
|
||||||
|
|
||||||
|
--- Returns a formatted string how many of a battle pet species the player has collected.
|
||||||
|
--- @param speciesId number The species ID
|
||||||
|
--- @return string ownedString Formatted string showing collection status
|
||||||
|
GetOwnedBattlePetString = function(speciesId) end,
|
||||||
|
|
||||||
|
--- Gets a table of all owned pet IDs
|
||||||
|
--- @return table ownedPetIDs Table containing all owned pet IDs
|
||||||
|
GetOwnedPetIDs = function() end,
|
||||||
|
|
||||||
|
--- Gets information about a pet ability
|
||||||
|
--- @param abilityID number The ability ID
|
||||||
|
--- @return string name The name of the ability
|
||||||
|
--- @return string icon The icon texture path
|
||||||
|
--- @return string petType The type of pet this ability belongs to
|
||||||
|
GetPetAbilityInfo = function(abilityID) end,
|
||||||
|
|
||||||
|
--- Gets a list of pet abilities
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @param idTable? table Optional table to store ability IDs
|
||||||
|
--- @param levelTable? table Optional table to store ability levels
|
||||||
|
--- @return table idTable Table of ability IDs
|
||||||
|
--- @return table levelTable Table of ability levels
|
||||||
|
GetPetAbilityList = function(speciesID, idTable, levelTable) end,
|
||||||
|
|
||||||
|
--- Gets a table of pet ability information
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @return table info Table containing ability information
|
||||||
|
GetPetAbilityListTable = function(speciesID) end,
|
||||||
|
|
||||||
|
--- Gets cooldown information for a pet
|
||||||
|
--- @param GUID string The pet's GUID
|
||||||
|
--- @return number start Cooldown start time
|
||||||
|
--- @return number duration Cooldown duration
|
||||||
|
--- @return boolean isEnabled Whether the cooldown is enabled
|
||||||
|
GetPetCooldownByGUID = function(GUID) end,
|
||||||
|
|
||||||
|
--- Returns information about a battle pet.
|
||||||
|
--- @param index number The index of the pet
|
||||||
|
--- @return number petID The pet ID
|
||||||
|
--- @return number speciesID The species ID
|
||||||
|
--- @return boolean owned Whether the pet is owned
|
||||||
|
--- @return string customName Custom name if set
|
||||||
|
--- @return number level Pet level
|
||||||
|
--- @return boolean favorite Whether it's marked as favorite
|
||||||
|
--- @return boolean isRevoked Whether the pet is revoked
|
||||||
|
--- @return string speciesName Species name
|
||||||
|
--- @return string icon Icon texture path
|
||||||
|
--- @return number petType Pet type ID
|
||||||
|
--- @return number companionID Companion ID
|
||||||
|
--- @return string tooltip Tooltip text
|
||||||
|
--- @return string description Pet description
|
||||||
|
--- @return boolean isWild Whether it's a wild pet
|
||||||
|
--- @return boolean canBattle Whether it can battle
|
||||||
|
--- @return boolean isTradeable Whether it can be traded
|
||||||
|
--- @return boolean isUnique Whether it's unique
|
||||||
|
--- @return boolean obtainable Whether it can be obtained
|
||||||
|
GetPetInfoByIndex = function(index) end,
|
||||||
|
|
||||||
|
--- Gets information about a pet from its item ID
|
||||||
|
--- @param itemID number The item ID
|
||||||
|
--- @return string name Pet name
|
||||||
|
--- @return string icon Icon texture path
|
||||||
|
--- @return number petType Pet type ID
|
||||||
|
--- @return number creatureID Creature ID
|
||||||
|
--- @return string sourceText Source description
|
||||||
|
--- @return string description Pet description
|
||||||
|
--- @return boolean isWild Whether it's a wild pet
|
||||||
|
--- @return boolean canBattle Whether it can battle
|
||||||
|
--- @return boolean isTradeable Whether it can be traded
|
||||||
|
--- @return boolean isUnique Whether it's unique
|
||||||
|
--- @return boolean obtainable Whether it can be obtained
|
||||||
|
--- @return number displayID Display ID
|
||||||
|
--- @return number speciesID Species ID
|
||||||
|
GetPetInfoByItemID = function(itemID) end,
|
||||||
|
|
||||||
|
--- Returns information about a battle pet.
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return number speciesID Species ID
|
||||||
|
--- @return string customName Custom name if set
|
||||||
|
--- @return number level Pet level
|
||||||
|
--- @return number xp Current experience
|
||||||
|
--- @return number maxXp Experience needed for next level
|
||||||
|
--- @return number displayID Display ID
|
||||||
|
--- @return boolean favorite Whether it's marked as favorite
|
||||||
|
--- @return string name Pet name
|
||||||
|
--- @return string icon Icon texture path
|
||||||
|
--- @return number petType Pet type ID
|
||||||
|
--- @return number creatureID Creature ID
|
||||||
|
--- @return string sourceText Source description
|
||||||
|
--- @return string description Pet description
|
||||||
|
--- @return boolean isWild Whether it's a wild pet
|
||||||
|
--- @return boolean canBattle Whether it can battle
|
||||||
|
--- @return boolean isTradeable Whether it can be traded
|
||||||
|
--- @return boolean isUnique Whether it's unique
|
||||||
|
--- @return boolean obtainable Whether it can be obtained
|
||||||
|
GetPetInfoByPetID = function(petID) end,
|
||||||
|
|
||||||
|
--- Returns information about a pet species.
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @return string speciesName Species name
|
||||||
|
--- @return string speciesIcon Icon texture path
|
||||||
|
--- @return number petType Pet type ID
|
||||||
|
--- @return number companionID Companion ID
|
||||||
|
--- @return string tooltipSource Source tooltip
|
||||||
|
--- @return string tooltipDescription Description tooltip
|
||||||
|
--- @return boolean isWild Whether it's a wild pet
|
||||||
|
--- @return boolean canBattle Whether it can battle
|
||||||
|
--- @return boolean isTradeable Whether it can be traded
|
||||||
|
--- @return boolean isUnique Whether it's unique
|
||||||
|
--- @return boolean obtainable Whether it can be obtained
|
||||||
|
--- @return number creatureDisplayID Display ID
|
||||||
|
--- @return number desiredScale Desired display scale
|
||||||
|
GetPetInfoBySpeciesID = function(speciesID) end,
|
||||||
|
|
||||||
|
--- Gets a table containing pet information
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return table info Table containing pet information
|
||||||
|
GetPetInfoTableByPetID = function(petID) end,
|
||||||
|
|
||||||
|
--- Gets information about a pet loadout slot
|
||||||
|
--- @param slot number The loadout slot index
|
||||||
|
--- @return number petID Pet ID in the slot
|
||||||
|
--- @return number ability1ID First ability ID
|
||||||
|
--- @return number ability2ID Second ability ID
|
||||||
|
--- @return number ability3ID Third ability ID
|
||||||
|
--- @return boolean locked Whether the slot is locked
|
||||||
|
GetPetLoadOutInfo = function(slot) end,
|
||||||
|
|
||||||
|
--- Gets model scene information for a pet species
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
GetPetModelSceneInfoBySpeciesID = function(speciesID) end,
|
||||||
|
|
||||||
|
--- Gets the current pet sort parameter
|
||||||
|
--- @return string sortParameter The current sort parameter
|
||||||
|
GetPetSortParameter = function() end,
|
||||||
|
|
||||||
|
--- Returns the stats of a collected battle pet.
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return number health Current health
|
||||||
|
--- @return number maxHealth Maximum health
|
||||||
|
--- @return number power Attack power
|
||||||
|
--- @return number speed Speed stat
|
||||||
|
--- @return number rarity Pet rarity level
|
||||||
|
GetPetStats = function(petID) end,
|
||||||
|
|
||||||
|
--- Gets information about whether a pet can be summoned
|
||||||
|
--- @param battlePetGUID string The pet's GUID
|
||||||
|
--- @return boolean isSummonable Whether the pet can be summoned
|
||||||
|
--- @return string error Error code if not summonable
|
||||||
|
--- @return string errorText Error message if not summonable
|
||||||
|
GetPetSummonInfo = function(battlePetGUID) end,
|
||||||
|
|
||||||
|
--- Gets the average level of the current pet team
|
||||||
|
--- @return number avgLevel Average level of the pet team
|
||||||
|
GetPetTeamAverageLevel = function() end,
|
||||||
|
|
||||||
|
--- Gets the current search filter text
|
||||||
|
--- @return string filterText Current search filter text
|
||||||
|
GetSearchFilter = function() end,
|
||||||
|
|
||||||
|
--- Returns information about a battle pet.
|
||||||
|
--- @return number summonedPetGUID GUID of the currently summoned pet
|
||||||
|
GetSummonedPetGUID = function() end,
|
||||||
|
|
||||||
|
--- Gets the GUID of a random favorite pet for summoning
|
||||||
|
--- @return number petGUID GUID of a random favorite pet
|
||||||
|
GetSummonRandomFavoritePetGUID = function() end,
|
||||||
|
|
||||||
|
--- Checks if the player has any favorite pets
|
||||||
|
--- @return boolean hasFavorites Whether any pets are marked as favorites
|
||||||
|
HasFavoritePets = function() end,
|
||||||
|
|
||||||
|
--- Checks if a filter is currently active
|
||||||
|
--- @param filter string The filter to check
|
||||||
|
--- @return boolean isFiltered Whether the filter is active
|
||||||
|
IsFilterChecked = function(filter) end,
|
||||||
|
|
||||||
|
--- Checks if pet battles can be initiated
|
||||||
|
--- @return boolean isEnabled Whether pet battles are enabled
|
||||||
|
IsFindBattleEnabled = function() end,
|
||||||
|
|
||||||
|
--- Checks if the pet journal is in read-only mode
|
||||||
|
--- @return boolean isReadOnly Whether the journal is read-only
|
||||||
|
IsJournalReadOnly = function() end,
|
||||||
|
|
||||||
|
--- Checks if the pet journal is unlocked
|
||||||
|
--- @return boolean isUnlocked Whether the journal is unlocked
|
||||||
|
IsJournalUnlocked = function() end,
|
||||||
|
|
||||||
|
--- Checks if a pet source filter is active
|
||||||
|
--- @param index number The source index to check
|
||||||
|
--- @return boolean isChecked Whether the source is checked
|
||||||
|
IsPetSourceChecked = function(index) end,
|
||||||
|
|
||||||
|
--- Checks if a pet type filter is active
|
||||||
|
--- @param index number The pet type index to check
|
||||||
|
--- @return boolean isChecked Whether the type is checked
|
||||||
|
IsPetTypeChecked = function(index) end,
|
||||||
|
|
||||||
|
--- Checks if using default filter settings
|
||||||
|
--- @return boolean isUsingDefaultFilters Whether using default filters
|
||||||
|
IsUsingDefaultFilters = function() end,
|
||||||
|
|
||||||
|
--- Returns true if you can release the pet.
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean canRelease Whether the pet can be released
|
||||||
|
PetCanBeReleased = function(petID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet can be captured
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean isCapturable Whether the pet can be captured
|
||||||
|
PetIsCapturable = function(petID) end,
|
||||||
|
|
||||||
|
--- Returns true if the collected battle pet is favorited.
|
||||||
|
--- @param petGUID string The pet's GUID
|
||||||
|
--- @return boolean isFavorite Whether the pet is marked as favorite
|
||||||
|
PetIsFavorite = function(petGUID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet needs healing
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean isHurt Whether the pet is hurt
|
||||||
|
PetIsHurt = function(petID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet is locked for conversion
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
PetIsLockedForConvert = function(petID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet is revoked
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean isRevoked Whether the pet is revoked
|
||||||
|
PetIsRevoked = function(petID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet is in a battle loadout slot
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean isSlotted Whether the pet is in a loadout slot
|
||||||
|
PetIsSlotted = function(petID) end,
|
||||||
|
|
||||||
|
--- Returns true if you can summon this pet.
|
||||||
|
--- @param battlePetGUID string The pet's GUID
|
||||||
|
--- @return boolean isSummonable Whether the pet can be summoned
|
||||||
|
PetIsSummonable = function(battlePetGUID) end,
|
||||||
|
|
||||||
|
--- Returns whether or not a pet from the Pet Journal is tradable.
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean isTradable Whether the pet can be traded
|
||||||
|
PetIsTradable = function(petID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet is usable
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @return boolean isUsable Whether the pet is usable
|
||||||
|
PetIsUsable = function(petID) end,
|
||||||
|
|
||||||
|
--- Checks if a pet needs fanfare display
|
||||||
|
--- @return boolean needsFanfare Whether the pet needs fanfare
|
||||||
|
PetNeedsFanfare = function() end,
|
||||||
|
|
||||||
|
--- Checks if a pet species uses random display variation
|
||||||
|
--- @param speciesID number The species ID
|
||||||
|
--- @return boolean usesRandomDisplay Whether the species uses random display
|
||||||
|
PetUsesRandomDisplay = function(speciesID) end,
|
||||||
|
|
||||||
|
--- Picks up a pet into the cursor
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
PickupPet = function(petID) end,
|
||||||
|
|
||||||
|
--- Picks up a random pet for summoning
|
||||||
|
PickupSummonRandomPet = function() end,
|
||||||
|
|
||||||
|
--- Releases the pet.
|
||||||
|
--- @param petID number The pet ID to release
|
||||||
|
ReleasePetByID = function(petID) end,
|
||||||
|
|
||||||
|
--- Sets a pet ability in a loadout slot
|
||||||
|
--- @param slotIndex number The loadout slot index
|
||||||
|
--- @param spellIndex number The spell slot index
|
||||||
|
--- @param petSpellID number The pet ability spell ID
|
||||||
|
SetAbility = function(slotIndex, spellIndex, petSpellID) end,
|
||||||
|
|
||||||
|
--- Sets the checked state for all pet sources
|
||||||
|
--- @param value boolean Whether to check or uncheck all sources
|
||||||
|
SetAllPetSourcesChecked = function(value) end,
|
||||||
|
|
||||||
|
--- Sets the checked state for all pet types
|
||||||
|
--- @param value boolean Whether to check or uncheck all types
|
||||||
|
SetAllPetTypesChecked = function(value) end,
|
||||||
|
|
||||||
|
--- Sets a custom name for the pet.
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @param customName string The new custom name
|
||||||
|
SetCustomName = function(petID, customName) end,
|
||||||
|
|
||||||
|
--- Resets all filters to default values
|
||||||
|
SetDefaultFilters = function() end,
|
||||||
|
|
||||||
|
--- Sets (or clears) the pet as a favorite.
|
||||||
|
--- @param petID number The pet ID
|
||||||
|
--- @param value boolean Whether to set or clear favorite status
|
||||||
|
SetFavorite = function(petID, value) end,
|
||||||
|
|
||||||
|
--- Sets a filter's checked state
|
||||||
|
--- @param filter string The filter to set
|
||||||
|
--- @param value boolean The checked state to set
|
||||||
|
SetFilterChecked = function(filter, value) end,
|
||||||
|
|
||||||
|
--- Sets the currently hovered battle pet
|
||||||
|
--- @param battlePetGUID string The pet's GUID
|
||||||
|
SetHoveredBattlePet = function(battlePetGUID) end,
|
||||||
|
|
||||||
|
--- Sets a pet in a loadout slot
|
||||||
|
--- @param slotIndex number The loadout slot index
|
||||||
|
--- @param petID number The pet ID to set
|
||||||
|
SetPetLoadOutInfo = function(slotIndex, petID) end,
|
||||||
|
|
||||||
|
--- Sets the pet sort parameter
|
||||||
|
--- @param sortParameter string The sort parameter to set
|
||||||
|
SetPetSortParameter = function(sortParameter) end,
|
||||||
|
|
||||||
|
--- Sets a pet source filter's checked state
|
||||||
|
--- @param index number The source index
|
||||||
|
--- @param value boolean The checked state to set
|
||||||
|
SetPetSourceChecked = function(index, value) end,
|
||||||
|
|
||||||
|
--- Sets the pet type in the filter menu.
|
||||||
|
--- @param index number The pet type index
|
||||||
|
--- @param value boolean Whether to check or uncheck the type
|
||||||
|
SetPetTypeFilter = function(index, value) end,
|
||||||
|
|
||||||
|
--- Sets the search filter in the pet journal.
|
||||||
|
--- @param filterText string The search text to set
|
||||||
|
SetSearchFilter = function(filterText) end,
|
||||||
|
|
||||||
|
--- Targets a battle pet with a spell
|
||||||
|
--- @param battlePetGUID string The pet's GUID
|
||||||
|
SpellTargetBattlePet = function(battlePetGUID) end,
|
||||||
|
|
||||||
|
--- Summons (or dismisses) a pet.
|
||||||
|
--- @param petID number The pet ID to summon
|
||||||
|
SummonPetByGUID = function(petID) end,
|
||||||
|
|
||||||
|
--- Summons a random battle pet companion.
|
||||||
|
--- @param favoritePets boolean Whether to only summon from favorites
|
||||||
|
SummonRandomPet = function(favoritePets) end,
|
||||||
|
}
|
Reference in New Issue
Block a user