//////////////// public Item[] GetBookPageItems(Player player, string bookName, int pageIdx) { if (!this.Books.ContainsKey(bookName)) { throw new ModHelpersException("No such book by name " + bookName); } InventoryBook book = this.Books[bookName]; return(book.GetPageItems(player, pageIdx)); }
//////////////// 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)); }