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

30 lines
688 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
{
private 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;
}
}
}