Server.Items.Spellbook.AllSpells_OnTarget C# (CSharp) Méthode

AllSpells_OnTarget() private static méthode

private static AllSpells_OnTarget ( Server.Mobile from, object obj ) : void
from Server.Mobile
obj object
Résultat void
        private static void AllSpells_OnTarget( Mobile from, object obj )
        {
            if ( obj is Spellbook )
            {
                Spellbook book = (Spellbook)obj;

                if ( book.BookCount == 64 )
                    book.Content = ulong.MaxValue;
                else
                    book.Content = (1ul << book.BookCount) - 1;

                from.SendMessage( "The spellbook has been filled." );

                CommandLogging.WriteLine( from, "{0} {1} filling spellbook {2}", from.AccessLevel, CommandLogging.Format( from ), CommandLogging.Format( book ) );
            }
            else
            {
                from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( AllSpells_OnTarget ) );
                from.SendMessage( "That is not a spellbook. Try again." );
            }
        }