Core/Spells: Implemented SPELL_ATTR5_TREAT_AS_AREA_EFFECT

This commit is contained in:
Shauren authored and Ovahlord committed 2022-09-30 02:12:19 +02:00
1 parent 4cfd439d34
commit 0f6cac2373
4 files changed
+5 -8

No files matched your search

+2 -2
View File
@@ -7988,7 +7988,7 @@ void Spell::DoEffectOnLaunchTarget(TargetInfo& targetInfo, float multiplier, uin
if (m_originalCaster&& m_damage > 0)
{
if (m_spellInfo->Effects[effIndex].IsTargetingArea() || m_spellInfo->Effects[effIndex].IsAreaAuraEffect() || m_spellInfo->Effects[effIndex].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
if (m_spellInfo->Effects[effIndex].IsTargetingArea() || m_spellInfo->Effects[effIndex].IsAreaAuraEffect() || m_spellInfo->Effects[effIndex].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || m_spellInfo->HasAttribute(SPELL_ATTR5_TREAT_AS_AREA_EFFECT))
{
m_damage = unit->CalculateAOEAvoidance(m_damage, m_spellInfo->SchoolMask, m_originalCaster->GetGUID());
@@ -8663,7 +8663,7 @@ bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target)
}
else if (target->ToUnit())
{
float hitboxSum = (_caster->IsUnit(), _spellInfo->HasAttribute(SPELL_ATTR5_TREAT_AS_AREA_EFFECT) && _spellInfo->SpellFamilyName != SPELLFAMILY_GENERIC) ? target->ToUnit()->GetMeleeRange(_caster->ToUnit()) : 0.f;
float hitboxSum = (_caster->IsUnit() && _spellInfo->HasAttribute(SPELL_ATTR5_TREAT_AS_AREA_EFFECT) && _spellInfo->SpellFamilyName != SPELLFAMILY_GENERIC) ? target->ToUnit()->GetMeleeRange(_caster->ToUnit()) : 0.f;
bool isInsideCylinder = target->IsWithinDist2d(_position, _range + hitboxSum) && std::abs(target->GetPositionZ() - _position->GetPositionZ()) <= (_range + hitboxSum);
if (!isInsideCylinder)
return false;