fix(Core/Spells): Do not allow the use of the master's call while the pet is controlled [port from TC] (#5273)

This commit is contained in:
KiK0
2021-04-27 06:54:58 -07:00
committed by GitHub
parent 28242ca061
commit 310f856932
2 changed files with 42 additions and 28 deletions

View File

@@ -5572,19 +5572,6 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_TARGET_NOT_DEAD;
}
}
else if (m_spellInfo->Id == 53271) // Master's Call
{
if (!m_caster->ToPlayer())
return SPELL_FAILED_BAD_TARGETS;
Unit* target = m_targets.GetUnitTarget();
Pet* pet = m_caster->ToPlayer()->GetPet();
if (!target || !pet || pet->isDead() || target->isDead())
return SPELL_FAILED_BAD_TARGETS;
if (!pet->IsWithinLOSInMap(target, LINEOFSIGHT_ALL_CHECKS))
return SPELL_FAILED_LINE_OF_SIGHT;
}
break;
}
case SPELL_EFFECT_LEARN_SPELL: