protected bool LivingHasEffect(GameLiving target, Spell spell)
{
if (target == null)
return true;
if (target is GamePlayer && (target as GamePlayer).CharacterClass.ID == (int)eCharacterClass.Vampiir)
{
switch (spell.SpellType)
{
case "StrengthConstitutionBuff":
case "DexterityQuicknessBuff":
case "StrengthBuff":
case "DexterityBuff":
case "ConstitutionBuff":
case "AcuityBuff":
return true;
}
}
lock (target.EffectList)
{
//Check through each effect in the target's effect list
foreach (IGameEffect effect in target.EffectList)
{
//If the effect we are checking is not a gamespelleffect keep going
if (effect is GameSpellEffect == false)
continue;
GameSpellEffect speffect = effect as GameSpellEffect;
//if the effect effectgroup is the same as the checking spells effectgroup then these are considered the same
if (speffect.Spell.EffectGroup == spell.EffectGroup)
return true;
//otherwise continue unless the SpellType is the same
if (speffect.Spell.SpellType == spell.SpellType)
return true;
}
}
if (Body.GetSkillDisabledDuration(spell) == 0)
{
if (spell.CastTime > 0) //removed this
{
if (spell.Target.ToLower() == "enemy" || spell.Target.ToLower() == "area" || spell.Target.ToLower() == "cone")
spell_rec.Add(spell); // here the spell is added to casting list
}
Users browsing this forum: No registered users and 1 guest