1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 04:49:54 +00:00
openmw-tes3mp/apps/openmw/mwclass/container.cpp
2010-08-05 15:40:03 +02:00

34 lines
783 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;
}
std::string Container::getScript (const MWWorld::Ptr& ptr) const
{
ESMS::LiveCellRef<ESM::Container, MWWorld::RefData> *ref =
ptr.get<ESM::Container>();
return ref->base->script;
}
void Container::registerSelf()
{
boost::shared_ptr<Class> instance (new Container);
registerClass (typeid (ESM::Container).name(), instance);
}
}