View Single Post
08-20-12, 09:34 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The tag system has changed; oUF.UnitlessTagEvents no longer exists, and has been replaced with oUF.Tags.SharedEvents.

Here is an example of a working tag using non-unit events from oUF_Phanx:
Code:
oUF.Tags.Events["leadericon"] = "PARTY_LEADER_CHANGED PARTY_MEMBERS_CHANGED"
oUF.Tags.SharedEvents["PARTY_LEADER_CHANGED"] = true
oUF.Tags.SharedEvents["PARTY_MEMBERS_CHANGED"] = true
oUF.Tags.Methods["leadericon"] = function(unit)
	if UnitIsGroupLeader(unit) then
		return [[|TInterface\GroupFrame\UI-Group-LeaderIcon:0|t]]
	elseif UnitInRaid(unit) and UnitIsGroupAssistant(unit) then
		return [[|TInterface\GroupFrame\UI-Group-AssistantIcon:0|t]]
	end
end
Compare with a tag using unit events:
Code:
oUF.Tags.Events["powercolor"] = "UNIT_DISPLAYPOWER"
oUF.Tags.Methods["powercolor"] = function(unit)
	local _, type = UnitPowerType(unit)
	local color = ns.colors.power[type] or ns.colors.power.FUEL
	return ("|cff%02x%02x%02x"):format(color[1] * 255, color[2] * 255, color[3] * 255)
end
You will probably need to rewrite all of the tag definitions in your own layout to work with the new system.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote