Beispiel #1
0
        public static void Pick_Callback(CommandEventArgs e)
        {
            Lockpick pick = (Lockpick)BaseStoreKey.FindItemByType(e.Mobile.Backpack, typeof(Lockpick));

            if (pick == null)
            {
                e.Mobile.SendMessage("You need lockpicks");
                return;
            }

            pick.OnDoubleClick(e.Mobile);
        }
Beispiel #2
0
        public virtual bool ConsumeReagents()
        {
            if ((m_Scroll != null && !(m_Scroll is SpellStone)) || !m_Caster.Player)
            {
                return(true);
            }

            if (AosAttributes.GetValue(m_Caster, AosAttribute.LowerRegCost) > Utility.Random(100))
            {
                return(true);
            }

            if (DuelContext.IsFreeConsume(m_Caster))
            {
                return(true);
            }

            Container pack = m_Caster.Backpack;

            if (pack == null)
            {
                return(false);
            }

            if (pack.ConsumeTotal(m_Info.Reagents, m_Info.Amounts) == -1)
            {
                return(true);
            }

// UNIVERSAL STORAGE KEYS START
            if (BaseStoreKey.Consume(pack, m_Info.Reagents, m_Info.Amounts))
            {
                return(true);
            }
// UNIVERSAL STORAGE KEYS END

            return(false);
        }