diff --git a/zone/entity.cpp b/zone/entity.cpp index 944418f29..aad8a3e82 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -689,6 +689,14 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue) { npc->SetID(GetFreeID()); + //If this is not set here we will despawn pets from new AC changes + auto owner_id = npc->GetOwnerID(); + if(owner_id) { + auto owner = entity_list.GetMob(owner_id); + if (owner) { + owner->SetPetID(npc->GetID()); + } + } parse->EventNPC(EVENT_SPAWN, npc, nullptr, "", 0); uint16 emoteid = npc->GetEmoteID();