public static MagicControl GetBestControl(Sim sim, IMagicalDefinition definition) { MagicControl intendedControl = definition.IntendedControl; if (intendedControl != null) { if (intendedControl.IsAvailable(sim, definition)) { return(intendedControl); } } foreach (MagicControl control2 in sControls) { if (control2.IsAvailable(sim, definition)) { return(control2); } } return(null); }
public Definition(CommodityKind motive, IMagicalDefinition settings, MagicControl control) : base(motive, control.GetMinSkillLevel(settings)) { mSettings = settings.SpellSettings; }