
local function eventHandler(self,event,...)
	SetCVar("nameplateMaxDistance", 45)
	SetCVar("nameplateOverlapH", 0.4)
	SetCVar("nameplateOtherTopInset", .12)
	SetCVar("nameplateOtherBottomInset", -1)
	SetCVar("nameplateLargeTopInset", .12) 
	SetCVar("nameplateLargeBottomInset", -1)
	SetCVar("nameplateOverlapV", 0.8)
	SetCVar("nameplateShowDebuffsOnFriendly", 0)
	SetCVar("nameplateShowFriendlyNPCs",1)
	SetCVar("missingTransmogSourceInItemTooltips", 1)
	SetCVar("Sound_NumChannels", 128)
	SetCVar("screenshotQuality", 10)
	SetCVar("nameplateMotionSpeed", 0.08)
	SetCVar("scriptErrors", 1)
end

local frame = CreateFrame("Frame","CVarSet")
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent",eventHandler)


local EventFrame = CreateFrame("Frame")
EventFrame:RegisterEvent("PLAYER_LOGIN")
EventFrame:SetScript("OnEvent", function(self,event,...) 
	SetCVar("nameplateMaxDistance", 45)
	SetCVar("nameplateOverlapH", 0.4)
	SetCVar("nameplateOtherTopInset", .12)
	SetCVar("nameplateOtherBottomInset", -1)
	SetCVar("nameplateLargeTopInset", .12) 
	SetCVar("nameplateLargeBottomInset", -1)
	SetCVar("nameplateOverlapV", 0.8)
	SetCVar("nameplateShowDebuffsOnFriendly", 0)
	SetCVar("nameplateShowFriendlyNPCs",1)
	SetCVar("missingTransmogSourceInItemTooltips", 1)
	SetCVar("Sound_NumChannels", 128)
	SetCVar("screenshotQuality", 10)
	SetCVar("nameplateMotionSpeed", 0.08)
	SetCVar("scriptErrors", 1)
-- print("SilverPlateTweaks Loaded.")
end)