Add C_PetBattles module with comprehensive pet battle functions and methods

This commit is contained in:
2025-05-17 19:19:34 +02:00
parent 6cb045f3d9
commit 80f16398e1
57 changed files with 264 additions and 338 deletions

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.AcceptPVPDuel() end

View File

@@ -1,5 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---Accepts a found Pet Battle Queue.
function C_PetBattles.AcceptQueuedPVPMatch() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.CanAcceptQueuedPVPMatch() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.CanActivePetSwapOut() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.CanPetSwapIn() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.CancelPVPDuel() end

View File

@@ -1,6 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param id number
---Attempts to change your active pet. Has no effect if used when this switch isn't impossible (out of turn, with the ID of a dead pet, etc.).
function C_PetBattles.ChangePet(id) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.DeclineQueuedPVPMatch() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.ForfeitGame() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetAbilityEffectInfo() end

View File

@@ -1,18 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner 2
---@param 1
---@param 2
---@param slotnumber number
---@param spellIndex number
---@return number id
---@return string name
---@return string icon
---@return number maxcooldown
---@return string desc
---@return number numTurns
---@return number abilityPetType
---@return boolean nostrongweak
---Returns information on a battle pet's ability
function C_PetBattles.GetAbilityInfo(owner, 1, 2, slotnumber, spellIndex) end

View File

@@ -1,14 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param id number
---@return nil
---@return string name
---@return string icon
---@return nil
---@return nil
---@return nil
---@return number? petType
---@return boolean nostrongweakhint
---Returns information about a pet battle ability based on the ID.
function C_PetBattles.GetAbilityInfoByID(id) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetAbilityProcTurnIndex() end

View File

@@ -1,12 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner 2
---@param 1
---@param 2
---@param slotnumber number
---@param spellIndex number
---@return boolean isUsable
---@return number currentCooldown
---Returns the cooldown state of a pet ability
function C_PetBattles.GetAbilityState(owner, 1, 2, slotnumber, spellIndex) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetAbilityStateModification() end

View File

@@ -1,9 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner 2
---@param 1
---@param 2
---@return number index
---Returns the index of the currently active pet.
function C_PetBattles.GetActivePet(owner, 1, 2) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetAllEffectNames() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetAllStates() end

View File

@@ -1,7 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param YourType number?
---@param EnemyType number?
---Returns the modification to attacks based on types.
function C_PetBattles.GetAttackModifier(YourType, EnemyType) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetAuraInfo() end

View File

@@ -1,10 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@return 7 battleState
---@return 2
---@return 3
---@return 4
---@return 7
---Returns the current battle state.
function C_PetBattles.GetBattleState() end

View File

@@ -1,8 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param petOwner number
---@param petIndex number
---@return number quality
---Returns the breed quality of a pet.
function C_PetBattles.GetBreedQuality(petOwner, petIndex) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetDisplayID() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetForfeitPenalty() end

View File

@@ -1,8 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param petOwner number
---@param petIndex number
---@return number health
---Returns the current health of a specific pet in the current pet battle.
function C_PetBattles.GetHealth(petOwner, petIndex) end

View File

@@ -1,10 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner 2
---@param 1
---@param 2
---@param index number
---@return string icon
---Returns the path of a pet's icon texture.
function C_PetBattles.GetIcon(owner, 1, 2, index) end

View File

@@ -1,8 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param petOwner number
---@param petIndex number
---@return number level
---Returns the level of a pet
function C_PetBattles.GetLevel(petOwner, petIndex) end

View File

@@ -1,8 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param petOwner number
---@param petIndex number
---@return number maxHealth
---Returns the maximum health of a specific pet in the current pet battle.
function C_PetBattles.GetMaxHealth(petOwner, petIndex) end

View File

@@ -1,9 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner number?
---@param index number
---@return string name
---@return string default
---Returns the name of a pet
function C_PetBattles.GetName(owner, index) end

View File

@@ -1,8 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner string?
---@param index number
---@return number auras
---Returns the number of auras on a pet
function C_PetBattles.GetNumAuras(owner, index) end

View File

@@ -1,9 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner 2
---@param 1
---@param 2
---@return number amount
---Returns the number of pets a player/enemy has.
function C_PetBattles.GetNumPets(owner, 1, 2) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetPVPMatchmakingInfo() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetPetSpeciesID() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetPetType() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetPlayerTrapAbility() end

View File

@@ -1,7 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner number
---@param index number
---Returns the power of a pet.
function C_PetBattles.GetPower(owner, index) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetSelectedAction() end

View File

@@ -1,10 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner 2
---@param 1
---@param 2
---@param index number
---@return number speed
---Returns the speed of a pet.
function C_PetBattles.GetSpeed(owner, 1, 2, index) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.GetStateValue() end

View File

@@ -1,7 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@return number timeRemaining
---@return number totalTime
---Returns the remaining time and max time for waiting on a turn
function C_PetBattles.GetTurnTimeInfo() end

View File

@@ -1,9 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param owner string?
---@param index number
---@return number xp
---@return number maxXP
---Returns the current and maximum experience of a pet
function C_PetBattles.GetXP(owner, index) end

View File

@@ -1,5 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---Returns true during a pet battle
function C_PetBattles.IsInBattle() end

View File

@@ -1,7 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param player string?
---@return boolean isnpc
---Returns whether a participant in a pet battle is a player or an NPC
function C_PetBattles.IsPlayerNPC(player) end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.IsSkipAvailable() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.IsTrapAvailable() end

View File

@@ -1,6 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@return boolean waiting
---Returns whether or not you are waiting on the opponent
function C_PetBattles.IsWaitingOnOpponent() end

View File

@@ -1,6 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@return boolean isWild
---Returns whether or not in wild battle.. Returns true if the pet battle is against a wild pet.
function C_PetBattles.IsWildBattle() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.SetPendingReportBattlePetTarget() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.SetPendingReportTargetFromUnit() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.ShouldShowPetSelect() end

View File

@@ -1,5 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---Does a pass on your turn for a round.
function C_PetBattles.SkipTurn() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.StartPVPDuel() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.StartPVPMatchmaking() end

View File

@@ -1,4 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
function C_PetBattles.StopPVPMatchmaking() end

View File

@@ -1,6 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---@param id number
---Uses an ability.
function C_PetBattles.UseAbility(id) end

View File

@@ -1,5 +0,0 @@
---@diagnostic disable: missing-return, lowercase-global
---@meta
---Throws the trap if the target pet has low enough health. Always uses best trap.
function C_PetBattles.UseTrap() end