engine/XML/source/XMLSpellbookReader.cpp
// Methods for reading details about a book/spellbook from an XML node
// conformant to the Book type.
Methods for reading details about a book/spellbook from an XML node
conformant to the Book type.
Methods for reading details about a book / spellbook from an XML node conformant to the Book type .
void XMLSpellbookReader::parse(SpellbookPtr book, GenerationValues& igv, const XMLNode& book_node)
{
  if (!book_node.is_null())
  {
    XMLReadableReader::parse(book, igv, book_node);
    string spell_id = XMLUtils::get_child_node_value(book_node, "SpellID");
    book->set_spell_id(spell_id);
    int difficulty = XMLUtils::get_child_node_int_value(book_node, "Difficulty");
    book->set_difficulty(difficulty);
  }
}
void XMLSpellbookReader :: parse ( SpellbookPtr book , GenerationValues & igv , const XMLNode & book_node ) { if ( ! book_node . is_null ( ) ) { XMLReadableReader :: parse ( book , igv , book_node ) ; string spell_id = XMLUtils :: get_child_node_value ( book_node , " " ) ; book -> set_spell_id ( spell_id ) ; int difficulty = XMLUtils :: get_child_node_int_value ( book_node , " " ) ; book -> set_difficulty ( difficulty ) ; } }
Methods for reading details about a book/spellbook from an XML node
conformant to the Book type.
Methods for reading details about a book / spellbook from an XML node conformant to the Book type .
// The spell which is contained within the book. // The difficulty of learning the spell, as it is described by the book.