diff --git a/Server/Components/Popups/EquipmentPopup.razor b/Server/Components/Popups/EquipmentPopup.razor index 1c534ef..4856c7b 100644 --- a/Server/Components/Popups/EquipmentPopup.razor +++ b/Server/Components/Popups/EquipmentPopup.razor @@ -89,11 +89,27 @@ public void Equip(Item item) { + if (Equipment.Count < slots) { - item.IsEquipped = true; - ItemsRepository.UpdateItemAsync(item); - Equipment.Add(item); + if (item.Type.Equals(ItemType.Ring)) + { + item.IsEquipped = true; + ItemsRepository.UpdateItemAsync(item); + Equipment.Add(item); + return; + } + + foreach (var equipped in Equipment) + { + if (equipped.Type.Equals(item.Type)) + { + return; + } + } + item.IsEquipped = true; + ItemsRepository.UpdateItemAsync(item); + Equipment.Add(item); } }