aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 574c9f11a19..e80de7b966f 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1086,6 +1086,10 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S
Trinity::Containers::EnsureWritableVectorIndex(_effects, spellEffect->EffectIndex, SpellEffectInfo(this)) = SpellEffectInfo(this, *spellEffect);
}
+ // Correct EffectIndex for blank effects
+ for (size_t i = 0; i < _effects.size(); ++i)
+ _effects[i].EffectIndex = SpellEffIndex(i);
+
_effects.shrink_to_fit();
SpellName = &spellName->Name;
@@ -1269,6 +1273,10 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, s
for (SpellEffectEntry const& spellEffect : effects)
Trinity::Containers::EnsureWritableVectorIndex(_effects, spellEffect.EffectIndex, SpellEffectInfo(this)) = SpellEffectInfo(this, spellEffect);
+ // Correct EffectIndex for blank effects
+ for (size_t i = 0; i < _effects.size(); ++i)
+ _effects[i].EffectIndex = SpellEffIndex(i);
+
_effects.shrink_to_fit();
}