Ejemplo n.º 1
0
        /// <summary>
        /// Transfers an amount from one stack to a free space
        /// </summary>
        public void OnInventorySplitStackMessage(InventorySplitStackMessage msg)
        {
            Item itemFrom = GetItem((uint)msg.FromID);

            itemFrom.Attributes[GameAttribute.ItemStackQuantityLo] -= (int)msg.Amount;
            itemFrom.Attributes.SendChangedMessage(_owner.InGameClient);

            Item item = ItemGenerator.CreateItem(_owner, itemFrom.ItemDefinition);

            item.Attributes[GameAttribute.ItemStackQuantityLo] = (int)msg.Amount;

            InventoryGrid targetGrid = (msg.InvLoc.EquipmentSlot == (int)EquipmentSlotId.Stash) ? _stashGrid : _inventoryGrid;

            targetGrid.AddItem(item, msg.InvLoc.Row, msg.InvLoc.Column);
        }
Ejemplo n.º 2
0
 public void OnInventorySplitStackMessage(InventorySplitStackMessage msg)
 {
     // TODO need to create and introduce a new item that is of the same type as the source
 }