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


C# Mobiles.PlayerBarkeeper類代碼示例

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


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

示例1: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
            }
            else if ( from.AccessLevel >= AccessLevel.GameMaster )
            {
                from.SendLocalizedMessage( 503248 ); // Your godly powers allow you to place this vendor whereever you wish.

                Mobile v = new PlayerBarkeeper( from, BaseHouse.FindHouseAt( from ) );

                v.Direction = from.Direction & Direction.Mask;
                v.MoveToWorld( from.Location, from.Map );

                this.Delete();
            }
            else
            {
                BaseHouse house = BaseHouse.FindHouseAt( from );

                if ( house == null || !house.IsOwner( from ) )
                {
                    from.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You are not the full owner of this house." );
                }
                else if ( !house.CanPlaceNewBarkeep() )
                {
                    from.SendLocalizedMessage( 1062490 ); // That action would exceed the maximum number of barkeeps for this house.
                }
                else
                {
                    bool vendor, contract;
                    BaseHouse.IsThereVendor( from.Location, from.Map, out vendor, out contract );

                    if ( vendor )
                    {
                        from.SendLocalizedMessage( 1062677 ); // You cannot place a vendor or barkeep at this location.
                    }
                    else if ( contract )
                    {
                        from.SendLocalizedMessage( 1062678 ); // You cannot place a vendor or barkeep on top of a rental contract!
                    }
                    else
                    {
                        Mobile v = new PlayerBarkeeper( from, house );

                        v.Direction = from.Direction & Direction.Mask;
                        v.MoveToWorld( from.Location, from.Map );

                        this.Delete();
                    }
                }
            }
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:54,代碼來源:BarkeepContract.cs

示例2: BarkeeperGump

        public BarkeeperGump( Mobile from, PlayerBarkeeper barkeeper )
            : base(0, 0)
        {
            m_From = from;
            m_Barkeeper = barkeeper;

            from.CloseGump( typeof( BarkeeperGump ) );
            from.CloseGump( typeof( BarkeeperTitleGump ) );

            RenderBackground();
            RenderCategories();
            RenderMessageManagement();
            RenderDismissConfirmation();
            RenderMessageManagement_Message_AddOrChange();
            RenderMessageManagement_Message_Remove();
            RenderMessageManagement_Tip_AddOrChange();
            RenderMessageManagement_Tip_Remove();
            RenderAppearanceCategories();
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:19,代碼來源:PlayerBarkeeper.cs

示例3: ManageBarkeeperEntry

 public ManageBarkeeperEntry( Mobile from, PlayerBarkeeper barkeeper )
     : base(6151, 12)
 {
     m_From = from;
     m_Barkeeper = barkeeper;
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:6,代碼來源:PlayerBarkeeper.cs

示例4: ChangeTipMessagePrompt

 public ChangeTipMessagePrompt( PlayerBarkeeper barkeeper )
 {
     m_Barkeeper = barkeeper;
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:4,代碼來源:PlayerBarkeeper.cs

示例5: ChangeRumorMessagePrompt

 public ChangeRumorMessagePrompt( PlayerBarkeeper barkeeper, int rumorIndex )
 {
     m_Barkeeper = barkeeper;
     m_RumorIndex = rumorIndex;
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:5,代碼來源:PlayerBarkeeper.cs

示例6: ChangeRumorKeywordPrompt

 public ChangeRumorKeywordPrompt( PlayerBarkeeper barkeeper, int rumorIndex )
 {
     m_Barkeeper = barkeeper;
     m_RumorIndex = rumorIndex;
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:5,代碼來源:PlayerBarkeeper.cs

示例7: BarkeeperTitleGump

        public BarkeeperTitleGump( Mobile from, PlayerBarkeeper barkeeper )
            : base(0, 0)
        {
            m_From = from;
            m_Barkeeper = barkeeper;

            from.CloseGump( typeof( BarkeeperGump ) );
            from.CloseGump( typeof( BarkeeperTitleGump ) );

            Entry[] entries = m_Entries;

            RenderBackground();

            int pageCount = ( entries.Length + 19 ) / 20;

            for ( int i = 0; i < pageCount; ++i )
            {
                RenderPage( entries, i );
            }
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:20,代碼來源:PlayerBarkeeper.cs

示例8: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else if ( from.AccessLevel >= AccessLevel.GameMaster )
			{
				from.SendLocalizedMessage( 503248 ); // Your godly powers allow you to place this vendor whereever you wish.

				Mobile v = new PlayerBarkeeper( from );

				v.Direction = from.Direction & Direction.Mask;
				v.MoveToWorld( from.Location, from.Map );

				this.Delete();
			}
			else
			{
				BaseHouse house = BaseHouse.FindHouseAt( from );

				if ( house == null || !house.IsOwner( from ) )
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You are not the full owner of this house." );
				}
				else if ( !house.CanPlaceNewBarkeep() )
				{
					//from.SendLocalizedMessage( 1062490 ); // That action would exceed the m/aximum number of barkeeps for this house.
					from.SendMessage("You must purchase a work permit if you wish to employ more barkeepers.");
				}
				else
				{
					Mobile v = new PlayerBarkeeper( from );

					v.Direction = from.Direction & Direction.Mask;
					v.MoveToWorld( from.Location, from.Map );
						
					this.Delete();
				}
			}
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:41,代碼來源:BarkeepContract.cs


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