aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-09-01 00:38:46 +0200
committerGitHub <noreply@github.com>2020-09-01 00:38:46 +0200
commit3fbbe7cfbe1bc51db12bdc1ec7b21c16d1716366 (patch)
treedfeb5042850efebde2c1ad79ca2db85f1da45d0f /src/server/game/Spells/Spell.cpp
parentb2895f31ec835e24d7e30944dc2fc8c5853e10dd (diff)
Core/Misc: DBC std::array refactors, and |Hachievement unit tests
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 6e57a17172f..3412310bce6 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -867,13 +867,14 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
case TARGET_SELECT_CATEGORY_NEARBY:
case TARGET_SELECT_CATEGORY_CONE:
case TARGET_SELECT_CATEGORY_AREA:
+ {
// targets for effect already selected
if (effectMask & processedEffectMask)
return;
+ std::array<SpellEffectInfo, MAX_SPELL_EFFECTS> const& effects = GetSpellInfo()->Effects;
// choose which targets we can select at once
- for (uint32 j = effIndex + 1; j < MAX_SPELL_EFFECTS; ++j)
+ for (uint32 j = effIndex + 1; j < effects.size(); ++j)
{
- SpellEffectInfo const* effects = GetSpellInfo()->Effects;
if (effects[j].IsEffect() &&
effects[effIndex].TargetA.GetTarget() == effects[j].TargetA.GetTarget() &&
effects[effIndex].TargetB.GetTarget() == effects[j].TargetB.GetTarget() &&
@@ -886,6 +887,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
}
processedEffectMask |= effectMask;
break;
+ }
default:
break;
}