Crashfix for TempName() when numbers are passed at the end of the name.

This commit is contained in:
Trevius 2015-02-03 17:23:29 -06:00
parent bfa6bd3458
commit 8bc5e5eee1
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,7 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 02/03/2015 ==
Trevius: Crashfix for TempName() when numbers are passed at the end of the name.
== 02/02/2015 ==
Akkadius: Implement Packet logs with dumps

View File

@ -1982,9 +1982,10 @@ void Mob::TempName(const char *newname)
strn0cpy(temp_name, GetCleanName(), 64);
}
// Remove Numbers before making name unique
EntityList::RemoveNumbers(temp_name);
// Make the new name unique and set it
strn0cpy(temp_name, entity_list.MakeNameUnique(temp_name), 64);
entity_list.MakeNameUnique(temp_name);
// Send the new name to all clients
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MobRename, sizeof(MobRename_Struct));