Esempio n. 1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (IsChildOf(from.Backpack) || Parent == from)
            {
                CraftSystem system = this.CraftSystem;

                int num = system.CanCraft(from, this, null);

                if (num > 0 && (num != 1044267 || !Core.SE))                     // Blacksmithing shows the gump regardless of proximity of an anvil and forge after SE
                {
                    from.SendLocalizedMessage(num);
                }
                else
                {
                    CraftContext context = system.GetContext(from);

                    Gump cgump = new CraftGump(from, system, this, null);
                    CaptchaGump.sendCaptcha(from, CaptchaGump.SendGumpAfterCaptcha, cgump);
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
        }
Esempio n. 2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!Server.Misc.DifficultyLevel.AllowMacroResources())
            {
                CaptchaGump.sendCaptcha(from, BaseTool.OnDoubleClickRedirected, this);
            }
            else if (IsChildOf(from.Backpack) || Parent == from)
            {
                CraftSystem system = this.CraftSystem;

                object num = system.CanCraft(from, this, null);

                // Blacksmithing shows the gump regardless of proximity of an anvil and forge after SE
                if ((num is int && (int)num > 0 && ((int)num != 1044267 || !Core.SE)) || (num is string && !string.IsNullOrWhiteSpace((string)num)))
                {
                    if (num is int)
                    {
                        from.SendLocalizedMessage((int)num);
                    }
                    else
                    {
                        from.SendMessage((string)num);
                    }
                }
                else
                {
                    CraftContext context = system.GetContext(from);

                    from.SendGump(new CraftGump(from, system, this, null));

                    if (this is TomeOfWands)
                    {
                        from.PlaySound(0x55);
                    }
                }
            }
            else
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
        }
Esempio n. 3
0
 public override void OnDoubleClick(Mobile from)
 {
     CaptchaGump.sendCaptcha(from, BaseTool.OnDoubleClickRedirected, new object [] { this });
 }
 public override void OnDoubleClick(Mobile from)
 {
     CaptchaGump.sendCaptcha(from, BaseTool.OnDoubleClickRedirected, this);
     //OnDoubleClickRedirected(from, this);
 }