--[[
Hello, and thank you for downloading my addon! I hope you like it! :)
]]--

--[[------------------------------------------------------------------------------------------------------------------]]--

--Spec Selection
local TalentArt = CreateFrame("Frame")
local SpecTexture = TalentArt:CreateTexture()
TalentArt:RegisterEvent("ADDON_LOADED")
TalentArt:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
TalentArt:RegisterEvent("PLAYER_LOGIN")




TalentArt:SetScript("OnEvent", function(self, event, ...)
	SpecTexture:SetPoint("CENTER", PlayerTalentFrameSpecialization, "CENTER", 105, 5)
	SpecTexture:SetSize(420, 420)
	SpecTexture:SetDrawLayer("ARTWORK", 0)
	SpecTexture:SetParent(PlayerTalentFrameSpecialization)
	
	--[[ElvUI support;
	For some reason, it doesn't like to anchor to the spec frame by itself and requires extra touches.
	]]--
	
	if IsAddOnLoaded("ElvUI") then
			SpecTexture:SetPoint("CENTER", PlayerTalentFrameSpecialization, "CENTER", 1, -5) -- This is the anchor
			SpecTexture:SetSize(643, 470) --If there's a better method, I want to know. SetAllPoints is not good enough either.
			SpecTexture:SetParent(PlayerTalentFrameSpecialization) -- This is required for it to pop up. Is not an anchor
			SpecTexture:SetDrawLayer("BACKGROUND", 0) -- This HAS to be here or it doesn't work. DO NOT CHANGE. (I think)
	end
	
	--Aurora Support
	if IsAddOnLoaded("Aurora") then
			SpecTexture:SetPoint("CENTER", PlayerTalentFrameSpecialization, "CENTER", 1, -1)
			SpecTexture:SetSize(645, 467)
			SpecTexture:SetParent(PlayerTalentFrameSpecialization)
			SpecTexture:SetDrawLayer("BACKGROUND", 0)
	end
	
	--Skinner Support
	if IsAddOnLoaded("Skinner") then
			SpecTexture:SetPoint("CENTER", PlayerTalentFrameSpecialization, "CENTER", 0, -3)
			SpecTexture:SetSize(641, 467)
			SpecTexture:SetParent(PlayerTalentFrameSpecialization)
			SpecTexture:SetDrawLayer("BACKGROUND", 0)
	end

	--Demon Hunter
	if UnitClass("player") == "Demon Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Havoc" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DHHavoc.blp")
	elseif UnitClass("player") == "Demon Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Vengeance" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DHVeng.blp")
		
	--Death Knight
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Blood" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DKBlood.blp")
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DKFrost.blp")
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Unholy" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DKUnholy.blp")
	
	--Druid
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Balance" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DruidBalance.blp")
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Feral" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DruidFeral.blp")
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Guardian" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DruidGuardian.blp")
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Restoration" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\DruidResto.blp")
		
	--Hunter
	elseif UnitClass("player") == "Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Beast Mastery" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\HunterBestiality.blp") -- ;)
	elseif UnitClass("player") == "Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Marksmanship" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\HunterMM.blp")
	elseif UnitClass("player") == "Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Survival" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\HunterSV.blp")
		
	--Mage
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Arcane" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\MageArcane.blp")
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Fire" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\MageFire.blp")
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\MageFrost.blp")	
		
	--Monk
	elseif UnitClass("player") == "Monk" and select(2, GetSpecializationInfo(GetSpecialization())) == "Brewmaster" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\MonkBM.blp")	
	elseif UnitClass("player") == "Monk" and select(2, GetSpecializationInfo(GetSpecialization())) == "Mistweaver" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\MonkMW.blp")	
	elseif UnitClass("player") == "Monk" and select(2, GetSpecializationInfo(GetSpecialization())) == "Windwalker" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\MonkWW.blp")	
		
	--Paladin
	elseif UnitClass("player") == "Paladin" and select(2, GetSpecializationInfo(GetSpecialization())) == "Holy" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\PaladinHoly.blp")	
	elseif UnitClass("player") == "Paladin" and select(2, GetSpecializationInfo(GetSpecialization())) == "Protection" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\PaladinProt.blp")	
	elseif UnitClass("player") == "Paladin" and select(2, GetSpecializationInfo(GetSpecialization())) == "Retribution" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\PaladinRet.blp")	
		
	--Priest
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Discipline" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\PriestDisc.blp")	
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Holy" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\PriestHoly.blp")	
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Shadow" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\PriestVoid.blp")	
		
	--Rogue
	elseif UnitClass("player") == "Rogue" and select(2, GetSpecializationInfo(GetSpecialization())) == "Assassination" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\RogueAss.blp") -- ( °͜ʖ°)
	elseif UnitClass("player") == "Rogue" and select(2, GetSpecializationInfo(GetSpecialization())) == "Outlaw" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\RogueOutlaw.blp")
	elseif UnitClass("player") == "Rogue" and select(2, GetSpecializationInfo(GetSpecialization())) == "Subtlety" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\RogueSub.blp")
		
	--Shaman
	elseif UnitClass("player") == "Shaman" and select(2, GetSpecializationInfo(GetSpecialization())) == "Elemental" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\ShamanEle.blp")
	elseif UnitClass("player") == "Shaman" and select(2, GetSpecializationInfo(GetSpecialization())) == "Enhancement" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\ShamanEnh.blp")
	elseif UnitClass("player") == "Shaman" and select(2, GetSpecializationInfo(GetSpecialization())) == "Restoration" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\ShamanResto.blp")
		
	--Warlock
	elseif UnitClass("player") == "Warlock" and select(2, GetSpecializationInfo(GetSpecialization())) == "Affliction" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\WarlockAff.blp")
	elseif UnitClass("player") == "Warlock" and select(2, GetSpecializationInfo(GetSpecialization())) == "Demonology" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\WarlockDemo.blp")
	elseif UnitClass("player") == "Warlock" and select(2, GetSpecializationInfo(GetSpecialization())) == "Destruction" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\WarlockDest.blp")
		
	--Warrior
	elseif UnitClass("player") == "Warrior" and select(2, GetSpecializationInfo(GetSpecialization())) == "Arms" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\WarriorArms.blp")
	elseif UnitClass("player") == "Warrior" and select(2, GetSpecializationInfo(GetSpecialization())) == "Fury" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\WarriorFury.blp")
	elseif UnitClass("player") == "Warrior" and select(2, GetSpecializationInfo(GetSpecialization())) == "Protection" then
		SpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\WarriorProt.blp")
	end
