当前位置: 首页>>代码示例>>C#>>正文


C# Multis.BaseHouse类代码示例

本文整理汇总了C#中Server.Multis.BaseHouse的典型用法代码示例。如果您正苦于以下问题:C# BaseHouse类的具体用法?C# BaseHouse怎么用?C# BaseHouse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BaseHouse类属于Server.Multis命名空间,在下文中一共展示了BaseHouse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VendorInventory

        public VendorInventory( BaseHouse house, GenericReader reader )
        {
            m_House = house;

            int version = reader.ReadEncodedInt();

            m_Owner = reader.ReadMobile();
            m_VendorName = reader.ReadString();
            m_ShopName = reader.ReadString();

            m_Items = reader.ReadStrongItemList();
            m_Gold = reader.ReadInt();

            m_ExpireTime = reader.ReadDeltaTime();

            if ( m_Items.Count == 0 && m_Gold == 0 )
            {
                Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
            }
            else
            {
                TimeSpan delay = m_ExpireTime - DateTime.UtcNow;
                m_ExpireTimer = new ExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
                m_ExpireTimer.Start();
            }
        }
开发者ID:nathanvy,项目名称:runuo,代码行数:26,代码来源:VendorInventory.cs

示例2: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_House = reader.ReadItem() as BaseHouse;
					goto case 0;
				}
				case 0:
				{
					m_Description = reader.ReadString();
					m_Marked = reader.ReadBool();
					m_Target = reader.ReadPoint3D();
					m_TargetMap = reader.ReadMap();

					CalculateHue();

					break;
				}
			}
		}
开发者ID:nathanvy,项目名称:runuo,代码行数:26,代码来源:RecallRune.cs

