diff --git a/common/ruletypes.h b/common/ruletypes.h index 83f1f2b94..41dbeacd2 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -502,6 +502,7 @@ RULE_BOOL(NPC, LiveLikeEnrage, false) // If set to true then only player control RULE_BOOL(NPC, EnableMeritBasedFaction, false) // If set to true, faction will given in the same way as experience (solo/group/raid) RULE_INT(NPC, NPCToNPCAggroTimerMin, 500) RULE_INT(NPC, NPCToNPCAggroTimerMax, 6000) +RULE_BOOL(NPC, UseClassAsLastName, true) // Uses class archetype as LastName for npcs with none RULE_CATEGORY_END() RULE_CATEGORY(Aggro) diff --git a/common/version.h b/common/version.h index 93d3b1779..38731b3ba 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9096 +#define CURRENT_BINARY_DATABASE_VERSION 9097 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9008 #else diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index 6f48f983e..283500c3b 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -350,6 +350,7 @@ 9094|2015_12_29_quest_zone_events.sql|SELECT * FROM perl_event_export_settings WHERE event_description = 'EVENT_SPAWN_ZONE'|empty| 9095|2016_01_08_command_find_aliases.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'findaliases'|empty| 9096|2016_03_05_secondary_recall.sql|SHOW COLUMNS FROM `character_bind` LIKE 'slot'|empty| +9097|2016_07_03_npc_class_as_last_name.sql|SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'NPC:UseClassAsLastName'|empty| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not diff --git a/utils/sql/git/required/2016_07_03_npc_class_as_last_name.sql b/utils/sql/git/required/2016_07_03_npc_class_as_last_name.sql new file mode 100644 index 000000000..75f4b5296 --- /dev/null +++ b/utils/sql/git/required/2016_07_03_npc_class_as_last_name.sql @@ -0,0 +1,2 @@ +INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES +(1, 'NPC:UseClassAsLastName', 'true', 'Uses class archetype as LastName for npcs with none'); diff --git a/zone/mob.cpp b/zone/mob.cpp index b2dd61687..590751bd0 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -909,7 +909,7 @@ void Mob::CreateSpawnPacket(EQApplicationPacket* app, Mob* ForWho) { NewSpawn_Struct* ns = (NewSpawn_Struct*)app->pBuffer; FillSpawnStruct(ns, ForWho); - if(strlen(ns->spawn.lastName) == 0) + if(RuleB(NPC, UseClassAsLastName) && strlen(ns->spawn.lastName) == 0) { switch(ns->spawn.class_) {