public static void OnFeaturePropensityUpdated(ref Maid maid, bool updateFeature, bool updatePropensity) { UpdateFeaturePropensityEventArgs args = new UpdateFeaturePropensityEventArgs { CallerMaid = maid, UpdateFeature = updateFeature, UpdatePropensity = updatePropensity }; FeaturePropensityUpdated?.Invoke(null, args); }
private void OnFeaturePropensityUpdated(object sender, UpdateFeaturePropensityEventArgs args) { Debugger.Assert( () => { MaidInfo maid = SelectedMaid; if (maid == null) return; if (args.CallerMaid != maid.Maid) return; if (args.UpdateFeature) { Debugger.WriteLine(LogLevel.Info, "Updating all features!"); for (Feature e = Feature.Null + 1; e < EnumHelper.MaxFeature; e++) maid.UpdateMiscStatus(MaidChangeType.Feature, (int) e); } else if (args.UpdatePropensity) { Debugger.WriteLine(LogLevel.Info, "Updating all propensities!"); for (Propensity e = Propensity.Null + 1; e < EnumHelper.MaxPropensity; e++) maid.UpdateMiscStatus(MaidChangeType.Propensity, (int) e); } }, "Failed to update maid features/propensities"); }
public static void OnFeaturePropensityUpdated(ref Maid maid, bool updateFeature, bool updatePropensity) { UpdateFeaturePropensityEventArgs args = new UpdateFeaturePropensityEventArgs { CallerMaid = maid, UpdateFeature = updateFeature, UpdatePropensity = updatePropensity }; FeaturePropensityUpdated?.Invoke(args); }