Example #1
0
        public static void RemoveKeys(Container cont, uint keyValue)
        {
            if (cont == null || keyValue == 0)
            {
                return;
            }

            Item[] items = cont.FindItemsByType(new Type[] { typeof(Key), typeof(KeyRing) });

            foreach (Item item in items)
            {
                if (item is Key)
                {
                    Key key = (Key)item;

                    if (key.KeyValue == keyValue)
                    {
                        key.Delete();
                    }
                }
                else
                {
                    KeyRing keyRing = (KeyRing)item;

                    keyRing.RemoveKeys(keyValue);
                }
            }
        }
Example #2
0
        public static bool ContainsKey(Container cont, uint keyValue)
        {
            if (cont == null)
            {
                return(false);
            }

            Item[] items = cont.FindItemsByType(new Type[] { typeof(Key), typeof(KeyRing) });

            foreach (Item item in items)
            {
                if (item is Key)
                {
                    Key key = (Key)item;

                    if (key.KeyValue == keyValue)
                    {
                        return(true);
                    }
                }
                else
                {
                    KeyRing keyRing = (KeyRing)item;

                    if (keyRing.ContainsKey(keyValue))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Example #3
0
            public UnlockTarget(KeyRing keyring)
                : base(10, false, TargetFlags.None)
            {
                m_KeyRing = keyring;

                CheckLOS = false;
            }
Example #4
0
 public InternalTarget(KeyRing keyRing) : base(-1, false, TargetFlags.None)
 {
     m_KeyRing = keyRing;
 }
Example #5
0
 public InternalTarget(KeyRing keyRing)
     : base(-1, false, TargetFlags.None)
 {
     this.m_KeyRing = keyRing;
 }
Example #6
0
 public RingUnlockTarget(KeyRing keyring) : base(keyring.MaxRange, false, TargetFlags.None)
 {
     m_KeyRing = keyring;
     CheckLOS  = false;
 }
			public UnlockTarget( KeyRing keyring ) : base( 10, false, TargetFlags.None )
			{
				m_KeyRing = keyring;
				CheckLOS = false;
			}
Example #8
0
 public InternalTarget(KeyRing keyRing)
     : base(-1, false, TargetFlags.None)
 {
     CheckLOS = false;
     m_KeyRing = keyRing;
 }
Example #9
0
			public RingUnlockTarget( KeyRing keyring ) : base( keyring.MaxRange, false, TargetFlags.None )
			{
				m_KeyRing = keyring;
				CheckLOS = false;
			}
Example #10
0
 public KeyRingRenamePrompt( Mobile m, KeyRing cont )
 {
     m_Mobile = m;
     i_KeyRing = cont;
 }
Example #11
0
 public KeyRingRenameEntry( Mobile from, KeyRing cont )
     : base(5104)
 {
     m_From = from;
     i_KeyRing = cont;
 }