fix(Core/PetHandler): when dismissing a charmed unit owned by another unit; stop the charm instead of despawning (#18989)

2cdea49d81
This commit is contained in:
Jelle Meeus
2024-06-03 05:42:06 +02:00
committed by GitHub
parent 70fc43ff8d
commit a6425c3630

View File

@@ -287,10 +287,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
case COMMAND_ABANDON: // abandon (hunter pet) or dismiss (summoned pet)
if (pet->GetCharmerGUID() == GetPlayer()->GetGUID())
{
if (pet->IsSummon())
pet->ToTempSummon()->UnSummon();
else
_player->StopCastingCharm();
_player->StopCastingCharm();
}
else if (pet->GetOwnerGUID() == GetPlayer()->GetGUID())
{