I've added some raid pet frames to my layout. They spawn, they have the right position, ... everything works. But on every login (or after reloading ui) I get this error.
Code:
Message: Interface\FrameXML\SecureTemplates.lua:774: CreateFrame(): Couldn't find inherited node "oUF_VIVRaid"
Time: 10/13/09 01:38:23
Count: 8
Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
[C]: ?
[C]: in function `CreateFrame'
Interface\FrameXML\SecureTemplates.lua:774: in function <Interface\FrameXML\SecureTemplates.lua:729>
Interface\FrameXML\SecureTemplates.lua:1024: in function <Interface\FrameXML\SecureTemplates.lua:905>
[C]: in function `Show'
Interface\AddOns\oUF_viv\oUF_viv.lua:1112: in main chunk
Locals: (*temporary) = "Button"
(*temporary) = "oUF_Raid8UnitButton1"
(*temporary) = oUF_Raid8 {
0 = <userdata>
SetManyAttributes = <function> defined @Interface\AddOns\oUF\ouf.lua:24
style = "oUF_viv"
initialConfigFunction = <function> defined @Interface\AddOns\oUF\ouf.lua:315
}
(*temporary) = "oUF_VIVRaid"
I obviously have added the xml to the toc and like I said, everything works. No idea what is causing this.
The other issue I have is with the pet's castbar. I wanted to add a vehicle castbar to the player frame and hide blizzards "pet" (/vehicle) castbar.
I'm using the same one for several units and call it like that
Code:
if(unit == 'player' or self:GetAttribute("unitsuffix") == "pet" or unit == 'target' or unit == "focus") then
....
end
Which was just fine until I added raid pets. Now, I see the raid pets castbars.... which is just plain wrong.
Question is:
How do I call for the "pet/vehicle" castbar, but not for raidpets (and to some larger extend party pets...)? Or how do I hide it for raidpets?
Edit:
This is my 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_VIVRaid" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true">
<Frames>
<Button name="$parentPet" inherits="SecureUnitButtonTemplate">
<Anchors>
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent">
<Offset>
<AbsDimension x="0" y="-3"/>
</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 this is how I spawn my raidframes
Code:
local raid = {}
for i = 1, 8 do
table.insert(raid, oUF:Spawn("header", "oUF_Raid"..i))
raid[i]:SetManyAttributes("showRaid", true, "yOffset", -10, "groupFilter", i, "template", "oUF_VIVRaid")
raid[i]:Show()
if i == 1 then
raid[i]:SetPoint("TOPLEFT", "RaidMoveFrame", "TOPLEFT", 30, -20)
else
raid[i]:SetPoint("TOPLEFT", raid[i-1], "TOPRIGHT", 5, 0)
end
end