1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwclass/container.cpp
2010-08-03 17:11:41 +02:00

27 lines
560 B
C++

#include "container.hpp"
#include <components/esm/loadcont.hpp>
#include <components/esm_store/cell_store.hpp>
#include "../mwworld/ptr.hpp"
namespace MWClass
{
std::string Container::getName (const MWWorld::Ptr& ptr) const
{
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
ptr.get<ESM::Container>();
return ref->base->name;
}
void Container::registerSelf()
{
boost::shared_ptr<Class> instance (new Container);
registerClass (typeid (ESM::Container).name(), instance);
}
}