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

(cherry picked from commit 8c42b3bd88)
This commit is contained in:
Giacomo Pozzoni
2021-07-17 12:54:29 +02:00
committed by Shauren
parent c9e685bd9a
commit 6fd7cd9dc9

View File

@@ -531,6 +531,12 @@ class spell_hun_tame_beast : public SpellScript
if (!caster->GetCharmedGUID().IsEmpty())
return SPELL_FAILED_ALREADY_HAVE_CHARM;
if (!target->GetOwnerGUID().IsEmpty())
{
caster->SendTameFailure(PetTameResult::CreatureAlreadyOwned);
return SPELL_FAILED_DONT_REPORT;
}
}
else
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;