local _, Ns = ...

function Ns.talentScan()
	local _, classFilename, _ = UnitClass("player")
	if (classFilename == "MAGE") then   
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 17)
			Ns.arcaneMod = points * 1
			Ns.aiMod = ((points * 1)/100)
		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 21) 
		Ns.impFrostbolt = (points * 1)
		Ns.impFbDmg = (points * 2) / 100
		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 3)
		Ns.hitMod = points

	local _, _, _, _, points, _, _, _ = GetTalentInfo(2, 13)
			Ns.playFire = (points * 1) / 100	
			
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 20)
		Ns.arcticWind = (points * 1) / 100
			
	local _, _, _, _, points, _, _, _ = GetTalentInfo(2, 17)      
		Ns.firepowerMod = ((points * 2)/100)
 
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 8)
		Ns.pierceMod = ((points * 2) / 100)
	
	-- local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 18)
		-- arcanePotencyTalent = (points * 10)
		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 2)
		Ns.arcaneFocus = (points * 2)
		if Ns.arcaneFocus > 0 then
			Ns.arcaneFocus = "|cff8788EE +" .. (points * 2) .. "|r"
		else
			Ns.arcaneFocus = ""
		end		
		
	elseif (classFilename == "PRIEST") then

	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 5)
		Ns.hitMod = points * 2

	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 17)
		DarkNessTalent = ((points * 2) / 100)
   		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(2, 16)   
		Ns.spiritualHealing = ((points * 2) / 100)
   
	-- local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 9) 
			-- talentRegen = 0 --((points * 10) / 100)

	elseif (classFilename == "PALADIN") then
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 4)
		Ns.crusaderTalent = (points * 1)

	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 16)
		Ns.vengeance = (points * 1)		

	elseif (classFilename == "WARLOCK") then
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 16)
		Ns.shadowMastery = ((points * 2)/100)
       
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 16)
		Ns.emberstorm = ((points * 2)/100)  
		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 1)
		Ns.Suppression = (points * 2)
		if Ns.Suppression > 0 then
			Ns.Suppression = "|cff8788EE +" .. (points * 2) .. "|r"
		else
			Ns.Suppression = ""
		end

	local _, _, _, _, points, _, _, _ = GetTalentInfo(2, 17)
	Ns.masterDemo = ((points * 2)/100)
		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 7)	
		Ns.devastation = (points * 1)
		
	elseif (classFilename == "HUNTER") then
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 20)
		Ns.serpentSwift = (points * 4)		

	elseif (classFilename == "SHAMAN") then
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 15)  
			Ns.purification = ((points * 2)/100)
   
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 6)  
			Ns.natGuidance = (points)
 
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 15)  
			Ns.elePrecision = (points * 2)

	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 14)  
			Ns.unrStorm = (points * 2)
 		
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 18)  
			Ns.natBlessing = ((points * 10) / 100)
 
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 10)
			Ns.totemTalent = ((points * 5) / 100)	
			
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 11)
			Ns.tidalMastery = (points * 1)
			
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 8)
			Ns.callofThunder = (points * 1)
		if Ns.callofThunder > 0 then
			Ns.callofThunder = "|cff0070DD +" .. (points * 1) .. "|r"
		else
			Ns.callofThunder = ""
		end			
		
	elseif (classFilename == "DRUID") then
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 16)  
			Ns.balancePower = (points * 2)
	
	local _, _, _, _, points, _, _, _ = GetTalentInfo(3, 12)  
			Ns.giftNature = ((points * 2) / 100)		

	local _, _, _, _, points, _, _, _ = GetTalentInfo(2, 16)  
			Ns.survFittest = (points * 1)				

	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 5)  
			Ns.starlight = (points * 2)		
			
	local _, _, _, _, points, _, _, _ = GetTalentInfo(1, 17)  
	    if points == 1 then
			Ns.DreamState = 0.04
		elseif points == 2 then
			Ns.DreamState = 0.07
		elseif points == 3 then
			Ns.DreamState = 0.1
	    end 			
	end 
end	
