/// <summary> /// Called when a cast is sucesfully finished. Removes all dispellable debuffs from the target. /// </summary> public override void OnCastSucess() { BuffManager manager = GetTarget().GetGameObject().GetComponent <BuffManager>(); List <IBuff> buffDict = manager.GetAllBuffsSortetByDuration(); //get all buffs foreach (IBuff buff in buffDict) { if (buff.IsDispellable()) { buff.Destroy();//remove buff if it is dispellable } else if (buff.IsBuff() && GameControl.control.talente[6]) { buff.Reset(); //reset buff if the "dispell reset" talent is picked } } }