internal static FarmEvent InvokeChooseNightlyFarmEvent(FarmEvent vanilla) { var args = new EventArgsChooseNightlyFarmEvent(); args.NightEvent = vanilla; Log.trace("Event: SelectHotbarSlot"); if (ChooseNightlyFarmEvent == null) { return(args.NightEvent); } Util.invokeEvent("SpaceEvents.SelectHotbarSlot", SelectHotbarSlot.GetInvocationList(), null, args); return(args.NightEvent); }
internal static bool InvokeSelectHotbarSlot(int slot) { EventArgsSelectHotbarSlot args = new EventArgsSelectHotbarSlot(); args.Slot = slot; Log.trace("Event: SelectHotbarSlot"); if (SelectHotbarSlot == null) { return(!args.Canceled); } Util.invokeEvent("SpaceEvents.SelectHotbarSlot", SelectHotbarSlot.GetInvocationList(), null, args); return(!args.Canceled); }