ModernUO/Projects/UOContent/Mobiles/Vendors/BeverageBuy.cs
Kamron Batman e9c1e4cbba
Fixes dupe exception (#258)
- [X] Cleans up ActivatorUtil
- [X] Fixes dupe exception
- [X] Fixes a bug in BasePotion
- [X] Fixes a few possible memory leaks

Bumps release version
2020-09-19 15:46:07 -07:00

46 lines
1.2 KiB
C#

using System;
using Server.Items;
using Server.Utilities;
namespace Server.Mobiles
{
public class BeverageBuyInfo : GenericBuyInfo
{
private readonly BeverageType m_Content;
public BeverageBuyInfo(Type type, BeverageType content, int price, int amount, int itemID, int hue) : this(
null,
type,
content,
price,
amount,
itemID,
hue
)
{
}
public BeverageBuyInfo(string name, Type type, BeverageType content, int price, int amount, int itemID, int hue) :
base(name, type, price, amount, itemID, hue)
{
m_Content = content;
if (type == typeof(Pitcher))
{
Name = (1048128 + (int)content).ToString();
}
else if (type == typeof(BeverageBottle))
{
Name = (1042959 + (int)content).ToString();
}
else if (type == typeof(Jug))
{
Name = (1042965 + (int)content).ToString();
}
}
public override bool CanCacheDisplay => false;
public override IEntity GetEntity() => Type.CreateInstance<IEntity>(m_Content);
}
}