CheckHeaveTimer() публичный статический Метод

public static CheckHeaveTimer ( Server.Mobile from ) : void
from Server.Mobile
Результат void
Пример #1
0
        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.
                }
            }
        }
Пример #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (Empty)
            {
                // A foggy memory is recalled and you have to ask yourself, "Why is the Pungent Brew always gone?"
                from.PrivateOverheadMessage(Network.MessageType.Regular, 0x3B2, 1113610, from.NetState);
            }
            else
            {
                from.PlaySound(Utility.RandomList(0x30, 0x2D6));

                from.BAC = 60;
                BaseBeverage.CheckHeaveTimer(from);

                if (!m_Table.ContainsKey(from))
                {
                    from.SendLocalizedMessage(1095139);                       // Flint wasn't kidding. This brew is strong!

                    InternalTimer t = m_Table[from] = new InternalTimer(from);
                    t.Start();
                }
                else
                {
                    InternalTimer t = m_Table[from];
                    t.Counter = 20;
                }

                Empty = true;
            }
        }
Пример #3
0
        public void Drink(Mobile from)
        {
            if (Thirsty(from, m_FillFactor))
            {
                from.PlaySound(Utility.Random(0x30, 2));

                if (from.Body.IsHuman && !from.Mounted)
                {
                    from.Animate(34, 5, 1, true, false, 0);
                }

                if (m_Poison != null)
                {
                    from.ApplyPoison(m_Poisoner, m_Poison);
                }

                int bac = 5;
                from.BAC += bac;
                if (from.BAC > 60)
                {
                    from.BAC = 60;
                }

                BaseBeverage.CheckHeaveTimer(from);

                this.Consume();

                Item item = EmptyItem;

                if (item != null)
                {
                    from.AddToBackpack(item);
                }
            }
        }
Пример #4
0
        public void GetDrunk(Mobile m)
        {
            m.SendMessage("Yo ho, Yo ho, a pirate's life for you");
            int bac = 30;

            m.BAC += bac;
            if (m.BAC > 60)
            {
                m.BAC = 60;
            }

            BaseBeverage.CheckHeaveTimer(m);
        }
Пример #5
0
 public override void OnDoubleClick(Mobile from)
 {
     if (m_CurrentUses > 0)
     {
         if (from.Thirst < 20)
         {
             ++from.Thirst;
         }
         from.BAC += 5;
         if (from.BAC > 60)
         {
             from.BAC = 60;
         }
         BaseBeverage.CheckHeaveTimer(from);
         --m_CurrentUses;
         from.PlaySound(Utility.RandomList(0x30, 0x2D6));
     }
     else
     {
         from.BeginTarget(-1, true, TargetFlags.None, new TargetCallback(Fill));
         SendLocalizedMessageTo(from, 500837);                   // Fill from what?
     }
 }