mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
35 lines
793 B
C++
35 lines
793 B
C++
|
|
#include "ingredient.hpp"
|
|
|
|
#include <components/esm/loadingr.hpp>
|
|
|
|
#include <components/esm_store/cell_store.hpp>
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
namespace MWClass
|
|
{
|
|
std::string Ingredient::getName (const MWWorld::Ptr& ptr) const
|
|
{
|
|
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
|
ptr.get<ESM::Ingredient>();
|
|
|
|
return ref->base->name;
|
|
}
|
|
|
|
std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const
|
|
{
|
|
ESMS::LiveCellRef<ESM::Ingredient, MWWorld::RefData> *ref =
|
|
ptr.get<ESM::Ingredient>();
|
|
|
|
return ref->base->script;
|
|
}
|
|
|
|
void Ingredient::registerSelf()
|
|
{
|
|
boost::shared_ptr<Class> instance (new Ingredient);
|
|
|
|
registerClass (typeid (ESM::Ingredient).name(), instance);
|
|
}
|
|
}
|