Beispiel #1
0
        public bool RemoveLatestBookPage(Player player, string bookName, out string err)
        {
            if (!this.Books.ContainsKey(bookName))
            {
                throw new ModHelpersException("No such book by name " + bookName);
            }

            InventoryBook book = this.Books[bookName];

            return(book.DeleteEmptyPage(player, book.CountPages() - 1, out err));
        }
        ////////////////

        public Item[] GetLatestBookPageItems(Player player, string bookName)
        {
            if (this.Books.ContainsKey(bookName))
            {
                throw new ModHelpersException("No such book by name " + bookName);
            }

            InventoryBook book  = this.Books[bookName];
            int           count = book.CountPages();

            if (count == 0)
            {
                return(null);
            }

            return(book.GetPageItems(player, count - 1));
        }