forked from mirror/openmw-tes3mp
added getEquipmentSlots function to MWWorld::Class hierarchy
This commit is contained in:
parent
635b7ec6cb
commit
4b73116b9d
2 changed files with 12 additions and 0 deletions
|
@ -127,6 +127,11 @@ namespace MWWorld
|
||||||
return Ogre::Vector3 (0, 0, 0);
|
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)
|
const Class& Class::get (const std::string& key)
|
||||||
{
|
{
|
||||||
std::map<std::string, boost::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);
|
std::map<std::string, boost::shared_ptr<Class> >::const_iterator iter = sClasses.find (key);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
@ -142,6 +143,12 @@ namespace MWWorld
|
||||||
///< Return desired movement vector (determined based on movement settings,
|
///< Return desired movement vector (determined based on movement settings,
|
||||||
/// stance and stats).
|
/// 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);
|
static const Class& get (const std::string& key);
|
||||||
///< If there is no class for this \a key, an exception is thrown.
|
///< If there is no class for this \a key, an exception is thrown.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue