openmw-tes3coop/apps/openmw/mwclass/container.cpp
2010-08-03 17:11:41 +02:00

26 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);
}
}