Mount Backdrop Issue After 9.1.5 Patch

Hey All,

I have a simple addon created to fix the mount backdrop in the mount list when neither Collected, Uncollected, or Unusable are selected. Just strips the standard horse / mount background image from the frame so it appears as the battle pets list when neither Collected or Uncollected are selected with just a fully empty frame.

After the 9.1.5 patch, this broke. Any help / thoughts would be greatly appreciated.

hooksecurefunc("MountJournal_UpdateMountList",function()
 for i=1,#MountJournal.ListScrollFrame.buttons do
 local button = _G["MountJournalListScrollFrameButton"..i]
 if button.icon:GetTexture()=="Interface\\PetBattles\\MountJournalEmptyIcon" then
 button:Hide()
 end
 end
end)

There’s nothing in the code about backdrops so I’ll take a punt and say that the problem might be that the icon textures are using IDs instead of a file name so you might want to replace "Interface\\PetBattles\\MountJournalEmptyIcon" with the associated file id.

Maybe insert:
print("Button", i, "ID", button.icon:GetTexture())
inside your loop after local button = ... to print the id currently being displayed and use the button no. to find a button with the "horse / mount background image" and grab the id from that.

1 Like

The mount buttons seem to have a spellID of 0 when they’re empty. This should achieve the effect you’re after:

hooksecurefunc("MountJournal_UpdateMountList",function()
  for _,button in ipairs(MountJournal.ListScrollFrame.buttons) do
    if button.spellID==0 then
      button:Hide()
    end
  end
end)
2 Likes

That did the trick! Super appreciated, friend!