Core/Spells: Add server-side check for spells that require combo points to prevent exploits

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-09-08 01:35:36 +03:00
parent 88daff9676
commit 5f3ec4366d
+4
View File
@@ -5728,6 +5728,10 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_ITEM_ALREADY_ENCHANTED;
}
// check if caster has at least 1 combo point for spells that require combo points
if (m_needComboPoints && m_caster->ToPlayer() && !m_caster->ToPlayer()->GetComboPoints())
return SPELL_FAILED_NO_COMBO_POINTS;
// all ok
return SPELL_CAST_OK;
}