Originally Posted by sirinsidiator
You are passing the table "MyAddon.killFilterList" to "for .. do" instead of the length of the table "#MyAddon.killFilterList".
Other than you are mixing two different approaches on how to use tables and end up not filtering anything at all.
You iterate over the table and insert new entries into it with numeric indexes, but at the same time try to access entries in the table by using the displayName as a key (instead of the numeric index).
Code:
MyAddon.killFilterList = {}
function MyAddon.PvpKillFeedFilter(victomDisplayName)--<< PVP CHAT FEED MULTIPLE EVENT FILTER
if not MyAddon.killFilterList[victomDisplayName] then
MyAddon.killFilterList[victomDisplayName] = true
return false
end
return true
end
Aside of that you will have to unset the entry in the killFilterList at some point, otherwise you won't ever show the name again after it got filtered the first time.
|
yes im aware of the resetting the list which is next and I think a non issue but populating the list has been my issue. Im using similar code to populate a list of char names on account though and works fine.
what im trying to do is add victoms to the list and NOT display them(and return false) if in the list because the ingame killfeed fires twice per kill.
will "#MyAddon.killFilterList" work in the for .. do statement for length of list or number of entries? I've never seen this example before.
The devs posted a fix for the pvp kill feed double spam but I cant find it anywhere.. Anyone have a link?