From 5d8f06e4e709e9e9c216f4d1c562eb498d2aa136 Mon Sep 17 00:00:00 2001 From: F16Gaming Date: Mon, 12 Dec 2011 19:31:14 +0100 Subject: [PATCH] FIXED: Achievements should no longer behave weird after a threshold change. --- KillTrack.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/KillTrack.lua b/KillTrack.lua index d8d670e..fd91a23 100644 --- a/KillTrack.lua +++ b/KillTrack.lua @@ -102,6 +102,7 @@ function KT:SetThreshold(threshold) error("KillTrack.SetThreshold: Argument #1 (threshold) must be of type 'number'") end self.Global.ACHIEV_THRESHOLD = threshold + self:ResetAchievCount() KT:Msg(("New kill notice (achievement) threshold set to %d."):format(threshold)) end @@ -291,6 +292,12 @@ function KT:Reset() StaticPopup_Show("KILLTRACK_FINISH", tostring(count)) end +function KT:ResetAchievCount() + for _,v in pairs(self.Global.MOBS) do + v.AchievCount = floor(v.Kills / self.Global.ACHIEV_THRESHOLD) + end +end + KT.Frame = CreateFrame("Frame") for k,_ in pairs(KT.Events) do -- 1.7.9.5