コード例 #1
0
		protected override void OnTarget( Mobile from, object target ) 
		{
			if ( m_Deed.Deleted || m_Deed.RootParent != from )
				return;

			if ( target is HouseSign )
			{
				HouseSign item = (HouseSign)target;

				if ( item.RestrictDecay == true )
				{
					from.SendMessage ( "This house is already ageless" ); 
				}
				
				else
				{
					item.RestrictDecay = true;
					from.SendMessage ( "The house is now ageless for 60 Days" );
						
					Timer m_timer = new AgelessHouseTimer( item ); 
					m_timer.Start();

					m_Deed.Delete(); // Delete the ageless house deed
				}
			}
			else
			{
				from.SendMessage ( "You must target a house sign!" );
			}
		}
コード例 #2
0
        protected override void OnTarget(Mobile from, object target)
        {
            if (m_Deed.Deleted || m_Deed.RootParent != from)
            {
                return;
            }

            if (target is HouseSign)
            {
                HouseSign item = (HouseSign)target;

                if (item.RestrictDecay == true)
                {
                    from.SendMessage("This house is already ageless");
                }

                else
                {
                    item.RestrictDecay = true;
                    from.SendMessage("The house is now ageless for 60 Days");

                    Timer m_timer = new AgelessHouseTimer(item);
                    m_timer.Start();

                    m_Deed.Delete();                     // Delete the ageless house deed
                }
            }
            else
            {
                from.SendMessage("You must target a house sign!");
            }
        }