I'm currently playing a warlock and a paladin. On the paladin's screen, the party pet frame for the warlock's pet shows up just fine. On the warlock's screen, however, the majority of the time the party pet frame for his pet appears with "Unknown" for the name, and the first time any element is updated, it changes to show the pet as offline.
Some basic checking reveals that the (frame).unit value isn't being set correctly on the frame for the warlock. Putting the mouse over the misbehaving frame:
/dump GetMouseFocus().unit
==> vehicle
/dump SecureButton_GetModifiedUnit(GetMouseFocus())
==> pet
However, if I manually set the .unit value:
/run GetMouseFocus().unit = SecureButton_GetModifiedUnit(GetMouseFocus())
The frame starts working correctly. It breaks again if I mount (pet disappears) and then dismount (pet reappears) though.
I'm spawning party pets using XML:
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/../FrameXML/UI.xsd">
<Button name="oUF_PhanxPartyTemplate" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true">
<Frames>
<Button name="$parentPet" inherits="SecureUnitButtonTemplate">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="$parent">
<Offset>
<AbsDimension x="10" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Attributes>
<Attribute name="unitsuffix" type="string" value="pet"/>
<Attribute name="useparent-unit" type="boolean" value="true"/>
<Attribute name="type1" type="string" value="target"/>
<Attribute name="initial-unitWatch" type="boolean" value="true"/>
</Attributes>
</Button>
</Frames>
</Button>
</Ui>
and:
Code:
oUF:SpawnHeader(nil, nil, "party",
"showParty", true,
"showPlayer", true,
"template", "oUF_PhanxPartyTemplate",
"xOffset", 0,
"yOffset", -25)
The party and party pet frames are generally working fine, other than the party pet frame for the warlock's pet on the warlock's screen. I'm guessing it has something to do with setting the "showPlayer" attribute on my party header, but I don't know what the solution (if there is one) is.
Any thoughts?