The[Pet Battle System](https://wow.gamepedia.com/Pet_Battle_System "Pet Battle System")was introduced in[Patch 5.0.4](https://wow.gamepedia.com/Patch_5.0.4 "Patch 5.0.4"). See also[Pet Journal](https://wow.gamepedia.com/World_of_Warcraft_API#Pet_Journal)functions.
[C\_PetBattles.AcceptPVPDuel](https://wow.gamepedia.com/API_C_PetBattles.AcceptPVPDuel "API C PetBattles.AcceptPVPDuel")()
[C\_PetBattles.AcceptQueuedPVPMatch](https://wow.gamepedia.com/API_C_PetBattles.AcceptQueuedPVPMatch "API C PetBattles.AcceptQueuedPVPMatch")()
[C\_PetBattles.CanAcceptQueuedPVPMatch](https://wow.gamepedia.com/API_C_PetBattles.CanAcceptQueuedPVPMatch "API C PetBattles.CanAcceptQueuedPVPMatch")()
[C\_PetBattles.CanActivePetSwapOut](https://wow.gamepedia.com/API_C_PetBattles.CanActivePetSwapOut "API C PetBattles.CanActivePetSwapOut")()
[C\_PetBattles.CanPetSwapIn](https://wow.gamepedia.com/API_C_PetBattles.CanPetSwapIn "API C PetBattles.CanPetSwapIn")(petIndex)
[C\_PetBattles.CancelPVPDuel](https://wow.gamepedia.com/API_C_PetBattles.CancelPVPDuel "API C PetBattles.CancelPVPDuel")()
[C\_PetBattles.ChangePet](https://wow.gamepedia.com/API_C_PetBattles.ChangePet "API C PetBattles.ChangePet")(petIndex)
[C\_PetBattles.DeclineQueuedPVPMatch](https://wow.gamepedia.com/API_C_PetBattles.DeclineQueuedPVPMatch "API C PetBattles.DeclineQueuedPVPMatch")()
[C\_PetBattles.ForfeitGame](https://wow.gamepedia.com/API_C_PetBattles.ForfeitGame "API C PetBattles.ForfeitGame")()
[C\_PetBattles.GetAbilityEffectInfo](https://wow.gamepedia.com/API_C_PetBattles.GetAbilityEffectInfo "API C PetBattles.GetAbilityEffectInfo")(abilityID, turnIndex, effectIndex, effectName)
[C\_PetBattles.GetAbilityInfoByID](https://wow.gamepedia.com/API_C_PetBattles.GetAbilityInfoByID "API C PetBattles.GetAbilityInfoByID")(abilityID)
[C\_PetBattles.GetAbilityInfo](https://wow.gamepedia.com/API_C_PetBattles.GetAbilityInfo "API C PetBattles.GetAbilityInfo")(petOwner, petIndex, abilityIndex)
[C\_PetBattles.GetAbilityProcTurnIndex](https://wow.gamepedia.com/API_C_PetBattles.GetAbilityProcTurnIndex "API C PetBattles.GetAbilityProcTurnIndex")(abilityID, procType)
[C\_PetBattles.GetAbilityStateModification](https://wow.gamepedia.com/API_C_PetBattles.GetAbilityStateModification "API C PetBattles.GetAbilityStateModification")(abilityID, stateID)
[C\_PetBattles.GetAbilityState](https://wow.gamepedia.com/API_C_PetBattles.GetAbilityState "API C PetBattles.GetAbilityState")(petOwner, petIndex, actionIndex)
[C\_PetBattles.GetActivePet](https://wow.gamepedia.com/API_C_PetBattles.GetActivePet "API C PetBattles.GetActivePet")(petOwner)
[C\_PetBattles.GetAllEffectNames](https://wow.gamepedia.com/API_C_PetBattles.GetAllEffectNames "API C PetBattles.GetAllEffectNames")()
[C\_PetBattles.GetAllStates](https://wow.gamepedia.com/API_C_PetBattles.GetAllStates "API C PetBattles.GetAllStates")()
[C\_PetBattles.GetAttackModifier](https://wow.gamepedia.com/API_C_PetBattles.GetAttackModifier "API C PetBattles.GetAttackModifier")(petType, enemyPetType)
[C\_PetBattles.GetAuraInfo](https://wow.gamepedia.com/API_C_PetBattles.GetAuraInfo "API C PetBattles.GetAuraInfo")(petOwner, petIndex, auraIndex)
[C\_PetBattles.GetBattleState](https://wow.gamepedia.com/API_C_PetBattles.GetBattleState "API C PetBattles.GetBattleState")()
[C\_PetBattles.GetBreedQuality](https://wow.gamepedia.com/API_C_PetBattles.GetBreedQuality "API C PetBattles.GetBreedQuality")(petOwner, petIndex)
[C\_PetBattles.GetDisplayID](https://wow.gamepedia.com/API_C_PetBattles.GetDisplayID "API C PetBattles.GetDisplayID")(petOwner, petIndex)
[C\_PetBattles.GetForfeitPenalty](https://wow.gamepedia.com/API_C_PetBattles.GetForfeitPenalty "API C PetBattles.GetForfeitPenalty")()
[C\_PetBattles.GetHealth](https://wow.gamepedia.com/API_C_PetBattles.GetHealth "API C PetBattles.GetHealth")(petOwner, petIndex)
[C\_PetBattles.GetIcon](https://wow.gamepedia.com/API_C_PetBattles.GetIcon "API C PetBattles.GetIcon")(petOwner, petIndex)
[C\_PetBattles.GetLevel](https://wow.gamepedia.com/API_C_PetBattles.GetLevel "API C PetBattles.GetLevel")(petOwner, petIndex)
[C\_PetBattles.GetMaxHealth](https://wow.gamepedia.com/API_C_PetBattles.GetMaxHealth "API C PetBattles.GetMaxHealth")(petOwner, petIndex)
[C\_PetBattles.GetName](https://wow.gamepedia.com/API_C_PetBattles.GetName "API C PetBattles.GetName")(petOwner, petIndex)
[C\_PetBattles.GetNumAuras](https://wow.gamepedia.com/API_C_PetBattles.GetNumAuras "API C PetBattles.GetNumAuras")(petOwner, petIndex)
[C\_PetBattles.GetNumPets](https://wow.gamepedia.com/API_C_PetBattles.GetNumPets "API C PetBattles.GetNumPets")(petOwner)
[C\_PetBattles.GetPVPMatchmakingInfo](https://wow.gamepedia.com/API_C_PetBattles.GetPVPMatchmakingInfo "API C PetBattles.GetPVPMatchmakingInfo")()
[C\_PetBattles.GetPetSpeciesID](https://wow.gamepedia.com/API_C_PetBattles.GetPetSpeciesID "API C PetBattles.GetPetSpeciesID")(petOwner, petIndex)
[C\_PetBattles.GetPetType](https://wow.gamepedia.com/API_C_PetBattles.GetPetType "API C PetBattles.GetPetType")(petOwner, petIndex)
[C\_PetBattles.GetPlayerTrapAbility](https://wow.gamepedia.com/API_C_PetBattles.GetPlayerTrapAbility "API C PetBattles.GetPlayerTrapAbility")()
[C\_PetBattles.GetPower](https://wow.gamepedia.com/API_C_PetBattles.GetPower "API C PetBattles.GetPower")(petOwner, petIndex)
[C\_PetBattles.GetSelectedAction](https://wow.gamepedia.com/API_C_PetBattles.GetSelectedAction "API C PetBattles.GetSelectedAction")()
[C\_PetBattles.GetSpeed](https://wow.gamepedia.com/API_C_PetBattles.GetSpeed "API C PetBattles.GetSpeed")(petOwner, petIndex)
[C\_PetBattles.GetStateValue](https://wow.gamepedia.com/API_C_PetBattles.GetStateValue "API C PetBattles.GetStateValue")(petOwner, petIndex, stateID)
[C\_PetBattles.GetTurnTimeInfo](https://wow.gamepedia.com/API_C_PetBattles.GetTurnTimeInfo "API C PetBattles.GetTurnTimeInfo")()
[C\_PetBattles.GetXP](https://wow.gamepedia.com/API_C_PetBattles.GetXP "API C PetBattles.GetXP")(petOwner, petIndex)
[C\_PetBattles.IsInBattle](https://wow.gamepedia.com/API_C_PetBattles.IsInBattle "API C PetBattles.IsInBattle")()
[C\_PetBattles.IsPlayerNPC](https://wow.gamepedia.com/API_C_PetBattles.IsPlayerNPC "API C PetBattles.IsPlayerNPC")(petOwner)
[C\_PetBattles.IsSkipAvailable](https://wow.gamepedia.com/API_C_PetBattles.IsSkipAvailable "API C PetBattles.IsSkipAvailable")()
[C\_PetBattles.IsTrapAvailable](https://wow.gamepedia.com/API_C_PetBattles.IsTrapAvailable "API C PetBattles.IsTrapAvailable")()
[C\_PetBattles.IsWaitingOnOpponent](https://wow.gamepedia.com/API_C_PetBattles.IsWaitingOnOpponent "API C PetBattles.IsWaitingOnOpponent")()
[C\_PetBattles.IsWildBattle](https://wow.gamepedia.com/API_C_PetBattles.IsWildBattle "API C PetBattles.IsWildBattle")()
[C\_PetBattles.SetPendingReportBattlePetTarget](https://wow.gamepedia.com/API_C_PetBattles.SetPendingReportBattlePetTarget "API C PetBattles.SetPendingReportBattlePetTarget")(petIndex)
[C\_PetBattles.SetPendingReportTargetFromUnit](https://wow.gamepedia.com/API_C_PetBattles.SetPendingReportTargetFromUnit "API C PetBattles.SetPendingReportTargetFromUnit")(unit)
[C\_PetBattles.ShouldShowPetSelect](https://wow.gamepedia.com/API_C_PetBattles.ShouldShowPetSelect "API C PetBattles.ShouldShowPetSelect")()
HW[C\_PetBattles.SkipTurn](https://wow.gamepedia.com/API_C_PetBattles.SkipTurn "API C PetBattles.SkipTurn")()
[C\_PetBattles.StartPVPDuel](https://wow.gamepedia.com/API_C_PetBattles.StartPVPDuel "API C PetBattles.StartPVPDuel")()
[C\_PetBattles.StartPVPMatchmaking](https://wow.gamepedia.com/API_C_PetBattles.StartPVPMatchmaking "API C PetBattles.StartPVPMatchmaking")()
[C\_PetBattles.StopPVPMatchmaking](https://wow.gamepedia.com/API_C_PetBattles.StopPVPMatchmaking "API C PetBattles.StopPVPMatchmaking")()
HW[C\_PetBattles.UseAbility](https://wow.gamepedia.com/API_C_PetBattles.UseAbility "API C PetBattles.UseAbility")(actionIndex)
HW[C\_PetBattles.UseTrap](https://wow.gamepedia.com/API_C_PetBattles.UseTrap "API C PetBattles.UseTrap")()
[CanTrackBattlePets](https://wow.gamepedia.com/API_CanTrackBattlePets "API CanTrackBattlePets")() - Returns whether the player can track battle pets.
[IsTrackingBattlePets](https://wow.gamepedia.com/API_IsTrackingBattlePets "API IsTrackingBattlePets")() - Returns whether the player is currently tracking battle pets.
[UnitBattlePetLevel](https://wow.gamepedia.com/index.php?title=API_UnitBattlePetLevel&action=edit&redlink=1 "API UnitBattlePetLevel (page does not exist)")()
[UnitBattlePetSpeciesID](https://wow.gamepedia.com/API_UnitBattlePetSpeciesID "API UnitBattlePetSpeciesID")()
[UnitBattlePetType](https://wow.gamepedia.com/index.php?title=API_UnitBattlePetType&action=edit&redlink=1 "API UnitBattlePetType (page does not exist)")()
[UnitIsBattlePetCompanion](https://wow.gamepedia.com/index.php?title=API_UnitIsBattlePetCompanion&action=edit&redlink=1 "API UnitIsBattlePetCompanion (page does not exist)")()
[UnitIsBattlePet](https://wow.gamepedia.com/API_UnitIsBattlePet "API UnitIsBattlePet")()
[UnitIsOtherPlayersBattlePet](https://wow.gamepedia.com/index.php?title=API_UnitIsOtherPlayersBattlePet&action=edit&redlink=1 "API UnitIsOtherPlayersBattlePet (page does not exist)")()
[UnitIsWildBattlePet](https://wow.gamepedia.com/index.php?title=API_UnitIsWildBattlePet&action=edit&redlink=1 "API UnitIsWildBattlePet (page does not exist)")()
- 基础
- 循环
- 迭代器
- ipairs与pairs 的区别
- 流程控制if
- 函数
- 运算符
- 字符串
- 数组
- table(表)
- 模块与包
- 魔兽插件
- 初学介绍
- api
- Global API
- Widget API
- 窗口小部件类层次结构(Widget Class Hierarchy)
- 动画(Animation)
- 透明度(Alpha)
- 线条缩放比例(LineScale)
- 平移(Translation)
- 线平移(Line Translation)
- 路径(Path)
- 旋转(Rotation)
- 缩放(Scale)
- 纹理坐标平移(TextureCoordTranslation)
- 框架 :Frame
- 浏览器(Browser)
- 按键(Button)
- Item按钮(ItemButton)
- 检查按钮(CheckButton)
- 检测(Checkout)
- 颜色选择(ColorSelect)
- 冷却(Cooldown)
- 编辑框(EditBox)
- 战争迷雾(FogOfWarFrame)
- 游戏工具提示(GameTooltip)
- 消息框(MessageFrame)
- 小地图(Minimap)
- 模型(Model)
- 玩家模型(PlayerModel)
- 电影模型(CinematicModel)
- 换装模型(DressUpModel)
- 战袍模型(TabardModel)
- _模型场景(ModelScene)
- 电影Frame(MovieFrame)
- 根小部件(Root Widgets)
- UIObject衍生品(UIObject Derivatives)
- 动画衍生品(Animation Derivatives)
- FontInstance
- 地区衍生品(Region Derivatives)
- 帧衍生品(Frame Derivatives)
- 特殊(Special)
- Events(游戏中变化的事件)
- WoWAPI
- Global Function Groups
- 帐户(Account)
- 成就(Achievements)
- 动作条(Action Bars)
- Action Buttons
- 插件(AddOns)
- 冒险指南(Adventure Guide)
- 神器(Artifact)
- 拍卖行(Auction House)
- 黑市AH
- 魔兽代币(WoW Tokens)
- Azerite
- 背包(Bags)
- 容器(Containers)
- 库存(Inventory)
- 银行(Bank)
- 公会银行(Guild Bank)
- 理发店(Barber Shop)
- 书籍(书籍)
- 日历(calendar)
- 相机(Camera)
- 频道(Channels)
- 聊天窗口(Chat Window)
- 社区(communities)
- 语音聊天(Voice Chat)
- 推特(Twitter)
- 角色(Character)
- 角色表(Paper Doll)
- 试衣间(dressing room)
- 活动(Movement)
- 指定目标(Targeting)
- 死亡(Death)
- 过场动画(Cinematics)
- 职业(class)
- 天赋(Talents)
- 收藏(Collections)
- 坐骑(Mount Journal)
- 宠物(Pet Journal)
- 玩具箱(Toy Box)
- 传家宝(Heirlooms)
- 外观(Appearances)
- 战斗记录(Combat Log)
- 战斗宠物(Combat Pets)
- 同伴(Companions)
- Contribution Collection
- 货币(Currency)
- 光标(Cursor)
- 客户支持(Customer Support)
- 知识库(Knowledge Base)
- 设备管理器(Equipment Manager)
- 扩展(Expansions)
- FrameXML
- 好友(Friends)
- Who List
- 真实身份证(Real ID)
- 招募朋友(Recruit-a-Friend)
- 驻军(Garrisons)
- 建筑物(Buildings)
- 战利品(Trophies)
- 追随者与任务(Followers & Missions)
- 团队(Groups)
- Raid Groups
- Raid Profiles
- 组查找器(Group Finder)
- 突袭者(Raid Finder)
- 公会(Guild)
- 检查(Inspection)
- Instances
- 场景(Scenarios)
- Mythic+
- 入侵(Invasions)
- 海岛探险(Island Expeditions)
- Items
- 按键绑定(Key Bindings)
- Modifiers
- 劫掠(Looting)
- 失控(Loss of Control)
- 宏命令(Macros)
- 邮件(Mail)
- 地图(Maps)
- 飞行管理员(Flight Master)
- 追踪(Tracking)
- 商人(Merchant)
- 铭牌(Nameplates)
- 宠物大战(Pet Battles)
- 申请书(Petitions)
- 专业(Professions)
- 考古(Archaeology)
- 附魔(Enchantments)
- 雕文(glyphs)
- 物品插口(tem Socketing)
- PvP
- 竞技场(Arena)
- 战场(Battlegrounds)
- 世界战场(World Battlefields)
- 争吵(Brawl)
- 战争游戏(War Games)
- 战争模式(War Mode)
- 任务 (Quests)
- 任务日志(Quest Log)
- 任务选择(Quest Choices)
- Task Quests
- 闲聊(Gossip)
- 探险地图(Adventure Map)
- 战争战役(War Campaigns)
- 种族(Races)
- 境界(Realms)
- 报告(Reporting)
- 声望(Reputation)
- 报废的机器(Scrapping Machine)
- 法术(Spells)
- Spell Book
- 商店(Shop)
- 召唤(Summoning)
- 系统(System)
- 网络(Network)
- 控制台(Console)
- 日期时间(Date & Time)
- 调试(Debugging)
- 图形(Graphics)
- 语言环境(Locales)
- 脚本分析(Script Profiling)
- 安全执行(Secure Execution)
- 声音(Sound)
- Sound Drivers
- Talking Head
- 交易(Trading)
- 训练师(Trainer)
- 迁移(Transmogrification)
- 空白存储(Void Storage)
- 讲解(Tutorials)
- UI对象(UI Objects)
- 框架(Frame)
- 字体(Font)
- 质地(Texture)
- 混合(Mixin)
- 咒语(SpellMixin)
- ItemMixin
- 物品位置(ItemLocationMixin)
- PlayerLocationMixin
- 模型场景(ModelScene)
- 未分类
- UI窗口小部件管理器(UI Widget Manager)
- 单位(Units)
- 光环(Auras)
- 玩家(Players)
- 实用程序(Util)
- 车辆(Vehicles)
- Classic Specific Functions
- 猎人宠物(Hunter Pets)
- 专业(Professions)
- 手工制作(Crafting)
- @PvP
- 模拟器
- 训练师(Trainer)
- 8.x API
- 控制台(Console)
- 召唤(Summoning)
- See also
- 外部链接(External links)
- Widget handlers(UI交互事件)
- ScriptObject
- AnimationGroup
- Animation对象
- Alpha对象
- Scale
- LineScale
- Translation
- LineTranslation
- Path
- Rotation
- TextureCoordTranslation
- Frame
- Browser
- Button
- CheckButton
- ItemButton
- Checkout
- ColorSelect
- Cooldown
- EditBox
- FogOfWarFrame
- GameTooltip
- Model
- PlayerModel
- CinematicModel
- DressupModel
- TabardModel
- MovieFrame
- ScrollFrame
- Slider
- MessageFrame
- Minimap
- ModelScene
- OffScreenFrame
- POIFrame
- ArchaeologyDigSiteFrame
- QuestPOIFrame
- ScenarioPOIFrame
- SimpleHTML
- StatusBar
- UnitPositionFrame
- WorldFrame
- 入门
- .toc
- .lua
- .xml
- 示例
- 自动邀请插件
- 完整例子:显示任务坐标
- eCoordinates.toc
- eCoordinates.xml
- eCoordinates.lua
- 开发帮助组件
- AddOn Studio编辑器
- 暴雪自带调试工具
- DevTools调试插件
- wowlua
- 魔兽宏
- 战斗宠物命令
- 暴雪界面命令
- 聊天命令
- chat substitutions
- 角色指令
- 开发者工具
- 表情动作
- 战斗命令
- 公会命令
- 小队与团队命令、
- 宠物命令
- PvP的命令
- 系统命令
- 目标函数
- 命令
- 被禁用的命令
- 宏条件
- 装备物品编号