public static void InvokeDropItem(GameObject player, ref Inventory.SyncItemInfo item, ref bool allow) { if (DropItemEvent == null) { return; } DropItemEvent ev = new DropItemEvent() { Player = player.GetPlayer(), Item = item, Allow = allow }; DropItemEvent.InvokeSafely(ev); allow = ev.Allow; item = ev.Item; }
public static void InvokeDropItem(GameObject player, ref Inventory.SyncItemInfo item, ref bool allow) { DropItem dropItem = DropItemEvent; if (dropItem == null) { return; } DropItemEvent ev = new DropItemEvent() { Player = Player.GetPlayer(player), Item = item, Allow = allow }; dropItem.Invoke(ref ev); allow = ev.Allow; item = ev.Item; }