I noticed that a lot of creatures are considered named mobs that also have a "surname" or "Lastname" which is viewed differently for NPC's than it is for PC's.
However, my test cases have been rather limited at this point. Lemme explain how this works differently from a PC to an NPC
A player's surname or last name is their appropriated name assigned using the /surname command and appears as a last name on the character. With an NPC their surname or lastname appears -below- their name and is typically used to identify them as a Quest NPC, Merchant, or other sort of special tag. One of the more common places that you can find NPC's like this is in Crescent Reach's town, where below their name it will say "(Quest 1+)" or something else to that extent.
Recently I was writing a plugin that is still in early stages of development and I wanted to try and weed out any creatures I could that wouldn't be a valid combat target and I decided to exclude any NPC with a surname in my SearchSpawn function with a simple
Code: Select all
if (strlen(pSpawn->Lastname)) continue;Testing this in the tutorial zone I found that it automatically excluded all NPC's in the starting area with the exception of Flutterwing because all of the NPC's had a surname. Which of course greatly reduced the amount of NPC's my plugin chose as a target to attack, which prevented me from running around and adding them to my alert list for ignores.
Mostly I'm wondering if anyone knows of any NPC's that are legitimate targets which have a surname so I know if this will be a beneficial thing to exclude, or if it can be potentially hazardous down the line. My plugin would still react to aggro from something with a surname, but it wouldn't pick one as a target when I don't have aggro.
This could also be used as an added option to exclude an NPC from Named npc's if it turns out this is true 100% of the time. That way it could reduce the amount of false positives we get when checking for ${Target.Named} In macros or plugins.
Named is Member 87 of MQ2SpawnType.
Which as I understand it is determined by EQLIB_API BOOL IsNamed(PSPAWNINFO pSpawn);
The definition of IsNamed can be found in MQ2Utilities.cpp starting at line 5590 and ending at line 5650.
There's a bunch of individual if statements to determine if it should return false or not, adding this one may improve it's accuracy.
Thoughts or opinions on the question are welcome. Thanks
CWTN

