mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
27 lines
525 B
C++
27 lines
525 B
C++
|
|
#include "book.hpp"
|
|
|
|
#include <components/esm/loadbook.hpp>
|
|
|
|
#include <components/esm_store/cell_store.hpp>
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
namespace MWClass
|
|
{
|
|
std::string Book::getName (const MWWorld::Ptr& ptr) const
|
|
{
|
|
ESMS::LiveCellRef<ESM::Book, MWWorld::RefData> *ref =
|
|
ptr.get<ESM::Book>();
|
|
|
|
return ref->base->name;
|
|
}
|
|
|
|
void Book::registerSelf()
|
|
{
|
|
boost::shared_ptr<Class> instance (new Book);
|
|
|
|
registerClass (typeid (ESM::Book).name(), instance);
|
|
}
|
|
}
|