Core/Pet: Don't allow to tame pets that have already a owner

Port From (https://github.com/TrinityCore/TrinityCore/commit/6fd7cd9dc9ca2f3ce2e90d719b292f0249972f93)
This commit is contained in:
hondacrx
2022-05-29 15:36:35 -04:00
parent fbedb839f9
commit fd1cb0f43f
+6
View File
@@ -449,6 +449,12 @@ namespace Scripts.Spells.Hunter
if (!caster.GetCharmedGUID().IsEmpty())
return SpellCastResult.AlreadyHaveCharm;
if (!target.GetOwnerGUID().IsEmpty())
{
caster.SendTameFailure(PetTameResult.CreatureAlreadyOwned);
return SpellCastResult.DontReport;
}
}
else
return SpellCastResult.BadImplicitTargets;