Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-14-23, 03:18 PM   #1
fullmoon_sulfuras
A Fallenroot Satyr
Join Date: Dec 2019
Posts: 21
GetCompanionInfo("MOUNT") broken for WotLK Classic 3.4.3?

GetCompanionInfo seems broken when getting mount information on WotLK 3.4.3. The following snippet works:

Lua Code:
  1. for i=1,GetNumCompanions("CRITTER") do
  2.     local creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("CRITTER", i);
  3.     print(creatureID, creatureSpellID, creatureName, icon, issummoned)
  4. end

However, this returns all nil values:

Lua Code:
  1. for i=1,GetNumCompanions("MOUNT") do
  2.     local creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("MOUNT", i);
  3.     print(creatureID, creatureSpellID, creatureName, icon, issummoned)
  4. end

My addon's code is very similar to the snippet above and used to work fine until 3.4.3.

The odd thing is that in Interface_Wrath/FrameXML/PetPaperDollFrame.lua there's:

Lua Code:
  1. function PetPaperDollFrame_OnLoad (self)
  2.     self:RegisterEvent("PET_UI_UPDATE");
  3.     self:RegisterEvent("PET_BAR_UPDATE");
  4.  
  5.     ...
  6.  
  7.     PetPaperDollFrameCompanionFrame.mode = "CRITTER";
  8.     PetPaperDollFrameCompanionFrame.idMount = GetCompanionInfo("MOUNT", 1);


Any ideas are more than welcome! Thanks!!

Last edited by fullmoon_sulfuras : 10-14-23 at 03:47 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » GetCompanionInfo("MOUNT") broken for WotLK Classic 3.4.3?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off