I am tweaking singular a bit, I have a question, What hapends if you try to cast a spell than does not exist in your class? Code: public static Composite CreateInterruptSpellCast(UnitSelectionDelegate onUnit) { return new Decorator( // If the target is casting, and can actually be interrupted, AND we've waited out the double-interrupt timer, then find something to interrupt with. ret => onUnit != null && onUnit(ret) != null && onUnit(ret).IsCasting && onUnit(ret).CanInterruptCurrentSpellCast /* && PreventDoubleInterrupt*/, new PrioritySelector( Spell.Cast("Rebuke", onUnit), Spell.Cast("Avenger's Shield", onUnit), Spell.Cast("Hammer of Justice", onUnit), Spell.Cast("Kick", onUnit), Spell.Cast("Gouge", onUnit, ret => !onUnit(ret).IsBoss() && !onUnit(ret).MeIsSafelyBehind), // Can't gouge bosses. Spell.Cast("Counterspell", onUnit), Spell.Cast("Wind Shear", onUnit), Spell.Cast("Pummel", onUnit), Spell.Cast("Spear Hand Strike", onUnit), // AOE interrupt Spell.Cast("Disrupting Shout", onUnit), // Gag Order only works on non-bosses due to it being a silence, not an interrupt! Spell.Cast("Heroic Throw", onUnit, ret => TalentManager.IsSelected(7) && !onUnit(ret).IsBoss()), Spell.Cast("Silence", onUnit), Spell.Cast("Silencing Shot", onUnit), // Can't stun most bosses. So use it on trash, etc. Spell.Cast("Bash", onUnit, ret => !onUnit(ret).IsBoss()), Spell.Cast("Skull Bash (Cat)", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Cat), Spell.Cast("Skull Bash (Bear)", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Bear), Spell.Cast("Mighty Bash", onUnit, ret => !onUnit(ret).IsBoss() && onUnit(ret).IsWithinMeleeRange ), Spell.Cast("Solar Beam", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Moonkin), Spell.Cast("Strangulate", onUnit), Spell.Cast("Mind Freeze", onUnit), // Racials last. Spell.Cast("Arcane Torrent", onUnit), // Don't waste stomp on bosses. They can't be stunned 99% of the time! Spell.Cast("War Stomp", onUnit, ret => !onUnit(ret).IsBoss() && onUnit(ret).Distance < 8), Spell.Cast("Quaking Palm", onUnit) )); } Code above does not provide Wind Shear for shamans when it is called in Elemental.cs with Code: Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),
u could test it by adding a non supported spell but it should ignore it, cause singular checks with CanCast if a spell is castable and this should return false for the class (example: rebuke is a palaind spell not a shaman one)