local _,ns = ...
ns.ADDUIEVENT("PLAYER_LOGIN", function()


--[[
local ff = function(frame)
if frame:IsForbidden() then return end
	frame.healthBar:SetStatusBarTexture(.75,.75,.75)
	if frame.powerBar then
	frame.powerBar:SetStatusBarTexture(.9,.9,.9) end
	--frame.roleIcon:SetTexture()
end
hooksecurefunc("CompactUnitFrame_UpdateName", ff)
]]
ns.tips("更换团队框架职责图标")
hooksecurefunc("CompactUnitFrame_UpdateRoleIcon",function(frame)
	if not frame.roleIcon then return end
	local role = UnitGroupRolesAssigned(frame.unit)
	if role == "TANK" then
		frame.roleIcon:SetTexture("Interface\\AddOns\\AddUI\\UI\\Textures\\ROLE-TDPS",true)
		frame.roleIcon:SetTexCoord(0.02,.28,.35,.63)
	elseif role == "HEALER" then
		frame.roleIcon:SetTexture("Interface\\AddOns\\AddUI\\UI\\Textures\\ROLE-N",true)
		frame.roleIcon:SetTexCoord(.35,.6,.05,.3)
	elseif role == "DAMAGER" then
		frame.roleIcon:SetTexture("Interface\\AddOns\\AddUI\\UI\\Textures\\ROLE-TDPS",true)
		frame.roleIcon:SetTexCoord(.35,.6,.35,.65)
	end
end)

end)
