1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-05 09:47:18 -05:00
OpenDiablo2/OpenDiablo2.Core/ItemManager.cs

30 lines
697 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenDiablo2.Common;
using OpenDiablo2.Common.Interfaces;
using OpenDiablo2.Common.Models;
namespace OpenDiablo2.Core
{
public sealed class ItemManager : IItemManager
{
2018-12-08 09:32:09 -05:00
private readonly IEngineDataManager engineDataManager;
public ItemManager(IEngineDataManager engineDataManager)
{
this.engineDataManager = engineDataManager;
}
public Item getItem(string code)
{
Item item = engineDataManager.Items.Where(x => x.Code == code).FirstOrDefault();
return item;
}
}
}