feat(Core/Pets): Management refactoring (#9712)

* feat(Core/Pets): rework managment

* 1

* 2

* 3

* 4

* 5

* cs pet

* check before ressurect

* pet DECLINED_NAMES

* display

- https://github.com/azerothcore/azerothcore-wotlk/issues/9297

* ArenaSpectator

* 1
This commit is contained in:
Kargatum
2021-12-31 04:45:13 +07:00
committed by GitHub
parent 24ab99919a
commit e12494d993
24 changed files with 1173 additions and 1208 deletions

View File

@@ -948,7 +948,20 @@ class spell_hun_tame_beast : public SpellScript
return SPELL_FAILED_DONT_REPORT;
}
if (caster->GetPetGUID() || player->GetTemporaryUnsummonedPetNumber() || player->IsPetDismissed() || player->GetCharmGUID())
PetStable const* petStable = player->GetPetStable();
if (petStable)
{
if (petStable->CurrentPet)
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
if (petStable->GetUnslottedHunterPet())
{
caster->SendTameFailure(PET_TAME_TOO_MANY);
return SPELL_FAILED_DONT_REPORT;
}
}
if (player->GetCharmGUID())
{
player->SendTameFailure(PET_TAME_ANOTHER_SUMMON_ACTIVE);
return SPELL_FAILED_DONT_REPORT;