Exemplo n.º 1
0
        public static void RemoveContext(Mobile m)
        {
            OrangePetalsContext context = GetContext(m);

            if (context != null)
            {
                RemoveContext(m, context);
            }
        }
Exemplo n.º 2
0
        public override void OnDoubleClick(Mobile from)
        {
            OrangePetalsContext context = GetContext(from);

            if (context != null)
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061904);
                return;
            }

            from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061905);
            from.PlaySound(0x3B);

            Timer timer = new OrangePetalsTimer(from);

            timer.Start();

            AddContext(from, new OrangePetalsContext(timer));

            this.Consume();
        }
Exemplo n.º 3
0
        public override void OnDoubleClick(Mobile from)
        {
            OrangePetalsContext context = GetContext(from);

            if (context != null)
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061904); // * You already feel resilient! You decide to save the petal for later *
                return;
            }

            from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061905); // * You eat the orange petal.  You feel more resilient! *
            from.PlaySound(0x3B);

            Timer timer = new OrangePetalsTimer(from);

            timer.Start();

            BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.OrangePetals, 1153785, 1153814, TimeSpan.FromMinutes(5.0), from));

            AddContext(from, new OrangePetalsContext(timer));

            Consume();
        }
Exemplo n.º 4
0
        public override void OnDoubleClick(Mobile from)
        {
            OrangePetalsContext context = GetContext(from);

            if (context != null)
            {
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061904);
                return;
            }

            from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1061905);
            from.PlaySound(0x3B);

            Timer timer = new OrangePetalsTimer(from);

            timer.Start();

            BuffInfo.AddBuff(from, new BuffInfo(BuffIcon.OrangePetals, 1153785, 1153814, TimeSpan.FromMinutes(5.0), from));

            AddContext(from, new OrangePetalsContext(timer));

            this.Consume();
        }
Exemplo n.º 5
0
        private static void RemoveContext(Mobile m, OrangePetalsContext context)
        {
            m_Table.Remove(m);

            context.Timer.Stop();
        }
Exemplo n.º 6
0
 private static void AddContext(Mobile m, OrangePetalsContext context)
 {
     m_Table[m] = context;
 }