Exemplo n.º 1
0
        private static void AddCraft_OnTarget(Mobile from, object target, object state)
        {
            int num = (int)state;

            if (target is BookOfSpellCrafts)
            {
                BookOfSpellCrafts book = target as BookOfSpellCrafts;

                if (book.HasCraft(num))
                {
                    from.SendMessage("The book already has this craft.");
                }
                else
                {
                    book.Content |= (ulong)1 << num;
                    book.InvalidateProperties();
                    from.SendMessage("The spellcraft has been added to the book.");
                }
            }
            else
            {
                from.SendMessage("That is not a Book of Spellcrafts.");
            }
        }