Пример #1
0
        /// <inheritdoc />
        public override bool PreExecute(OpenPlayer source)
        {
            PlayerItemDropEvent dropEvent = new PlayerItemDropEvent(source, source.KnownPosition, TargetItem, SourceItem);

            source.EventDispatcher.DispatchEvent(dropEvent);
            if (dropEvent.IsCancelled)
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
        internal bool DropItem(Item droppedItem, Item newInventoryItem)
        {
            PlayerItemDropEvent dropEvent = new PlayerItemDropEvent(this, this.KnownPosition, droppedItem, newInventoryItem);

            EventDispatcher.DispatchEvent(dropEvent);
            if (dropEvent.IsCancelled)
            {
                SendPlayerInventory();
                return(false);
            }

            return(true);
            //base.DropItem(droppedItem, newInventoryItem);
        }
Пример #3
0
 public void OnitemDrop(PlayerItemDropEvent e)
 {
     Log.Info($"Detected Item Drop.");
 }