internal bool InvokeWorldHalloweenCheck(ref bool halloweenCheck) { HalloweenCheckEventArgs args = new HalloweenCheckEventArgs { Halloween = halloweenCheck }; this.worldHalloweenCheck.Invoke(args); halloweenCheck = args.Halloween; return(args.Handled); }
/// <summary>OnHalloweenCheck - Internal hook fired when the HalloweenCheck happens.</summary> /// <param name="args">args - The HalloweenCheckEventArgs object.</param> private void OnHalloweenCheck(HalloweenCheckEventArgs args) { if (args.Handled) return; if (Config.ForceHalloween) { args.Halloween = true; args.Handled = true; } }
internal bool InvokeWorldHalloweenCheck(ref bool halloweenCheck) { HalloweenCheckEventArgs args = new HalloweenCheckEventArgs { Halloween = halloweenCheck }; this.worldHalloweenCheck.Invoke(args); halloweenCheck = args.Halloween; return args.Handled; }
/// <summary> /// WorldHalloweenCheck callback. /// </summary> /// <param name="args"></param> private void OnWorldHalloweenCheck(HalloweenCheckEventArgs args) { lock (this.m_AddonsLock) { this.m_Addons.ForEach(a => { var ret = a.Value.InvokeEvent("WorldHalloweenCheck", args); if (ret != null && ret.Length >= 1) { bool result; if (bool.TryParse(ret[0].ToString(), out result) && result) args.Handled = true; } }); } }