mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01: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)
|
||||
{
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue