Thread Tools Display Modes
11-02-10, 10:11 AM   #1
DerBob
A Murloc Raider
Join Date: Aug 2007
Posts: 5
PartyTargets PartyPets

Hi there,
until some weeks ago I used an xml template to spawn targets and pets of all partymembers.
To be exact this template:
Code:
		<Button name="oUF_Party" inherits="SecureUnitButtonTemplate" hidden="true" virtual="true">
			<Frames>
				<Button name="$parentTarget" inherits="SecureUnitButtonTemplate">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" relativeTo="$parent">
							<Offset>
								<AbsDimension x="0" y="4"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Attributes>
						<Attribute name="unitsuffix" type="string" value="target"/>
						<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>
				<Button name="$parentPet" inherits="SecureUnitButtonTemplate">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="$parent">
							<Offset>
								<AbsDimension x="0" y="-4"/>
							</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>
But it stopped working now somehow. I'm using Tukui and used to edit it to my needs.

Code:
oUF:RegisterStyle('TukuiHealR25R40', Shared)
oUF:Factory(function(self)
	oUF:SetActiveStyle("TukuiHealR25R40")	
		raid = {}
		for i = 1, 5 do
			local group = self:SpawnHeader("oUF_TukuiHealRaid2540_"..i, nil, "raid,party",
				'oUF-initialConfigFunction', [[
					local header = self:GetParent()
					self:SetWidth(header:GetAttribute('initial-width'))
					self:SetHeight(header:GetAttribute('initial-height'))
				]],
				'initial-width', TukuiDB.Scale(45*TukuiCF["unitframes"].gridscale*TukuiDB.raidscale),
				'initial-height', TukuiDB.Scale(45*TukuiCF["unitframes"].gridscale*TukuiDB.raidscale),	
				"showParty", true,
				"showPlayer", TukuiCF["unitframes"].showplayerinparty, 
				"showRaid", true, 
				"xoffset", TukuiDB.Scale(3),
				"yOffset", TukuiDB.Scale(-3),
				"point", "LEFT",
				"groupFilter", tostring(i),
				"groupingOrder", "1,2,3,4,5,6,7,8",
				"groupBy", "GROUP",
				"maxColumns", 5,
				"unitsPerColumn", 5,
				"columnSpacing", TukuiDB.Scale(3),
				"columnAnchorPoint", "TOP"
			)
			if i == 1 then
				group:SetPoint("TOPLEFT", UIParent, "CENTER", -120, -172)
			else
				group:SetPoint("TOPLEFT", raid[i-1], "BOTTOMLEFT", 0, TukuiDB.Scale(-3))
			end
			raid[i] = group
		end

		local ShowPet = CreateFrame("Frame")
		ShowPet:RegisterEvent("PLAYER_ENTERING_WORLD")
		ShowPet:RegisterEvent("RAID_ROSTER_UPDATE")
		ShowPet:RegisterEvent("PARTY_LEADER_CHANGED")
		ShowPet:RegisterEvent("PARTY_MEMBERS_CHANGED")
		ShowPet:SetScript("OnEvent", function(self)
			if InCombatLockdown() then
				self:RegisterEvent("PLAYER_REGEN_ENABLED")
			else
				self:UnregisterEvent("PLAYER_REGEN_ENABLED")
				local numraid = GetNumRaidMembers()
				local numparty = GetNumPartyMembers()
				if numparty > 0 and numraid == 0 or numraid > 0 and numraid <= 5 then
					raid[1]:SetAttribute("template", "oUF_Party")
				end
			end
		end)
end
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » PartyTargets PartyPets


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