Server.Mobiles.CharacterStatueDeed.OnDoubleClick C# (CSharp) Méthode

OnDoubleClick() public méthode

public OnDoubleClick ( Server.Mobile from ) : void
from Server.Mobile
Résultat void
        public override void OnDoubleClick( Mobile from )
        {
            Account acct = from.Account as Account;

            if ( acct != null && from.AccessLevel == AccessLevel.Player )
            {
                TimeSpan time = TimeSpan.FromDays( RewardSystem.RewardInterval.TotalDays * 6 ) - ( DateTime.Now - acct.Created );

                if ( time > TimeSpan.Zero )
                {
                    from.SendLocalizedMessage( 1008126, true, Math.Ceiling( time.TotalDays / RewardSystem.RewardInterval.TotalDays ).ToString() ); // Your account is not old enough to use this item. Months until you can use this item :
                    return;
                }
            }

            if ( IsChildOf( from.Backpack ) )
            {
                if ( !from.IsBodyMod )
                {
                    from.SendLocalizedMessage( 1076194 ); // Select a place where you would like to put your statue.
                    from.Target = new CharacterStatueTarget( this, StatueType );
                }
                else
                    from.SendLocalizedMessage( 1073648 ); // You may only proceed while in your original state...
            }
            else
                from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
        }