Core/Spells: finish fixing dispel functionality. closes #5745
This commit is contained in:
@@ -4956,6 +4956,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
return castResult;
|
return castResult;
|
||||||
|
|
||||||
bool hasDispellableAura = false;
|
bool hasDispellableAura = false;
|
||||||
|
bool hasNonDispelEffect = false;
|
||||||
for (int i = 0; i < MAX_SPELL_EFFECTS; i++)
|
for (int i = 0; i < MAX_SPELL_EFFECTS; i++)
|
||||||
if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_DISPEL)
|
if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_DISPEL)
|
||||||
{
|
{
|
||||||
@@ -4976,8 +4977,13 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (m_spellInfo->Effects[i].IsEffect())
|
||||||
|
{
|
||||||
|
hasNonDispelEffect = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasDispellableAura && m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))
|
if (!hasNonDispelEffect && !hasDispellableAura && m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL))
|
||||||
return SPELL_FAILED_NOTHING_TO_DISPEL;
|
return SPELL_FAILED_NOTHING_TO_DISPEL;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_SPELL_EFFECTS; i++)
|
for (int i = 0; i < MAX_SPELL_EFFECTS; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user