mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Titles] Cleanup titles, title suffix, and last name methods. (#2174)
* [Titles] Cleanup titles, title suffix, and last name methods. - Use strings instead of const chars*. - Add optional parameter to SetAATitle in Lua so you can save to the database similar to Perl. - Cleanup #lastname command. - Cleanup #title command. - Cleanup #titlesuffix command. * Update npc.cpp
This commit is contained in:
+10
-12
@@ -1111,20 +1111,18 @@ void QuestManager::rename(std::string name) {
|
||||
}
|
||||
}
|
||||
|
||||
void QuestManager::surname(const char *name) {
|
||||
void QuestManager::surname(std::string last_name) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
//Changes the last name.
|
||||
if(initiator)
|
||||
{
|
||||
if(initiator->IsClient())
|
||||
{
|
||||
initiator->ChangeLastName(name);
|
||||
initiator->Message(Chat::Yellow,"Your surname has been changed/set to: %s", name);
|
||||
}
|
||||
else
|
||||
{
|
||||
initiator->Message(Chat::Yellow,"Error changing/setting surname");
|
||||
}
|
||||
if (initiator && initiator->IsClient()) {
|
||||
initiator->ChangeLastName(last_name);
|
||||
initiator->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Your last name has been set to \"{}\".",
|
||||
last_name
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user