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

@@ -14164,24 +14164,21 @@ void Player::ResummonPetTemporaryUnSummonedIfAny()
bool Player::CanResummonPet(uint32 spellid)
{
switch (getClass())
if (getClass() == CLASS_DEATH_KNIGHT)
{
case CLASS_DEATH_KNIGHT:
if (CanSeeDKPet())
return true;
else if (spellid == 52150) //Raise Dead
return false;
break;
case CLASS_MAGE:
if (HasSpell(31687) && HasAura(70937)) //Has [Summon Water Elemental] spell and [Glyph of Eternal Water].
return true;
break;
case CLASS_HUNTER:
case CLASS_WARLOCK:
if (CanSeeDKPet())
return true;
break;
default:
break;
else if (spellid == 52150) // Raise Dead
return false;
}
else if (getClass() == CLASS_MAGE)
{
if (HasSpell(31687) && HasAura(70937)) //Has [Summon Water Elemental] spell and [Glyph of Eternal Water].
return true;
}
else if (getClass() == CLASS_HUNTER)
{
return true;
}
return HasSpell(spellid);