What about "togglemenu" on a (non-Blizz. frames) target unit that is not the player?
I get an error about UnitIsOtherPlayersBattlePet which I'm pretty certain weren't a thing in vanilla
.
Test Code:
Code:
local f = CreateFrame("Button", "FizzleTestUnitFrame", UIParent, "SecureUnitButtonTemplate")
f.unit = "target"
f:SetAttribute("unit", f.unit)
RegisterUnitWatch(f)
f:SetAttribute("toggleForVehicle", true)
f:RegisterForClicks("AnyUp")
f:SetAttribute("*type1", "target")
f:SetAttribute("*type2", "togglemenu")
f:SetAttribute("*type3", "assist")
f:SetPoint("TOP", 0, -5)
f:SetSize(100, 100)
f.Portrait = f:CreateTexture("$parentPortrait")
f.Portrait:SetAllPoints()
f:SetScript("OnEvent", function(self, event, ...)
SetPortraitTexture(self.Portrait, self.unit)
end)
f:RegisterEvent("UNIT_PORTRAIT_UPDATE")
f:RegisterEvent("PLAYER_TARGET_CHANGED")