public static CheckHeaveTimer ( Server.Mobile from ) : void | ||
from | Server.Mobile | |
return | void |
public static void CheckHeaveTimer( Mobile from )
{
if( from.BAC > 0 && from.Map != Map.Internal && !from.Deleted )
{
Timer t = (Timer)m_Table[ from ];
if( t == null )
{
if( from.BAC > 60 )
from.BAC = 60;
t = new HeaveTimer( from );
t.Start();
m_Table[ from ] = t;
}
}
else
{
Timer t = (Timer)m_Table[ from ];
if( t != null )
{
t.Stop();
m_Table.Remove( from );
from.SendLocalizedMessage( 500850 ); // You feel sober.
}
}
}
public override void OnDoubleClick(Mobile from) { base.OnDoubleClick(from); if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1075438); // You can only drink from the goblet of celebration when its in your inventory. } else { if (m_Full) { from.SendLocalizedMessage(1075272); // You drink from the goblet of celebration Full = false; from.BAC = 60; BaseBeverage.CheckHeaveTimer(from); } else { from.SendLocalizedMessage(1075439); // You need to wait a day for the goblet of celebration to be replenished. } } }