# HG changeset patch # User Xiiph # Date 1298593273 -3600 # Node ID 21cefa363c73c24a2f4f8fdc15750db82c497e97 # Parent 4c6367b8e64041357bee9c860212a4f68db4c25f Last modification to ready checking broke something ... Now its fixed and ready checking is working as intended. diff -r 4c6367b8e640 -r 21cefa363c73 ICU.lua --- a/ICU.lua Tue Feb 22 00:00:24 2011 +0100 +++ b/ICU.lua Fri Feb 25 01:21:13 2011 +0100 @@ -580,13 +580,21 @@ local raider = UnitName(unit); --@debug@ - print(unit); + print("Thingy:",unit,responders[#responders],responders[#responders-1]); --@end-debug@ - - -- Check if the latest entires contain the raider... + + -- Iterate through all responders to avoid duplicates, abort on match -- The event fires twice for units in your party, -- and may fire a THIRD time if you have the person targetted ... - if (responders[#responders] == raider or responders[#responders-1] == raider) then return end + for i = 1,#responders do + if responders[i] == raider then + --@debug@ + print("Found match, aborting"); + print(responders[i],raider); + --@end-debug@ + return true; + end + end -- Raider is NOT afk, but might not be ready responders[#responders+1] = raider; @@ -616,8 +624,6 @@ --@end-debug@ for i = 1, #responders do - print("Iterating through responders ..."); - print(responders[i],raider); if responders[i] == raider then --@debug@ print(responders[i],raider);