I also have problems with a debuff as DK
Example: i'm trying to use icy touch only if the debuff "Frost Fever" does not exists.
public Spell FrostFever = new Spell("Frost Fever");
if(!this._target.HaveBuff(this.FrostFever.Id))
{
// Use spell
}
This does not work for me. If i replace the "this.FrostFever.Id" with the string "HaveBuff("Frost Fever")" it works.
This is the function i wrote for my spells but it wont work if the framework dont detect the debuff with id
private void UseSpell(Spell spell, bool canMove, List<uint> dependencies)
{
// Set current target
this._target = ObjectManager.Me.TargetObject;
// Valid?
if (this._target.IsValid && spell.KnownSpell && spell.IsSpellUsable && spell.IsDistanceGood && !this._target.HaveBuff(dependencies))
{
// Cast spell
spell.Launch(canMove, true);
}
}