Beispiel #1
0
        public List <EquipmentItem> Equip(EquipmentItem item)
        {
            var unequippedItems = new List <EquipmentItem>();
            var equipment       = GetEquipmentAt(item.Slot);

            if (equipment != null)
            {
                unequippedItems.Add(UnEquip(item.Slot));
            }

            if (item.IsHandSlot())
            {
                unequippedItems.AddRange(EquipWeapon(item));
            }

            SetEquipmentAt(item.Slot, item);
            return(unequippedItems);
        }