You might want to set a variable to your character name via UnitName("player") during login and checking it during event.
About string:match I am suspicious that it will record the item even if you didn't obtain it but simply rolled during greed/need/pass. So additional check might be needed.
You have slightly wrong idea about LootLog = {} . It prepares LootLog for the first recording. Actual saving is due to LootLog being in toc file.
Local function is supposedly faster, and has limited scope where it can be accessed/modified. In posts 1 and 6 you were already using them: keyword local before function.
In my scripts for event handling I usually use ellipsis(...) as the last argument, and assign it to local variable but how did you write should also work.
|