• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Multis.BaseHouse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: HouseRemoveGump

        public HouseRemoveGump(int number, ArrayList list, BaseHouse house, bool accountOf)
            : base(20, 30)
        {
            if (house.Deleted)
                return;

            this.m_House = house;
            this.m_List = list;
            this.m_Number = number;
            this.m_AccountOf = accountOf;

            this.AddPage(0);

            this.AddBackground(0, 0, 420, 430, 5054);
            this.AddBackground(10, 10, 400, 410, 3000);

            this.AddButton(20, 388, 4005, 4007, 0, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(55, 388, 300, 20, 1011104, false, false); // Return to previous menu

            this.AddButton(20, 365, 4005, 4007, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(55, 365, 300, 20, 1011270, false, false); // Remove now!

            this.AddHtmlLocalized(20, 20, 350, 20, number, false, false);

            if (list != null)
            {
                this.m_Copy = new ArrayList(list);

                for (int i = 0; i < list.Count; ++i)
                {
                    if ((i % 15) == 0)
                    {
                        if (i != 0)
                        {
                            // Next button
                            this.AddButton(370, 20, 4005, 4007, 0, GumpButtonType.Page, (i / 15) + 1);
                        }

                        this.AddPage((i / 15) + 1);

                        if (i != 0)
                        {
                            // Previous button
                            this.AddButton(340, 20, 4014, 4016, 0, GumpButtonType.Page, i / 15);
                        }
                    }

                    Mobile m = (Mobile)list[i];

                    string name;

                    if (m == null || (name = m.Name) == null || (name = name.Trim()).Length <= 0)
                        continue;

                    this.AddCheck(34, 52 + ((i % 15) * 20), 0xD2, 0xD3, false, i);
                    this.AddLabel(55, 52 + ((i % 15) * 20), 0, accountOf && m.Player && m.Account != null ? String.Format("Account of {0}", name) : name);
                }
            }
        }
开发者ID:zerodowned,项目名称:JustUO-merged-with-EC-Support,代码行数:59,代码来源:HouseGump.cs


示例17: Deserialize

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

            int version = reader.ReadInt();

            m_House = reader.ReadItem() as BaseHouse;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:8,代码来源:TentChest.cs


示例18: HasContract

        public static bool HasContract( BaseHouse house )
        {
            foreach( Item item in TownHouseSign.AllSigns )
                if ( item is RentalContract && house == ((RentalContract)item).ParentHouse )
                    return true;

            return false;
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:8,代码来源:General.cs


示例19: MovingCrate

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

            this.m_House = house;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:8,代码来源:MovingCrate.cs


示例20: HouseSign

 public HouseSign(BaseHouse owner, uint keyValue, bool TowerCastle)
     : base(0xBD0)
 {
     m_Owner = owner;
     m_OrgOwner = m_Owner.Owner;
     m_KeyOwner = keyValue;
     Movable = false;
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:8,代码来源:HouseSign.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Multis.DesignState类代码示例发布时间:2022-05-26
下一篇:
C# Multis.BaseBoat类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap