/// <summary> /// /// </summary> /// <param name="item"></param> /// <param name="quantity"></param> /// <param name="slot"></param> /// <returns></returns> public ItemDAO MoveQuantity(ItemDAO item, int quantity, ItemSlotEnum slot = ItemSlotEnum.SLOT_INVENTORY) { if (quantity >= item.Quantity) { return(RemoveItem(item.Id, item.Quantity)); } item.Quantity -= quantity; OnItemQuantity(item.Id, item.Quantity); return(item.Clone(quantity)); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <param name="quantity"></param> /// <param name="slot"></param> /// <returns></returns> public ItemDAO MoveQuantity(ItemDAO item, int quantity, ItemSlotEnum slot = ItemSlotEnum.SLOT_INVENTORY) { if(quantity >= item.Quantity) return RemoveItem(item.Id, item.Quantity); item.Quantity -= quantity; OnItemQuantity(item.Id, item.Quantity); return item.Clone(quantity); }