WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Player's pet's partypet frame has wrong .unit set (https://www.wowinterface.com/forums/showthread.php?t=34374)

Phanx 08-08-10 10:31 PM

Player's pet's partypet frame has wrong .unit set
 
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?

haste 08-08-10 11:24 PM

Sounds like a oUF bug. I'll have a look after work.

Phanx 08-09-10 01:01 AM

Thanks. My complete layout is here:
http://www.wowinterface.com/download...oUF_Phanx.html

haste 08-09-10 10:28 AM

Issue should be solved with f8de36a107eca9a997d8. I'll look into posting 1.4.3 later today.

Toran 08-09-10 01:47 PM

Ha! And I always thought this was a problem with my layout. Good to see it's getting fixed.

haste 08-09-10 04:43 PM

Quote:

Originally Posted by Toran (Post 201793)
Ha! And I always thought this was a problem with my layout. Good to see it's getting fixed.

Reporting bugs is generally a good idea, even if you aren't certain regarding why they happen.

Toran 08-15-10 03:47 PM

Coming back to this, my pet frame has come up grey a few times in the past two days. It's always on login when pet is first spawned.

Edit: Not just on first login. Also happened when zoning into an instance. Seems kind of random.

Toran 08-20-10 07:48 AM

haste - any idea why this is still happening? Perhaps the bug isn't completely fixed?

haste 08-20-10 09:59 AM

Quote:

Originally Posted by Toran (Post 203081)
haste - any idea why this is still happening? Perhaps the bug isn't completely fixed?

This isn't the same bug as phanx reported. To me it sounds like some pet update event is missing.

Do you have a way to reproduce it?

yj589794 08-20-10 10:12 AM

Is this related to unknown units?

I have seen times where a party or raid pet does not have the correct details for a while, but when in range all the details update correctly.

haste 08-20-10 10:20 AM

Quote:

Originally Posted by yj589794 (Post 203104)
Is this related to unknown units?

I have seen times where a party or raid pet does not have the correct details for a while, but when in range all the details update correctly.

Toran said "my pet frame", so I'm guessing it's related to the player pet. That being said: range + party = hell.

p3lim 08-20-10 03:15 PM

Quote:

Originally Posted by Toran (Post 202630)
Coming back to this, my pet frame has come up grey a few times in the past two days. It's always on login when pet is first spawned.

Edit: Not just on first login. Also happened when zoning into an instance. Seems kind of random.

I havent had these issues since 1.2.
Could you post a screenshot comparisation of the normal frame and the "bugged" frame?

Toran 08-22-10 12:45 PM

Here's a pic. It's really random when it happens, but can happen on login, after dismounting, and after entering an instance. I did noticed though, that it recovered once when my pet was buffed.

Anyway, the problem frame is the far left with the yellow arrow above it. The color on the target frame (far right) is the color it should be.



If it helps, here is my updateHealth code:

Code:

local updateHealth = function(health, unit)
        local r, g, b, t
        local reaction = UnitReaction(unit, "player")
        if(UnitIsPlayer(unit)) then
                local _, class = UnitClass(unit)
                t = oUF.colors.class[class]
        elseif UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) then
                t = oUF.colors.tapped
        elseif reaction then
                t = oUF.colors.reaction[reaction]
        else
                r, g, b = .1, .8, .3
        end

        if(t) then
                r, g, b = t[1], t[2], t[3]
        end
       
        -- set health background color
        local color = RAID_CLASS_COLORS[select(2, UnitClass(unit))]       
        if UnitIsPlayer(unit) and color then
                health.bg:SetVertexColor(color.r*.5, color.g*.5, color.b*.5, .7)
    else
                local r, g, b = UnitSelectionColor(unit)
                health.bg:SetVertexColor(r*.5, g*.5, b*.5, .7)       
    end
       
        health:SetStatusBarColor(r, g, b)

end


Toran 08-25-10 04:02 PM

Quote:

Originally Posted by haste (Post 203106)
Toran said "my pet frame", so I'm guessing it's related to the player pet. That being said: range + party = hell.

Yes this is about the *player* pet frame.

Toran 09-03-10 01:31 PM

bump - please let me know if this could me a layout issue or if it's an oUF issue. Thanks.

haste 09-03-10 01:38 PM

I haven't been able to reproduce your issue with it, but I also haven't torn down your layout. A small proof of concept would be much wanted, at least for a quick "check".

Toran 09-03-10 01:45 PM

What part of the layout would benefit you? Or should I just link the whole thing to a pastey?

haste 09-03-10 01:49 PM

Quote:

Originally Posted by Toran (Post 204869)
What part of the layout would benefit you? Or should I just link the whole thing to a pastey?

The best solution would be if you could build a layout with the least amount of code needed to clearly present the issue.


All times are GMT -6. The time now is 07:33 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI