• 0

    posted a message on Summoning Battle Pets from a Secure Button
    Quote from MuffinManKen >>

    Does anyone know what attributes to set on a SecureActionButton to summon a battle pet? I was sure I'd figured this out at one point, but when I went back to my notes and tested the code, it didn't work.

    Code:
    btn = CreateFrame("Button", "TestPet", UIParent, "SecureActionButtonTemplate,ActionButtonTemplate");
    btn:SetAttribute("type", "summonpet");
    btn:SetAttribute("summonpet", C_PetJournal.GetPetInfoByIndex(1));
    btn:SetPoint("Center",UIParent)

    I can't seem to find any documentation anywhere on what to set the "type" attribute to. GetActionInfo() helpfully tells me "summonpet" is a thing, but is that the type? It's own attribute? Both?

     

    I know summoning pets can be done without going the Secure route, but everything else in AutoBar is secure.

     
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.