[Rules] Add Rule to Disable NPC Last Names. (#2227)

* [Rules] Add Rule to Disable NPC Last Names.
- Add NPC:DisableLastNames to disable NPC Last Names.
- Fix #npcedit lastname to allow you to use an empty string.

* Cleanup of classes in naming.

* Duplicate.

* Update classes.cpp
This commit is contained in:
Kinglykrab
2022-06-04 14:01:00 -04:00
committed by GitHub
parent 7160aa651e
commit 8f729fe948
13 changed files with 135 additions and 177 deletions
+2 -2
View File
@@ -2511,8 +2511,8 @@ const NPCType *ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
t->see_invis = n.see_invis != 0;
t->see_invis_undead = n.see_invis_undead != 0; // Set see_invis_undead flag
if (!n.lastname.empty()) {
strn0cpy(t->lastname, n.lastname.c_str(), 32);
if (!RuleB(NPC, DisableLastNames) && !n.lastname.empty()) {
strn0cpy(t->lastname, n.lastname.c_str(), sizeof(t->lastname));
}
t->qglobal = n.qglobal != 0; // qglobal