Quantcast

Some fixes

p3lim-52096 [08-25-08 - 23:00]
Some fixes

git-svn-id: svn://svn.wowinterface.com/pError-161/trunk@5 7a612bb6-1b7b-4f5f-b58b-e1cc54d1b6b6
Filename
pError/pError.lua
diff --git a/pError/pError.lua b/pError/pError.lua
index 5f54b74..d60b81b 100644
--- a/pError/pError.lua
+++ b/pError/pError.lua
@@ -31,12 +31,13 @@ local blacklist = {
 	ERR_NOEMOTEWHILERUNNING,        -- You can't do that while moving!
 }

-local lastEvent
-local oldUIErrorsFrame_OnEvent = UIErrorsFrame_OnEvent
+local last
+local orig = UIErrorsFrame_OnEvent
 function UIErrorsFrame_OnEvent(event, msg, ...)
-	for _,text in pairs(blacklist) do
+	last = msg
+	for i,text in pairs(blacklist) do
 		if(text and msg and msg == text) then return end
 	end
-	if(msg and msg == lastEvent) then return end
-	return oldUIErrorsFrame_OnEvent(event, msg, ...)
+	if(msg and msg == last) then return end
+	return orig(event, msg, ...)
 end
\ No newline at end of file