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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user