Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
#ifndef _ESM_BOOK_H
|
|
|
|
#define _ESM_BOOK_H
|
|
|
|
|
|
|
|
#include "esm_reader.hpp"
|
|
|
|
|
|
|
|
namespace ESM {
|
|
|
|
|
|
|
|
/*
|
2010-02-28 08:18:48 +00:00
|
|
|
* Books, magic scrolls, notes and so on
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
struct Book
|
|
|
|
{
|
|
|
|
struct BKDTstruct
|
|
|
|
{
|
|
|
|
float weight;
|
|
|
|
int value, isScroll, skillID, enchant;
|
|
|
|
};
|
|
|
|
|
|
|
|
BKDTstruct data;
|
|
|
|
std::string name, model, icon, script, enchant, text;
|
|
|
|
|
|
|
|
void load(ESMReader &esm)
|
|
|
|
{
|
|
|
|
model = esm.getHNString("MODL");
|
|
|
|
name = esm.getHNOString("FNAM");
|
|
|
|
esm.getHNT(data, "BKDT", 20);
|
|
|
|
script = esm.getHNOString("SCRI");
|
|
|
|
icon = esm.getHNOString("ITEX");
|
|
|
|
text = esm.getHNOString("TEXT");
|
|
|
|
enchant = esm.getHNOString("ENAM");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|