Quantcast

Press ctrl and mouse over a unit to clear that unit's talent data.

Scott Sibley [08-06-10 - 16:08]
Press ctrl and mouse over a unit to clear that unit's talent data.
Filename
Modules/Talents.lua
Modules/Text.lua
diff --git a/Modules/Talents.lua b/Modules/Talents.lua
index 8c100ce..d1e82eb 100644
--- a/Modules/Talents.lua
+++ b/Modules/Talents.lua
@@ -210,6 +210,10 @@ function mod:SetUnit()
 			expireTimer = nil
 		end
 		expireTimer = self:ScheduleTimer(expireQuery, EXPIRE_TIME)
+		if IsControlKeyDown() then
+			local nameRealm = select(1, UnitName("mouseover")) .. (select(2, UnitName("mouseover")) or '')
+			spec[nameRealm] = nil
+		end
 	end
 end

diff --git a/Modules/Text.lua b/Modules/Text.lua
index 2b2a8e8..1787ccb 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -629,17 +629,7 @@ local getGuild = function()
 end

 local ff = CreateFrame("Frame")
-function mod:SetUnit()
-    --[[self = mod
-    if not UnitExists("mouseover") then
-        if ff:GetScript("OnUpdate") then
-            ff:SetScript("OnUpdate", nil)
-        else
-            ff:SetScript("OnUpdate", self.SetUnit)
-        end
-        return
-    end]]
-
+function mod:SetUnit()
     if ff:GetScript("OnUpdate") then ff:SetScript("OnUpdate", nil) end

     self.unitName = getName()