[c12651] Crashfix at server loading

This commit is contained in:
Dramacydal 2013-07-01 17:24:27 +01:00 committed by Antz
parent 30703e33e2
commit 6419d8b47a
2 changed files with 7 additions and 7 deletions

View file

@ -3504,14 +3504,14 @@ void SpellMgr::LoadSpellScriptTarget()
if (!spellInfo) if (!spellInfo)
continue; continue;
SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(i));
if(!spellEffect)
continue;
for (int j = 0; j < MAX_EFFECT_INDEX; ++j) for (int j = 0; j < MAX_EFFECT_INDEX; ++j)
{ {
if (spellEffect && (spellEffect->EffectImplicitTargetA == TARGET_SCRIPT || SpellEffectEntry const* spellEffect = spellInfo->GetSpellEffect(SpellEffectIndex(j));
(spellEffect->EffectImplicitTargetA != TARGET_SELF && spellEffect->EffectImplicitTargetB == TARGET_SCRIPT))) if (!spellEffect)
continue;
if (spellEffect->EffectImplicitTargetA == TARGET_SCRIPT ||
spellEffect->EffectImplicitTargetA != TARGET_SELF && spellEffect->EffectImplicitTargetB == TARGET_SCRIPT)
{ {
SQLMultiStorage::SQLMSIteratorBounds<SpellTargetEntry> bounds = sSpellScriptTargetStorage.getBounds<SpellTargetEntry>(i); SQLMultiStorage::SQLMSIteratorBounds<SpellTargetEntry> bounds = sSpellScriptTargetStorage.getBounds<SpellTargetEntry>(i);
if (bounds.first == bounds.second) if (bounds.first == bounds.second)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "12650" #define REVISION_NR "12651"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__