Core/Spells: renamed SPELL_ATTR5_INCLUDE_MELEE_RANGE to SPELL_ATTR5_TREAT_AS_AREA_EFFECT and handle the attribute in SpellInfo::IsAffectingArea
This commit is contained in:
1 parent
d5fa8c3e10
commit
9892d239a8
3 files changed
+5
-2
No files matched your search
@@ -8509,7 +8509,7 @@ bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target)
|
||||
}
|
||||
else if (target->ToUnit())
|
||||
{
|
||||
float hitboxSum = (_spellInfo->HasAttribute(SPELL_ATTR5_INCLUDE_MELEE_RANGE) && _spellInfo->SpellFamilyName != SPELLFAMILY_GENERIC) ? target->ToUnit()->GetMeleeRange(_caster) : 0.f;
|
||||
float hitboxSum = (_spellInfo->HasAttribute(SPELL_ATTR5_TREAT_AS_AREA_EFFECT) && _spellInfo->SpellFamilyName != SPELLFAMILY_GENERIC) ? target->ToUnit()->GetMeleeRange(_caster) : 0.f;
|
||||
bool isInsideCylinder = target->IsWithinDist2d(_position, _range + hitboxSum) && std::abs(target->GetPositionZ() - _position->GetPositionZ()) <= (_range + hitboxSum);
|
||||
if (!isInsideCylinder)
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user