mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
[Bug Fix] Loading pets from database will make unique name to not overlap existing pets with same name in zone (#1933)
This commit is contained in:
parent
28b1abe1a7
commit
176bfc8524
@ -273,6 +273,8 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
|
|||||||
if (petname != nullptr) {
|
if (petname != nullptr) {
|
||||||
// Name was provided, use it.
|
// Name was provided, use it.
|
||||||
strn0cpy(npc_type->name, petname, 64);
|
strn0cpy(npc_type->name, petname, 64);
|
||||||
|
EntityList::RemoveNumbers(npc_type->name);
|
||||||
|
entity_list.MakeNameUnique(npc_type->name);
|
||||||
} else if (record.petnaming == 0) {
|
} else if (record.petnaming == 0) {
|
||||||
strcpy(npc_type->name, this->GetCleanName());
|
strcpy(npc_type->name, this->GetCleanName());
|
||||||
npc_type->name[25] = '\0';
|
npc_type->name[25] = '\0';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user