public static bool CheckUse( LocksmithTools tool, Mobile from )
 {
     if ( !BasePotion.HasFreeHand( from ) )
     {
         from.SendMessage( "You need a free hand to use these tools." );
         return false;
     }
     return true;
 }
示例#2
0
 public static bool CheckUse(LocksmithTools tool, Mobile from)
 {
     if (!BasePotion.HasFreeHand(from))
     {
         from.SendMessage("You need a free hand to use these tools.");
         return(false);
     }
     return(true);
 }
示例#3
0
            public InternalGump(LocksmithTools decorator) : base(150, 50)
            {
                m_Decorator = decorator;

                AddBackground(0, 0, 200, 200, 2600);

                AddButton(50, 45, (decorator.Command == LocksmithCommand.UnlockDoor ? 2154 : 2152), 2154, 1, GumpButtonType.Reply, 0);
                AddHtml(90, 50, 70, 40, "Unlock Door", false, false);

                AddButton(50, 95, (decorator.Command == LocksmithCommand.Relock ? 2154 : 2152), 2154, 2, GumpButtonType.Reply, 0);
                AddHtml(90, 100, 70, 40, "Relock", false, false);

                AddButton(50, 145, (decorator.Command == LocksmithCommand.ForgeKey ? 2154 : 2152), 2154, 3, GumpButtonType.Reply, 0);
                AddHtml(90, 150, 70, 40, "Forge Key", false, false);
            }
示例#4
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Item && LocksmithTools.CheckUse(m_Decorator, from))
                {
                    Item item = (Item)targeted;

                    switch (m_Decorator.Command)
                    {
                    case LocksmithCommand.Relock:   Relock(item, from);   break;

                    case LocksmithCommand.ForgeKey: ForgeKey(item, from); break;

                    case LocksmithCommand.UnlockDoor:       UnlockDoor(item, from);       break;
                    }
                }

                from.Target = new InternalTarget(m_Decorator);
            }
示例#5
0
            public InternalTarget(LocksmithTools decorator) : base(-1, false, TargetFlags.None)
            {
                CheckLOS = false;

                m_Decorator = decorator;
            }
            public InternalTarget( LocksmithTools decorator )
                : base(-1, false, TargetFlags.None)
            {
                CheckLOS = false;

                m_Decorator = decorator;
            }
            public InternalGump( LocksmithTools decorator )
                : base(150, 50)
            {
                m_Decorator = decorator;

                AddBackground( 0, 0, 200, 200, 2600 );

                AddButton( 50, 45, ( decorator.Command == LocksmithCommand.UnlockDoor ? 2154 : 2152 ), 2154, 1, GumpButtonType.Reply, 0 );
                AddHtml( 90, 50, 70, 40, "Unlock Door", false, false );

                AddButton( 50, 95, ( decorator.Command == LocksmithCommand.Relock ? 2154 : 2152 ), 2154, 2, GumpButtonType.Reply, 0 );
                AddHtml( 90, 100, 70, 40, "Relock", false, false );

                AddButton( 50, 145, ( decorator.Command == LocksmithCommand.ForgeKey ? 2154 : 2152 ), 2154, 3, GumpButtonType.Reply, 0 );
                AddHtml( 90, 150, 70, 40, "Forge Key", false, false );
            }