In patch 10.2 the UnitBattlePetType API appears to now return raw pet types with zero-based indexing (eg. Humanoid pets return 0).
This runs slightly counter to a few things;
The global strings for battle pet type names still use 1-based indexing - eg. BATTLE_PET_NAME_1 = "Humanoid".
The global PET_TYPE_SUFFIX table similarly still uses 1-based indexing.
Currently, the effects of this change can be noticed by summoning a Humanoid battle pet and then targetting it - as the PET_TYPE_SUFFIX table hasn't been adjusted you'll get a script error. For all other pet types, the displayed texture will be incorrect (eg. Flying pets will use the Dragonkin icon).
For the Humanoid case:
Message: Interface/FrameXML/TargetFrame.lua:373: attempt to concatenate field '?' (a nil value)
Time: Fri Nov 10 10:54:25 2023
Count: 1
Stack: Interface/FrameXML/TargetFrame.lua:373: attempt to concatenate field '?' (a nil value)
[string "@Interface/FrameXML/TargetFrame.lua"]:373: in function `CheckBattlePet'
[string "@Interface/FrameXML/TargetFrame.lua"]:154: in function `Update'
[string "@Interface/FrameXML/TargetFrame.lua"]:169: in function `OnEvent'
[string "@Interface/FrameXML/UnitFrame.lua"]:1086: in function <Interface/FrameXML/UnitFrame.lua:1084>
In patch 10.2 the UnitBattlePetType API appears to now return raw pet types with zero-based indexing (eg. Humanoid pets return 0).
This runs slightly counter to a few things;
BATTLE_PET_NAME_1 = "Humanoid"
.Currently, the effects of this change can be noticed by summoning a Humanoid battle pet and then targetting it - as the
PET_TYPE_SUFFIX
table hasn't been adjusted you'll get a script error. For all other pet types, the displayed texture will be incorrect (eg. Flying pets will use the Dragonkin icon).For the Humanoid case: