Core/Spells:
- rename SpellInfo::IsAOE to SpellInfo::IsTargetingArea due to ambiguity of old name. - add IsAffectingArea function to check whenever spell or it's effects are affecting objects in area and use new function to fix problems with hunter flares. Closes #3310. Thanks to Kaelima and Warpten for research.
This commit is contained in:
@@ -2412,7 +2412,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
|
||||
// Chance hit from victim SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE auras
|
||||
modHitChance += victim->GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_ATTACKER_SPELL_HIT_CHANCE, schoolMask);
|
||||
// Reduce spell hit chance for Area of effect spells from victim SPELL_AURA_MOD_AOE_AVOIDANCE aura
|
||||
if (spell->IsAOE())
|
||||
if (spell->IsTargetingArea())
|
||||
modHitChance -= victim->GetTotalAuraModifier(SPELL_AURA_MOD_AOE_AVOIDANCE);
|
||||
|
||||
// Decrease hit chance from victim rating bonus
|
||||
@@ -12081,7 +12081,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co
|
||||
return false;
|
||||
|
||||
// can't attack invisible (ignore stealth for aoe spells)
|
||||
if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE()))
|
||||
if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
|
||||
return false;
|
||||
|
||||
// can't attack dead
|
||||
@@ -12176,7 +12176,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co
|
||||
return false;
|
||||
|
||||
// can't assist invisible
|
||||
if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE()))
|
||||
if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAffectingArea()))
|
||||
return false;
|
||||
|
||||
// can't assist dead
|
||||
@@ -14871,7 +14871,7 @@ uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectTyp
|
||||
break;
|
||||
}
|
||||
|
||||
if (spellProto->Effects[i].IsArea())
|
||||
if (spellProto->Effects[i].IsTargetingArea())
|
||||
AreaEffect = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user