#include "ingredient.hpp" #include #include #include "../mwworld/ptr.hpp" #include "containerutil.hpp" namespace MWClass { std::string Ingredient::getName (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->name; } void Ingredient::insertIntoContainer (const MWWorld::Ptr& ptr, MWWorld::ContainerStore& containerStore) const { insertIntoContainerStore (ptr, containerStore.ingreds); } std::string Ingredient::getScript (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->script; } void Ingredient::registerSelf() { boost::shared_ptr instance (new Ingredient); registerClass (typeid (ESM::Ingredient).name(), instance); } }