public virtual bool Open(Player player)
        {
            InventoryOpenEventArgs inventoryOpenEventArgs = new InventoryOpenEventArgs(this, player);

            InventoryEvents.OnInventoryOpen(inventoryOpenEventArgs);
            if (inventoryOpenEventArgs.IsCancel)
            {
                return(false);
            }
            this.OnOpen(player);
            return(true);
        }
Пример #2
0
        public virtual bool Open(Player player)
        {
            InventoryOpenEventArgs args = new InventoryOpenEventArgs(this, player);

            Server.Instance.Event.Inventory.OnInventoryOpen(this, args);
            if (args.IsCancel)
            {
                return(false);
            }
            this.OnOpen(player);
            return(true);
        }
 public static void OnInventoryOpen(InventoryOpenEventArgs args)
 {
     InventoryOpen?.Invoke(args);
 }