Esempio n. 1
0
        void Inventory_ItemPut(object sender, EntityContainerEventArgs <ContainedSlot> e)
        {
            // skip player own messages
            if (_dontSendInventoryEvents)
            {
                return;
            }

            // inform client about his inventory change from outside
            var msg = new ItemTransferMessage {
                DestinationContainerEntityLink = PlayerCharacter.GetLink(),
                DestinationContainerSlot       = e.Slot.GridPosition,
                ItemsCount     = e.Slot.ItemsCount,
                ItemEntityId   = e.Slot.Item.BluePrintId,
                SourceEntityId = PlayerCharacter.DynamicId
            };

            Connection.Send(msg);
            CurrentArea.OnCustomMessage(PlayerCharacter.DynamicId, msg);
        }