當前位置: 首頁>>代碼示例>>C#>>正文


C# Items.BaseDoor類代碼示例

本文整理匯總了C#中Server.Items.BaseDoor的典型用法代碼示例。如果您正苦於以下問題:C# BaseDoor類的具體用法?C# BaseDoor怎麽用?C# BaseDoor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BaseDoor類屬於Server.Items命名空間,在下文中一共展示了BaseDoor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Install

        public virtual bool Install( Mobile m, BaseDoor door, out string message )
        {
            if( door.CanInstallTrap(m) )
            {
                if( door.HasTrap() && this.TrapType == door.TrapType && door.DoorTrap.Refillable )
                {
                    door.DoorTrap.Recharge(this.InitialUses);
                    message = "A trap of the same type was already installed on this door, so you refill its ammunition.";
                    return true;
                }

                if (door.AttachTrap(BaseDoorTrap.CreateTrapByType(_trapType, _owner, _initialUses)))
                {
                    message = "You successfully install the trap.";
                    return true;
                }

                if (door.HasTrap() && this.TrapType != door.TrapType)
                {
                    message = "This door already appears to be trapped.";
                    return false;
                }
            }

            message = "You fail to install the trap.";
            return false;
        }
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:27,代碼來源:DoorTrapInstaller.cs

示例2: LabelTrappedDoor

        /// <summary>
        /// Adds a [trapped] label to a trapped item at <code>PerkLevel.First</code>
        /// </summary>
        public bool LabelTrappedDoor(BaseDoor door)
        {
            if (Level < PerkLevel.First)
                return false;

            if (door.TrapType != DoorTrapType.None)
                return true;

            return false;
        }
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:13,代碼來源:Scout.cs

示例3: InternalTimer

			public InternalTimer( BaseDoor door, int sound )
				: base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.0 ) )
			{
				m_Door = door;
				m_Sound = sound;

				count = 0;

				Priority = TimerPriority.TwoFiftyMS;
			}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:10,代碼來源:DoorKnockEntry.cs

示例4: GetKnockFor

		public int GetKnockFor( BaseDoor door )
		{
			if( door is MetalDoor || door is IronGate || door is IronGateShort || door is BarredMetalDoor || door is BarredMetalDoor2
			   || door is MetalDoor2 || door is PortcullisNS || door is PortcullisEW )
				return 320;
			else if( door is LightWoodGate || door is DarkWoodGate || door is DarkWoodDoor || door is MediumWoodDoor || door is LightWoodDoor )
				return 938;
			else if( door is StrongWoodDoor )
				return 328;
			else
				return 292;
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:12,代碼來源:DoorKnockEntry.cs

示例5: YardSecurityGump

		public YardSecurityGump( Mobile from, BaseDoor gate ) : base( 50, 50 )
		{
			m_Gate = gate;
			m_From = from;
			this.Closable=true;
			this.Disposable=true;
			this.Dragable=true;
			this.Resizable=false;
			this.AddPage(0);
			this.AddBackground(0, 0, 200, 100, 9250);
			this.AddLabel(58, 13, 0, @"SET ACCESS");
			this.AddButton(131, 38, 1150, 1152, (int)Buttons.Unlock, GumpButtonType.Reply, 0);
			this.AddButton(40, 38, 1153, 1155, (int)Buttons.Lock, GumpButtonType.Reply, 0);
			this.AddLabel(38, 58, 0, @"Lock");
			this.AddLabel(123, 58, 0, @"Unlock");
		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:16,代碼來源:YardGateContext.cs

示例6: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                {
                    m_Prisoner = reader.ReadMobile();
                    m_Gate = reader.ReadItem() as BaseDoor;
                    break;
                }
            }
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:16,代碼來源:RatCamp.cs

示例7: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			switch( version )
			{
				case 0:
				{
					m_HasMessage = reader.ReadBool();

					if( m_HasMessage )
						m_Message = reader.ReadString();

					m_HasLinkedDoor = reader.ReadBool();

					if( m_HasLinkedDoor )
						m_LinkedDoor = (BaseDoor)reader.ReadItem();

					m_HasOnItemId = reader.ReadBool();

					if( m_HasOnItemId )
						m_OnItemId = reader.ReadInt();

					m_OffItemId = reader.ReadInt();

					m_SayOverhead = reader.ReadBool();

					break;
				}
			}
		}
開發者ID:FreeReign,項目名稱:imaginenation,代碼行數:32,代碼來源:AdvancedSwitch.cs

