Quantcast
WoWInterface - View Single Post - How to check if Unit target is player
View Single Post
10-20-18, 04:42 PM   #7
Lyak
A Cyclonian
Join Date: Jul 2018
Posts: 46
Sorry for hijacking your thread, neheri, but I was also been curious about how nameplates work.

Originally Posted by semlar View Post
The NAME_PLATE_CREATED, NAME_PLATE_UNIT_ADDED, and NAME_PLATE_UNIT_REMOVED events are used to track when to create a new nameplate frame, when to show and hide your addon's frames, and to keep track of which unitIDs belong to which nameplates.
So, if I am understanding correctly, NAME_PLATE_CREATED gets fired when the new nameplate frame needs to be made if there is more of them needed than what currently exists (which I am guessing that they are recycled) while NAME_PLATE_UNIT_ADDED and NAME_PLATE_UNIT_REMOVED are fired when the unit is being allocated to/ release from the nameplate frame.

That being said in case if there are five nameplate frames already exist and the game has to display only four units to assign to the nameplate frame the only event being fried would be NAME_PLATE_UNIT_ADDED.

Am I getting it correctly?