Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap)

This commit is contained in:
KayenEQ
2014-07-03 08:48:27 -04:00
parent 8453d5bc48
commit ee741048e9
4 changed files with 139 additions and 17 deletions
+18
View File
@@ -157,6 +157,24 @@ bool IsFearSpell(uint16 spell_id)
return IsEffectInSpell(spell_id, SE_Fear);
}
bool IsCureSpell(uint16 spell_id)
{
const SPDat_Spell_Struct &sp = spells[spell_id];
bool CureEffect = false;
for(int i = 0; i < EFFECT_COUNT; i++){
if (sp.effectid[i] == SE_DiseaseCounter || sp.effectid[i] == SE_PoisonCounter
|| sp.effectid[i] == SE_CurseCounter || sp.effectid[i] == SE_CorruptionCounter)
CureEffect = true;
}
if (CureEffect && IsBeneficialSpell(spell_id))
return true;
return false;
}
bool IsSlowSpell(uint16 spell_id)
{
const SPDat_Spell_Struct &sp = spells[spell_id];