示例8: RemoveDoor

		public void RemoveDoor(BaseDoor door)
		{
			if (m_Doors != null && m_Doors.Contains(door))
				m_Doors.Remove(door);
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:5,代碼來源:BaseHouse.cs

示例9: ConvertDoor

        protected void ConvertDoor(BaseDoor door)
        {
            if (!Owned)
            {
                return;
            }

            if (door is ISecurable)
            {
                door.Locked = false;
                c_House.Doors.Add(door);
                return;
            }

            door.Open = false;

            var newdoor = new GenericHouseDoor(0, door.ClosedID, door.OpenedSound, door.ClosedSound)
            {
                Offset = door.Offset,
                ClosedID = door.ClosedID,
                OpenedID = door.OpenedID,
                Location = door.Location,
                Map = door.Map
            };

            door.Delete();

            foreach (
                Item inneritem in
                    newdoor.GetItemsInRange(1)
                        .Where(inneritem => inneritem is BaseDoor && inneritem != newdoor && inneritem.Z == newdoor.Z))
            {
                ((BaseDoor) inneritem).Link = newdoor;
                newdoor.Link = (BaseDoor) inneritem;
            }

            c_House.Doors.Add(newdoor);
        }
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:38,代碼來源:TownHouseSign.cs

示例10: InternalTimer

 public InternalTimer( BaseDoor door )
     : base(TimeSpan.FromSeconds( 20.0 ), TimeSpan.FromSeconds( 10.0 ))
 {
     Priority = TimerPriority.OneSecond;
     m_Door = door;
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:6,代碼來源:BaseDoor.cs

示例11: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                {
                    m_KeyValue = reader.ReadUInt();
                    m_Open = reader.ReadBool();
                    m_Locked = reader.ReadBool();
                    m_OpenedID = reader.ReadInt();
                    m_ClosedID = reader.ReadInt();
                    m_OpenedSound = reader.ReadInt();
                    m_ClosedSound = reader.ReadInt();
                    m_Offset = reader.ReadPoint3D();
                    m_Link = reader.ReadItem() as BaseDoor;

                    m_Timer = new InternalTimer( this );

                    if ( m_Open )
                        m_Timer.Start();

                    break;
                }
            }
        }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:29,代碼來源:BaseDoor.cs

示例12: RefundEntry

		public RefundEntry( Mobile from, BaseDoor gate, int price) : base( 6104, 9 )
		{
			m_From = from;
			m_Gate = gate;
			value = price;
		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:6,代碼來源:YardGateContext.cs

示例13: YardSecurityEntry

		public YardSecurityEntry( Mobile from, BaseDoor gate) : base( 6203, 9 )
		{
			m_From = from;
			m_Gate = gate;
		}
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:5,代碼來源:YardGateContext.cs

示例14: AddComponents

        public override void AddComponents()
        {
            IronGate gate = new IronGate( DoorFacing.EastCCW );
            m_Gate = gate;

            gate.KeyValue = Key.RandomValue();
            gate.Locked = true;

            AddItem( gate, -2, 1, 0 );

            MetalChest chest = new MetalChest();

            chest.ItemID = 0xE7C;
            chest.DropItem( new Key( KeyType.Iron, gate.KeyValue ) );

            TreasureMapChest.Fill( chest, 2 );

            AddItem( chest, 4, 4, 0 );

            AddMobile( new Gnoll(), 15, 0, -2, 0 );
            AddMobile( new Gnoll(), 15, 0,  1, 0 );
            AddMobile( new Gnoll(), 15, 0, -1, 0 );
            AddMobile( new Gnoll(), 15, 0,  0, 0 );

            switch ( Utility.Random( 2 ) )
            {
                case 0: m_Prisoner = new Noble(); break;
                case 1: m_Prisoner = new SeekerOfAdventure(); break;
            }

            m_Prisoner.YellHue = Utility.RandomList( 0x57, 0x67, 0x77, 0x87, 0x117 );

            AddMobile( m_Prisoner, 2, -2, 0, 0 );
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:34,代碼來源:RatCamp.cs

示例15: AddComponents

        public override void AddComponents()
        {
            IronGate gate = new IronGate( DoorFacing.EastCCW );
            m_Gate = gate;

            gate.KeyValue = Key.RandomValue();
            gate.Locked = true;

            AddItem( gate, -2, 1, 0 );

            MetalChest chest = new MetalChest();

            chest.ItemID = 0xE7C;
            chest.DropItem( new Key( KeyType.Iron, gate.KeyValue ) );
            chest.LiftOverride = true;

            TreasureMapChest.FillOld( chest, 2 );

            AddItem( chest, 4, 4, 0 );

            AddMobile( new Ratman(), 15, 0, -2, 0 );
            AddMobile( new Ratman(), 15, 0, 1, 0 );
            AddMobile( new RatmanMage(), 15, 0, -1, 0 );
            AddMobile( new RatmanArcher(), 15, 0, 0, 0 );

            m_Prisoner = new BaseEscort();

            m_Prisoner.YellHue = Utility.RandomList( 0x57, 0x67, 0x77, 0x87, 0x117 );

            AddMobile( m_Prisoner, 2, -2, 0, 0 );
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:31,代碼來源:RatCamp.cs


注:本文中的Server.Items.BaseDoor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。