aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2012-02-03 22:24:03 +0100
committerQAston <qaston@gmail.com>2012-02-03 22:24:03 +0100
commit7e99e5f094ae38102fd8f9123dd761d91ddfc6f6 (patch)
treefafb6aebedf215aea06aa3b31da0c1ee22b8966d /src/server/game/Spells/SpellInfo.cpp
parentaae833a759d670959a4e794fa9227bd90ca9c6a5 (diff)
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.
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 556516ecfb0..ad465767ab0 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -503,7 +503,7 @@ bool SpellEffectInfo::IsAura(AuraType aura) const
return IsAura() && ApplyAuraName == aura;
}
-bool SpellEffectInfo::IsArea() const
+bool SpellEffectInfo::IsTargetingArea() const
{
return TargetA.IsArea() || TargetB.IsArea();
}
@@ -1061,10 +1061,19 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const
return false;
}
-bool SpellInfo::IsAOE() const
+bool SpellInfo::IsAffectingArea() const
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (Effects[i].IsEffect() && Effects[i].IsArea())
+ if (Effects[i].IsEffect() && (Effects[i].IsTargetingArea() || Effects[i].IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) || Effects[i].IsAreaAuraEffect()))
+ return true;
+ return false;
+}
+
+// checks if spell targets are selected from area, doesn't include spell effects in check (like area wide auras for example)
+bool SpellInfo::IsTargetingArea() const
+{
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if (Effects[i].IsEffect() && Effects[i].IsTargetingArea())
return true;
return false;
}