fix(Core/Player): Check if the player can summon the warlock pet on B… (#18064)

fix(Core/Player): Check if the player can summon the warlock pet on BG ress
This commit is contained in:
Andrew
2024-01-01 10:56:32 -03:00
committed by GitHub
parent c48066bf35
commit f9f71fff36
2 changed files with 21 additions and 16 deletions

View File

@@ -105,6 +105,14 @@ void Pet::AddToWorld()
if (GetOwnerGUID().IsPlayer())
{
if (Player* owner = GetOwner())
{
if (getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK)
{
owner->SetLastPetSpell(GetUInt32Value(UNIT_CREATED_BY_SPELL));
}
}
sScriptMgr->OnPetAddToWorld(this);
}
}