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())
|
if (!caster.GetCharmedGUID().IsEmpty())
|
||||||
return SpellCastResult.AlreadyHaveCharm;
|
return SpellCastResult.AlreadyHaveCharm;
|
||||||
|
|
||||||
|
if (!target.GetOwnerGUID().IsEmpty())
|
||||||
|
{
|
||||||
|
caster.SendTameFailure(PetTameResult.CreatureAlreadyOwned);
|
||||||
|
return SpellCastResult.DontReport;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return SpellCastResult.BadImplicitTargets;
|
return SpellCastResult.BadImplicitTargets;
|
||||||
|
|||||||
Reference in New Issue
Block a user