Thread Tools Display Modes
10-12-09, 06:08 PM   #1
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
problem with raid pets and a question regarding pet castbar

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

Last edited by Dawn : 10-12-09 at 06:13 PM.
  Reply With Quote
10-13-09, 08:20 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
How does your TOC look?
__________________
「貴方は1人じゃないよ」
  Reply With Quote
10-13-09, 08:52 AM   #3
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
like this

Code:
## Interface: 30800
## Author: Dawn
## Notes: compact oUF layout ... 
## Title: oUF_|cff1aff8bviv2|r
## RequiredDeps: oUF
## OptionalDeps: oUF_CombatFeedback, oUF_SpellRange, oUF_PowerSpark, oUF_DebuffHighlight, oUF_BarFader, oUF_Smooth, oUF_MoveableFrames, oUF_WeaponEnchant
oUF_viv.lua
viv.xml
... and to be more specific the error occurs whenever the first raid frame is spawn (or reload ui, while being in a raid). Not on log-in in general. It does not happen again when people join or leave the raid.

Last edited by Dawn : 10-13-09 at 08:55 AM.
  Reply With Quote
10-13-09, 09:01 AM   #4
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
load your XML first, then the Lua. Problem solved.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
10-13-09, 09:05 AM   #5
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
I'll try this when I'm at home, thanks.
  Reply With Quote
10-14-09, 06:09 PM   #6
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
re: castbars. simple is better. you're checking the unitsuffix attribute for "pet" which is obviously going to return true for party & raid pets, since their unitid is partyNpet / raidNpet. if you only want it to work for the player pet just do

-- the "pet" token for unitid implies playerpet.
<...> or unit == "pet" or <...>
  Reply With Quote
10-14-09, 07:32 PM   #7
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Thanks. I "fixed" it for now with SetAlpha(0). It's just a pain to test party and raid pet castbars in game, since BGs don't open as fast as they used to do, anymore. And it's not guaranteed that some pet casts something in there.

I'll look into addressing it, like you suggested.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » problem with raid pets and a question regarding pet castbar


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off