Server.Items.FishBowl.OnDragDrop C# (CSharp) Méthode

OnDragDrop() public méthode

public OnDragDrop ( Mobile from, Server.Items.Item dropped ) : bool
from Mobile
dropped Server.Items.Item
Résultat bool
        public override bool OnDragDrop( Mobile from, Item dropped )
        {
            if ( !IsAccessibleTo( from ) )
            {
                from.SendLocalizedMessage( 502436 ); // That is not accessible.
                return false;
            }

            if ( !( dropped is BaseFish ) )
            {
                from.SendLocalizedMessage( 1074836 ); // The container can not hold that type of object.
                return false;
            }

            if ( base.OnDragDrop( from, dropped ) )
            {
                ((BaseFish) dropped).StopTimer();
                InvalidateProperties();

                return true;
            }

            return false;
        }