ProjectSkyfire/SkyFireEMU_rebase — comment on commit 3af3f19433aa6431f241dc3dee2cac4e57f540d4
File: src/server/scripts/World/npcs_special.cpp line 2855
By subv2112:

if((*itr)->GetEntry() == me->GetEntry() && ((*itr)->GetOwner() == me->GetOwner() && *itr != me))
or you will despawn every kind of friendly NPCs