当前位置: 首页>>代码示例>>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;未经允许,请勿转载。