Quantcast

In ARLFrame.lua: Added realm name above character selection, and added tradeskill wiping for the selected toon if the Alt key is held while the left mouse button is pressed.

torhal [05-21-09 - 07:59]
In ARLFrame.lua: Added realm name above character selection, and added tradeskill wiping for the selected toon if the Alt key is held while the left mouse button is pressed.
In AckisRecipeList.lua: Replaced global wipe() with local twipe().
Filename
ARLFrame.lua
AckisRecipeList.lua
diff --git a/ARLFrame.lua b/ARLFrame.lua
index bf9e49d..487fadd 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -3248,7 +3248,8 @@ local function GenerateClickableTT(anchor)
 				y, x = tip:AddLine()
 				tip:SetCell(y, x, realm, realm)
 			elseif realm == target_realm then
-				y, x = tip:AddLine()
+				y, x = tip:AddNormalLine(realm)
+				y, x = tip:AddNormalLine(" ")

 				click_info.realm = realm
 				for name in pairs(tskl_list[click_info.realm]) do
@@ -3300,7 +3301,6 @@ local function HandleTTClick(event, cell, arg, button)
 		GenerateClickableTT()
 		return
 	end
-
 	local tskl_list = addon.db.global.tradeskill

 	if not click_info.realm then
@@ -3311,6 +3311,16 @@ local function HandleTTClick(event, cell, arg, button)
 		GenerateClickableTT()
 	elseif not click_info.name then
 		click_info.name = arg
+
+		-- Wipe tradeskill information for the selected toon. -Torhal
+		if IsAltKeyDown() and button == "LeftButton" then
+			tskl_list[click_info.realm][click_info.name] = nil
+			local anchor = click_info.anchor
+			twipe(click_info)
+			click_info.anchor = anchor
+			GenerateClickableTT()
+			return
+		end
 		GenerateClickableTT()
 	else
 		-- Print link to chat frame, then reset tip data
diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua
index b7247ca..919d0c4 100644
--- a/AckisRecipeList.lua
+++ b/AckisRecipeList.lua
@@ -2690,7 +2690,7 @@ end

 --Description: Clears all saved tradeskills
 function addon:ClearSavedSkills()
-	wipe(addon.db.global.tradeskill)
+	twipe(addon.db.global.tradeskill)

 	if addon.db.profile.tradeskill then
 		addon.db.profile.tradeskill = nil