Quantcast

FIXED: Spelling errors.

F16Gaming [12-01-11 - 13:58]
FIXED: Spelling errors.
Filename
Command.lua
Dialogs.lua
KillTrack.lua
diff --git a/Command.lua b/Command.lua
index 89fc768..b800cb6 100644
--- a/Command.lua
+++ b/Command.lua
@@ -71,10 +71,10 @@ C:Register("__DEFAULT__", function(args)
 	KT:Msg("/kt print - Toggle printing kill updates to chat.")
 	KT:Msg("/kt list - Display a list of all mobs entries.")
 	KT:Msg("/kt delete <id> - Delete entry with NPC id <id>.")
-	KT:Msg("/kt purge [treshold] - Open dialog to purge entries, specifiying a treshold here is optional.")
+	KT:Msg("/kt purge [threshold] - Open dialog to purge entries, specifiying a threshold here is optional.")
 	KT:Msg("/kt reset - Clear the mob database.")
 	KT:Msg("/kt time - Track kills within specified time.")
-	KT:Msg("/kt treshold <treshold> - Set treshold for kill record notices to show.")
+	KT:Msg("/kt threshold <threshold> - Set threshold for kill record notices to show.")
 	KT:Msg("/kt - Displays this help message.")
 end)

@@ -112,9 +112,9 @@ C:Register({"delete", "del", "remove", "rem"}, function(args)
 end)

 C:Register({"purge"}, function(args)
-	local treshold
-	if #args >= 1 then treshold = tonumber(args[1]) end
-	KT:ShowPurge(treshold)
+	local threshold
+	if #args >= 1 then threshold = tonumber(args[1]) end
+	KT:ShowPurge(threshold)
 end)

 C:Register({"reset", "r"}, function(args)
@@ -164,16 +164,16 @@ C:Register({"time", "timer"}, function(args)
 	KT.TimerFrame:Start(s, m, h)
 end)

-C:Register({"treshold"}, function(args)
+C:Register({"threshold"}, function(args)
 	if #args <= 0 then
-		KT:Msg("Usage: treshold <treshold>")
-		KT:Msg("E.g: /kt treshold 100")
+		KT:Msg("Usage: threshold <threshold>")
+		KT:Msg("E.g: /kt threshold 100")
 		KT:Msg("    Notice will be shown on every 100th kill.")
 		return
 	end
 	local t = tonumber(args[1])
 	if t then
-		KT:SetTreshold(t)
+		KT:SetThreshold(t)
 	else
 		KT:Msg("Argument must be a number.")
 	end
diff --git a/Dialogs.lua b/Dialogs.lua
index 2f8d110..9fe0a61 100644
--- a/Dialogs.lua
+++ b/Dialogs.lua
@@ -42,15 +42,15 @@ StaticPopupDialogs["KILLTRACK_DELETE"] = {
 }

 StaticPopupDialogs["KILLTRACK_PURGE"] = {
-	text = "Remove all mob entries with their kill count below this treshold:",
+	text = "Remove all mob entries with their kill count below this threshold:",
 	button1 = "Purge",
 	button2 = "Cancel",
 	hasEditBox = true,
 	OnAccept = function(self, data, data2) KT:Purge(tonumber(self.editBox:GetText())) end,
-	OnCancel = function() KT.Temp.Treshold = nil end,
+	OnCancel = function() KT.Temp.Threshold = nil end,
 	OnShow = function(self, data)
-		if tonumber(KT.Temp.Treshold) then
-			self.editBox:SetText(tostring(KT.Temp.Treshold))
+		if tonumber(KT.Temp.Threshold) then
+			self.editBox:SetText(tostring(KT.Temp.Threshold))
 		else
 			self.button1:Disable()
 		end
@@ -89,9 +89,9 @@ function KT:ShowDelete(id, name)
 	StaticPopup_Show("KILLTRACK_DELETE", name, id)
 end

-function KT:ShowPurge(treshold)
-	if tonumber(treshold) then
-		self.Temp.Treshold = tonumber(treshold)
+function KT:ShowPurge(threshold)
+	if tonumber(threshold) then
+		self.Temp.Threshold = tonumber(threshold)
 	end
 	StaticPopup_Show("KILLTRACK_PURGE")
 end
diff --git a/KillTrack.lua b/KillTrack.lua
index 0bed3ec..d8d670e 100644
--- a/KillTrack.lua
+++ b/KillTrack.lua
@@ -60,8 +60,8 @@ function KT.Events.ADDON_LOADED(self, ...)
 	if type(self.Global.PRINTKILLS) ~= "boolean" then
 		self.Global.PRINTKILLS = true
 	end
-	if type(self.Global.ACHIEV_TRESHOLD) ~= "number" then
-		self.Global.ACHIEV_TRESHOLD = 1000
+	if type(self.Global.ACHIEV_THRESHOLD) ~= "number" then
+		self.Global.ACHIEV_THRESHOLD = 1000
 	end
 	if type(self.Global.MOBS) ~= "table" then
 		self.Global.MOBS = {}
@@ -97,12 +97,12 @@ function KT.Events.UPDATE_MOUSEOVER_UNIT(self, ...)
 	GameTooltip:Show()
 end

-function KT:SetTreshold(treshold)
-	if type(treshold) ~= "number" then
-		error("KillTrack.SetTreshold: Argument #1 (treshold) must be of type 'number'")
+function KT:SetThreshold(threshold)
+	if type(threshold) ~= "number" then
+		error("KillTrack.SetThreshold: Argument #1 (threshold) must be of type 'number'")
 	end
-	self.Global.ACHIEV_TRESHOLD = treshold
-	KT:Msg(("New kill notice (achievement) treshold set to %d."):format(treshold))
+	self.Global.ACHIEV_THRESHOLD = threshold
+	KT:Msg(("New kill notice (achievement) threshold set to %d."):format(threshold))
 end

 function KT:AddKill(id, name)
@@ -121,13 +121,13 @@ function KT:AddKill(id, name)
 		self:Msg(("Updated %q, new kill count: %d. Kill count on this character: %d"):format(name, self.Global.MOBS[id].Kills, self.CharGlobal.MOBS[id].Kills))
 	end
 	if type(self.Global.MOBS[id].AchievCount) ~= "number" then
-		self.Global.MOBS[id].AchievCount = floor(self.Global.MOBS[id].Kills / self.Global.ACHIEV_TRESHOLD)
+		self.Global.MOBS[id].AchievCount = floor(self.Global.MOBS[id].Kills / self.Global.ACHIEV_THRESHOLD)
 		if self.Global.MOBS[id].AchievCount >= 1 then
 			self:KillAlert(self.Global.MOBS[id])
 		end
 	else
 		local achievCount = self.Global.MOBS[id].AchievCount
-		self.Global.MOBS[id].AchievCount = floor(self.Global.MOBS[id].Kills / self.Global.ACHIEV_TRESHOLD)
+		self.Global.MOBS[id].AchievCount = floor(self.Global.MOBS[id].Kills / self.Global.ACHIEV_THRESHOLD)
 		if self.Global.MOBS[id].AchievCount > achievCount then
 			self:KillAlert(self.Global.MOBS[id])
 		end
@@ -264,22 +264,22 @@ function KT:Delete(id, charOnly)
 	end
 end

-function KT:Purge(treshold)
+function KT:Purge(threshold)
 	local count = 0
 	for k,v in pairs(KT.Global.MOBS) do
-		if type(v) == "table" and v.Kills < treshold then
+		if type(v) == "table" and v.Kills < threshold then
 			self.Global.MOBS[k] = nil
 			count = count + 1
 		end
 	end
 	for k,v in pairs(KT.CharGlobal.MOBS) do
-		if type(v) == "table" and v.Kills < treshold then
+		if type(v) == "table" and v.Kills < threshold then
 			self.CharGlobal.MOBS[k] = nil
 			count = count + 1
 		end
 	end
-	self:Msg(("Purged %d entries with a kill count below %d"):format(count, treshold))
-	self.Temp.Treshold = nil
+	self:Msg(("Purged %d entries with a kill count below %d"):format(count, threshold))
+	self.Temp.Threshold = nil
 	StaticPopup_Show("KILLTRACK_FINISH", tostring(count))
 end