server-master/srcs/_plugins/WingsEmu.Plugins.BasicImplementation/Entities/ShopFactory.cs
2026-02-10 18:21:30 +01:00

16 lines
No EOL
604 B
C#

using System.Collections.Generic;
using WingsAPI.Data.Shops;
using WingsEmu.DTOs.Shops;
using WingsEmu.Game.Entities;
using WingsEmu.Game.Shops;
namespace WingsEmu.Plugins.BasicImplementations.Entities;
public class ShopFactory : IShopFactory
{
private readonly List<ShopItemDTO> _emptyItemList = new();
private readonly List<ShopSkillDTO> _emptySkillList = new();
public ShopNpc CreateShop(ShopDTO shopDto) => new ShopNpc(shopDto.MapNpcId, (ShopNpcMenuType)shopDto.MenuType, shopDto.Name, shopDto.ShopType, shopDto.Items ?? _emptyItemList,
shopDto.Skills ?? _emptySkillList);
}