end)

--[[------------------------------------------------------------------------------------------------------------------]]--

	--Hunter Pet Spec	
--[[
GetPetTalentTree() returns the information your pet WAS in by default when you tamed them.
This function really should be changed, since it's useless.
If you use GetSpecialization(false, true), it will return a number.
1 = ferocity
2 = tenacity
3 = cunning
]]--

-- PlayerTalentFramePetSpecializationSpellScrollFrameChildSpecName --
local PetTalentArt = CreateFrame("Frame")
local PetSpecTexture = PetTalentArt:CreateTexture()
PetTalentArt:RegisterEvent("ADDON_LOADED")
PetTalentArt:RegisterEvent("UNIT_PET")
PetTalentArt:RegisterEvent("PET_SPECIALIZATION_CHANGED")
PetTalentArt:RegisterEvent("PLAYER_LOGIN")


PetTalentArt:SetScript("OnEvent", function(self, event, ...)
	PetSpecTexture:SetPoint("CENTER", PlayerTalentFramePetSpecialization, "CENTER", 105, 5)
	PetSpecTexture:SetSize(420, 420)
	PetSpecTexture:SetDrawLayer("ARTWORK", 0)
	PetSpecTexture:SetParent(PlayerTalentFramePetSpecialization)
	
		--ElvUI Support
	if IsAddOnLoaded("ElvUI") then
		PetSpecTexture:SetPoint("CENTER", PlayerTalentFramePetSpecialization, "CENTER", 1, -4)
		PetSpecTexture:SetSize(644, 471)
		PetSpecTexture:SetDrawLayer("ARTWORK", 0)
		PetSpecTexture:SetParent(PlayerTalentFramePetSpecialization)
	end
	
	--Aurora Support
	if IsAddOnLoaded("Aurora") then
		PetSpecTexture:SetPoint("CENTER", PlayerTalentFramePetSpecialization, "CENTER", 1, -1)
		PetSpecTexture:SetSize(644, 467)
		PetSpecTexture:SetDrawLayer("ARTWORK", 0)
		PetSpecTexture:SetParent(PlayerTalentFramePetSpecialization)
	end

	--Skinner Support
	if IsAddOnLoaded("Skinner") then
		PetSpecTexture:SetPoint("CENTER", PlayerTalentFramePetSpecialization, "CENTER", 0, -3)
		PetSpecTexture:SetSize(642, 467)
		PetSpecTexture:SetDrawLayer("ARTWORK", 0)
		PetSpecTexture:SetParent(PlayerTalentFramePetSpecialization)
	end
		
	
	if GetSpecialization(false, true) == 1 then
		PetSpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\HunterPetFerocity.blp")
	elseif GetSpecialization(false, true) == 2 then
		PetSpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\HunterPetTen.blp")
	elseif GetSpecialization(false, true) == 3 then
		PetSpecTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\SpecFrame\\HunterPetCunt.blp") --lol please don't ban me
	end
end)

