WoWInterface - View Single Post - Class icons on nameplates
View Single Post
08-21-18, 10:47 AM   #5
An Onyxian Warder
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 390
Originally Posted by Mitur View Post
I only omitted things like table creation (icons table for example), and obvious stuff like event registration etc. Main logic is contained within the code I posted.
Not really.
    if event == events["npu_added"] and not idSet:contains(unit) then
Without knowing what is going on in idSet:contains(unit) I have no idea if that logic branch is correct. I believe that part to be unnecessary but I have no way to be sure. I also don't know if you have the correct events in your table (or why you abstract them that way instead of just putting the event name there).

    elseif event == events["npu_removed"] and idSet:contains(id) then
Same issues as above and also what does idSet:remove(id) do? What does "id" even reference and where is it set? Is it supposed to be "unit" instead or is there something going on in the code not posted.

In short post ALL of your code if you want help.
  Reply With Quote