public override void OnDoubleClick(Mobile from)
{
if (!this.Movable)
{
return;
}
if (!from.BeginAction(this.GetType()))
{
from.SendLocalizedMessage(500119); // You must wait to perform another action.
return;
}
Timer.DelayCall(TimeSpan.FromMilliseconds(500), () => from.EndAction(this.GetType()));
if (from.InRange(this.GetWorldLocation(), 1))
{
if (!this.RequireFreeHand || HasFreeHand(from))
{
if (this is BaseExplosionPotion && this.Amount > 1)
{
BasePotion pot = (BasePotion)Activator.CreateInstance(this.GetType());
if (pot != null)
{
this.Amount--;
if (from.Backpack != null && !from.Backpack.Deleted)
{
from.Backpack.DropItem(pot);
}
else
{
pot.MoveToWorld(from.Location, from.Map);
}
pot.Drink(from);
}
}
else
{
this.Drink(from);
}
}
else
{
from.SendLocalizedMessage(502172); // You must have a free hand to drink a potion.
}
}
else
{
from.SendLocalizedMessage(502138); // That is too far away for you to use
}
}