dismiss summoned non-hunter pets by removing them

This commit is contained in:
Jelle Meeus
2024-06-12 12:49:43 +02:00
parent 7fe6d2cc9b
commit eb539e841d

View File

@@ -297,8 +297,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
if (pet->ToPet()->getPetType() == HUNTER_PET)
GetPlayer()->RemovePet(pet->ToPet(), PET_SAVE_AS_DELETED);
else
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
pet->setDeathState(DeathState::Corpse);
GetPlayer()->RemovePet(pet->ToPet(), PET_SAVE_NOT_IN_SLOT);
}
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_CONTROLABLE_GUARDIAN))
{