From f05aecbe210524e7f3bc4f61dd086d76a428a2e5 Mon Sep 17 00:00:00 2001 From: "Erik L. Vonderscheer" Date: Mon, 16 Aug 2010 02:25:54 +0000 Subject: [PATCH] Fix repeat counter Fix error in localization (r195) --- TradeFilter3.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/TradeFilter3.lua b/TradeFilter3.lua index 542a24d..a039e76 100644 --- a/TradeFilter3.lua +++ b/TradeFilter3.lua @@ -57,6 +57,7 @@ local repeatFrame = L["repeatFrame"] local lastmsgID local lastmsg local rptmsg +local rptmsgID local lastuserID local PROJECT_VERSION = "@project-version@" @@ -416,9 +417,13 @@ function TF3:FindRepeat(msg, userID, msgID, coloredName, arg) if (msgID ~= repeatdata[userID].lastmsgID and msg == repeatdata[userID].lastmsg and gtime - repeatdata[userID].lastIndex < tonumber(TF3.db.profile.time_repeats)) then repeatdata[userID].repeats = repeatdata[userID].repeats + 1 if (repeatdata[userID].repeats >= tonumber(TF3.db.profile.num_repeats)) then - if (msg ~= rptmsg) then + if (msg ~= rptmsg or msg == rptmsg and msgID ~= rptmsgID) then if (TF3.db.profile.debug) then - TF3:FindFrame(repeatFrame, "|cFFFF8C00[" .. L["#RPT"] .. "]|r |cFFD9D9D9[" .. msgID .. "]|r |Hplayer:" .. userID .. ":" .. msgID .. "|h[" .. coloredName .. "]|h |cFFC08080" .. msg .. "|r") + if rptmsg ~= nil then + TF3:FindFrame(repeatFrame, "|cFFFF8C00[" .. L["#RPT"] .. "]|r |cFFD9D9D9[" .. msgID .. "(" .. rptmsgID .. ")" .. "]|r |Hplayer:" .. userID .. ":" .. msgID .. "|h[" .. coloredName .. "]|h |cFFC08080" .. msg .. "(" .. rptmsg .. ")" .. "|r") + else + TF3:FindFrame(repeatFrame, "|cFFFF8C00[" .. L["#RPT"] .. "]|r |cFFD9D9D9[" .. msgID .. "(" .. repeatdata[userID].lastmsgID .. ")" .. "]|r |Hplayer:" .. userID .. ":" .. msgID .. "|h[" .. coloredName .. "]|h |cFFC08080" .. msg .. "(" .. repeatdata[userID].lastmsg .. ")" .. "|r") + end end TF3.db.profile.repeats_blocked = TF3.db.profile.repeats_blocked + 1 if (LDB) then @@ -426,6 +431,7 @@ function TF3:FindRepeat(msg, userID, msgID, coloredName, arg) TF3Frame.Blocked.value = TF3.db.profile.repeats_blocked end rptmsg = msg + rptmsgID = msgID end return true end -- 1.7.9.5