--[[------------------------------------------------------------------------------------------------------------------]]--

--Talent Selection
local SelectArt = CreateFrame("Frame")
local TalentTexture = SelectArt:CreateTexture()
SelectArt:RegisterEvent("ADDON_LOADED")
SelectArt:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
SelectArt:RegisterEvent("PLAYER_LOGIN")

SelectArt:SetScript("OnEvent", function(self, event, ...)
	TalentTexture:SetPoint("CENTER", PlayerTalentFrameTalents, "CENTER", 0, 0)
	TalentTexture:SetSize(625, 375)
	TalentTexture:SetDrawLayer("ARTWORK", 0)
	TalentTexture:SetParent(PlayerTalentFrameTalents)
	
	--ElvUI support
	if IsAddOnLoaded("ElvUI") then
		TalentTexture:SetPoint("CENTER", PlayerTalentFrameTalents, "CENTER", 1, 14)
		TalentTexture:SetSize(645, 473)
	end
	
	--Aurora support
	if IsAddOnLoaded("Aurora") then
		TalentTexture:SetPoint("CENTER", PlayerTalentFrameTalents, "CENTER", 1, 17)
		TalentTexture:SetSize(644, 467)
	end
	
	--Skinner support
	if IsAddOnLoaded("Skinner") then
		TalentTexture:SetPoint("CENTER", PlayerTalentFrameTalents, "CENTER", 0, 15)
		TalentTexture:SetSize(642, 467)
	end
	
	--Demon Hunter
	if UnitClass("player") == "Demon Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Havoc" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\HavocDH.blp")
	elseif UnitClass("player") == "Demon Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Vengeance" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\VengDH.blp")
		
	--Death Knight
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Blood" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\BloodDK.blp")
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\FrostDK.blp")
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Unholy" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\UnholyDK.blp")
	
	--Druid
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Balance" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\BalanceDruid.blp")
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Feral" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\FeralDruid.blp")
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Guardian" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\GuardianDruid.blp")
	elseif UnitClass("player") == "Druid" and select(2, GetSpecializationInfo(GetSpecialization())) == "Restoration" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\RestoDruid.blp")
		
	--Hunter
	elseif UnitClass("player") == "Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Beast Mastery" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\BMHunter.blp")
	elseif UnitClass("player") == "Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Marksmanship" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\MMHunter.blp")
	elseif UnitClass("player") == "Hunter" and select(2, GetSpecializationInfo(GetSpecialization())) == "Survival" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\SVHunter.blp")
		
	--Mage
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Arcane" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\ArcaneMage.blp")
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Fire" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\FireMage.blp")
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\FrostMage.blp")	
		
	--Monk
	elseif UnitClass("player") == "Monk" and select(2, GetSpecializationInfo(GetSpecialization())) == "Brewmaster" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\BMMonk.blp")	
	elseif UnitClass("player") == "Monk" and select(2, GetSpecializationInfo(GetSpecialization())) == "Mistweaver" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\MWMonk.blp")	
	elseif UnitClass("player") == "Monk" and select(2, GetSpecializationInfo(GetSpecialization())) == "Windwalker" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\WWMonk.blp")	
		
	--Paladin
	elseif UnitClass("player") == "Paladin" and select(2, GetSpecializationInfo(GetSpecialization())) == "Holy" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\HolyPally.blp")	
	elseif UnitClass("player") == "Paladin" and select(2, GetSpecializationInfo(GetSpecialization())) == "Protection" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\ProtPally.blp")	
	elseif UnitClass("player") == "Paladin" and select(2, GetSpecializationInfo(GetSpecialization())) == "Retribution" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\RetPally.blp")	
		
	--Priest
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Discipline" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\DiscPriest.blp")	
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Holy" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\HolyPriest.blp")	
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Shadow" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\ShadowPriest.blp")	
		
	--Rogue
	elseif UnitClass("player") == "Rogue" and select(2, GetSpecializationInfo(GetSpecialization())) == "Assassination" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\AssRogue.blp") -- ( °͜ʖ°)
	elseif UnitClass("player") == "Rogue" and select(2, GetSpecializationInfo(GetSpecialization())) == "Outlaw" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\OutlawRogue.blp")
	elseif UnitClass("player") == "Rogue" and select(2, GetSpecializationInfo(GetSpecialization())) == "Subtlety" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\SubRogue.blp")
		
	--Shaman
	elseif UnitClass("player") == "Shaman" and select(2, GetSpecializationInfo(GetSpecialization())) == "Elemental" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\EleShaman.blp")
	elseif UnitClass("player") == "Shaman" and select(2, GetSpecializationInfo(GetSpecialization())) == "Enhancement" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\EnhShaman.blp")
	elseif UnitClass("player") == "Shaman" and select(2, GetSpecializationInfo(GetSpecialization())) == "Restoration" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\RestoShaman.blp")
		
	--Warlock
	elseif UnitClass("player") == "Warlock" and select(2, GetSpecializationInfo(GetSpecialization())) == "Affliction" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\AfflictionWarlock.blp")
	elseif UnitClass("player") == "Warlock" and select(2, GetSpecializationInfo(GetSpecialization())) == "Demonology" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\DemoWarlock.blp")
	elseif UnitClass("player") == "Warlock" and select(2, GetSpecializationInfo(GetSpecialization())) == "Destruction" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\DestroWarlock.blp")
		
	--Warrior
	elseif UnitClass("player") == "Warrior" and select(2, GetSpecializationInfo(GetSpecialization())) == "Arms" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\ArmsWarrior.blp")
	elseif UnitClass("player") == "Warrior" and select(2, GetSpecializationInfo(GetSpecialization())) == "Fury" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\FuryWarrior.blp")
	elseif UnitClass("player") == "Warrior" and select(2, GetSpecializationInfo(GetSpecialization())) == "Protection" then
		TalentTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\TalentFrame\\ProtWarrior.blp")
	end
