コード例 #1
0
        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();
                    }
                }
            }
        }
コード例 #2
0
ファイル: PlayerBarkeeper.cs プロジェクト: Ravenwolfe/xrunuo
        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();
        }
コード例 #3
0
ファイル: PlayerBarkeeper.cs プロジェクト: Ravenwolfe/xrunuo
 public ManageBarkeeperEntry( Mobile from, PlayerBarkeeper barkeeper )
     : base(6151, 12)
 {
     m_From = from;
     m_Barkeeper = barkeeper;
 }
コード例 #4
0
ファイル: PlayerBarkeeper.cs プロジェクト: Ravenwolfe/xrunuo
 public ChangeTipMessagePrompt( PlayerBarkeeper barkeeper )
 {
     m_Barkeeper = barkeeper;
 }
コード例 #5
0
ファイル: PlayerBarkeeper.cs プロジェクト: Ravenwolfe/xrunuo
 public ChangeRumorMessagePrompt( PlayerBarkeeper barkeeper, int rumorIndex )
 {
     m_Barkeeper = barkeeper;
     m_RumorIndex = rumorIndex;
 }
コード例 #6
0
ファイル: PlayerBarkeeper.cs プロジェクト: Ravenwolfe/xrunuo
 public ChangeRumorKeywordPrompt( PlayerBarkeeper barkeeper, int rumorIndex )
 {
     m_Barkeeper = barkeeper;
     m_RumorIndex = rumorIndex;
 }
コード例 #7
0
ファイル: PlayerBarkeeper.cs プロジェクト: Ravenwolfe/xrunuo
        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 );
            }
        }
コード例 #8
0
 public ManageBarkeeperEntry(Mobile from, PlayerBarkeeper barkeeper) : base(6151, 12)
 {
     m_From      = from;
     m_Barkeeper = barkeeper;
 }
コード例 #9
0
 public ChangeTipMessagePrompt(PlayerBarkeeper barkeeper)
 {
     m_Barkeeper = barkeeper;
 }
コード例 #10
0
 public ChangeRumorKeywordPrompt(PlayerBarkeeper barkeeper, int rumorIndex)
 {
     m_Barkeeper  = barkeeper;
     m_RumorIndex = rumorIndex;
 }
コード例 #11
0
 public ChangeRumorMessagePrompt(PlayerBarkeeper barkeeper, int rumorIndex)
 {
     m_Barkeeper  = barkeeper;
     m_RumorIndex = rumorIndex;
 }
コード例 #12
0
		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();
				}
			}
		}