/// <summary> /// Removes an item from the equipment slot it uses /// returns the used equipmentSlot /// </summary> public EquipmentSlotId UnequipItem(InventoryItem item) { ItemsEquiped.Remove(item.DynamicID); itemsEquipedBySlot[item.EquipmentSlot] = null; item.EquipmentSlot = EquipmentSlotId.Inventory; return(item.EquipmentSlot); }
/// <summary> /// Equips an item in an equipment slot /// </summary> public void EquipItem(InventoryItem item, EquipmentSlotId slot) { ItemsEquiped.Add(item.DynamicID, item); item.Owner = _owner; //item.Attributes[GameAttributeStaticList.Item_Equipped] = true; // Probaly should be handled by Equipable class //item.Attributes.SendChangedMessage(_owner.GameClient); item.EquipmentSlot = slot; if (!itemsEquipedBySlot.ContainsKey(slot)) { itemsEquipedBySlot.Add(slot, item); } else { itemsEquipedBySlot[slot] = item; } }