示例3: HouseSign

 public HouseSign(BaseHouse owner)
     : base(0xBD2)
 {
     this.m_Owner = owner;
     this.m_OrgOwner = this.m_Owner.Owner;
     this.Movable = false;
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:HouseSign.cs

示例4: TentPackGump

		public TentPackGump( Mobile mobile, BaseHouse house ) : base( 110, 100 )
		{
			m_Mobile = mobile;
			m_House = house;

			mobile.CloseGump( typeof( TentPackGump ) );

			Closable = false;

			AddPage( 0 );

			AddBackground( 0, 0, 420, 280, 5054 );

			AddImageTiled( 10, 10, 400, 20, 2624 );
			AddAlphaRegion( 10, 10, 400, 20 );

			AddHtmlLocalized( 10, 10, 400, 20, 1060635, 30720, false, false ); // <CENTER>WARNING</CENTER>

			AddImageTiled( 10, 40, 400, 200, 2624 );
			AddAlphaRegion( 10, 40, 400, 200 );
			AddHtml( 10, 40, 400, 200, string.Format( "You are about to pack up your tent.\nYou will place the tent back in its tent bag.\nThe tent will remain behind and can be freely picked up by anyone.\nOnce the tent has been put away, anyone can attempt to place a new house or tent on the vacant land.\n	Are you sure you wish to continue?" ), false, true );

			AddImageTiled( 10, 250, 400, 20, 2624 );
			AddAlphaRegion( 10, 250, 400, 20 );

			AddButton( 10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 40, 250, 170, 20, 1011036, 32767, false, false ); // OKAY

			AddButton( 210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 240, 250, 170, 20, 1011012, 32767, false, false ); // CANCEL
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:31,代码来源:TentPackGump.cs

示例5: ValidatePlacement

        public bool ValidatePlacement(Point3D loc)
        {
            Map map = m_From.Map;
            if (map == null)
                return false;
            
            m_House = BaseHouse.FindHouseAt(m_From.Location, map, 20);
            if (m_House == null || !m_House.IsOwner(m_From))
            {
                m_From.SendMessage("You must be standing in your house to place this");
                return false;
            }

            if (loc.Y > m_From.Location.Y + YardSettings.Front || loc.Y < m_From.Location.Y - YardSettings.Back)
            {
                m_From.SendMessage("This is outside of your yard. Please re-try the placement");
                return false;
            }

            if (loc.X > m_From.Location.X + YardSettings.Right || loc.X < m_From.Location.X - YardSettings.Left)
            {
                m_From.SendMessage("This is outside of your yard. Please re-try the placement");
                return false;
            }
            return true;
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:26,代码来源:YardTarget.cs

示例6: VendorInventoryGump

        public VendorInventoryGump(BaseHouse house, Mobile from)
            : base(50, 50)
        {
            m_House = house;
            m_Inventories = new ArrayList(house.VendorInventories);

            AddBackground(0, 0, 420, 50 + 20 * m_Inventories.Count, 0x13BE);

            AddImageTiled(10, 10, 400, 20, 0xA40);
            AddHtmlLocalized(15, 10, 200, 20, 1062435, 0x7FFF, false, false); // Reclaim Vendor Inventory
            AddHtmlLocalized(330, 10, 50, 20, 1062465, 0x7FFF, false, false); // Expires

            AddImageTiled(10, 40, 400, 20 * m_Inventories.Count, 0xA40);

            for (int i = 0; i < m_Inventories.Count; i++)
            {
                VendorInventory inventory = (VendorInventory)m_Inventories[i];

                int y = 40 + 20 * i;

                if (inventory.Owner == from)
                    AddButton(10, y, 0xFA5, 0xFA7, i + 1, GumpButtonType.Reply, 0);

                AddLabel(45, y, 0x481, String.Format("{0} ({1})", inventory.ShopName, inventory.VendorName));

                TimeSpan expire = inventory.ExpireTime - DateTime.UtcNow;
                int hours = (int)expire.TotalHours;

                AddLabel(320, y, 0x481, hours.ToString());
                AddHtmlLocalized(350, y, 50, 20, 1062466, 0x7FFF, false, false); // hour(s)
            }
        }
开发者ID:zerodowned,项目名称:justuo-with-ec-support,代码行数:32,代码来源:VendorInventoryGump.cs

示例7: CheckAccess

        public static bool CheckAccess( BaseHouse house, Mobile from )
        {
            if ( house.Public || !house.IsAosRules )
                return !house.IsBanned( from );

            return house.HasAccess( from );
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:7,代码来源:PlayerBulletinBoards.cs

示例8: PlayerVendor

        public PlayerVendor( Mobile owner, BaseHouse house )
        {
            Owner = owner;
            House = house;

            if ( BaseHouse.NewVendorSystem )
            {
                m_BankAccount = 0;
                m_HoldGold = 4;
            }
            else
            {
                m_BankAccount = 1000;
                m_HoldGold = 0;
            }

            ShopName = "Shop Not Yet Named";

            m_SellItems = new Hashtable();

            CantWalk = true;

            InitStats( 75, 75, 75 );
            InitBody();
            InitOutfit();

            TimeSpan delay = PayTimer.GetInterval();

            m_PayTimer = new PayTimer( this, delay );
            m_PayTimer.Start();

            m_NextPayTime = DateTime.Now + delay;
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:33,代码来源:PlayerVendor.cs

示例9: LoginEventHandler

        /*public static void Initialize()
        {
            EventSink.Login += new LoginEventHandler( OnLogin );
        }

        public static void OnLogin( LoginEventArgs e )
        {
            BaseHouse house = BaseHouse.FindHouseAt( e.Mobile );

            if ( house != null && !house.Public && !house.IsFriend( e.Mobile ) )
                e.Mobile.Location = house.BanLocation;
        }*/
        public HouseRegion( BaseHouse house )
            : base(null, house.Map, HousePriority, GetArea( house ))
        {
            m_House = house;
            Point3D ban = house.RelativeBanLocation;
            this.GoLocation = new Point3D( house.X + ban.X, house.Y + ban.Y, house.Z + ban.Z );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:19,代码来源:HouseRegion.cs

示例10: EjectPlayerEntry

 public EjectPlayerEntry(Mobile from, Mobile target)
     : base(6206, 12)
 {
     this.m_From = from;
     this.m_Target = target;
     this.m_TargetHouse = BaseHouse.FindHouseAt(this.m_Target);
 }
开发者ID:FreeReign,项目名称:forkuo,代码行数:7,代码来源:EjectPlayer.cs

示例11: MovingCrate

		public MovingCrate( BaseHouse house ) : base( 0xE3D )
		{
			Hue = 0x8A5;
			Movable = false;

			m_House = house;
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:7,代码来源:MovingCrate.cs

示例12: StrongBox

		public StrongBox( Mobile owner, BaseHouse house ) : base( 0xE80 )
		{
			m_Owner = owner;
			m_House = house;

			MaxItems = 25;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:Strongbox.cs

示例13: HouseRegion

 public HouseRegion( BaseHouse house )
     : base("", "", house.Map)
 {
     Priority = Region.HousePriority;
     LoadFromXml = false;
     m_House = house;
 }
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:7,代码来源:HouseRegion.cs

示例14: HouseSign

 public HouseSign( BaseHouse owner )
     : base(0xBD2)
 {
     m_Owner = owner;
     m_OrgOwner = m_Owner.Owner;
     Movable = false;
 }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:7,代码来源:HouseSign.cs

示例15: VendorInventory

		public VendorInventory(BaseHouse house, GenericReader reader)
		{
			House = house;

			reader.ReadEncodedInt();

			Owner = reader.ReadMobile();
			VendorName = reader.ReadString();
			ShopName = reader.ReadString();

			Items = reader.ReadStrongItemList();
			Currency = reader.ReadInt();

			ExpireTime = reader.ReadDeltaTime();

			if (Items.Count == 0 && Currency == 0)
			{
				Timer.DelayCall(TimeSpan.Zero, Delete);
			}
			else
			{
				TimeSpan delay = ExpireTime - DateTime.UtcNow;

				m_ExpireTimer = new ExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
				m_ExpireTimer.Start();
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:27,代码来源:VendorInventory.cs


注:本文中的Server.Multis.BaseHouse类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。