1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/apps/openmw/mwclass/potion.cpp

35 lines
753 B
C++
Raw Normal View History

2010-08-03 15:24:44 +02:00
#include "potion.hpp"
#include <components/esm/loadalch.hpp>
2010-08-03 17:11:41 +02:00
#include <components/esm_store/cell_store.hpp>
#include "../mwworld/ptr.hpp"
2010-08-03 15:24:44 +02:00
namespace MWClass
{
2010-08-03 17:11:41 +02:00
std::string Potion::getName (const MWWorld::Ptr& ptr) const
{
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
ptr.get<ESM::Potion>();
return ref->base->name;
}
std::string Potion::getScript (const MWWorld::Ptr& ptr) const
{
ESMS::LiveCellRef<ESM::Potion, MWWorld::RefData> *ref =
ptr.get<ESM::Potion>();
return ref->base->script;
}
2010-08-03 15:24:44 +02:00
void Potion::registerSelf()
{
boost::shared_ptr<Class> instance (new Potion);
registerClass (typeid (ESM::Potion).name(), instance);
}
}