Merge pull request #5052 from devilcoredev/fix_003
Core/Spells: Check line of sight for AoE targeted spells
This commit is contained in:
@@ -4767,6 +4767,16 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Check for line of sight for spells with dest
|
||||||
|
if (m_targets.HasDst())
|
||||||
|
{
|
||||||
|
float x, y, z;
|
||||||
|
m_targets.GetDst()->GetPosition(x, y, z);
|
||||||
|
|
||||||
|
if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOS(x, y, z))
|
||||||
|
return SPELL_FAILED_LINE_OF_SIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
// check pet presence
|
// check pet presence
|
||||||
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user