#include "armor.hpp" #include #include #include "../mwworld/ptr.hpp" namespace MWClass { std::string Armor::getName (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->name; } bool Armor::hasItemHealth (const MWWorld::Ptr& ptr) const { return true; } int Armor::getItemMaxHealth (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->data.health; } void Armor::registerSelf() { boost::shared_ptr instance (new Armor); registerClass (typeid (ESM::Armor).name(), instance); } }