Core/Spells: revert SPELL_ATTR5_INCLUDE_MELEE_RANGE naming since all non-generic aoe spells are suposed to use hitbox sums instead

This commit is contained in:
Ovahlord committed 2020-08-30 14:17:01 +02:00
1 parent 2db08bb0e0
commit ec997a4715
2 files changed
+2 -2

No files matched your search

@@ -547,7 +547,7 @@ enum SpellAttr5
SPELL_ATTR5_UNK12 = 0x00001000, // 12 Cleave related?
SPELL_ATTR5_HASTE_AFFECT_DURATION = 0x00002000, // 13 haste effects decrease duration of this
SPELL_ATTR5_UNK14 = 0x00004000, // 14
SPELL_ATTR5_INCLUDE_MELEE_RANGE = 0x00008000, // 15 Area target selection includes the combat reach of caster and potential target
SPELL_ATTR5_UNK15 = 0x00008000, // 15
SPELL_ATTR5_UNK16 = 0x00010000, // 16
SPELL_ATTR5_USABLE_WHILE_FEARED = 0x00020000, // 17 usable while feared
SPELL_ATTR5_USABLE_WHILE_CONFUSED = 0x00040000, // 18 usable while confused
+1 -1
View File
@@ -8375,7 +8375,7 @@ bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target)
}
else if (target->ToUnit())
{
float hitboxSum = _spellInfo->HasAttribute(SPELL_ATTR5_INCLUDE_MELEE_RANGE) ? target->ToUnit()->GetMeleeRange(_caster) : 0.f;
float hitboxSum = _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;