[0145] Fix wrong logic in IsPositiveEffect.

Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
This commit is contained in:
Yaki Khadafi 2012-08-20 18:01:21 +03:00 committed by Antz
parent 1112b9f353
commit 48670fda6f
2 changed files with 3 additions and 5 deletions

View file

@ -738,10 +738,8 @@ bool IsExplicitNegativeTarget(uint32 targetA)
bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
{
SpellEffectEntry const* spellEffect = spellproto->GetSpellEffect(effIndex);
if(!spellEffect)
return false;
switch(spellEffect->Effect)
switch(spellproto->GetSpellEffectIdByIndex(effIndex))
{
case SPELL_EFFECT_DUMMY:
// some explicitly required dummy effect sets
@ -962,7 +960,7 @@ bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
}
// non-positive targets
if(!IsPositiveTarget(spellEffect->EffectImplicitTargetA,spellEffect->EffectImplicitTargetB))
if (spellEffect && !IsPositiveTarget(spellEffect->EffectImplicitTargetA,spellEffect->EffectImplicitTargetB))
return false;
// AttributesEx check