Thread: Two bugs
View Single Post
12-09-09, 12:31 PM   #9
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,935
Hmm, I can't find where I saw about the Role Icons now. I was sure it was in one of the wowcompares files..... will keep looking though.

Ah, here is what sparked my memory .. PlayerFrame.lua

Code:
function PlayerFrame_UpdateRolesAssigned()
	local frame = PlayerFrame;
	local icon = _G[frame:GetName().."RoleIcon"];
	local isTank, isHealer, isDamage = UnitGroupRolesAssigned("player");
	
	if ( isTank ) then
		icon:SetTexCoord(0, 19/64, 22/64, 41/64);
		icon:Show();
	elseif ( isHealer ) then
		icon:SetTexCoord(20/64, 39/64, 1/64, 20/64);
		icon:Show();
	elseif ( isDamage ) then
		icon:SetTexCoord(20/64, 39/64, 22/64, 41/64);
		icon:Show();
	else
		icon:Hide();
	end
end
It is called when the following event is captured :

Code:
	elseif ( event == "PLAYER_ROLES_ASSIGNED" ) then
		PlayerFrame_UpdateRolesAssigned();
	end
Hopefully that helps you somewhat Scott.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 12-09-09 at 12:34 PM.