added getEquipmentSlots function to MWWorld::Class hierarchy

actorid
Marc Zinnschlag 13 years ago
parent 635b7ec6cb
commit 4b73116b9d

@ -127,6 +127,11 @@ namespace MWWorld
return Ogre::Vector3 (0, 0, 0);
}
std::pair<std::vector<int>, bool> Class::getEquipmentSlots (const Ptr& pt) const
{
return std::make_pair (std::vector<int>(), false);
}
const Class& Class::get (const std::string& key)
{
std::map<std::string, boost::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);

@ -3,6 +3,7 @@
#include <map>
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
@ -142,6 +143,12 @@ namespace MWWorld
///< Return desired movement vector (determined based on movement settings,
/// stance and stats).
virtual std::pair<std::vector<int>, bool> getEquipmentSlots (const Ptr& pt) const;
///< \return first: Return IDs of the slot this object can be equipped in; second: can object
/// stay stacked when equipped?
///
/// Default implementation: return (empty vector, false).
static const Class& get (const std::string& key);
///< If there is no class for this \a key, an exception is thrown.

Loading…
Cancel
Save