end)

--[[------------------------------------------------------------------------------------------------------------------]]--

--PvP Talent Selection
local PvPArt = CreateFrame("Frame")
local PvPTexture = PvPArt:CreateTexture()
PvPArt:RegisterEvent("ADDON_LOADED")
PvPArt:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
PvPArt:RegisterEvent("PLAYER_LOGIN")

PvPArt:SetScript("OnEvent", function(self, event, ...)
	PvPTexture:SetPoint("CENTER", PlayerTalentFramePVPTalents, "CENTER", 0, 0)
	PvPTexture:SetSize(625, 325)
	PvPTexture:SetDrawLayer("ARTWORK", 0)
	PvPTexture:SetParent(PlayerTalentFramePVPTalents)
	
	--ElvUI Support
	if IsAddOnLoaded("ElvUI") then
		PvPTexture:SetPoint("CENTER", PlayerTalentFramePVPTalents, "CENTER", 1, 39)
		PvPTexture:SetSize(645, 473)
	end
	
	--Aurora Support
	if IsAddOnLoaded("Aurora") then
		PvPTexture:SetPoint("CENTER", PlayerTalentFramePVPTalents, "CENTER", 1, 42)
		PvPTexture:SetSize(644, 467)
	end
	
	--Skinner Support
	if IsAddOnLoaded("Skinner") then
		PvPTexture:SetPoint("CENTER", PlayerTalentFramePVPTalents, "CENTER", 0, 39)
		PvPTexture:SetSize(642, 469)
	end
	
	
	--Demon Hunter
	if UnitClass("player") == "Demon Hunter" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIDemonHunter.blp")
		
	--Death Knight
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Blood" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIDeathKnightBlood.blp")
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIDeathKnightFrost.blp")
	elseif UnitClass("player") == "Death Knight" and select(2, GetSpecializationInfo(GetSpecialization())) == "Unholy" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIDeathKnightUnholy.blp")
	
	--Druid
	elseif UnitClass("player") == "Druid" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIDruid.blp")
		
	--Hunter
	elseif UnitClass("player") == "Hunter" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIHunter.blp")
		
	--Mage
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Arcane" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIMageArcane.blp")
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Fire" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIMageFire.blp")
	elseif UnitClass("player") == "Mage" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIMageFrost.blp")	
		
	--Monk
	elseif UnitClass("player") == "Monk" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIMonk.blp")
		
	--Paladin
	elseif UnitClass("player") == "Paladin" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIPaladin.blp")
		
	--Priest
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Discipline" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIPriest.blp")	
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Holy" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIPriest.blp")	
	elseif UnitClass("player") == "Priest" and select(2, GetSpecializationInfo(GetSpecialization())) == "Shadow" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIPriestShadow.blp")	
		
	--Rogue
	elseif UnitClass("player") == "Rogue" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIRogue.blp")
		
	--Shaman
	elseif UnitClass("player") == "Shaman" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIShaman.blp")
		
	--Warlock
	elseif UnitClass("player") == "Warlock" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIWarlock.blp")
		
	--Warrior
	elseif UnitClass("player") == "Warrior" then
		PvPTexture:SetTexture("Interface\\AddOns\\TalentArt\\Media\\PvPFrame\\ArtifactUIWarrior.blp")
	end
end)






--[[
I would like to thank everyone who helped me create this addon.
I've been hoping to do something like this for so long.
]]--

		
--[[elseif UnitClass("player") == "CLASS" and select(2, GetSpecializationInfo(GetSpecialization())) == "SPECNAME" then
		SpecTexture:SetTexture("texturepath")
	elseif UnitClass("player") == "CLASS" and select(2, GetSpecializationInfo(GetSpecialization())) == "SPECNAME" then
		SpecTexture:SetTexture("texturepath")
	elseif UnitClass("player") == "CLASS" and select(2, GetSpecializationInfo(GetSpecialization())) == "SPECNAME" then
		SpecTexture:SetTexture("texturepath")]]--
