mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[0145] Fix wrong logic in IsPositiveEffect.
Signed-off-by: Yaki Khadafi <ElSolDolLo@gmail.com>
This commit is contained in:
parent
1112b9f353
commit
48670fda6f
2 changed files with 3 additions and 5 deletions
|
|
@ -738,10 +738,8 @@ bool IsExplicitNegativeTarget(uint32 targetA)
|
||||||
bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
|
bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
|
||||||
{
|
{
|
||||||
SpellEffectEntry const* spellEffect = spellproto->GetSpellEffect(effIndex);
|
SpellEffectEntry const* spellEffect = spellproto->GetSpellEffect(effIndex);
|
||||||
if(!spellEffect)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch(spellEffect->Effect)
|
switch(spellproto->GetSpellEffectIdByIndex(effIndex))
|
||||||
{
|
{
|
||||||
case SPELL_EFFECT_DUMMY:
|
case SPELL_EFFECT_DUMMY:
|
||||||
// some explicitly required dummy effect sets
|
// some explicitly required dummy effect sets
|
||||||
|
|
@ -962,7 +960,7 @@ bool IsPositiveEffect(SpellEntry const* spellproto, SpellEffectIndex effIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
// non-positive targets
|
// non-positive targets
|
||||||
if(!IsPositiveTarget(spellEffect->EffectImplicitTargetA,spellEffect->EffectImplicitTargetB))
|
if (spellEffect && !IsPositiveTarget(spellEffect->EffectImplicitTargetA,spellEffect->EffectImplicitTargetB))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// AttributesEx check
|
// AttributesEx check
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "0144"
|
#define REVISION_NR "0145"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue